/* Learning Logic — public site styles (v2, vibrant).
   Self-contained: system fonts only, no external requests (the site lives the privacy
   policy's own claims). Text pairs are WCAG-measured; brand tokens from src/theme/colors.ts,
   board/circuit tokens verbatim from the app's dark "industrial" board palette. */

:root {
  /* Brand (light surfaces) — measured pairs in plan-website.md */
  --ink: #1f4a3f;        /* body on white 9.95 · on gold 6.89 · on goldSoft 8.98 */
  --ink-soft: #4a5b66;   /* secondary on white 7.05 */
  --gold: #FFD23E;
  --gold-lite: #FFDE6B;
  --gold-deep: #F5B100;  /* decoration / borders only */
  --gold-soft: #FFF3CC;
  --gold-text: #8a6400;  /* large text on gold only (3.72) */
  --mint: #2aa088;       /* active/solved accent — non-text on white (3.24) */
  --mint-text: #1c7a5e;  /* text-safe mint for small labels on light (~5.2 on white) */
  --white: #ffffff;

  /* Board / circuit (dark surfaces) — the game's real palette */
  --board: #14231d;      /* deep teal-black board ground */
  --board-2: #1e1e1e;    /* app board base */
  --board-surface: #252526;
  --board-line: #2f4a40;
  --wire: #4ec9b0;       /* cyan energized wire */
  --lime: #A6E22E;       /* current-flows-here */
  --amber: #E8A33D;      /* armed */
  --rail: #497e6d;       /* teal rail (lightened from #365B50 for glow on dark) */
  --coil: #dcdcaa;       /* output coil */
  --nc: #f44747;         /* normally-closed contact */
  --spark: #FFD700;
  --on-dark: #ffffff;      /* text on board — measured */
  --on-dark-soft: #c9d6d0; /* secondary text on board — measured */

  /* Sparky (classic gold skin) */
  --sp-body: #FFD23E;
  --sp-edge: #F5B100;
  --sp-glow: #FFE08A;
  --sp-face: #3a2c00;
  --sp-cheek: #FFA928;
  --sp-core: #FFFDF2;

  --maxw: 900px;
  --readw: 720px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
a:hover { text-decoration: none; }

/* ── Section band system ─────────────────────────────────────────────────── */
.band { padding: 56px 20px; }
.band__wrap { max-width: var(--maxw); margin: 0 auto; }
.band--gold {
  background: linear-gradient(165deg, var(--gold-lite) 0%, var(--gold) 48%, #FCC63A 100%);
}
.band--light { background: var(--white); }
.band--tint  { background: linear-gradient(180deg, #FFFDF7 0%, #FFF7E4 100%); }
.band--dark {
  background:
    radial-gradient(1100px 380px at 50% -8%, #21382f 0%, rgba(33,56,47,0) 70%),
    linear-gradient(180deg, var(--board) 0%, #101a16 100%);
  color: var(--on-dark);
}
.band--ink { background: var(--ink); color: var(--white); }

.center { text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint-text);
  margin: 0 0 10px;
}
.band--dark .eyebrow { color: var(--lime); }
.section-title {
  font-size: clamp(24px, 5.5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: inherit;
}
.section-sub {
  max-width: 52ch;
  margin: 0 auto 8px;
  font-size: clamp(16px, 4vw, 18px);
}
.band--light .section-sub, .band--tint .section-sub { color: var(--ink-soft); }
.band--dark .section-sub { color: var(--on-dark-soft); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { padding: 48px 20px 40px; text-align: center; }
.hero__icon {
  width: 108px; height: 108px; display: block; margin: 0 auto 20px;
  border-radius: 25px; box-shadow: 0 10px 30px rgba(31, 74, 63, 0.32);
}
.hero__title {
  margin: 0; color: var(--ink); font-weight: 800;
  font-size: clamp(34px, 9vw, 58px); letter-spacing: -0.03em; line-height: 1.02;
}
.hero__tagline {
  margin: 14px auto 0; max-width: 24ch; color: var(--ink);
  font-size: clamp(17px, 4.6vw, 22px); font-weight: 600;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  padding: 9px 18px; border-radius: 999px; background: var(--ink); color: var(--white);
  font-size: 14px; font-weight: 700; box-shadow: 0 6px 18px rgba(31,74,63,0.28);
}
.hero__badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }

/* Hero stage: dark board card showing live gameplay + Sparky */
.stage {
  position: relative; max-width: 560px; margin: 30px auto 0;
  background:
    radial-gradient(420px 200px at 68% 30%, rgba(78,201,176,0.16) 0%, rgba(78,201,176,0) 70%),
    linear-gradient(180deg, #1c2f28 0%, #12201b 100%);
  border: 1px solid #2c473d; border-radius: 22px; padding: 20px 20px 16px;
  box-shadow: 0 20px 46px rgba(15, 30, 24, 0.4);
}
.stage__caption {
  margin: 12px 2px 0; color: var(--on-dark-soft); font-size: 14px; text-align: left;
  display: flex; align-items: center; gap: 8px;
}
.stage__caption b { color: var(--on-dark); font-weight: 700; }
.stage svg { width: 100%; height: auto; display: block; }

/* ── Feature cards (how you play) ────────────────────────────────────────── */
.features { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 28px; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature {
  background: var(--white); border: 1px solid #eadfbf; border-radius: 18px;
  padding: 18px; box-shadow: 0 8px 22px rgba(31,74,63,0.07); text-align: left;
}
.feature__art {
  border-radius: 12px; overflow: hidden; margin-bottom: 14px;
  background: linear-gradient(180deg, #1c2f28, #12201b);
  border: 1px solid #2c473d;
}
.feature__art svg { width: 100%; height: auto; display: block; }
.feature__step {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
  color: var(--gold-text); text-transform: uppercase; margin-bottom: 4px;
}
.feature__title { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: var(--ink); }
.feature__desc { margin: 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.55; }

/* ── Showcase (real screenshots, flick-through carousel) ─────────────────── */
.carousel { position: relative; margin-top: 30px; }
.shots {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 2px 16px; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
}
.shots::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 auto; width: 208px; margin: 0; scroll-snap-align: center; }
.shot img { width: 100%; height: auto; display: block; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.55)); }
.shot figcaption { margin-top: 14px; text-align: center; color: var(--on-dark-soft); font-size: 13.5px; }
.shot figcaption b { color: var(--on-dark); font-weight: 700; }
.car-btn {
  position: absolute; top: 44%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.94); color: #14231d;
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.car-btn:hover { background: #fff; }
.car-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.car-prev { left: -8px; }
.car-next { right: -8px; }
.car-btn[hidden] { display: none; }
@media (hover: none) { .car-btn { display: none; } }
.showcase-note {
  margin: 20px auto 0; max-width: 48ch; text-align: center; color: var(--on-dark-soft);
  font-size: 13.5px; line-height: 1.5;
}

/* ── Grown-ups promises ──────────────────────────────────────────────────── */
.promise-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 24px; }
@media (min-width: 620px) { .promise-grid { grid-template-columns: 1fr 1fr; } }
.promise {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--gold-soft); border: 1px solid #F3E3B0; border-radius: 16px; padding: 18px;
}
.promise__check {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--mint); display: grid; place-items: center; margin-top: 1px;
  box-shadow: 0 3px 8px rgba(42,160,136,0.35);
}
.promise__check svg { width: 17px; height: 17px; display: block; }
.promise h3 { margin: 0 0 3px; font-size: 17px; color: var(--ink); }
.promise p { margin: 0; font-size: 15px; color: var(--ink); line-height: 1.5; }

.cta-row { margin-top: 26px; text-align: center; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 800;
  text-decoration: none; font-size: 16px;
}
.btn--primary { background: var(--ink); color: var(--white); box-shadow: 0 8px 20px rgba(31,74,63,0.25); }
.btn--ghost { color: var(--ink); border: 2px solid var(--ink); margin-left: 6px; }

.lead { font-size: clamp(18px, 4.6vw, 22px); color: var(--ink); text-align: center; max-width: 40ch; margin: 0 auto; font-weight: 500; }
.muted { color: var(--ink-soft); }
.contact-line { text-align: center; font-size: 17px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--white); text-align: center; padding: 34px 20px; font-size: 14px; }
.site-footer a { color: var(--white); }
.site-footer nav { margin-bottom: 10px; display: flex; gap: 18px; justify-content: center; }
.site-footer .fine { color: #b9cfc7; margin-top: 4px; }

/* ── Policy page ─────────────────────────────────────────────────────────── */
.policy-header { background: linear-gradient(165deg, var(--gold-lite), var(--gold)); text-align: center; padding: 22px 20px; }
.policy-header a { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.policy-header .mk { width: 30px; height: 30px; border-radius: 9px; }
.wordmark { font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -0.01em; }
.policy { max-width: var(--readw); margin: 0 auto; padding: 40px 20px 8px; }
.policy h1 { font-size: clamp(26px, 6.5vw, 34px); color: var(--ink); margin: 6px 0 4px; letter-spacing: -0.02em; }
.policy h2 { font-size: clamp(19px, 5vw, 23px); color: var(--ink); margin: 32px 0 10px; }
.policy .meta { color: var(--ink-soft); margin: 2px 0; }
.policy ul { padding-left: 22px; }
.policy li { margin: 6px 0; }
.policy .callout { background: var(--gold-soft); border-left: 5px solid var(--gold-deep); border-radius: 12px; padding: 4px 18px; margin: 18px 0; }

/* ── Small screens ───────────────────────────────────────────────────────── */
@media (max-width: 380px) {
  .band { padding: 44px 16px; }
  .hero { padding: 36px 16px 32px; }
}
