/* The Culture Says — marketing site. Regal scheme, mirrors the app
   (lib/board_view.dart palette + Cinzel/Fraunces/Inter type). */

:root {
  --onyx: #07100b;
  --pine: #0c1711;
  --panel: #14211a;
  --panel2: #18281f;
  --line: rgba(201, 162, 75, 0.22);
  --line-strong: rgba(201, 162, 75, 0.5);
  --gold: #c9a24b;
  --gold-bright: #e8c97a;
  --gold-deep: #8a6a2a;
  --gold-mid: #b98e36;
  --on-gold: #241a06;
  --emerald: #3da37c;
  --garnet: #c05a6e;
  --strike: #c8434f;
  --ivory: #f3ebd8;
  --ink-soft: #cfc4a8;
  --ink-mute: #8e866f;

  /* themed surfaces (dark defaults; overridden under .light) */
  --glow: rgba(20, 39, 29, 0.65);
  --board-glow: rgba(20, 39, 29, 0.55);
  --nav-bg: rgba(7, 16, 11, 0.72);
  --surface-faint: rgba(255, 255, 255, 0.02);
  --surface-sunken: rgba(0, 0, 0, 0.2);
  --faint-text: rgba(255, 255, 255, 0.14);
  --rank-bg: rgba(0, 0, 0, 0.5);

  --display: "Cinzel", Georgia, serif;
  --serif: "Fraunces", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;

  --maxw: 1140px;
}

/* Light mode — warm parchment (mirrors the app's Light theme). */
:root.light {
  --onyx: #f0e4c6;
  --pine: #fbf4e1;
  --panel: #fcf8ec;
  --panel2: #f3e9ce;
  --line: rgba(138, 106, 42, 0.30);
  --line-strong: rgba(138, 106, 42, 0.5);
  --gold: #a87e2f;
  --gold-bright: #cba14c;
  --gold-deep: #b89243;
  --gold-mid: #b98e36;
  --on-gold: #2a1e07;
  --emerald: #2e7d5b;
  --garnet: #b23a52;
  --strike: #bb3b4d;
  --ivory: #22402f;
  --ink-soft: #6a5e3c;
  --ink-mute: #8e815b;
  --glow: rgba(184, 142, 54, 0.12);
  --board-glow: rgba(184, 142, 54, 0.10);
  --nav-bg: rgba(251, 244, 225, 0.82);
  --surface-faint: rgba(138, 106, 42, 0.06);
  --surface-sunken: rgba(138, 106, 42, 0.05);
  --faint-text: rgba(40, 30, 10, 0.20);
  --rank-bg: rgba(138, 106, 42, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink-soft);
  background:
    radial-gradient(120% 90% at 50% -10%, var(--glow) 0%, transparent 55%),
    linear-gradient(180deg, var(--pine) 0%, var(--onyx) 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--ivory); }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- shared type treatments ---- */
.eyebrow {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  margin: 0;
}
.diamond { color: var(--gold); font-size: 0.6em; vertical-align: middle; }

.section-title {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--ivory);
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  margin: 0;
}

.rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-deep), transparent);
  border: 0;
  margin: 0;
}

/* ---- nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand b {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.92rem;
  color: var(--ivory);
}
.brand b span { color: var(--gold-bright); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-family: var(--display);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav-links a.cta { color: var(--on-gold); }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 4px;
  border: 1px solid var(--gold-deep);
  color: var(--gold-bright);
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold {
  color: var(--on-gold);
  border-color: transparent;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-mid));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}
.btn-gold:hover { color: var(--on-gold); }

/* ---- store badges (official Apple / Google artwork) ---- */
.stores { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.store-badge { display: inline-block; transition: transform 0.15s ease; }
.store-badge:hover { transform: translateY(-2px); }
/* Apple's badge is tight; Google's PNG carries built-in padding — nudge the
   heights so the visible pills read as the same size side by side. */
.store-badge img { display: block; width: auto; }
.store-badge .apple { height: 52px; }
.store-badge .play { height: 76px; margin: -12px 0; }

/* ---- hero ---- */
.hero { padding: clamp(48px, 8vw, 96px) 0 64px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: 0.06em;
  margin: 0;
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--ivory);
}
.wordmark span { display: block; color: var(--gold-bright); }
.lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 30ch;
  margin: 22px 0 28px;
}
.hero-cta { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.age-pill {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 5px 14px;
}

/* ---- the answer board (hero signature) ---- */
.board {
  background:
    radial-gradient(120% 80% at 50% 0%, var(--board-glow), transparent 60%),
    linear-gradient(180deg, var(--pine), var(--onyx));
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.board-head { text-align: center; margin-bottom: 16px; }
.board-prompt {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ivory);
  margin: 8px 0 0;
}
#g-slats { perspective: 900px; }
.slat {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 7px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  background: var(--surface-faint);
  transform-origin: center;
  /* button reset (slats render as <button> when tappable) */
  font: inherit;
  color: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}
.slat.tappable { cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease; }
.slat.tappable:hover { transform: translateY(-2px); border-color: var(--gold); background: rgba(201, 162, 75, 0.08); }
.slat .rank {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--serif); font-weight: 600;
  color: var(--gold);
  background: var(--rank-bg);
  border: 1px solid var(--gold-deep);
}
.slat .answer { font-family: var(--serif); font-style: italic; color: var(--ink-mute); flex: 1; line-height: 1.2; }
/* line-height:1 keeps the (larger) revealed score from growing the row — the
   rank circle stays the tallest element, so concealed and revealed rows match
   and revealing never shifts the layout. */
.slat .score { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; line-height: 1; color: var(--ink-mute); }
.slat.revealed {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-mid));
  border-color: var(--gold-bright);
}
.slat.revealed .rank { background: transparent; border-color: rgba(36, 26, 6, 0.5); color: var(--on-gold); }
.slat.revealed .answer { color: var(--on-gold); font-style: normal; font-weight: 500; }
.slat.revealed .score { color: var(--on-gold); font-size: 1.4rem; }
.strikes { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.strikes button, .strikes span {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-faint);
  color: var(--faint-text);
  font-family: var(--serif);
  padding: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.strikes button:not(:disabled) { cursor: pointer; }
.strikes button:not(:disabled):hover { transform: translateY(-2px); border-color: var(--strike); color: var(--strike); }
.strikes .lit {
  background: linear-gradient(180deg, var(--strike), var(--strike-deep, #9b2f3c));
  border-color: var(--strike);
  color: #fff;
}
.g-status {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin: 16px 0 0;
  min-height: 1.2em;
}

/* ---- value props ---- */
.band { padding: 56px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-head { text-align: center; margin-bottom: 32px; }
.props { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.prop {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  background: var(--surface-sunken);
}
.prop .glyph { font-size: 1.6rem; }
.prop h3 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.92rem;
  color: var(--ivory);
  margin: 12px 0 6px;
}
.prop p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

/* ---- how to play ---- */
.rules { padding: 72px 0; }
.rules-head { text-align: center; margin-bottom: 14px; }
.rules-sub {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-mute);
  max-width: 46ch;
  margin: 0 auto 40px;
}
.rule-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.rcard {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  background: var(--panel);
}
.rcard h3 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  color: var(--gold-bright);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rcard ol { list-style: none; counter-reset: r; margin: 0; padding: 0; }
.rcard li {
  counter-increment: r;
  display: flex;
  gap: 12px;
  padding: 7px 0;
  font-size: 0.96rem;
  color: var(--ink-soft);
}
.rcard li::before {
  content: counter(r);
  flex: none;
  width: 22px; height: 22px;
  margin-top: 2px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--display); font-size: 0.7rem; font-weight: 700;
  color: var(--gold); border: 1px solid var(--gold-deep);
}

/* ---- download ---- */
.download { padding: 80px 0; text-align: center; }
.download .stores { justify-content: center; margin-top: 28px; }
.download .age-pill { margin-top: 24px; }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer .brand b { font-size: 0.8rem; }
.footer-links { display: flex; gap: 22px; }
.footer-links a, .footer small {
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ---- legal (privacy) ---- */
.legal { padding: 56px 0 80px; }
.legal-doc { max-width: 760px; margin: 0 auto; }
.legal h1 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ivory);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 0 0 6px;
}
.legal .updated { font-family: var(--display); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); }
.legal h2 {
  font-family: var(--serif);
  color: var(--gold-bright);
  font-size: 1.35rem;
  margin: 40px 0 10px;
}
.legal p, .legal li { font-size: 1rem; color: var(--ink-soft); }
.legal ul { padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal .note {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 16px 18px;
  background: rgba(201, 162, 75, 0.06);
  font-size: 0.92rem;
  margin: 24px 0;
}

/* ---- motion: a card flips (vertically, like the app) when it's revealed ---- */
@keyframes flipReveal {
  from { transform: rotateX(90deg); }
  to { transform: rotateX(0); }
}
.slat.flip { animation: flipReveal 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .board { order: 2; }
  .props { grid-template-columns: 1fr; }
  .rule-cards { grid-template-columns: 1fr; }
  .nav-links a:not(.cta) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slat.flip { animation: none; }
  .btn:hover, .store-badge:hover, .slat.tappable:hover, .strikes button:hover { transform: none; }
}

/* ---- theme toggle ---- */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-faint);
  color: var(--gold-bright);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .theme-toggle:hover { transform: none; } }
