/* Vocab Quest — landing-page styles
 *
 * Inherits the cream/gold palette and Charter serif from src/styles.css so the
 * landing page and the eventual product feel like one thing. Hand-rolled — no
 * framework, no build step. Mobile-first; max content width 720px.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:        #6b5218;
  --gold-dim:    #8a6d2e;
  --gold-faint:  rgba(100, 70, 20, 0.08);
  --gold-strong: #4a3810;
  --bg:          #f8f5ef;
  --card-bg:     #ffffff;
  --text:        #2c2218;
  --text-dim:    #5a4d3a;
  --border:      rgba(100, 70, 20, 0.18);
  --border-soft: rgba(100, 70, 20, 0.10);
  --accent:      #b8841f;
  --accent-bg:   rgba(184, 132, 31, 0.08);
  --shadow-sm:   0 1px 2px rgba(60, 40, 10, 0.04);
  --shadow-md:   0 4px 16px rgba(60, 40, 10, 0.06);
  --max-w:       720px;
  --max-w-wide:  920px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 15% 8%, rgba(180, 140, 80, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 92%, rgba(140, 100, 40, 0.05) 0%, transparent 55%);
  color: var(--text);
  font-family: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, 'Iowan Old Style', Palatino, Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { display: block; }

/* ─── Header ────────────────────────────────────────────────────────── */
.site-header {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--gold-strong);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand-mark {
  font-size: 18px;
  color: var(--accent);
}
.brand-name { font-size: 18px; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-nav a {
  color: var(--gold-dim);
  text-decoration: none;
  font-size: 15px;
}
.site-nav a:hover { color: var(--gold-strong); }
.site-nav .nav-login {
  color: var(--gold-strong);
  font-weight: 500;
}
.site-nav .nav-login:hover { color: var(--gold); }
.site-nav .nav-cta {
  padding: 7px 14px;
  border-radius: 6px;
  background: var(--gold-strong);
  color: var(--bg);
  font-weight: 500;
}
.site-nav .nav-cta:hover { background: var(--gold); color: var(--bg); }
@media (max-width: 540px) {
  /* On phones: keep only the login + primary CTA in the header to save room. */
  .site-nav a:not(.nav-cta):not(.nav-login) { display: none; }
}

/* ─── Section scaffolding ───────────────────────────────────────────── */
.section, .hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 24px;
}
.section h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--gold-strong);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  line-height: 1.25;
}
.section p { margin-bottom: 14px; }
.section p:last-child { margin-bottom: 0; }
.section .section-lede {
  font-size: 17px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

/* ─── Hero ──────────────────────────────────────────────────────────── */
.hero { padding: 40px 24px 48px; text-align: left; }
.hero .eyebrow {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 500;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--gold-strong);
  margin-bottom: 18px;
  max-width: 18ch;
}
.hero .lede {
  font-size: 19px;
  color: var(--text-dim);
  max-width: 56ch;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ─── Signup form ───────────────────────────────────────────────────── */
.signup-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 520px;
  margin-bottom: 12px;
}
.signup-form input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  font: inherit;
  font-size: 16px;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}
.signup-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.signup-form input[type="email"]::placeholder { color: rgba(100, 70, 20, 0.4); }
.signup-form button {
  padding: 12px 22px;
  border: none;
  border-radius: 6px;
  background: var(--gold-strong);
  color: var(--bg);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.signup-form button:hover:not([disabled]) { background: var(--gold); }
.signup-form button:active:not([disabled]) { transform: translateY(1px); }
.signup-form button[disabled] { opacity: 0.55; cursor: progress; }

.signup-trust {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 56ch;
  margin-top: 4px;
}
.signup-trust strong { color: var(--gold-strong); }
.signup-status {
  margin-top: 8px;
  font-size: 14px;
  min-height: 1.4em;
}
.signup-status.is-success { color: #1a7a1a; }
.signup-status.is-error   { color: #b83030; }

/* ─── Hero CTA button + repeat-CTA button ──────────────────────────── */
.hero-cta-line { margin-bottom: 8px; }
.cta-row { margin: 0; }
.cta-btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 6px;
  background: var(--gold-strong);
  color: var(--bg);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.cta-btn:hover { background: var(--gold); }
.cta-btn:active { transform: translateY(1px); }
.section-cta .cta-btn-primary {
  background: var(--bg);
  color: var(--gold-strong);
}
.section-cta .cta-btn-primary:hover { background: #fff; }

/* ─── Self-id strip — "this is for you if…" ────────────────────────── */
.section-self-id {
  border-top: 1px solid var(--border-soft);
  padding-top: 48px;
  padding-bottom: 48px;
}
.section-self-id h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--gold-strong);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.self-id-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.self-id-list li {
  position: relative;
  padding: 14px 18px 14px 44px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.55;
  box-shadow: var(--shadow-sm);
}
.self-id-list li::before {
  content: '✓';
  position: absolute;
  left: 16px;
  top: 14px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
}
.self-id-list strong { color: var(--text); font-weight: 600; }

/* ─── Demo card — "what your kid actually does" ─────────────────────── */
.section-demo {
  background: var(--gold-faint);
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  padding-top: 56px;
  padding-bottom: 56px;
}
.section-demo > * {
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}
.demo-figure {
  margin: 0 auto 18px;
  max-width: 620px;
}
.demo-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 36px rgba(60, 40, 10, 0.10);
  background: var(--card-bg);
}
.demo-caption {
  font-size: 14px;
  color: var(--text-dim);
  text-align: center;
  max-width: 56ch;
  font-style: italic;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Gallery: more views from inside the app ───────────────────────── */
.section-gallery h2 {
  text-align: center;
  margin-bottom: 28px;
}
.gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.gallery-item {
  margin: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  background: var(--bg);
}
.gallery-item figcaption {
  margin-top: 12px;
  padding: 0 4px;
  font-size: 14.5px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.55;
}
.gallery-item figcaption em {
  font-style: italic;
  color: var(--gold-strong);
}

/* ─── Problem section ───────────────────────────────────────────────── */
.section-problem {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.section-problem p {
  font-size: 18px;
  color: var(--text);
}

/* ─── How it works ──────────────────────────────────────────────────── */
.section-how { padding-bottom: 64px; }
.how-grid {
  display: grid;
  gap: 18px;
  margin-top: 12px;
}
@media (min-width: 700px) {
  .how-grid { grid-template-columns: repeat(3, 1fr); }
}
.how-card {
  padding: 22px 22px 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.how-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gold-strong);
  margin-bottom: 10px;
  letter-spacing: -0.005em;
}
.how-card p {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ─── Loop section: one goal, closed loop ──────────────────────────── */
.section-loop {
  border-top: 1px solid var(--border-soft);
}
.section-loop p {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 56ch;
  margin-bottom: 22px;
}
.loop-goal {
  margin: 0 0 22px;
  padding: 18px 22px;
  border-left: 4px solid var(--accent);
  background: var(--gold-faint);
  border-radius: 0 6px 6px 0;
  font-size: 21px;
  line-height: 1.35;
  color: var(--gold-strong);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.005em;
  max-width: 38ch;
}
.loop-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: loop;
  font-size: 16.5px;
}
.loop-steps li {
  counter-increment: loop;
  position: relative;
  padding: 8px 0 8px 40px;
  color: var(--text);
  line-height: 1.55;
}
.loop-steps li::before {
  content: counter(loop);
  position: absolute;
  left: 0;
  top: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold-strong);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.loop-steps li em {
  font-style: italic;
  color: var(--gold-strong);
  font-weight: 500;
}
.loop-steps li:last-child {
  margin-top: 6px;
  font-weight: 600;
  color: var(--gold-strong);
  letter-spacing: 0.02em;
}
.loop-steps li:last-child::before {
  content: '↻';
  background: var(--accent);
  font-size: 16px;
}

/* ─── Story ─────────────────────────────────────────────────────────── */
.section-story p { font-size: 18px; }
.section-story em { font-style: italic; color: var(--gold-strong); }
.story-credentials {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  font-size: 15px;
  color: var(--text-dim);
  font-style: italic;
}

/* ─── Science table ─────────────────────────────────────────────────── */
.section-science {
  background: var(--gold-faint);
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.section-science > * {
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}
.science-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto 22px;
  font-size: 15px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.science-table th, .science-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.science-table th {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--gold-faint);
}
.science-table tr:last-child td { border-bottom: none; }
.science-table strong { color: var(--gold-strong); }
.science-table td:first-child {
  font-weight: 500;
  color: var(--text);
  width: 38%;
}
.science-table td:last-child { color: var(--text-dim); }
.science-cta {
  text-align: right;
  margin-top: 8px;
}
.science-cta a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.science-cta a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .science-table { font-size: 14px; }
  .science-table th, .science-table td { padding: 10px 12px; }
  .science-table td:first-child { width: 42%; }
}

/* ─── Pricing ───────────────────────────────────────────────────────── */
.section-pricing { text-align: left; }
.pricing-card {
  margin-top: 8px;
  padding: 28px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}
.pricing-strike {
  font-size: 18px;
  color: var(--text-dim);
  text-decoration: line-through;
  text-decoration-color: rgba(100, 70, 20, 0.4);
  margin-bottom: 4px;
}
.pricing-strike span { font-size: 14px; margin-left: 4px; }
.pricing-now {
  font-size: 36px;
  font-weight: 600;
  color: var(--gold-strong);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.1;
}
.pricing-now span {
  font-size: 16px;
  font-weight: 500;
  color: var(--gold-dim);
  margin-left: 6px;
}
.pricing-why {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.55;
  max-width: 56ch;
}

/* ─── FAQ ───────────────────────────────────────────────────────────── */
.section-faq details {
  border-bottom: 1px solid var(--border-soft);
  padding: 14px 0;
}
.section-faq details:last-of-type { border-bottom: none; }
.section-faq summary {
  font-weight: 500;
  font-size: 17px;
  color: var(--gold-strong);
  cursor: pointer;
  list-style: none;
  padding-right: 28px;
  position: relative;
}
.section-faq summary::-webkit-details-marker { display: none; }
.section-faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 400;
  color: var(--gold-dim);
  font-size: 22px;
  line-height: 1;
}
.section-faq details[open] summary::after { content: '−'; }
.section-faq details p {
  margin-top: 10px;
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ─── Final CTA ─────────────────────────────────────────────────────── */
.section-cta {
  background: var(--gold-strong);
  max-width: none;
  padding: 56px 24px;
  text-align: center;
  color: var(--bg);
  margin-top: 24px;
}
.section-cta h2 {
  color: var(--bg);
  margin-bottom: 14px;
}
.section-cta p {
  color: rgba(248, 245, 239, 0.85);
  max-width: 56ch;
  margin: 0 auto 22px;
}
.section-cta .signup-form {
  margin-left: auto;
  margin-right: auto;
}
.section-cta .signup-form input[type="email"] { box-shadow: none; }
.section-cta .signup-form button {
  background: var(--bg);
  color: var(--gold-strong);
}
.section-cta .signup-form button:hover:not([disabled]) {
  background: #fff;
}
.section-cta .signup-trust { color: rgba(248, 245, 239, 0.7); }
.section-cta .signup-status.is-success { color: #c5e8c5; }
.section-cta .signup-status.is-error   { color: #f0b8b8; }

/* ─── Footer ────────────────────────────────────────────────────────── */
.site-footer {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 32px 24px 56px;
  font-size: 14px;
  color: var(--text-dim);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--border-soft);
  padding-top: 24px;
  margin-bottom: 12px;
}
.footer-row nav { display: flex; gap: 18px; }
.footer-row a {
  color: var(--text-dim);
  text-decoration: none;
}
.footer-row a:hover { color: var(--gold-strong); text-decoration: underline; }
.footer-note {
  font-size: 13px;
  color: var(--gold-dim);
  opacity: 0.75;
}

/* ─── /science page ─────────────────────────────────────────────────── */
.prose {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 24px 80px;
}
.prose h1 {
  font-size: 36px;
  font-weight: 600;
  color: var(--gold-strong);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.2;
}
.prose .prose-lede {
  font-size: 19px;
  color: var(--text-dim);
  margin-bottom: 32px;
  line-height: 1.5;
}
.prose h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--gold-strong);
  margin-top: 40px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.prose p { margin-bottom: 14px; line-height: 1.65; }
.prose .prose-cite {
  display: block;
  font-size: 14px;
  color: var(--gold-dim);
  margin-top: 4px;
  font-style: italic;
}
.prose blockquote {
  margin: 18px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--accent);
  background: var(--gold-faint);
  font-size: 16px;
  color: var(--text-dim);
  border-radius: 0 6px 6px 0;
}
.prose .back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--gold-dim);
  text-decoration: none;
}
.prose .back-link:hover { color: var(--gold-strong); }

/* ─── Reduced motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
