/* Chanom marketing site
   Tokens mirror constants/colors.ts in the app: dark-first surfaces, yellow as the
   action colour, indigo only where the app itself uses it (ChaCode), green/yellow
   for correct/skip. Type is Kanit, same as the app. */

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

:root {
  --ink-900: #0A0A0A;
  --surface: #121212;
  --surface-elevated: #1C1C1C;
  --surface-raised: #232323;
  --border: #333333;
  --glass-fill: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.10);

  --text: #F5F5F5;
  --text-secondary: #BBBBBB;
  --text-muted: #A0A0A0;
  --text-on-light: #0A0A0A;

  --action: #F5D04C;
  --action-soft: rgba(245, 208, 76, 0.5);
  --indigo: #4834d4;
  --indigo-dark: #130f40;
  --indigo-light: #9C96F0;
  --green: #93D155;
  --paper: #FEFEFE;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --pill: 999px;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: 'Kanit', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

::selection { background: var(--action); color: var(--text-on-light); }

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--action);
  color: var(--text-on-light);
  padding: 10px 16px;
  border-radius: var(--pill);
  font-weight: 500;
}
.skip-link:focus { top: 12px; }

/* ---------- Shared pieces ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-fill);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
}
.eyebrow .spark { color: var(--action); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head h2 {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 18px 0 14px;
  color: var(--action);
}
.section-head p {
  font-size: clamp(1.0625rem, 1.8vw, 1.1875rem);
  color: var(--text-muted);
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--pill);
  font-weight: 500;
  font-size: 0.9375rem;
  border: 0;
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s;
}
.btn-action { background: var(--action); color: var(--text-on-light); }
.btn-action:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(245, 208, 76, 0.25); }

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.store-badges a {
  display: inline-flex;
  transition: transform .2s var(--ease), opacity .2s;
}
.store-badges a:hover { transform: translateY(-2px); opacity: .88; }
/* The App Store SVG fills its box edge-to-edge, but the Google Play PNG has
   transparent padding top & bottom (visible button = 67.2% of its height),
   so it's scaled up by 1/0.672 to match visually. */
.store-badges .appstore { height: 52px; width: auto; }
.store-badges .googleplay { height: 77px; width: auto; margin: -12.6px -8px; }
@media (max-width: 420px) {
  .store-badges { gap: 10px; }
  .store-badges .appstore { height: 44px; }
  .store-badges .googleplay { height: 65.5px; margin: -10.75px -7px; }
}

/* Phone frame — sized by width; the screen keeps the capture's 1320×2868 ratio. */
.phone {
  --w: 300px;
  position: relative;
  width: var(--w);
  padding: calc(var(--w) * 0.035);
  border-radius: calc(var(--w) * 0.16);
  background: linear-gradient(145deg, #3a3a3a, #111 38%, #1a1a1a 70%, #3a3a3a);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 40px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 0 1px #000;
  flex-shrink: 0;
}
.phone::before { /* side button */
  content: '';
  position: absolute;
  right: -3px;
  top: 26%;
  width: 3px;
  height: 12%;
  border-radius: 0 3px 3px 0;
  background: #2a2a2a;
}
.phone .screen {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--w) * 0.13);
  background: var(--surface);
  aspect-ratio: 1320 / 2868;
}
.phone .screen img { width: 100%; height: 100%; object-fit: cover; }
.phone .island {
  position: absolute;
  top: calc(var(--w) * 0.058);
  left: 50%;
  transform: translateX(-50%);
  width: 31%;
  height: calc(var(--w) * 0.085);
  border-radius: var(--pill);
  background: #000;
  z-index: 2;
}

/* Reveal on scroll (only when JS has run, so no-JS visitors see everything) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 18, 18, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--glass-border); }
.nav .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
}
.nav .brand img { height: 26px; width: auto; }
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 24px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--pill);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--text); background: var(--glass-fill); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-fill);
}
.lang-switch button {
  min-width: 44px;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--action);
  color: var(--text-on-light);
  font-weight: 500;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
}
@media (max-width: 420px) {
  .nav .btn-action { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(40px, 8vw, 96px) 0 clamp(56px, 8vw, 110px);
  overflow: hidden;
  isolation: isolate;
}
.contours {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('../images/site/contours.svg') center / cover no-repeat;
  opacity: .55;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
          mask-image: linear-gradient(to bottom, #000 55%, transparent);
  animation: drift 40s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.08) translate3d(-2%, 2%, 0); }
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(2.6rem, 6.6vw, 5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 22px 0 22px;
  color: var(--action);
  text-wrap: wrap;
}
.hero-copy h1 .sparkle {
  display: inline-block;
  width: .62em;
  height: .62em;
  vertical-align: .38em;
  margin-left: .06em;
}
.hero-copy .lead {
  font-size: clamp(1.125rem, 2.1vw, 1.375rem);
  color: var(--text-secondary);
  max-width: 34ch;
  margin: 0 0 36px;
}
.hero-copy .fine {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px 0;
}
.hero-visual .phone { --w: min(320px, 72vw); transform: rotate(-3deg); }

.float {
  position: absolute;
  z-index: 3;
  animation: bob 6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-10px) rotate(var(--r, 0deg)); }
}
.float-toast {
  --r: 3deg;
  right: max(-10px, calc(50% - 280px));
  top: 36%;
  animation-delay: -1.5s;
  text-align: left;
}
/* The bob lives on .float; the pop-in lives on .toast, so the transforms don't fight. */
.toast {
  width: 262px;
  padding: 12px;
  border-radius: 18px;
  background: var(--surface-raised);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(10px) scale(0.94);
  transition: opacity .35s var(--ease), transform .45s cubic-bezier(.3, 1.5, .5, 1);
}
.toast.show { opacity: 1; transform: none; }
.toast-head { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
/* Mirrors components/BrewReveal.tsx: yellow-outlined pills that zoom in one by one. */
.brew-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 6px;
}
.brew-pills:not(:empty) { margin-top: 12px; }
.brew-pill {
  padding: 1px 10px 2px;
  border: 1px solid var(--action);
  border-radius: var(--pill);
  font-size: 0.8125rem;
  font-weight: 300;
  line-height: 1.4;
  color: var(--text);
  white-space: nowrap;
  animation: zoomIn .22s var(--ease) both;
}
.brew-pill.extra { border-color: var(--border); color: var(--text-muted); }
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.3); }
  50%  { opacity: 1; }
  to   { transform: scale(1); }
}
.toast .ico {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--action);
  color: var(--text-on-light);
}
.toast .ttl { font-size: 0.9375rem; font-weight: 500; line-height: 1.25; }
.toast .sub { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.3; }
.float-chip {
  --r: -4deg;
  left: max(-10px, calc(50% - 260px));
  bottom: 24%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 18px;
  border-radius: var(--pill);
  background: var(--surface-raised);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.7);
  font-size: 0.9375rem;
  font-weight: 400;
  white-space: nowrap;
  animation-delay: -3s;
}
.float-chip .go {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--action);
  color: var(--text-on-light);
}
.float-chip .caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: var(--action);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .hero-copy .store-badges { justify-content: center; }
  .hero-visual { margin-top: 12px; }
}
@media (max-width: 520px) {
  .float-toast { right: -4px; top: 34%; }
  .toast { width: 224px; padding: 10px; }
  .toast-head { gap: 10px; }
  .brew-pill { font-size: 0.75rem; padding: 1px 8px 2px; }
  .toast .ico { width: 32px; height: 32px; border-radius: 10px; }
  .float-chip { left: -4px; font-size: 0.875rem; }
}

/* ---------- Topic marquee ---------- */

.topics {
  padding: 16px 0 clamp(64px, 9vw, 120px);
  overflow: hidden;
}
.topics .label {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.marquee {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: marquee 60s linear infinite;
}
.marquee.reverse { animation-direction: reverse; animation-duration: 70s; margin-top: 12px; }
.marquee-mask {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.marquee-mask:hover .marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.chip {
  flex-shrink: 0;
  padding: 10px 20px;
  border-radius: var(--pill);
  border: 1px solid var(--border);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-secondary);
  white-space: nowrap;
}
.chip.hot { border-color: var(--action-soft); color: var(--action); }

/* ---------- How to play ---------- */

.how { padding: clamp(40px, 6vw, 80px) 0 clamp(72px, 10vw, 130px); }
.how-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.how-grid > * { min-width: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface-elevated);
  border: 1px solid var(--glass-border);
}
.step .num { /* the app's time-limit circles */
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--action);
  color: var(--action);
  font-weight: 500;
  font-size: 1.0625rem;
}
.step.on .num { background: var(--action); color: var(--text-on-light); }
.step h3 { margin: 0 0 4px; font-size: 1.1875rem; font-weight: 500; }
.step p { margin: 0; color: var(--text-muted); font-size: 0.9875rem; }

/* Landscape phone playing the game */
.demo { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.phone-land {
  --h: min(260px, 46vw);
  position: relative;
  width: min(calc(var(--h) * 2868 / 1320), 100%);
  padding: calc(var(--h) * 0.035);
  border-radius: calc(var(--h) * 0.16);
  background: linear-gradient(145deg, #3a3a3a, #111 38%, #1a1a1a 70%, #3a3a3a);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 40px 80px -20px rgba(0,0,0,.8);
}
.phone-land .screen {
  position: relative;
  aspect-ratio: 2868 / 1320;
  border-radius: calc(var(--h) * 0.13);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  padding: 4% 4% 4% 9%;
}
.phone-land .island {
  position: absolute;
  left: calc(var(--h) * 0.058);
  top: 50%;
  transform: translateY(-50%);
  width: calc(var(--h) * 0.085);
  height: 31%;
  border-radius: var(--pill);
  background: #000;
}
.game-card {
  position: relative;
  flex: 1;
  border-radius: clamp(10px, 2vw, 18px);
  background: var(--paper);
  color: var(--text-on-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 6%;
  transition: background-color .25s;
}
.game-card.correct { background: var(--green); }
.game-card.skip { background: var(--action); }
.game-card .back {
  position: absolute;
  top: 8%;
  left: 3.5%;
  width: clamp(18px, 3.4vw, 28px);
  opacity: .55;
}
.game-card .word {
  font-size: clamp(1.5rem, 4.4vw, 2.75rem);
  font-weight: 500;
  line-height: 1.1;
}
.game-card .timer {
  margin-top: 6px;
  font-size: clamp(0.9375rem, 2.2vw, 1.375rem);
  font-weight: 500;
}
.game-card .word.swap { animation: swapIn .35s var(--ease); }
@keyframes swapIn { from { opacity: 0; transform: translateX(24px); } }

.tilt { animation: none; transition: transform .35s var(--ease); }
.tilt.down { transform: perspective(900px) rotateX(-18deg); }
.tilt.up   { transform: perspective(900px) rotateX(18deg); }

.demo-controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.demo-controls button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--pill);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  font-size: 0.9375rem;
  font-weight: 400;
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.demo-controls button:hover { border-color: #555; }
.demo-controls .dot { width: 10px; height: 10px; border-radius: 50%; }
.demo-controls .ok .dot { background: var(--green); }
.demo-controls .no .dot { background: var(--action); }
.demo-score { font-size: 0.875rem; color: var(--text-muted); min-height: 1.4em; }
.demo-score strong { color: var(--text); font-weight: 500; }

@media (max-width: 900px) {
  .how-grid { grid-template-columns: 1fr; }
  .demo { order: -1; }
}

/* ---------- Feature rows ---------- */

.features { padding: 0 0 clamp(40px, 6vw, 80px); overflow-x: clip; }
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding: clamp(40px, 6vw, 72px) 0;
}
.feature.flip .feature-media { order: 2; }
.feature-media {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 36px 0;
  isolation: isolate;
}
.feature-media::before { /* soft yellow glow behind each phone */
  content: '';
  position: absolute;
  z-index: -1;
  inset: 8% 10%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245, 208, 76, 0.16), transparent);
}
.feature-media .phone { --w: min(300px, 70vw); }
.feature-copy .tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--action);
  margin-bottom: 12px;
}
.feature-copy h2 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}
.feature-copy h2 em { font-style: normal; color: var(--action); }
.nw { white-space: nowrap; }
.feature-copy > p {
  font-size: clamp(1.0625rem, 1.8vw, 1.1875rem);
  color: var(--text-muted);
  margin: 0 0 24px;
  max-width: 42ch;
}
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text-secondary);
}
.ticks li::before { /* the app's yellow checkbox */
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  border-radius: 4px;
  background: var(--action) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; text-align: center; }
  .feature.flip .feature-media { order: 0; }
  .feature-copy > p { margin-left: auto; margin-right: auto; }
  .ticks { justify-items: center; }
  .ticks li { text-align: left; }
}

/* ---------- Bento ---------- */

.more { padding: clamp(56px, 8vw, 110px) 0; }
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.tile {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface-elevated);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 250px;
}
.tile h3 { margin: 0; font-size: 1.375rem; font-weight: 500; line-height: 1.2; }
.tile p { margin: 0; color: var(--text-muted); font-size: 0.9875rem; max-width: 38ch; }
.tile .art { margin-top: auto; padding-top: 20px; }
.span-3 { grid-column: span 3; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }

/* ChaCode tile — mirrors the app's indigo ChaCode strip */
.chacode-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(100deg, var(--indigo) 0%, #3420b8 60%, var(--indigo-dark) 140%);
}
.chacode-logo { display: flex; align-items: baseline; gap: 4px; font-weight: 500; font-size: 1.5rem; line-height: 1; color: #fff; }
.chacode-logo span {
  font-size: 1rem;
  padding: 2px 7px 3px;
  border-radius: 6px;
  background: #fff;
  color: var(--indigo);
  font-weight: 600;
}
.chacode-strip small { display: block; font-size: 0.75rem; color: rgba(255,255,255,.85); margin-top: 6px; }
.chacode-digits {
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(10, 10, 30, 0.65);
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: 0.2em;
  padding-right: calc(14px - 0.2em);
  white-space: nowrap;
}

/* Time-limit strip */
.time-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-raised);
}
.time-strip .clock { width: 26px; height: 26px; margin-right: 4px; }
.time-strip .opt {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--action);
  color: var(--action);
  font-weight: 400;
  font-size: 0.9375rem;
  background: none;
  cursor: pointer;
  padding: 0;
  transition: background-color .2s, color .2s;
}
.time-strip .opt[aria-pressed="true"] { background: var(--action); color: var(--text-on-light); }
@media (max-width: 420px) {
  .time-strip { gap: 6px; flex-wrap: nowrap; }
  .time-strip .opt { width: 36px; height: 36px; font-size: 0.875rem; }
}

/* Round summary — mirrors the end-of-round card in screens/Play.tsx */
.summary {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--surface-raised);
}
.summary-score { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.summary-score .lbl { font-size: 0.875rem; font-weight: 500; }
.summary-score .ring {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--action);
  font-size: 1.75rem;
  font-weight: 600;
}
.summary-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; min-width: 0; }
.summary-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.summary-list svg { width: 18px; height: 18px; flex-shrink: 0; }
.summary-list .ok svg { color: var(--green); }
.summary-list .no svg { color: var(--action); }
.summary-list .no span:first-of-type { color: var(--text-muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Deck tiles like the app's home rail */
.deck-rail {
  display: flex;
  gap: 10px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, #000 75%, transparent);
          mask-image: linear-gradient(to right, #000 75%, transparent);
}
.deck {
  position: relative;
  flex-shrink: 0;
  width: 132px;
  aspect-ratio: 1.4;
  border-radius: 10px;
  overflow: hidden;
  background: #e8e8e8;
}
.deck img { width: 100%; height: 100%; object-fit: cover; }
.deck span {
  position: absolute;
  left: 10px;
  bottom: 7px;
  font-weight: 500;
  font-size: 0.875rem;
  color: #111;
}
.deck.dark span { color: #fff; }

@media (max-width: 900px) {
  .span-3, .span-2, .span-4 { grid-column: span 6; }
  .tile { min-height: 0; }
}

/* ---------- CTA ---------- */

.cta { padding: 0 0 clamp(72px, 10vw, 130px); }
.cta-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 36px;
  padding: clamp(40px, 7vw, 80px) clamp(24px, 6vw, 72px);
  background: var(--action);
  color: var(--text-on-light);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}
.cta-card::after { /* dark contour lines on yellow */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('../images/site/contours.svg') right center / cover no-repeat;
  filter: brightness(0);
  opacity: .12;
}
.cta-card .icon {
  width: clamp(96px, 14vw, 148px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 24%;
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.55);
  transform: rotate(-6deg);
}
.cta-card h2 {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.cta-card p { margin: 0 0 28px; font-size: 1.125rem; font-weight: 400; opacity: .78; max-width: 44ch; }
.cta-card .store-badges a { filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18)); }

@media (max-width: 700px) {
  .cta-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .cta-card .store-badges { justify-content: center; }
}
@media (max-width: 420px) {
  .cta-card { padding-left: 16px; padding-right: 16px; }
}

/* ---------- FAQ ---------- */

.faq { padding: 0 0 clamp(72px, 10vw, 120px); }
.faq .wrap { max-width: 800px; }
.faq details {
  border-top: 1px solid var(--border);
}
.faq details:last-of-type { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 400;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--action);
  border-bottom: 2px solid var(--action);
  transform: translateY(-3px) rotate(45deg);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq details p { margin: 0 0 22px; color: var(--text-muted); max-width: 64ch; }
.faq details a { color: var(--action); }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--glass-border);
  padding: 48px 0 calc(40px + env(safe-area-inset-bottom));
  background: var(--ink-900);
}
footer .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
}
.foot-brand img { height: 28px; width: auto; margin-bottom: 14px; }
.foot-brand p { margin: 0; color: var(--text-muted); font-size: 0.9375rem; }
.foot-brand a.mail { color: var(--text); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.foot-brand a.mail:hover { text-decoration-color: var(--action); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: flex-end; }
.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
.foot-nav a:hover { color: var(--action); }
.copyright {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

@media (max-width: 700px) {
  footer .wrap { grid-template-columns: 1fr; text-align: center; }
  .foot-brand img { margin: 0 auto 14px; }
  .foot-nav { justify-content: center; }
  .copyright { justify-content: center; }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
