:root {
  color-scheme: light dark;
  --canvas: #faf8f2;
  --panel: #ffffff;
  --ink: #40332b;
  --muted: #665d56;
  --accent: #317b5b;
  --line: #e6e1d8;
  --focus: #8d4f23;
  --shadow: 0 12px 34px rgb(64 51 43 / 7%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #18211d;
    --panel: #28332f;
    --ink: #eeefeb;
    --muted: #b7c0ba;
    --accent: #92d0ae;
    --line: #43504a;
    --focus: #f0ba80;
    --shadow: 0 12px 34px rgb(0 0 0 / 18%);
  }
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}

a:hover { text-decoration-thickness: 0.13em; }

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 3px;
}

::selection { background: #d9eadf; color: #24372c; }
body { caret-color: var(--accent); }
::-webkit-scrollbar { width: 0.75rem; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 42%, var(--canvas)); border: 3px solid var(--canvas); border-radius: 99px; }
::-webkit-scrollbar-track { background: var(--canvas); }

.skip-link {
  position: absolute;
  z-index: 2;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  transform: translateY(-180%);
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}

.header-inner {
  width: min(100% - 2rem, 72rem);
  min-height: 6rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { display: block; width: min(12rem, 38vw); height: auto; }

.language-nav,
.page-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.language-nav a,
.page-nav a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  text-decoration: none;
}

.language-nav a[aria-current="page"],
.page-nav a[aria-current="page"] {
  background: var(--panel);
  color: var(--accent);
  box-shadow: var(--shadow);
  font-weight: 650;
}

.page-shell {
  width: min(100% - 2rem, 72rem);
  margin: 2rem auto 4rem;
}

.marketing-hero {
  min-height: 34rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.55fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
  padding: clamp(1.5rem, 6vw, 5rem) clamp(0.5rem, 4vw, 3rem);
}

.hero-copy { max-width: 40rem; }
.hero-copy h1 { max-width: 11ch; font-size: clamp(2.7rem, 6.2vw, 5.4rem); }
.hero-summary { max-width: 36rem; color: var(--muted); font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.action-primary, .action-secondary { min-height: 3rem; display: inline-flex; align-items: center; justify-content: center; padding: 0.7rem 1.1rem; border-radius: 10px; font-weight: 650; text-decoration: none; }
.action-primary { background: var(--accent); color: #fff; }
.action-secondary { border: 1px solid var(--line); color: var(--ink); }
.action-primary:hover, .action-secondary:hover { filter: brightness(0.96); text-decoration: underline; }
.app-preview { display: block; width: min(100%, 24rem); max-height: 42rem; justify-self: center; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 28px; background: var(--panel); box-shadow: var(--shadow); }
.feature-section { padding: clamp(2rem, 5vw, 4rem) clamp(0.5rem, 4vw, 3rem); border-top: 1px solid var(--line); }
.feature-section > h2 { margin-bottom: 2.25rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
.feature-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 4vw, 3rem); }
.feature-item { padding-top: 1rem; border-top: 2px solid var(--accent); }
.feature-item h3 { margin: 0 0 0.6rem; font-size: 1.2rem; }
.feature-item p { max-width: 38ch; margin: 0; color: var(--muted); }

.page-nav {
  width: fit-content;
  margin: 0 auto 2.5rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 68%, transparent);
}

.article {
  width: min(100%, 70ch);
  margin-inline: auto;
  padding: clamp(1.4rem, 4vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

h1, h2, p, ul { margin-top: 0; }

h1 {
  margin-bottom: 0.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.updated {
  margin-bottom: 2.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.intro {
  margin-bottom: 2rem;
  font-size: 1.12rem;
}

.article-section { margin-top: 2.3rem; }
.article-section:first-of-type { margin-top: 0; }

h2 {
  margin-bottom: 0.75rem;
  font-size: 1.22rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.article-section p { margin-bottom: 0.9rem; }
.article-section p:last-child { margin-bottom: 0; }
.article-section ul { padding-left: 1.25rem; }
.article-section li { padding-left: 0.25rem; margin-block: 0.45rem; }
.contact-line { margin: 2rem 0 0; font-size: 1.05rem; font-weight: 650; }
.contact-link { overflow-wrap: anywhere; }

.site-footer {
  width: min(100%, 70ch);
  margin: 1.5rem auto 0;
  padding: 0.5rem 0.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 620px) {
  .header-inner {
    min-height: 0;
    padding-block: 1rem;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }
  .language-nav { gap: 0.1rem; }
  .language-nav a { min-height: 2.5rem; padding-inline: 0.55rem; }
  .page-shell { margin-top: 1.25rem; }
  .page-nav { margin-bottom: 1.25rem; }
  .article { padding: 1.25rem; }
  .site-footer { flex-direction: column; }
  .marketing-hero { min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding: 2rem 0.25rem; }
  .hero-copy h1 { max-width: 12ch; font-size: clamp(2.6rem, 13vw, 4rem); }
  .app-preview { width: min(72%, 20rem); max-height: none; }
  .feature-list { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .feature-item p { max-width: 65ch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
