@font-face {
  font-family: 'Rethink Sans';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('./fonts/RethinkRegular.ttf') format('truetype');
}
@font-face {
  font-family: 'Rethink Sans';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('./fonts/RethinkMedium.ttf') format('truetype');
}
@font-face {
  font-family: 'Rethink Sans';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('./fonts/RethinkBold.ttf') format('truetype');
}
@font-face {
  font-family: 'ScoreRoboto';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('./fonts/RobotoRegular.ttf') format('truetype');
}
@font-face {
  font-family: 'ScoreRoboto';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('./fonts/RobotoBold.ttf') format('truetype');
}

:root {
  color-scheme: light;
  --paper: #FBF7EF;
  --surface: #FFFFFF;
  --raised: #F0E9DE;
  --ink: #282329;
  --muted: #665C61;
  --line: rgba(40, 35, 41, 0.13);
  --line-strong: rgba(40, 35, 41, 0.24);
  --coral: #E94E43;
  --coral-hover: #D63E33;
  --coral-soft: #FBE4DC;
  --sage: #3D6B5C;
  --sage-soft: #E5F1EC;
  --lavender: #CDBAF7;
  --lavender-soft: #EFE8FD;
  --lavender-ink: #6E4BC4;
  --shadow: 0 22px 60px rgba(40, 35, 41, 0.12);
  --shadow-sm: 0 6px 20px rgba(40, 35, 41, 0.06);
  --header-bg: rgba(251, 247, 239, 0.84);
  --phone-bezel: #1B1720;
  --phone-screen-bg: #F2F5FB;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #1D1820;
    --surface: #26202A;
    --raised: #332B38;
    --ink: #FAF3E8;
    --muted: #C4B7C1;
    --line: rgba(250, 243, 232, 0.13);
    --line-strong: rgba(250, 243, 232, 0.26);
    --coral: #F2685D;
    --coral-hover: #FF7B71;
    --coral-soft: rgba(240, 91, 80, 0.18);
    --sage: #8AD6BA;
    --sage-soft: rgba(138, 214, 186, 0.14);
    --lavender: #CDBAF7;
    --lavender-soft: rgba(205, 186, 247, 0.14);
    --lavender-ink: #CDBAF7;
    --shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.28);
    --header-bg: rgba(29, 24, 32, 0.84);
    --phone-bezel: #110E14;
    --phone-screen-bg: #0D1728;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1D1820;
  --surface: #26202A;
  --raised: #332B38;
  --ink: #FAF3E8;
  --muted: #C4B7C1;
  --line: rgba(250, 243, 232, 0.13);
  --line-strong: rgba(250, 243, 232, 0.26);
  --coral: #F2685D;
  --coral-hover: #FF7B71;
  --coral-soft: rgba(240, 91, 80, 0.18);
  --sage: #8AD6BA;
  --sage-soft: rgba(138, 214, 186, 0.14);
  --lavender: #CDBAF7;
  --lavender-soft: rgba(205, 186, 247, 0.14);
  --lavender-ink: #CDBAF7;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.28);
  --header-bg: rgba(29, 24, 32, 0.84);
  --phone-bezel: #110E14;
  --phone-screen-bg: #0D1728;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Rethink Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.28s ease, color 0.28s ease;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.28s ease, border-color 0.28s ease;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 70px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(40, 35, 41, 0.16);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.brand:hover img { transform: rotate(-6deg) scale(1.05); }
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--ink); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* Theme toggle button */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.theme-toggle:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  width: 17px;
  height: 17px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  font-size: 13px;
  font-weight: 700;
}
.lang-switch a, .lang-switch span {
  padding: 5px 10px;
  border-radius: 999px;
  text-decoration: none;
  line-height: 1;
}
.lang-switch .active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.lang-switch a { color: var(--muted); }
.lang-switch a:hover { color: var(--ink); }

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn-pill:hover { transform: translateY(-1px); opacity: 0.92; }

/* Hero */
.hero {
  position: relative;
  padding: 56px 0 76px;
  overflow: hidden;
}
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(42px);
  z-index: 0;
  will-change: transform;
}
.hero::before {
  width: 580px;
  height: 440px;
  right: 2%;
  top: 2%;
  background: radial-gradient(circle, var(--lavender-soft) 0%, transparent 72%);
  animation: glowDrift 11s ease-in-out infinite alternate;
}
.hero::after {
  width: 480px;
  height: 360px;
  left: -4%;
  top: -4%;
  background: radial-gradient(circle, var(--coral-soft) 0%, transparent 70%);
  animation: glowDrift 14s ease-in-out infinite alternate-reverse;
}
.hero > .wrap { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(240, 91, 80, 0.55);
  animation: pulseDot 2.4s ease-out infinite;
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.hero-lead {
  margin: 0 0 28px;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 540px;
}

/* Store CTA buttons */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease, border-color 0.18s ease;
  min-height: 58px;
}
.store-btn svg { flex-shrink: 0; }
.store-btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 26px rgba(40, 35, 41, 0.18);
}
.store-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(40, 35, 41, 0.24); }
.store-btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.store-btn-secondary:hover { transform: translateY(-2px); border-color: var(--ink); }
.store-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}
.store-kicker {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.78;
}
.store-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.trust-item svg { color: var(--sage); flex-shrink: 0; }

/* Hero Phone Showcase */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.phone-bezel {
  position: relative;
  width: min(306px, 82vw);
  aspect-ratio: 640 / 1390;
  border-radius: 42px;
  padding: 9px;
  background: var(--phone-bezel);
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.14),
    var(--shadow);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
.hero-visual .phone-bezel {
  animation: phoneFloat 6.5s ease-in-out infinite;
}
.hero-visual .phone-bezel:hover {
  animation-play-state: paused;
  transform: translateY(-4px) scale(1.012);
}
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--phone-screen-bg);
}
.phone-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.phone-screen img.is-active {
  opacity: 1;
  transform: scale(1);
}

.screen-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 500px;
}
.screen-tab {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.16s ease;
}
.screen-tab:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-1px); }
.screen-tab.is-active {
  background: var(--coral);
  border-color: var(--coral);
  color: #FFFFFF;
}

/* Section scaffolding */
.section {
  padding: 72px 0;
}
.section-alt {
  background: var(--raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.28s ease, border-color 0.28s ease;
}
.section-head {
  max-width: 660px;
  margin-bottom: 40px;
}
.section-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 10px;
}
.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

/* Scroll reveal (only activates when JS adds .has-reveal on html) */
.has-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0ms);
}
.has-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Feature Bento */
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.28s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--coral-soft);
  color: var(--coral);
  margin-bottom: 16px;
}
.card-icon.sage { background: var(--sage-soft); color: var(--sage); }
.card-icon.lavender { background: var(--lavender-soft); color: var(--lavender-ink); }
.card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  letter-spacing: -0.015em;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

/* 3D Dice Spotlight */
.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 52px;
  align-items: center;
}
.spotlight-phone {
  display: flex;
  justify-content: center;
}
.spotlight-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 14px;
}
.spotlight-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  color: var(--ink);
}
.spotlight-list .bullet {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--sage-soft);
  color: var(--sage);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.dice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.dice-chip {
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: 'ScoreRoboto', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

/* Interactive Mini Dice Roller Widget */
.dice-tray {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.dice-pair {
  display: flex;
  align-items: center;
  gap: 12px;
}
.die-cube {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: linear-gradient(145deg, #7C5AE6 0%, #5B38C8 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.34),
    inset 0 -3px 5px rgba(25, 12, 70, 0.35),
    0 8px 18px rgba(91, 56, 200, 0.32);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 8px;
  gap: 2px;
  will-change: transform;
}
.die-cube.is-rolling {
  animation: dieTumble 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}
.die-cube:nth-child(2).is-rolling {
  animation-name: dieTumbleAlt;
}
.pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FAF6FF;
  place-self: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.14s ease, transform 0.14s ease;
}
.pip.on {
  opacity: 1;
  transform: scale(1);
}
.dice-readout {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.dice-readout-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.dice-readout-sum {
  font-family: 'ScoreRoboto', sans-serif;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.dice-readout-sum.is-pop {
  animation: scorePop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.dice-roll-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 13px;
  border: 0;
  background: var(--coral);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(233, 78, 67, 0.26);
  transition: transform 0.15s ease, background 0.15s ease;
}
.dice-roll-btn:hover { background: var(--coral-hover); transform: translateY(-1px); }
.dice-roll-btn:active { transform: scale(0.96); }

/* Interactive 3-Style Playground */
.playground-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.15s ease;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.is-active {
  background: var(--ink);
  color: var(--paper);
}

.demo-board {
  --d-paper: #FBF7EF;
  --d-surface: #FBF7EF;
  --d-raised: #F0E9DE;
  --d-ink: #282329;
  --d-muted: #6C6267;
  --d-line: #8F8581;
  --d-primary: #F05B50;
  --d-on-primary: #241E25;
  --d-gold: #79500B;
  --d-gold-soft: #F9ECCB;
  --d-p0: #73BEA5;
  --d-p1: #CDAE90;
  --d-p2: #2B745D;
  --d-p3: #7751A4;
  --d-radius: 16px;
  --d-stroke: 1.5px;
  --d-tile-shadow: none;

  background: var(--d-paper);
  color: var(--d-ink);
  border-radius: 28px;
  padding: 26px;
  border: var(--d-stroke) solid var(--d-line);
  box-shadow: var(--shadow);
  transition: background 0.24s ease, color 0.24s ease, border-color 0.24s ease;
}

/* Exact tokens from src/theme-core.ts */
.demo-board[data-style="sketch"][data-mode="dark"] {
  --d-paper: #241E25; --d-surface: #241E25; --d-raised: #352C36; --d-ink: #FAF3E8;
  --d-muted: #CABCC5; --d-line: #ABA0A7; --d-primary: #F05B50; --d-on-primary: #241E25;
  --d-gold: #F0D18C; --d-gold-soft: #403626;
  --d-p0: #73BEA5; --d-p1: #CDAE90; --d-p2: #8AD6BA; --d-p3: #C5AFE9;
  --d-radius: 16px; --d-stroke: 1.5px;
}
.demo-board[data-style="object"][data-mode="light"] {
  --d-paper: #F7F4EE; --d-surface: #F4F1EB; --d-raised: #E9E5DE; --d-ink: #242422;
  --d-muted: #625D54; --d-line: #C7BFB3; --d-primary: #B34F20; --d-on-primary: #FFFFFF;
  --d-gold: #79500B; --d-gold-soft: #F9ECCB;
  --d-p0: #C0602D; --d-p1: #82796B; --d-p2: #2B745D; --d-p3: #7751A4;
  --d-radius: 24px; --d-stroke: 1px;
  --d-tile-shadow: 0 5px 14px rgba(98, 86, 74, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.demo-board[data-style="object"][data-mode="dark"] {
  --d-paper: #242423; --d-surface: #20201F; --d-raised: #2D2D2B; --d-ink: #F4EFE6;
  --d-muted: #C0BAAE; --d-line: #53554B; --d-primary: #A15A33; --d-on-primary: #FFF6EA;
  --d-gold: #F0D18C; --d-gold-soft: #403626;
  --d-p0: #D28C5B; --d-p1: #C7B699; --d-p2: #8AD6BA; --d-p3: #C5AFE9;
  --d-radius: 24px; --d-stroke: 1px;
  --d-tile-shadow: 0 6px 18px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.demo-board[data-style="light"][data-mode="light"] {
  --d-paper: #F2F5FB; --d-surface: #FCFDFF; --d-raised: #E9EDF6; --d-ink: #18223C;
  --d-muted: #59677F; --d-line: #C4CEE2; --d-primary: #A51373; --d-on-primary: #FFFFFF;
  --d-gold: #79500B; --d-gold-soft: #F9ECCB;
  --d-p0: #DC0085; --d-p1: #00B6DA; --d-p2: #2B745D; --d-p3: #7751A4;
  --d-radius: 22px; --d-stroke: 1px;
  --d-tile-shadow: 0 6px 20px rgba(165, 19, 115, 0.08);
}
.demo-board[data-style="light"][data-mode="dark"] {
  --d-paper: #0D1728; --d-surface: #0F1D30; --d-raised: #243149; --d-ink: #F4F6FF;
  --d-muted: #B7C3DA; --d-line: #22657D; --d-primary: #AC006C; --d-on-primary: #FFFFFF;
  --d-gold: #F0D18C; --d-gold-soft: #403626;
  --d-p0: #DC0085; --d-p1: #00B6DA; --d-p2: #8AD6BA; --d-p3: #C5AFE9;
  --d-radius: 22px; --d-stroke: 1px;
  --d-tile-shadow: 0 0 24px rgba(0, 182, 218, 0.14);
}

.demo-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.demo-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.demo-sub {
  font-size: 13px;
  color: var(--d-muted);
}
.demo-hint {
  font-size: 13px;
  color: var(--d-muted);
  background: var(--d-raised);
  padding: 6px 12px;
  border-radius: 999px;
}
.demo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.demo-tile {
  background: var(--d-surface);
  border: var(--d-stroke) solid var(--d-line);
  border-radius: var(--d-radius);
  padding: 16px;
  box-shadow: var(--d-tile-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.22s ease;
}
.demo-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.demo-player {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
}
.demo-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  flex-shrink: 0;
}
.demo-dot.p0 { background: var(--d-p0); }
.demo-dot.p1 { background: var(--d-p1); }
.demo-dot.p2 { background: var(--d-p2); }
.demo-dot.p3 { background: var(--d-p3); }
.demo-star {
  color: var(--d-gold);
  font-size: 16px;
  opacity: 0;
  transform: scale(0.5) rotate(-25deg);
  transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.demo-tile.is-leader .demo-star {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.demo-score {
  font-family: 'ScoreRoboto', sans-serif;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding: 8px 0;
}
.demo-score.is-pop {
  animation: scorePop 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.demo-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--d-raised);
  overflow: hidden;
}
.demo-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.demo-bar-fill.p0 { background: var(--d-p0); }
.demo-bar-fill.p1 { background: var(--d-p1); }
.demo-bar-fill.p2 { background: var(--d-p2); }
.demo-bar-fill.p3 { background: var(--d-p3); }
.demo-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.demo-step {
  border: 1px solid var(--d-line);
  background: var(--d-raised);
  color: var(--d-ink);
  border-radius: 10px;
  padding: 8px 0;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.1s ease, background 0.15s ease;
}
.demo-step:hover { background: var(--d-primary); color: var(--d-on-primary); border-color: var(--d-primary); }
.demo-step:active { transform: scale(0.95); }

/* 29 Games Catalog */
.games-groups {
  display: grid;
  gap: 24px;
}
.game-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
}
.game-group h3 {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.game-pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--raised);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.game-pill:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.custom-note {
  margin-top: 22px;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  background: var(--lavender-soft);
  border: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink);
}

/* Bottom CTA */
.cta-box {
  background: #241E25;
  color: #FAF3E8;
  border-radius: 32px;
  padding: 52px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  background-image:
    radial-gradient(520px 300px at 15% 0%, rgba(240, 91, 80, 0.24), transparent 70%),
    radial-gradient(520px 300px at 88% 100%, rgba(205, 186, 247, 0.22), transparent 70%);
}
.cta-box img {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  margin: 0 auto 20px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}
.cta-box h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.cta-box p {
  margin: 0 auto 28px;
  max-width: 520px;
  color: #D2C6CE;
  font-size: 17px;
}
.cta-box .store-row { justify-content: center; margin-bottom: 0; }
.cta-box .store-btn-primary {
  background: #FAF3E8;
  color: #241E25;
}
.cta-box .store-btn-secondary {
  background: rgba(250, 243, 232, 0.08);
  color: #FAF3E8;
  border-color: rgba(250, 243, 232, 0.28);
}
.cta-box .store-btn-secondary:hover {
  background: rgba(250, 243, 232, 0.16);
  border-color: #FAF3E8;
}

/* Footer */
.site-footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.footer-links a {
  text-decoration: none;
  color: var(--muted);
}
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-cross {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.footer-cross a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.footer-cross a:hover { text-decoration: underline; }

/* Keyframes */
@keyframes phoneFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-9px); }
}
@keyframes glowDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-24px, 18px) scale(1.08); }
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(240, 91, 80, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(240, 91, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 91, 80, 0); }
}
@keyframes scorePop {
  0% { transform: scale(1); }
  45% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
@keyframes dieTumble {
  0% { transform: translateY(0) rotate(0deg) scale(1); }
  30% { transform: translateY(-12px) rotate(-135deg) scale(1.08); }
  65% { transform: translateY(3px) rotate(-290deg) scale(0.95); }
  85% { transform: translateY(-3px) rotate(-350deg) scale(1.02); }
  100% { transform: translateY(0) rotate(-360deg) scale(1); }
}
@keyframes dieTumbleAlt {
  0% { transform: translateY(0) rotate(0deg) scale(1); }
  30% { transform: translateY(-14px) rotate(145deg) scale(1.08); }
  65% { transform: translateY(4px) rotate(305deg) scale(0.95); }
  85% { transform: translateY(-2px) rotate(352deg) scale(1.02); }
  100% { transform: translateY(0) rotate(360deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .has-reveal [data-reveal] { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 920px) {
  .nav { display: none; }
  .hero-grid, .spotlight { grid-template-columns: 1fr; gap: 38px; }
  .hero { padding: 36px 0 56px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spotlight-phone { order: -1; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .btn-pill { display: none; }
  .bento { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .cta-box { padding: 38px 22px; border-radius: 24px; }
  .store-btn { flex: 1 1 200px; justify-content: center; }
  .demo-board { padding: 18px; }
}
