/* LEXIO — marketing landing page
   Visual contract: docs/DESIGN_SYSTEM.md. Tokens mirror app/src/index.css.
   Legal hard lines (ANDROID_HANDOFF §2): tile states are ONLY teal/gold/slate;
   never NYT green/yellow/grey. No "Wordle"/"-dle"/"Word-" anywhere. */

/* ---------- Self-hosted fonts (never CDN — bundled, per design system) ---------- */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/fredoka-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/fredoka-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/nunito-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/nunito-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/nunito-latin-700-normal.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --tile-correct: #0E7C7B;
  --tile-present: #E0A458;
  --tile-absent: #5C6672;
  --accent: #0E7C7B;
  --accent-deep: #0a5c5b;
  --gold: #E0A458;
  --gold-deep: #b97f35;
  --gold-text: #7f5a1c; /* LEX-112: gold as TEXT, AA on ivory (5.32:1) */
  --bg: #f2ede1;
  --ink: #2b2620;
  --fg: #2b2620;
  --muted: #6b6153;
  --neo-dark: rgba(172, 156, 122, 0.42);
  --neo-light: rgba(255, 255, 255, 0.95);
  --zone-top: linear-gradient(180deg, #ede5d2, #f0e9d8);
  --zone-bottom: linear-gradient(180deg, #eee7d5, #e9e0cb);

  --round: 'Fredoka', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;

  --maxw: 1080px;
  --radius: 22px;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--fg);
  background: var(--bg);
  /* Warm radial "stage" light, like the app's board area. */
  background-image:
    radial-gradient(120% 80% at 50% -10%, #f7f2e7 0%, var(--bg) 55%),
    radial-gradient(80% 60% at 100% 100%, #efe7d4 0%, rgba(239, 231, 212, 0) 60%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@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;
  }
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-deep); }

h1, h2, h3 { line-height: 1.15; margin: 0; }

.wrap {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--round);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold-text);
}

.serif { font-family: var(--serif); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ---------- Neumorphic surface ---------- */
.neo {
  background: var(--zone-top);
  border-radius: var(--radius);
  box-shadow:
    6px 6px 16px var(--neo-dark),
    -6px -6px 16px var(--neo-light);
}
.neo-inset {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow:
    inset 5px 5px 12px var(--neo-dark),
    inset -5px -5px 12px var(--neo-light);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0 1.6rem;
  border-radius: 999px;
  font-family: var(--round);
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  will-change: transform;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible {
  outline: 3px solid var(--accent-deep);
  outline-offset: 3px;
}

.btn-primary {
  color: #fff8ea;
  background:
    radial-gradient(120% 140% at 30% 20%, #14908e 0%, var(--accent) 45%, var(--accent-deep) 100%);
  box-shadow:
    0 10px 22px rgba(14, 124, 123, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 0 0 1px rgba(224, 164, 88, 0.45);
}
.btn-primary:hover { filter: brightness(1.05); }

.btn-secondary {
  color: var(--accent-deep);
  background: var(--zone-top);
  box-shadow:
    5px 5px 12px var(--neo-dark),
    -5px -5px 12px var(--neo-light);
}
.btn-secondary:hover { filter: brightness(1.02); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(242, 237, 225, 0.78);
  border-bottom: 1px solid rgba(172, 156, 122, 0.22);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  width: 40px; height: 40px;
  border-radius: 12px;
  box-shadow: 3px 3px 8px var(--neo-dark), -3px -3px 8px var(--neo-light);
}
.brand .wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
}
.site-header .btn { min-height: 44px; padding-inline: 1.2rem; font-size: 0.95rem; }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 4rem);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.hero-copy .eyebrow { display: block; margin-bottom: 0.9rem; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 5.5rem);
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.hero .lede {
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  color: var(--ink);
  font-weight: 600;
  max-width: 30ch;
  margin-bottom: 0.6rem;
}
.hero .sub {
  color: var(--muted);
  max-width: 42ch;
  margin-bottom: 1.6rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}
.cta-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cta-note svg { flex: none; }
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.95rem;
}
.store-badges a { display: inline-flex; border-radius: 9px; transition: transform 0.15s ease, opacity 0.15s ease; }
.store-badges a:hover { transform: translateY(-1px); opacity: 0.92; }
.store-badges img { display: block; width: auto; }
.store-badges .badge-apple img { height: 44px; }
.store-badges .badge-google img { height: 62px; margin: -9px 0; }

/* Hero visual: dove + board mockup */
.hero-visual {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1.2rem;
}
.hero-dove {
  width: clamp(120px, 22vw, 190px);
  filter: drop-shadow(0 12px 18px rgba(172, 156, 122, 0.35));
}

/* ---------- Tile mockups ---------- */
.tiles {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
  justify-content: center;
}
.tiles.lg { gap: 10px; }
.tile {
  width: 3.4rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-family: var(--round);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--ink);
  background: var(--zone-top);
  box-shadow:
    5px 5px 12px var(--neo-dark),
    -5px -5px 12px var(--neo-light);
}
.tiles.sm .tile { width: 2.5rem; font-size: 1.2rem; border-radius: 12px; }

.tile[data-state] {
  color: #fdf9ef;
  box-shadow:
    inset 0 0 0 2px rgba(253, 249, 239, 0.24),
    0 8px 18px rgba(0, 0, 0, 0.12);
}
.tile[data-state="correct"] {
  background: radial-gradient(120% 120% at 30% 20%, #15918f, var(--tile-correct));
  box-shadow:
    inset 0 0 0 2px rgba(253, 249, 239, 0.24),
    0 12px 26px rgba(14, 124, 123, 0.24);
}
.tile[data-state="present"] {
  background: radial-gradient(120% 120% at 30% 20%, #e7b268, var(--tile-present));
  box-shadow:
    inset 0 0 0 2px rgba(253, 249, 239, 0.24),
    0 12px 26px rgba(224, 164, 88, 0.24);
}
.tile[data-state="absent"] {
  background: radial-gradient(120% 120% at 30% 20%, #667180, var(--tile-absent));
  opacity: 0.92;
}

/* ---------- Sections ---------- */
section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-head {
  text-align: center;
  max-width: 46ch;
  margin-inline: auto;
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}
.section-head .eyebrow { display: block; margin-bottom: 0.7rem; }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
  color: var(--ink);
  margin-bottom: 0.7rem;
}
.section-head p { color: var(--muted); margin: 0; }

.flourish {
  display: block;
  width: min(340px, 70vw);
  margin: 0 auto;
  opacity: 0.85;
}

/* How it plays */
.legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 1.8rem);
}
.legend .card { padding: 1.6rem 1.4rem; text-align: center; }
.legend .tile { margin: 0 auto 1rem; }
.legend h3 {
  font-family: var(--round);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
}
.legend p { color: var(--muted); margin: 0; font-size: 0.98rem; }
.play-summary {
  text-align: center;
  margin-top: 2rem;
  font-family: var(--round);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--accent-deep);
}

/* Scripture reveal */
.reveal {
  background: var(--zone-bottom);
}
.reveal-card {
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(1.8rem, 4vw, 2.8rem);
  text-align: center;
  border-radius: 26px;
  background: var(--bg);
  box-shadow:
    8px 8px 22px var(--neo-dark),
    -8px -8px 22px var(--neo-light),
    inset 0 0 0 1.5px rgba(224, 164, 88, 0.4);
}
.reveal-card .reveal-dove {
  width: 88px;
  margin: 0 auto 0.4rem;
  filter: drop-shadow(0 8px 12px rgba(172, 156, 122, 0.3));
}
.reveal-card .solved {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 2.8rem);
  letter-spacing: 0.14em;
  color: var(--accent-deep);
  margin-bottom: 0.2rem;
}
.reveal-card .ref {
  font-family: var(--round);
  font-weight: 600;
  color: var(--gold-text);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}
.reveal-card .verse {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink);
  max-width: 34ch;
  margin: 0 auto 1rem;
}
.reveal-card .note {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 0.8rem;
}
.reveal-card .attribution {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}
.reveal-card .translations {
  display: inline-flex;
  gap: 0.4rem;
  margin-top: 1.1rem;
}
.reveal-card .translations span {
  font-family: var(--round);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  color: var(--accent-deep);
  background: var(--zone-top);
  box-shadow: inset 2px 2px 5px var(--neo-dark), inset -2px -2px 5px var(--neo-light);
}
.reveal-card .translations span[aria-current="true"] {
  color: #fdf9ef;
  background: var(--accent);
  box-shadow: none;
}

/* Two modes */
.modes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 3vw, 1.8rem);
}
.mode-card { padding: clamp(1.6rem, 3.5vw, 2.2rem); }
.mode-card h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.mode-card .tag {
  display: inline-block;
  font-family: var(--round);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 0.7rem;
}
.mode-card p { color: var(--muted); margin: 0; }

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 1.6rem);
}
.feature { padding: 1.5rem 1.4rem; }
.feature .ficon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px;
  margin-bottom: 0.9rem;
  color: var(--accent-deep);
  background: var(--zone-top);
  box-shadow: 3px 3px 8px var(--neo-dark), -3px -3px 8px var(--neo-light);
}
.feature h3 {
  font-family: var(--round);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.feature p { color: var(--muted); margin: 0; font-size: 0.96rem; }

/* Final CTA */
.cta-band { text-align: center; }
.cta-band .neo {
  padding: clamp(2rem, 5vw, 3.2rem);
  background: var(--zone-top);
}
.cta-band h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.cta-band p { color: var(--muted); margin: 0 0 1.6rem; }

/* Support / donation (web only) — gentle, gold-accented, below the final CTA. */
.support { text-align: center; }
.support .support-card {
  padding: clamp(2rem, 5vw, 3rem);
  background: var(--zone-bottom);
  max-width: 680px;
  margin-inline: auto;
}
.support h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--ink);
  margin: 0.4rem 0 0.7rem;
}
.support p { color: var(--muted); margin: 0 auto 1.4rem; max-width: 52ch; }
.support .cta-note { margin-top: 1rem; }

/* Gold button — warm, distinct from the teal Play CTA; dark ink text for AA. */
.btn-gold {
  color: #3a2a0f;
  background:
    radial-gradient(120% 140% at 30% 20%, #eab766 0%, var(--gold) 45%, var(--gold-deep) 100%);
  box-shadow:
    0 10px 22px rgba(185, 127, 53, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-gold:hover { filter: brightness(1.04); }

/* Footer */
.site-footer {
  padding-block: 2.4rem 3rem;
  border-top: 1px solid rgba(172, 156, 122, 0.22);
  margin-top: 1rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer .brand .wordmark { font-size: 1.25rem; }
.site-footer .meta { color: var(--muted); font-size: 0.9rem; text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .lede, .hero .sub { margin-inline: auto; }
  .hero-copy .eyebrow { }
  .cta-row, .cta-note, .store-badges { justify-content: center; }
  .hero-visual { order: -1; }
  .legend { grid-template-columns: 1fr; max-width: 360px; margin-inline: auto; }
  .modes { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .brand .wordmark { font-size: 1.3rem; }
  .tile { width: 2.9rem; font-size: 1.35rem; }
  .site-footer .wrap { flex-direction: column; text-align: center; }
  .site-footer .meta { text-align: center; }
}
