/* ============================================================================
   VotEDU landing page — MOBILE FIRST.
   ----------------------------------------------------------------------------
   Everything outside a media query is the phone layout: one column, full-width
   controls, a pinned bottom action bar. `min-width` queries then add the two
   wider layouts (tablet ≥ 680px, desktop ≥ 1000px). Nothing uses `max-width`,
   so the small screen is never the leftover case.

   The palette, the 2px ink outline, the solid (never blurred) `0 4px 0` base
   shadow, the pinned bottom bar and the Nunito/Rubik pairing come from the
   app's design contract (DESIGN.md + src/theme/tokens.ts) so the page and the
   product read as one thing. The page is LIGHT ONLY (owner, 2026-09-21: the app
   opens white by default), so it does not follow the visitor's OS scheme — the
   app's dark mode is advertised by the screenshot in the "phone or browser"
   band instead.
   ========================================================================== */

:root {
  /* Light palette — src/theme/tokens.ts lightPalette */
  --paper: #fbf7ef;
  --paper-2: #f4eedf;
  --card: #ffffff;
  --ink: #22243b;
  --ink-2: #6a6d87;
  --ink-3: #6c6f87;

  --blue: #2e5be8;
  --blue-ink: #1e41b5;
  --blue-soft: #e7edfe;

  --yellow: #ffc531;
  --yellow-deep: #e8a50a;
  --yellow-pale: #fff3d4;
  --yellow-text: #8a6a1f;

  --green: #27ae6b;
  --green-deep: #1b7a4a;
  --green-soft: #ddf3e7;
  --coral: #f0553d;
  --coral-deep: #c23a26;
  --coral-soft: #fde4df;

  --outline: #22243b;
  --border: #e9e2d4;
  --shadow-base: #e3dacaff;

  --locked-bg: #ede6d8;
  --locked-border: #cbc3b0;
  --locked-text: #827c6b;

  /* Radii — DESIGN.md rule 6 */
  --r-button: 14px;
  --r-card: 18px;
  --r-pill: 999px;

  /* 16pt gutter on phones, 24 from tablet up (Screen's rule). */
  --gutter: 16px;
  --maxw: 1140px;

  /* Solid base shadow. Dark mode empties these. */
  --base: 0 4px 0 var(--shadow-base);
  --base-blue: 0 4px 0 var(--blue-ink);
  --base-yellow: 0 4px 0 var(--yellow-deep);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ── reset ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Rubik, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Room for the pinned mobile action bar. */
  padding-bottom: calc(84px + var(--safe-b));
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: Nunito, Rubik, system-ui, sans-serif; margin: 0; line-height: 1.12; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }

:where(a, button):focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  border-radius: var(--r-button);
  text-decoration: none;
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 12px; }

/* Very fine paper grain — invisible on low-DPI screens, and cheap. */
.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ── header ───────────────────────────────────────────────────────────── */

.site-header {
  position: relative;
  z-index: 3;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.brand__mark {
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  background: var(--blue);
  border: 2px solid var(--outline);
  object-fit: cover;
}
.brand__word {
  font-family: Nunito, sans-serif;
  font-weight: 900;
  font-size: 23px;
  letter-spacing: -0.4px;
}
.brand__word--accent { color: var(--blue); }

/* Segmented control: ONE joined pill with ink dividers (DESIGN.md rule 8). */
.langbar {
  display: inline-flex;
  border: 2px solid var(--outline);
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--base);
}
.langbar__btn {
  appearance: none;
  border: 0;
  border-left: 2px solid var(--outline);
  background: transparent;
  color: var(--ink);
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.4px;
  min-width: 44px;
  min-height: 40px;
  padding: 0 10px;
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.langbar__btn:first-child { border-left: 0; }
.langbar__btn.is-active { background: var(--blue); color: #fff; }
/* ── hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px var(--gutter) 0;
}

.hero__blob {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(54px);
  pointer-events: none;
}
.hero__blob--blue {
  width: 320px; height: 320px;
  right: -120px; top: -90px;
  background: var(--blue);
  opacity: 0.16;
}
.hero__blob--yellow {
  width: 260px; height: 260px;
  left: -120px; top: 300px;
  background: var(--yellow);
  opacity: 0.24;
}

.eyebrow {
  display: inline-block;
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-soft);
  border: 2px solid var(--blue);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  margin-bottom: 14px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero__title {
  font-weight: 900;
  font-size: clamp(34px, 9.6vw, 46px);
  letter-spacing: -1px;
  margin-bottom: 14px;
}

/* The yellow marker from the lesson prose (ADR-0001), drawn as a highlighter
   stroke rather than a filled block. Yellow never carries text — the ink stays
   on top of it (DESIGN.md rule 5), which is why dark mode flips it to ink. */
.marker {
  color: inherit;
  background: linear-gradient(
    180deg,
    transparent 16%,
    var(--yellow) 16%,
    var(--yellow) 97%,
    transparent 97%
  );
  border-radius: 4px;
  padding: 0 0.1em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hero__lead {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 44ch;
  margin-bottom: 22px;
}

/* ── buttons ──────────────────────────────────────────────────────────── */

.cta { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 24px;
  border: 2px solid var(--outline);
  border-radius: var(--r-button);
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.07s ease-in, box-shadow 0.07s ease-in, filter 0.16s var(--ease);
}
.btn--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: var(--base-blue);
}
.btn--primary:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(4px); box-shadow: none; }
.btn__arrow { width: 21px; height: 21px; flex: none; }

.storerow { display: flex; flex-wrap: wrap; gap: 10px; }

.storebadge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 50px;
  border-radius: var(--r-button);
  text-decoration: none;
  transition: transform 0.16s var(--ease);
}
a.storebadge { flex: 1 1 152px; }
a.storebadge img { height: 50px; width: auto; }
a.storebadge:hover { transform: translateY(-2px); }

/* Play is not live yet, so the tile borrows the app's LOCKED row treatment
   instead of the real Play badge — it can never be mistaken for a live link. */
.storebadge--soon {
  flex: 1 1 152px;
  justify-content: center;
  padding: 0 14px;
  background: var(--locked-bg);
  border: 2px solid var(--locked-border);
  color: var(--locked-text);
  cursor: default;
}
.playmark { width: 18px; height: 20px; flex: none; }
.storebadge__text { display: flex; flex-direction: column; line-height: 1.16; text-align: left; }
.storebadge__text small { font-size: 10.5px; letter-spacing: 0.3px; }
.storebadge__text strong { font-family: Nunito, sans-serif; font-weight: 800; font-size: 15px; }

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}

/* ── hero art ─────────────────────────────────────────────────────────── */

.hero__art { position: relative; display: flex; justify-content: center; margin-top: 26px; }

.phones { position: relative; width: min(100%, 330px); padding: 22px 0 34px; }

.phone {
  margin: 0;
  border: 3px solid var(--outline);
  border-radius: 30px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 14px 34px rgba(34, 36, 59, 0.15), 0 3px 0 var(--outline);
}
.phone img { width: 100%; height: auto; }

.phone--front { position: relative; width: 64%; z-index: 2; transform: rotate(-2.4deg); }
.phone--back {
  position: absolute;
  width: 55%;
  right: 0;
  top: 52px;
  z-index: 1;
  transform: rotate(5.5deg);
}

.chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 2px solid var(--outline);
  border-radius: var(--r-pill);
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}
.chip svg { width: 15px; height: 15px; }

.chip--xp {
  right: 6%;
  top: 8px;
  background: var(--yellow);
  color: var(--yellow-text);
  box-shadow: var(--base-yellow);
}
.chip--ok {
  left: -3%;
  bottom: 118px;
  background: var(--green-soft);
  color: var(--green-deep);
  border-color: var(--green);
  box-shadow: 0 4px 0 var(--green);
}
.arci {
  position: absolute;
  z-index: 4;
  left: -5%;
  bottom: 0;
  width: 96px;
  height: auto;
  filter: drop-shadow(0 10px 16px rgba(34, 36, 59, 0.22));
}

/* Gentle, slow drift. Nothing moves under reduce-motion. */
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.float-a { animation: floaty 5.5s ease-in-out infinite; }
.float-b { animation: floaty 6.5s ease-in-out -1.8s infinite; }
.float-c { animation: floaty 7.5s ease-in-out -3.2s infinite; }

/* ── stats ────────────────────────────────────────────────────────────── */

.stats {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 14px auto 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.stat {
  background: var(--card);
  border: 2px solid var(--outline);
  border-radius: var(--r-card);
  box-shadow: var(--base);
  padding: 14px 10px;
  text-align: center;
}
.stat b {
  display: block;
  font-family: Nunito, sans-serif;
  font-weight: 900;
  font-size: 27px;
  color: var(--blue);
  line-height: 1.05;
}
.stat span { font-size: 13px; color: var(--ink-2); }

/* ── features ─────────────────────────────────────────────────────────── */

.features {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 44px var(--gutter) 0;
}

.section-title {
  font-weight: 900;
  font-size: clamp(26px, 6.6vw, 32px);
  letter-spacing: -0.7px;
  margin-bottom: 18px;
}

.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }

.card {
  background: var(--card);
  border: 2px solid var(--outline);
  border-radius: var(--r-card);
  box-shadow: var(--base);
  padding: 18px 18px 20px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  transition: transform 0.18s var(--ease);
}
.card h3 { grid-column: 2; font-size: 18px; font-weight: 800; margin-bottom: 3px; }
.card p { grid-column: 2; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }

.card__icon {
  grid-row: 1 / span 2;
  grid-column: 1;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 2px solid var(--outline);
  border-radius: var(--r-button);
}
.card__icon svg { width: 24px; height: 24px; }

.card--blue   .card__icon { background: var(--blue-soft);   color: var(--blue); }
.card--green  .card__icon { background: var(--green-soft);  color: var(--green-deep); }
.card--yellow .card__icon { background: var(--yellow-pale); color: var(--yellow-text); }
.card--coral  .card__icon { background: var(--coral-soft);  color: var(--coral-deep); }
/* ── band ─────────────────────────────────────────────────────────────── */

.band {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 44px auto 0;
  padding: 0 var(--gutter);
  display: grid;
  gap: 20px;
}
.band__copy {
  background: var(--blue-soft);
  border: 2px solid var(--outline);
  border-radius: var(--r-card);
  box-shadow: var(--base);
  padding: 24px 20px;
}
.band__copy h2 {
  font-size: clamp(22px, 5.6vw, 28px);
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.band__copy p { color: var(--ink-2); font-size: 15.5px; max-width: 48ch; }
.band__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.band__note { font-size: 13.5px; color: var(--ink-3); }

.band__art { order: -1; display: flex; justify-content: center; gap: 12px; }
.phone--sm { width: 45%; max-width: 168px; border-radius: 24px; }
.phone--sm:first-child { transform: rotate(-3deg) translateY(8px); }
.phone--sm:last-child { transform: rotate(3deg); }

/* ── pinned mobile action bar (the app's bottom bar, DESIGN.md rule 2) ─── */

.actionbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px var(--gutter) calc(12px + var(--safe-b));
  background: var(--paper);
  border-top: 2px solid var(--border);
  transform: translateY(110%);
  transition: transform 0.28s var(--ease);
}
.actionbar.is-up { transform: none; }
.actionbar .btn { flex: 1; min-height: 52px; font-size: 15.5px; }
.actionbar__store { flex: none; display: inline-flex; }
.actionbar__store img { height: 46px; width: auto; }

/* ── footer ───────────────────────────────────────────────────────────── */

.site-footer {
  position: relative;
  z-index: 2;
  margin-top: 52px;
  border-top: 2px solid var(--border);
  background: var(--paper-2);
}
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px var(--gutter) 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.disclaimer { font-size: 13px; line-height: 1.6; color: var(--ink-3); max-width: 78ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15px; }
.footer-links a { color: var(--blue); font-weight: 600; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.copyright { font-size: 13px; color: var(--ink-3); }

/* ── reveal ───────────────────────────────────────────────────────────── */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* The pinned bar is a JS affordance too: it only ever rises once the hero CTA
   has scrolled away, so without JS it must not sit over the page. */
html:not(.js) .actionbar { display: none; }

/* ══════════════════════ TABLET — 680px and up ══════════════════════════ */

@media (min-width: 680px) {
  :root { --gutter: 24px; }
  body { font-size: 17px; }

  .brand__mark { width: 40px; height: 40px; }
  .brand__word { font-size: 26px; }
  .langbar__btn { font-size: 13px; padding: 0 14px; }

  .hero { padding-top: 20px; }
  .hero__title { font-size: clamp(44px, 6.4vw, 56px); }
  .hero__lead { font-size: 18px; margin-bottom: 26px; }
  .eyebrow { font-size: 12px; padding: 6px 14px; }

  .cta { align-items: flex-start; }
  .btn { min-height: 60px; font-size: 17px; padding: 0 28px; }
  .storerow { gap: 12px; }
  a.storebadge, .storebadge--soon { flex: 0 0 auto; }
  .storebadge, a.storebadge img { height: 52px; }

  .phones { width: min(100%, 420px); padding-bottom: 46px; }
  .arci { width: 120px; }
  .chip { font-size: 15px; padding: 9px 15px; }
  .chip svg { width: 17px; height: 17px; }
  .chip--ok { bottom: 168px; }

  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
  .stat { padding: 18px 12px; }
  .stat b { font-size: 32px; }
  .stat span { font-size: 14px; }

  .features { padding-top: 60px; }
  .section-title { margin-bottom: 24px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

  .band { margin-top: 60px; gap: 28px; }
  .band__copy { padding: 32px 30px; }
  .band__actions { flex-direction: row; align-items: center; gap: 18px; }
  .phone--sm { max-width: 200px; }

  .site-footer { margin-top: 68px; }
  .site-footer__inner { padding: 32px var(--gutter) 40px; }
}

/* ═════════════════════ DESKTOP — 1000px and up ═════════════════════════ */

@media (min-width: 1000px) {
  body { padding-bottom: 0; } /* the pinned bar is a phone affordance */

  .site-header { padding: 18px var(--gutter); }

  .hero {
    padding: 26px var(--gutter) 8px;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 32px;
    align-items: center;
  }
  .hero__title { font-size: clamp(50px, 4.8vw, 64px); letter-spacing: -1.4px; }
  .hero__art { margin-top: 0; }

  .hero__blob--blue { width: 520px; height: 520px; right: -140px; top: -120px; }
  .hero__blob--yellow { width: 380px; height: 380px; left: -160px; top: auto; bottom: -160px; }

  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    padding: 22px 20px 24px;
  }
  .card__icon { grid-row: auto; grid-column: auto; width: 52px; height: 52px; margin-bottom: 16px; }
  .card__icon svg { width: 26px; height: 26px; }
  .card h3 { grid-column: auto; font-size: 19px; margin-bottom: 7px; }
  .card p { grid-column: auto; font-size: 15px; }
  .card:hover { transform: translateY(-3px); }

  .band {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
    align-items: center;
    gap: 32px;
  }
  .band__art { order: 0; }
  .phone--sm { max-width: none; width: 47%; }

  .actionbar { display: none; }
}

/* ── motion ───────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float-a, .float-b, .float-c { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .storebadge, .actionbar { transition: none; }
  .actionbar.is-up { transform: none; }
}
