/* ==========================================================================
   Thinknest — marketing site styles
   Warm, cozy, low-pressure. Echoes the app's dreamy pastel + rounded type.
   ========================================================================== */

/* ---------- Fonts (self-hosted, OFL — see assets/fonts/NOTICE) ------------ */
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-var.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
  font-style: normal;
}

/* ---------- Design tokens ------------------------------------------------- */
:root {
  /* Surfaces */
  --cream: #fff9f1;
  --cream-2: #fbeee0;
  --cream-3: #f7e6d5;
  --paper: #fffdfa;
  --paper-edge: #efe1d0;

  /* Ink */
  --ink: #3e2d2b;
  --ink-soft: #6d5a53;
  --ink-mute: #786257; /* AA on light cream/sky/paper for small muted labels */

  /* Brand accents (pulled from the app art + scene code) */
  --gold: #f5b94d;
  --gold-soft: #fbd36b;
  --gold-deep: #e0952a;
  --coral: #f2897b;
  --coral-deep: #e0685a;
  --teal: #3c7b9e;
  --teal-deep: #2c5d7d;
  --lav: #c6b6e6;
  --pink: #f7cad9;
  --green: #8fc15b;
  --sky: #a9c9ec;

  /* Semantic */
  --bg: var(--cream);
  --surface: var(--paper);
  --border: var(--paper-edge);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --text-mute: var(--ink-mute);
  --link: var(--teal-deep);

  /* Gradients */
  --sky-grad: linear-gradient(180deg, #e9f1fb 0%, #f4e6f0 46%, #fdefdd 100%);
  --warm-grad: linear-gradient(135deg, #fbd36b 0%, #f4a25f 55%, #f2897b 100%);
  --warm-grad-soft: linear-gradient(135deg, #fde4a6 0%, #f8c58f 100%);

  /* Shape + depth */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --r-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(122, 86, 52, 0.08);
  --shadow-md: 0 10px 28px rgba(122, 86, 52, 0.12);
  --shadow-lg: 0 24px 60px rgba(122, 86, 52, 0.18);
  --ring: 0 0 0 4px rgba(60, 123, 158, 0.35);

  /* Rhythm */
  --container: 1120px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --section-y: clamp(3.75rem, 9vw, 7rem);

  --font-display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
}

/* ---------- Base ---------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--coral); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  z-index: 200;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout helpers ----------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4rem); }
.center { text-align: center; }
.measure { max-width: 62ch; }
.mx-auto { margin-inline: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8a5410; /* AA on the translucent gold chip over cream/sky (>=4.5:1) */
  background: rgba(245, 185, 77, 0.14);
  padding: 0.4em 0.9em;
  border-radius: var(--r-pill);
}

.section-title {
  font-size: clamp(1.8rem, 1.2rem + 2.6vw, 2.9rem);
  margin-top: 0.5rem;
}
.section-lead {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
  color: var(--text-soft);
  max-width: 56ch;
}
.center .section-lead { margin-inline: auto; }

/* ---------- Buttons ------------------------------------------------------- */
.btn {
  --btn-bg: var(--warm-grad);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1;
  padding: 0.95em 1.6em;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: #4a2f22;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); filter: saturate(1.05); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  --btn-bg: transparent;
  color: var(--teal-deep);
  box-shadow: inset 0 0 0 2px rgba(60, 123, 158, 0.4);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--teal-deep); filter: none; }
.btn--sm { padding: 0.7em 1.15em; font-size: 0.94rem; }
.btn--block { display: flex; width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}

/* App Store badge (coming-soon state) */
.appstore {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.7em 1.25em 0.7em 1.05em;
  background: #241d1b;
  color: #fff;
  border-radius: 16px;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.appstore:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
/* Non-interactive "coming soon" badge (not a link) — no hover affordance. */
.appstore--static { cursor: default; }
.appstore--static:hover { transform: none; box-shadow: var(--shadow-md); }
.appstore svg { width: 26px; height: 26px; flex: none; }
.appstore__text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.appstore__text small { font-size: 0.66rem; opacity: 0.8; letter-spacing: 0.04em; }
.appstore__text b { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.appstore__soon {
  margin-left: 0.35em;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--gold);
  color: #4a2f22;
  padding: 0.25em 0.5em;
  border-radius: var(--r-pill);
  align-self: center;
}
@media (prefers-reduced-motion: reduce) {
  .appstore:hover { transform: none; }
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}
.center .cta-row { justify-content: center; }

/* ---------- Navbar -------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 249, 241, 0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(239, 225, 208, 0.7);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 0.6em; text-decoration: none; }
.brand img { height: 30px; width: auto; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__cta { display: inline-flex; align-items: center; gap: 1rem; }
.nav__toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
}
.nav__toggle svg { width: 26px; height: 26px; stroke: var(--ink); }

@media (max-width: 860px) {
  /* With JS (html.js), collapse the nav into a toggle menu. */
  .js .nav__links,
  .js .nav__cta .btn { display: none; }
  .js .nav__toggle { display: inline-flex; }
  .js .nav[data-open="true"] .nav__links {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 0.75rem var(--gutter) 1.25rem;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .js .nav[data-open="true"] .nav__links a { padding: 0.6rem 0; font-size: 1.1rem; }
  /* Without JS the toggle can't work, so keep the links visible and let the
     bar wrap instead of leaving mobile visitors with no navigation. */
  html:not(.js) .nav__inner { flex-wrap: wrap; height: auto; padding-block: 0.55rem; row-gap: 0.35rem; }
  html:not(.js) .nav__links { flex-wrap: wrap; gap: 0.35rem 1.1rem; }
}

/* ---------- Hero ---------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--sky-grad);
  overflow: hidden;
  isolation: isolate;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  z-index: -1;
}
.hero::before {
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(247, 202, 217, 0.9), transparent 70%);
  top: -120px; left: -80px;
}
.hero::after {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(198, 182, 230, 0.75), transparent 70%);
  bottom: -160px; right: -120px;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2.75rem, 7vw, 5.5rem);
}
.hero__wordmark { width: min(430px, 82%); height: auto; margin-bottom: 1.1rem; }
.hero__inner h1 {
  /* Index hero only: the h1 is visually replaced by the wordmark image,
     but kept in the DOM for SEO / assistive tech. Other .hero sections
     (e.g. the 404 page) keep a normal, visible heading. */
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.hero__tagline {
  font-size: clamp(1.15rem, 1rem + 0.9vw, 1.5rem);
  color: var(--ink);
  font-weight: 700;
  max-width: 30ch;
  margin: 0 0 0.4rem;
}
.hero__sub {
  font-size: 1.08rem;
  color: var(--text-soft);
  max-width: 42ch;
  margin: 0 0 1.6rem;
}
.hero .cta-row { margin-bottom: 1.35rem; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.15rem;
  align-items: center;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.trust-row span { display: inline-flex; align-items: center; gap: 0.4em; }
.trust-row svg { width: 17px; height: 17px; color: var(--green); flex: none; }

/* Phone mockup — recreates the app's real landing screen */
.hero__art { display: grid; place-items: center; }
.phone {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 300 / 610;
  background: #2c2320;
  border-radius: 46px;
  padding: 12px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
  animation: float 6.5s ease-in-out infinite;
}
.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 35px;
  overflow: hidden;
  background: var(--sky-grad);
}
.phone__screen img.phone__bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.phone__wm {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: 74%;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(120, 80, 40, 0.18));
  animation: bob 4.5s ease-in-out infinite;
}
.phone__island {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 82px; height: 22px;
  background: #1c1512;
  border-radius: var(--r-pill);
  z-index: 3;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-14px) rotate(1deg); }
}
@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .phone, .phone__wm { animation: none; }
}

@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__inner { order: 2; }
  .hero__art { order: 1; margin-bottom: 0.5rem; }
  .hero__wordmark, .hero__tagline, .hero__sub { margin-inline: auto; }
  .hero .cta-row, .hero .trust-row { justify-content: center; }
}

/* ---------- Value strip --------------------------------------------------- */
.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.value {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.value:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value__ico {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 15px;
  margin-bottom: 0.9rem;
}
.value__ico svg { width: 27px; height: 27px; }
.value h3 { font-size: 1.16rem; margin-bottom: 0.25rem; }
.value p { margin: 0; color: var(--text-soft); font-size: 0.98rem; }

.i-gold { background: rgba(245, 185, 77, 0.16); color: var(--gold-deep); }
.i-coral { background: rgba(242, 137, 123, 0.16); color: var(--coral-deep); }
.i-teal { background: rgba(60, 123, 158, 0.14); color: var(--teal-deep); }
.i-green { background: rgba(143, 193, 91, 0.18); color: #5f8a34; }
.i-lav { background: rgba(198, 182, 230, 0.22); color: #7c63b0; }
.i-pink { background: rgba(247, 202, 217, 0.3); color: #c9698a; }

@media (max-width: 820px) { .values { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .values { grid-template-columns: 1fr; } }

/* ---------- Games --------------------------------------------------------- */
.games {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  --games-gap: clamp(1.1rem, 2.5vw, 1.75rem);
  gap: var(--games-gap);
}
/* A lone final card (odd count) centers at single-column width instead of
   hugging the left. Only in the 2-column layout — on mobile it's full width. */
@media (min-width: 681px) {
  .games > .game:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc((100% - var(--games-gap)) / 2);
    margin-inline: auto;
  }
}
.game {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.game:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.game__img {
  aspect-ratio: 820 / 512;
  width: 100%;
  object-fit: cover;
  background: var(--cream-2);
}
.game__body { padding: 1.3rem 1.4rem 1.5rem; }
.game__tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* Dark text on the pale category chip — readable (AA) while the chip's
     background still color-codes the game. Overrides the .i-* text color,
     which is meant for the larger icon glyphs, not this small label. */
  color: var(--ink);
  padding: 0.3em 0.75em;
  border-radius: var(--r-pill);
  margin-bottom: 0.7rem;
}
.game h3 { font-size: 1.4rem; margin-bottom: 0.35rem; }
.game p { margin: 0; color: var(--text-soft); }

@media (prefers-reduced-motion: reduce) {
  .value:hover, .game:hover { transform: none; }
}
@media (max-width: 680px) { .games { grid-template-columns: 1fr; } }

/* ---------- Split "what's inside / never inside" -------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.panel {
  border-radius: var(--r-xl);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--border);
}
.panel--yes { background: linear-gradient(180deg, #f3faee, #eef7e4); border-color: #d7e9c2; }
.panel--no { background: linear-gradient(180deg, #fdf1ef, #fbe8e4); border-color: #f2d3cc; }
.panel h3 { display: flex; align-items: center; gap: 0.5em; font-size: 1.3rem; }
.panel h3 svg { width: 30px; height: 30px; flex: none; }
.panel--yes h3 svg { color: #5f8a34; }
.panel--no h3 svg { color: var(--coral-deep); }
.panel ul { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.panel li { display: flex; align-items: flex-start; gap: 0.6em; font-weight: 600; color: var(--ink); }
.panel li svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.panel--yes li svg { color: #5f8a34; }
.panel--no li svg { color: var(--coral-deep); }
@media (max-width: 680px) { .split { grid-template-columns: 1fr; } }

/* ---------- Feature list (thoughtful design) ------------------------------ */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.6rem);
}
.feature { display: flex; gap: 0.9rem; align-items: flex-start; }
.feature__ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.feature__ico svg { width: 23px; height: 23px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.feature p { margin: 0; color: var(--text-soft); font-size: 0.96rem; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } }

/* ---------- Section variants --------------------------------------------- */
.band-warm { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%); }
.band-cream { background: var(--cream-2); }

/* ---------- Download band ------------------------------------------------- */
.download {
  position: relative;
  background: var(--warm-grad);
  border-radius: var(--r-xl);
  padding: clamp(2.25rem, 5vw, 3.75rem);
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.download h2 { color: #4a2f22; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); }
.download p { color: #4a2f22; font-weight: 700; max-width: 44ch; margin-inline: auto; }
/* The download band stays on the warm gradient in both themes, so its ghost
   CTA needs dark (not teal/light-blue) text to keep AA contrast. */
.download .btn--ghost { color: #4a2f22; box-shadow: inset 0 0 0 2px rgba(74, 47, 34, 0.45); }
.download .btn--ghost:hover { box-shadow: inset 0 0 0 2px #4a2f22; }
.download .cta-row { justify-content: center; margin-top: 1.6rem; }
.download__sparkle { position: absolute; opacity: 0.5; }

/* ---------- Footer -------------------------------------------------------- */
.footer {
  background: #2f2320;
  color: #e9ddd3;
  padding-block: clamp(2.75rem, 6vw, 4rem) 2rem;
}
.footer a { color: #f0e3d8; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2rem;
}
.footer__brand img { height: 34px; width: auto; margin-bottom: 0.9rem; filter: brightness(1.06); }
.footer__brand p { color: #c3b3a8; max-width: 34ch; font-size: 0.96rem; }
.footer__col h4 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer__col a { font-weight: 600; font-size: 0.98rem; }
.footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  color: #b6a498;
  font-size: 0.9rem;
}
.footer__bottom .heart { color: var(--coral); }
@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 460px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Doc pages (privacy / terms / support) ------------------------- */
.doc-hero {
  background: var(--sky-grad);
  padding-block: clamp(2.5rem, 6vw, 4.25rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(239, 225, 208, 0.6);
}
.doc-hero h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); }
.doc-hero p { color: var(--text-soft); font-size: 1.1rem; max-width: 54ch; margin: 0; }
.doc-meta { margin-top: 1rem; font-size: 0.9rem; color: var(--text-mute); font-weight: 700; }

.doc {
  max-width: 760px;
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.doc h2 {
  font-size: 1.5rem;
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}
.doc h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0.5rem; }
.doc h3 { font-size: 1.15rem; margin-top: 1.6rem; }
.doc p, .doc li { color: var(--text-soft); }
.doc ul, .doc ol { padding-left: 1.3rem; }
.doc li { margin-bottom: 0.5rem; }
.doc strong { color: var(--ink); }
.doc .callout {
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--r-md);
  padding: 1.15rem 1.35rem;
  margin: 1.5rem 0;
}
.doc .callout p:last-child { margin-bottom: 0; }
.doc .callout p:first-child { margin-top: 0; }

/* FAQ */
.faq { display: grid; gap: 0.85rem; margin-top: 1.5rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.35rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--ink);
  cursor: pointer;
  padding: 0.9rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--gold-deep);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { margin: 0 0 1rem; color: var(--text-soft); }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-sm);
  text-align: center;
  margin-top: 1.5rem;
}
.contact-card .btn { margin-top: 1.1rem; white-space: normal; max-width: 100%; overflow-wrap: break-word; }
.contact-card .muted { color: var(--text-mute); font-size: 0.92rem; margin-top: 0.9rem; }

/* ---------- Scroll reveal -------------------------------------------------
   Robust by default: content is VISIBLE with no JS. Only once the page has
   confirmed JS is running (html.js, set by an early head script) do we hide
   elements to animate them in — so a blocked/slow script never hides content. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Dark mode (warm, cozy night) ---------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #241b19;
    --surface: #2f2320;
    --border: #43332e;
    --ink: #f8efe6;          /* headings + ink text must flip for dark surfaces */
    --text: #f6ece2;
    --text-soft: #d3c1b6;
    --text-mute: #a68f83;
    --link: #8fc9e6;
    --gold-deep: #f5c451;    /* eyebrow / FAQ marker readable on dark */
    --cream: #241b19;
    --cream-2: #2a201d;
    --sky-grad: linear-gradient(180deg, #2b2733 0%, #33232d 50%, #2e2119 100%);
  }
  .nav { background: rgba(36, 27, 25, 0.85); border-bottom-color: rgba(67, 51, 46, 0.8); }
  .eyebrow { background: rgba(245, 185, 77, 0.16); color: var(--gold-soft); }
  /* Ghost CTAs (e.g. "See the games", "Get help") need a light outline on dark */
  .btn--ghost { color: var(--link); box-shadow: inset 0 0 0 2px rgba(143, 201, 230, 0.45); }
  .btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--link); }
  .panel--yes { background: linear-gradient(180deg, #26302014, #223018); border-color: #3c4d2e; }
  .panel--no { background: linear-gradient(180deg, #33222020, #3a2420); border-color: #55352f; }
  .panel li { color: var(--text); }
  .panel--yes li svg { color: var(--green); }
  .band-cream, .band-warm { background: #2a201d; }
  .footer { background: #1c1512; }
  .value, .game, .faq details, .contact-card { background: var(--surface); }
  .hero__sub, .doc p, .doc li { color: var(--text-soft); }
}

/* ---------- Utilities & page-specific ------------------------------------- */
/* (Small helpers so markup needs no inline styles — keeps the CSP tight,
   with no style-src 'unsafe-inline'.) */
.mt-sm { margin-top: 0.5rem; }
.mt-lg { margin-top: 2.5rem; }
.mt-xl { margin-top: 2.75rem; }

/* Support — contact card heading sits flush at the top of its card */
.doc .contact-card h2 { margin-top: 0; }

/* 404 page */
.error-hero { text-align: center; padding-block: clamp(3.5rem, 12vw, 7rem); }
.error-hero .cta-row { justify-content: center; margin-top: 1.75rem; }
.error-icon {
  width: 120px;
  height: auto;
  border-radius: 26px;
  box-shadow: var(--shadow-md);
  margin: 0 auto 1.5rem;
}
.footer__bottom--bare { border: 0; margin: 0; padding: 0; }

/* ---------- Story (page + homepage teaser) -------------------------------- */
.pull {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 1.05rem + 1.3vw, 1.85rem);
  line-height: 1.32;
  color: var(--ink);
  text-align: center;
  max-width: 24ch;
  margin: 2.25rem auto;
  padding-top: 1.5rem;
  border-top: 3px solid var(--gold);
}
.signature {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
  margin-top: 2.25rem;
}
.signature span {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-mute);
  margin-top: 0.15rem;
}
.story-teaser { text-align: center; }
.story-teaser .section-lead { margin-inline: auto; }
.story-teaser .btn { margin-top: 1.6rem; }
