:root {
  /* Surfaces */
  --paper:          #FAF7F2;
  --surface:        #FFFFFF;
  --surface-alt:    #F1ECDF;
  --surface-muted:  #F6F1E5;

  /* Ink hierarchy */
  --ink:            #1B1B19;
  --ink-secondary:  #6B6862;
  --ink-tertiary:   #9D9991;

  /* Borders (hairlines) */
  --hairline:       #DED5C0;
  --hairline-soft:  #EEE7D5;

  /* Accent — deep forest green (the only interactive accent) */
  --accent:         #2D5F3F;
  --accent-muted:   #E3ECDF;
  --accent-soft:    #F1F5EE;
  --on-accent:      #FAF7F2;

  /* Highlight — warm honey */
  --highlight:      #F3E5B0;
  --highlight-soft: #FAF1D5;

  /* Semantic */
  --success:        #2D5F3F;
  --warn:           #B8651C;
  --error:          #A8312A;

  /* Gold — Pro upsell ONLY (unused on the marketing site) */
  --gold:           #9A6A10;
  --gold-fill:      #C4861F;
  --on-gold:        #FFFDF5;

  /* Type */
  --font-serif: "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;

  /* Spacing */
  --space-xxs: 2px;  --space-xs: 4px;   --space-s: 8px;
  --space-m: 12px;   --space-l: 16px;   --space-xl: 20px;
  --space-xxl: 24px; --space-xxxl: 32px; --space-huge: 48px;

  /* Radii */
  --radius-xs: 6px;  --radius-s: 10px;  --radius-m: 14px;
  --radius-l: 18px;  --radius-xl: 24px;

  /* Borders */
  --hairline-thin: 0.6px;  --hairline-regular: 1px;  --hairline-bold: 1.4px;

  /* Motion */
  --motion-quick:    180ms ease-out;
  --motion-smooth:   280ms ease-in-out;
  --motion-entrance: 500ms cubic-bezier(0.2, 0.8, 0.2, 1);

  --max: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:          #1A1816;
    --surface:        #242220;
    --surface-alt:    #2C2A28;
    --surface-muted:  #1F1D1B;

    --ink:            #F2EFE8;
    --ink-secondary:  #B5B1A8;
    --ink-tertiary:   #807C75;

    --hairline:       #3A3835;
    --hairline-soft:  #2E2C2A;

    --accent:         #6FB186;
    --accent-muted:   #2C3A30;
    --accent-soft:    #232B25;
    --on-accent:      #111210;

    --highlight:      #4D421F;
    --highlight-soft: #3A3320;

    --success:        #6FB186;
    --warn:           #D79161;
    --error:          #D3736C;

    --gold:           #EFC75E;
    --gold-fill:      #E0A93C;
    --on-gold:        #231A06;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color var(--motion-quick); }
a:hover { color: var(--accent); }
img, svg { max-width: 100%; height: auto; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  background: var(--ink);
  color: var(--on-accent);
  padding: .75rem 1rem;
  border-radius: 999px;
  z-index: 999;
}
.skip-link:focus { left: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: var(--hairline-regular) solid var(--hairline);
}
.nav {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -.01em;
  font-size: 1.3rem;
}
.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-s);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-serif);
  font-weight: 600;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--ink-secondary);
  font-weight: 500;
  font-size: .96rem;
}
.nav-links a { padding: .35rem .15rem; }
.nav-ctas { display: flex; gap: 10px; align-items: center; }

a:focus-visible,
button:focus-visible,
.store-btn:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: var(--hairline-regular) solid var(--hairline);
  border-radius: var(--radius-s);
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform var(--motion-quick), opacity var(--motion-quick);
}
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.btn, .store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border-radius: 999px;
  min-height: 48px;
  padding: 14px 20px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0;
  border: var(--hairline-regular) solid transparent;
  cursor: pointer;
  transition: background var(--motion-quick), border-color var(--motion-quick), opacity var(--motion-quick), transform var(--motion-quick);
}
.btn:active, .store-btn:active { opacity: .85; transform: scale(.98); }

/* Primary — deep ink fill (the #1 action) */
.btn-primary {
  background: var(--ink);
  color: var(--on-accent);
  border-color: transparent;
}
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 88%, var(--paper)); color: var(--on-accent); }

/* Secondary / store buttons — paper-white fill, ink hairline */
.btn-secondary, .store-btn {
  background: var(--surface);
  color: var(--ink);
  border: 1.2px solid var(--ink);
}
.btn-secondary:hover, .store-btn:hover { background: var(--surface-muted); color: var(--ink); }

/* Accent — forest green "go forward" CTA */
.btn-accent { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 88%, black); color: var(--on-accent); }

.store-btn {
  min-width: 168px;
  padding: 10px 18px;
  justify-content: flex-start;
}
.store-btn svg { width: 25px; height: 25px; flex: 0 0 auto; }
.store-text { display: grid; line-height: 1.05; }
.store-kicker { font-size: .68rem; font-weight: 600; color: var(--ink-secondary); }
.store-name { font-size: .95rem; font-weight: 600; }

main { overflow: hidden; }
.section, .hero { max-width: var(--max); margin: 0 auto; padding: 84px 24px; }
.hero {
  padding-top: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 56px;
  align-items: center;
}

/* Eyebrow — signature uppercase tracked label */
.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-l);
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

h1, h2, h3 {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -.01em;
  font-weight: 600;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); max-width: 800px; line-height: 1.05; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
h3 { font-size: 1.25rem; font-weight: 500; }
p { margin: 0 0 18px; color: var(--ink-secondary); }
.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.7vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-secondary);
  max-width: 720px;
}
.hero-actions, .store-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-actions { margin-top: 30px; }
.trust-row {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--ink-secondary);
  font-weight: 500;
}
.trust-pill {
  border: var(--hairline-thin) solid var(--hairline);
  border-radius: 999px;
  padding: 7px 14px;
  background: var(--surface);
  font-size: .9rem;
}

/* Hero phone mockup */
.phone-wrap {
  position: relative;
  min-height: 610px;
  display: grid;
  place-items: center;
}
.glow-card {
  position: absolute;
  inset: 40px 0 auto auto;
  width: 74%;
  height: 360px;
  border-radius: var(--radius-xl);
  background: var(--accent-soft);
  border: var(--hairline-thin) solid var(--hairline-soft);
  transform: rotate(-6deg);
}
.phone {
  position: relative;
  width: min(360px, 88vw);
  border-radius: 46px;
  padding: 12px;
  background: var(--surface);
  border: var(--hairline-bold) solid var(--hairline);
}
.phone-screen {
  min-height: 610px;
  border-radius: 36px;
  overflow: hidden;
  background: var(--paper);
  border: var(--hairline-thin) solid var(--hairline-soft);
  padding: 22px;
}
.phone-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-secondary);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 22px;
}
.lesson-card {
  border-radius: var(--radius-l);
  padding: 20px;
  background: var(--surface);
  border: var(--hairline-thin) solid var(--hairline);
  margin-bottom: 16px;
}
.lesson-card strong { display: block; font-family: var(--font-serif); font-weight: 500; font-size: 1.1rem; margin-bottom: 8px; color: var(--ink); }
.bubble {
  border-radius: var(--radius-l);
  padding: 13px 16px;
  background: var(--accent-soft);
  border: var(--hairline-thin) solid var(--accent-muted);
  margin: 12px 0;
  color: var(--ink);
}
.bubble.alt {
  background: var(--highlight-soft);
  border-color: var(--highlight);
}
.progress {
  margin-top: 18px;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-alt);
  overflow: hidden;
}
.progress span { display: block; width: 68%; height: 100%; background: var(--accent); }
.word-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.word-chip { border-radius: 999px; padding: 9px 12px; background: var(--surface); border: var(--hairline-thin) solid var(--hairline); color: var(--ink); font-weight: 600; text-align: center; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Editorial card — white surface, hairline border, no shadow */
.card {
  border: var(--hairline-thin) solid var(--hairline);
  background: var(--surface);
  border-radius: var(--radius-l);
  padding: 28px;
}
.card p:last-child { margin-bottom: 0; }
.icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-m);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: var(--accent-soft);
  border: var(--hairline-thin) solid var(--accent-muted);
  margin-bottom: 18px;
}
.section-intro { max-width: 790px; margin-bottom: 34px; }
.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.keyword-list span {
  border: var(--hairline-thin) solid var(--hairline);
  color: var(--ink-secondary);
  border-radius: 999px;
  padding: 7px 14px;
  background: var(--surface);
  font-weight: 500;
}
.language-card {
  min-height: 245px;
  position: relative;
  overflow: hidden;
}
.language-card::after {
  content: attr(data-code);
  position: absolute;
  right: 18px;
  bottom: -14px;
  font-family: var(--font-serif);
  font-size: 5rem;
  font-weight: 600;
  letter-spacing: -.04em;
  color: var(--surface-alt);
}
.check-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.check-list li { color: var(--ink-secondary); padding-left: 32px; position: relative; }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 700;
  font-size: .72rem;
  line-height: 1;
}
.cta-panel {
  border-radius: var(--radius-xl);
  padding: clamp(30px, 5vw, 58px);
  background: var(--accent-soft);
  border: var(--hairline-thin) solid var(--accent-muted);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.legal-page .section, .simple-page .section { max-width: 920px; }
.breadcrumb { color: var(--ink-secondary); font-weight: 500; font-size: .9rem; margin-bottom: 22px; }
.legal-content {
  border: var(--hairline-thin) solid var(--hairline);
  background: var(--surface);
  border-radius: var(--radius-l);
  padding: clamp(24px, 4vw, 42px);
}
.legal-content h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-top: 34px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content ul { color: var(--ink-secondary); }
.legal-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.contact-box {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 22px;
}
.form-card form { display: grid; gap: 14px; }
label { color: var(--ink); font-weight: 600; font-size: .9rem; }
input, textarea {
  width: 100%;
  border: var(--hairline-regular) solid var(--hairline);
  border-radius: var(--radius-m);
  background: var(--surface);
  color: var(--ink);
  padding: 13px 16px;
  font: inherit;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }

.site-footer {
  border-top: var(--hairline-regular) solid var(--hairline);
  background: var(--paper);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  color: var(--ink-secondary);
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 500; }
.small { font-size: .9rem; color: var(--ink-secondary); }

@media (max-width: 960px) {
  .nav { flex-wrap: wrap; align-items: center; padding-top: 14px; padding-bottom: 14px; gap: 12px; }
  .nav-toggle { display: flex; }
  .nav-links, .nav-ctas { display: none; flex-basis: 100%; }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-top: 6px;
    border-top: var(--hairline-regular) solid var(--hairline);
  }
  .nav.open .nav-links a { width: 100%; padding: .7rem .2rem; }
  .nav.open .nav-ctas { display: flex; flex-wrap: wrap; }
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .phone-wrap { min-height: auto; }
  .grid-3, .grid-2, .cta-panel, .contact-box, .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .section, .hero { padding-left: 18px; padding-right: 18px; }
  .nav { padding-left: 18px; padding-right: 18px; }
  .store-btn { width: 100%; }
  .hero-actions { align-items: stretch; }
  .btn { width: 100%; }
  .phone-screen { min-height: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Language landing pages */
.lang-hero { padding-bottom: 40px; }
.lang-hero .hero-actions { margin-top: 26px; }
.phrasebook {
  margin-top: 8px;
  border: var(--hairline-thin) solid var(--hairline);
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--surface);
}
.phrase {
  display: grid;
  grid-template-columns: minmax(0,1.05fr) minmax(0,1fr);
  gap: 4px 24px;
  padding: 16px 22px;
  border-top: var(--hairline-thin) solid var(--hairline);
}
.phrase:first-child { border-top: none; }
.phrase .target { font-family: var(--font-serif); font-weight: 500; color: var(--ink); }
.phrase .en { color: var(--ink-secondary); }
.phrase .ctx { grid-column: 1 / -1; font-size: .85rem; color: var(--ink-tertiary); }

.related-card { display: grid; gap: 6px; align-content: start; }
.related-card strong { font-family: var(--font-serif); font-weight: 500; font-size: 1.15rem; color: var(--ink); }
.related-card span { color: var(--ink-secondary); font-weight: 500; }
.related-card:hover { border-color: var(--accent); }

.text-link { color: var(--accent); font-weight: 600; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Pills (brand) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  border: var(--hairline-thin) solid var(--hairline);
  font-weight: 500;
  font-size: .92rem;
}
.pill--filled { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.pill b, .lang-tag {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--accent);
}
.pill--filled b { color: var(--on-accent); }

/* Cognate showcase */
.cognate .eyebrow { margin-bottom: 6px; }
.cognate h3 { margin-bottom: 4px; }
.cognate-langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Glossed (cognate) words — warm honey highlight */
.gloss {
  border-radius: 3px;
  padding: 0 3px;
  background: var(--highlight-soft);
  box-shadow: inset 0 -2px 0 var(--highlight);
}

/* Numbered step marker */
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-muted);
  color: var(--accent);
  border: var(--hairline-thin) solid var(--accent-muted);
  font-family: var(--font-serif);
  font-weight: 600;
  margin-bottom: 16px;
}

@media (max-width: 560px) {
  .phrase { grid-template-columns: 1fr; gap: 2px; }
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding: 18px 22px;
  background: var(--surface);
  border: var(--hairline-bold) solid var(--hairline);
  border-radius: var(--radius-l);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__text { margin: 0; flex: 1 1 280px; font-size: .9rem; color: var(--ink-secondary); }
.cookie-banner__text a { color: var(--accent); font-weight: 600; }
.cookie-banner__actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cookie-btn { min-height: 42px; padding: 10px 18px; font-size: .9rem; }
.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 500;
  color: inherit;
  cursor: pointer;
}
.footer-link-btn:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 560px) {
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-banner__actions { justify-content: stretch; }
  .cookie-btn { flex: 1; }
}

/* ---- Blog ---- */
.post { max-width: 768px; margin-inline: auto; }
.post-head h1 { margin-bottom: 8px; }
.post-meta { color: var(--ink-secondary); font-size: .9rem; margin: 0; }
.post-body { font-size: 1.06rem; line-height: 1.7; color: var(--ink); }
.post-body > h2 { margin: 40px 0 14px; }
.post-body > h3 { margin: 28px 0 10px; }
.post-body p { margin: 0 0 16px; }
.post-body ul { margin: 0 0 18px 1.1em; }
.post-body li { margin-bottom: 6px; }
.post-body a { color: var(--accent); font-weight: 500; }
.post-body strong { color: var(--ink); }
.cognate-table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 1rem; }
.cognate-table th, .cognate-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--hairline-soft); }
.cognate-table thead th { color: var(--ink-secondary); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.cognate-table tbody td:last-child { color: var(--accent); font-weight: 600; }
.cognate-table tbody tr:last-child td { border-bottom: 0; }
.post-related { font-weight: 500; margin: 28px 0 0; }
.post-cta { margin-top: 44px; }
.blog-grid { margin-top: 8px; }
.post-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.post-card h2 { font-size: 1.22rem; margin: 0; }
.post-card p { color: var(--ink-secondary); margin: 0; }
.post-card-meta { color: var(--ink-tertiary); font-size: .85rem; margin-top: 6px; }

/* Phrasebook tables (phrase in the target language emphasised) */
.phrase-table td:first-child { color: var(--accent); font-weight: 600; }
.phrase-table td:last-child { color: var(--ink); font-weight: 400; }

/* "Keep reading" cross-links */
.post-readmore { margin: 40px 0 0; padding-top: 22px; border-top: 1px solid var(--hairline-soft); }
.post-readmore h2 { font-size: 1.1rem; margin: 0 0 12px; }
.post-readmore ul { margin: 0; padding-left: 1.1em; }
.post-readmore li { margin-bottom: 6px; }
.post-readmore a { color: var(--accent); font-weight: 500; }
