:root {
  color-scheme: light;
  --paper: #faf7f2;
  --surface: #ffffff;
  --ink: #1f2421;
  --ink-soft: #3a4641;
  --muted: #6b736e;
  --faint: #9aa39d;
  --sage: #3f6b58;
  --sage-soft: #5b8c7b;
  --sage-tint: #eaf1ec;
  --line: rgba(31, 36, 33, 0.10);
  --font-sans: "Inter", system-ui, sans-serif;
  --font-display: "Fraunces", "Inter", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 72rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); margin: 0; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }

::selection { background: var(--sage-tint); color: var(--sage); }
a { color: inherit; text-decoration: none; }
/* The hidden attribute must always win over component display rules (e.g. the
   success panel is display:flex but starts hidden until JS reveals it). */
[hidden] { display: none !important; }

/* ---- Utilities ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.5rem; }
.rule { height: 1px; background: linear-gradient(to right, transparent, var(--line), transparent); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 0 1px 2px rgba(31,36,33,0.03), 0 18px 40px -28px rgba(31,36,33,0.18);
}
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-radius: 9999px; background: var(--sage-tint); color: var(--sage);
  padding: 0.4rem 0.85rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.01em;
}
.focus-ring { outline: none; }
.focus-ring:focus-visible { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--sage-soft); border-radius: 0.5rem; }

/* ---- Buttons ---- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  white-space: nowrap; border-radius: 0.75rem; font-weight: 600; font-family: var(--font-sans);
  cursor: pointer; border: 1px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--sm { height: 2.3rem; padding-inline: 0.9rem; font-size: 0.875rem; }
.btn--lg { height: 3.1rem; padding-inline: 1.6rem; font-size: 1rem; }
.btn--primary { background: var(--sage); color: #fff; box-shadow: 0 10px 24px -12px rgba(63,107,88,0.7); }
.btn--primary:hover { background: #365e4d; transform: translateY(-1px); box-shadow: 0 16px 30px -14px rgba(63,107,88,0.75); }
.btn--soft { background: var(--sage-tint); color: var(--sage); }
.btn--soft:hover { background: #dfeae2; }
.btn--ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--sage-soft); color: var(--sage); }

/* ---- Header ---- */
.site-header {
  position: relative; z-index: 10; margin-inline: auto; max-width: var(--maxw);
  height: 4.5rem; display: flex; align-items: center; justify-content: space-between; padding-inline: 1.5rem;
}
.logo { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.logo-mark { display: grid; place-items: center; height: 2rem; width: 2rem; border-radius: 0.6rem; background: var(--sage-tint); color: var(--sage); }
.logo-word { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
.site-nav { display: flex; align-items: center; gap: 0.4rem; }
.nav-link { display: none; border-radius: 0.5rem; padding: 0.5rem 0.8rem; font-size: 0.9rem; color: var(--ink-soft); transition: color .2s var(--ease); }
.nav-link:hover { color: var(--sage); }
@media (min-width: 768px) { .nav-link { display: block; } }

/* ---- Footer ---- */
.site-footer { position: relative; z-index: 10; margin-inline: auto; max-width: var(--maxw); padding: 1rem 1.5rem 2.5rem; }
.site-footer .rule { margin-bottom: 1.5rem; }
.footer-row { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.footer-link { font-weight: 600; color: var(--ink-soft); transition: color .2s var(--ease); }
.footer-link:hover { color: var(--sage); text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 640px) { .footer-row { flex-direction: row; align-items: center; justify-content: space-between; } }

/* ---- Scroll-reveal (replaces JS animation libraries) ---- */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: calc(100dvh - 4.5rem); padding: 4rem 1.5rem;
}
.word-field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-veil { position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at center, rgba(250,247,242,0) 30%, rgba(250,247,242,0.72) 72%); }
.hero-content { position: relative; z-index: 2; max-width: 46rem; display: flex; flex-direction: column; align-items: center; }
.hero-title { margin-top: 1.5rem; font-size: 2.75rem; font-weight: 600; letter-spacing: -0.02em; }
.hero-accent { color: var(--sage); font-style: italic; position: relative; }
.hero-sub { margin-top: 1.5rem; max-width: 34rem; font-size: 1.15rem; line-height: 1.7; color: var(--muted); text-wrap: pretty; }
.hero-cta { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.scroll-cue { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 2; padding: 0.5rem; color: var(--faint); transition: color .2s var(--ease); }
.scroll-cue:hover { color: var(--sage); }
.scroll-cue svg { animation: bob 6s var(--ease) infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@media (min-width: 640px) { .hero-title { font-size: 3.75rem; } .hero-sub { font-size: 1.25rem; } }
@media (min-width: 768px) { .hero-title { font-size: 4.5rem; } }

/* ---- Shared section scaffolding ---- */
.section { width: 100%; max-width: var(--maxw); margin-inline: auto; padding: 3.5rem 1.5rem; }
@media (min-width: 768px) { .section { padding: 5rem 1.5rem; } }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage); margin-bottom: 0.9rem; }
.section-head { max-width: 40rem; }
.section-title { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; }
.section-lead { margin-top: 1rem; font-size: 1.1rem; line-height: 1.7; color: var(--muted); text-wrap: pretty; }
@media (min-width: 768px) { .section-title { font-size: 2.6rem; } }

/* ---- How it works ---- */
.steps { position: relative; margin-top: 3rem; }
.steps-connector { display: none; }
@media (min-width: 768px) {
  .steps-connector { display: block; position: absolute; left: 2rem; right: 2rem; top: 1.6rem; height: 1px; background: linear-gradient(to right, transparent, var(--line), transparent); }
}
.steps-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 768px) { .steps-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.step { position: relative; }
.step-num { display: grid; place-items: center; height: 3.25rem; width: 3.25rem; border-radius: 9999px; background: var(--sage-tint); color: var(--sage); font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; border: 1px solid var(--line); }
.step-title { margin-top: 1.4rem; font-size: 1.2rem; font-weight: 600; }
.step-body { margin-top: 0.65rem; font-size: 1rem; line-height: 1.7; color: var(--muted); }

/* ---- Features ---- */
.feature-grid { margin-top: 3rem; display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: 1.75rem; }
.feature-icon { display: grid; place-items: center; height: 2.75rem; width: 2.75rem; border-radius: 0.8rem; background: var(--sage-tint); color: var(--sage); }
.feature-title { margin-top: 1.1rem; font-size: 1.15rem; font-weight: 600; }
.feature-body { margin-top: 0.55rem; font-size: 0.98rem; line-height: 1.65; color: var(--muted); }

/* ---- Platforms ---- */
.platform-grid { margin-top: 3rem; display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 900px) { .platform-grid { grid-template-columns: 1fr 1fr; } }
.platform { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.platform-visual { display: grid; place-items: center; padding: 2.5rem 1.5rem; background: linear-gradient(160deg, var(--sage-tint), #f3efe8); border-bottom: 1px solid var(--line); }

/* Desktop ambient card mockup */
.ambient-card { width: min(20rem, 80%); background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1.1rem 1.25rem 1.25rem; box-shadow: 0 20px 45px -25px rgba(31,36,33,0.35); }
.ambient-top { display: flex; gap: 0.4rem; margin-bottom: 1rem; }
.ambient-dot { height: 0.55rem; width: 0.55rem; border-radius: 9999px; background: var(--line); }
.ambient-word { margin: 0; font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--ink); }
.ambient-trans { margin: 0.25rem 0 0; font-size: 1rem; color: var(--sage); }
.ambient-bar { margin-top: 1.1rem; height: 4px; border-radius: 9999px; background: var(--sage-tint); overflow: hidden; }
.ambient-bar span { display: block; height: 100%; width: 62%; background: var(--sage-soft); border-radius: 9999px; }

/* Phone mockup */
.phone { width: 11rem; border-radius: 1.6rem; background: var(--ink); padding: 0.55rem; box-shadow: 0 24px 50px -22px rgba(31,36,33,0.5); position: relative; }
.phone-notch { position: absolute; top: 0.55rem; left: 50%; transform: translateX(-50%); width: 3.5rem; height: 0.5rem; border-radius: 9999px; background: rgba(255,255,255,0.18); }
.phone-screen { background: var(--paper); border-radius: 1.2rem; padding: 1.6rem 1rem 1.1rem; min-height: 17rem; display: flex; flex-direction: column; align-items: center; }
.phone-label { margin: 0 0 1rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; color: var(--faint); }
.flashcard { flex: 1; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; padding: 1rem; box-shadow: 0 10px 24px -16px rgba(31,36,33,0.3); }
.flashcard-word { margin: 0; font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--ink); }
.flashcard-line { width: 2rem; height: 2px; border-radius: 2px; background: var(--sage-tint); }
.flashcard-trans { margin: 0; font-size: 1rem; color: var(--sage); }
.phone-hint { margin: 1rem 0 0; font-size: 0.72rem; color: var(--faint); }

/* Platform meta */
.platform-meta { padding: 1.75rem; }
.platform-title { font-size: 1.4rem; font-weight: 600; }
.platform-os { margin: 0.35rem 0 0; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; color: var(--sage); }
.platform-body { margin: 0.9rem 0 0; font-size: 1rem; line-height: 1.65; color: var(--muted); }
.platform-cta { margin-top: 1.5rem; display: flex; align-items: center; gap: 1.1rem; }
.platform-link { font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); transition: color .2s var(--ease); }
.platform-link:hover { color: var(--sage); }

/* ---- Languages ---- */
.lang-wrap { margin-top: 2.5rem; }
.lang-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.lang-chip { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 0.85rem; padding: 0.7rem 1.15rem; box-shadow: 0 1px 2px rgba(31,36,33,0.03); }
.level-row { margin-top: 1.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.level-label { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-right: 0.4rem; }

/* ---- Early access ---- */
.ea-card { padding: 0; background: linear-gradient(165deg, var(--sage-tint), var(--surface) 60%); }
.ea-inner { max-width: 34rem; margin-inline: auto; text-align: center; padding: 3rem 1.5rem; }
.ea-form { margin: 2rem auto 0; max-width: 28rem; display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.ea-fields { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 560px) { .ea-fields { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field-label { font-size: 0.875rem; font-weight: 600; color: var(--ink-soft); }
.field-input { height: 2.85rem; width: 100%; border-radius: 0.75rem; border: 1px solid var(--line); background: var(--surface); padding-inline: 0.9rem; color: var(--ink); font-size: 1rem; font-family: var(--font-sans); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.field-input::placeholder { color: var(--faint); }
.field-input:focus-visible { border-color: var(--sage-soft); box-shadow: 0 0 0 3px rgba(91,140,123,0.18); outline: none; }
.field-input.is-invalid { border-color: #c0584f; }
.field-error { min-height: 1rem; margin: 0; font-size: 0.85rem; color: #c0584f; }
.ea-fineprint { margin: 0; text-align: center; font-size: 0.78rem; color: var(--faint); }
.ea-success { margin: 2rem auto 0; max-width: 28rem; display: flex; align-items: flex-start; gap: 0.7rem; border-radius: 1rem; border: 1px solid var(--sage-soft); background: rgba(91,140,123,0.10); padding: 1.1rem; text-align: left; }
.ea-success svg { flex: 0 0 auto; margin-top: 0.1rem; color: var(--sage); }
.ea-success p { margin: 0; font-size: 0.98rem; line-height: 1.6; color: var(--ink-soft); }
.ea-repos { margin-top: 1.75rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.55rem; font-size: 0.9rem; color: var(--muted); }
/* Honeypot: present in the DOM for bots, off-screen for humans (not display:none). */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---- Download (Coming soon) ---- */
.download-band { max-width: 40rem; margin-inline: auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.download-band .section-title { margin-top: 1rem; }
.store-badges { margin-top: 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.store-badge {
  position: relative; display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 1.15rem; border-radius: 0.9rem; background: var(--ink); color: #fff;
  cursor: default; opacity: 0.92; box-shadow: 0 12px 28px -18px rgba(31,36,33,0.6);
}
.store-badge-logo { flex: 0 0 auto; color: #fff; }
.store-badge-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-badge-text small { font-size: 0.62rem; letter-spacing: 0.02em; opacity: 0.8; }
.store-badge-text strong { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.store-badge-soon { margin-left: 0.4rem; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--paper); background: var(--sage); border-radius: 9999px; padding: 0.18rem 0.45rem; }
.download-cta { margin-top: 1.75rem; font-size: 0.95rem; font-weight: 600; color: var(--sage); transition: color .2s var(--ease); }
.download-cta:hover { color: #2e5142; text-decoration: underline; text-underline-offset: 4px; }
