/* Ludo landing — mobile-first, content-rich */
:root {
  --bg-deep: #0f0c1a;
  --bg-card: #1a1430;
  --bg-elevated: #241d3d;
  --text: #f4f0ff;
  --text-muted: #a89cc8;
  --accent-gold: #e8c547;
  --accent-coral: #ff6b6b;
  --accent-mint: #4ecdc4;
  --accent-sky: #6c9eff;
  --r-ludo: #e63946;
  --g-ludo: #2a9d8f;
  --b-ludo: #457b9d;
  --y-ludo: #e9c46a;
  --radius: 16px;
  --radius-sm: 10px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --header-h: 56px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--accent-gold);
  color: var(--bg-deep);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(100% - 2rem, 1100px);
  margin-inline: auto;
}

.container.narrow {
  width: min(100% - 2rem, 640px);
}

@media (max-width: 480px) {
  .container,
  .container.narrow {
    width: min(100% - 1.25rem, 1100px);
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0);
  background: rgba(15, 12, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  height: var(--header-h);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-lang {
  font-size: 0.8rem;
  padding: 0.55rem 0.85rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
}

.logo-dice {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-gold), #c9a227);
  box-shadow: 0 4px 14px rgba(232, 197, 71, 0.35);
  position: relative;
}

.logo-dice::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 4px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 4px,
    rgba(0, 0, 0, 0.12) 4px,
    rgba(0, 0, 0, 0.12) 5px
  );
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  letter-spacing: -0.02em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

a,
button,
.btn {
  -webkit-tap-highlight-color: rgba(108, 158, 255, 0.12);
}

.btn-header {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-header:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-play {
  background: linear-gradient(145deg, #2d3142, #1e2129);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.btn-play:hover {
  box-shadow: 0 12px 32px rgba(108, 158, 255, 0.2);
  border-color: rgba(108, 158, 255, 0.35);
}

.btn-nav-play {
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.btn-lg {
  padding: 0.9rem 1.75rem;
  font-size: 1rem;
}

.play-icon {
  flex-shrink: 0;
  opacity: 0.95;
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(2rem, 6vw, 4rem) 0 clamp(3rem, 8vw, 5rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% -10%, rgba(108, 158, 255, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(232, 197, 71, 0.12), transparent 50%),
    var(--bg-deep);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .hero-grid--games-first {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }
}

.hero--games-first {
  padding-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.lead--tight {
  max-width: 36rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.btn-hero-primary {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}

.btn-hero-secondary {
  text-decoration: none;
}

.hero-pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-pills li {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}

.hero-visual--link {
  text-decoration: none;
  color: inherit;
  justify-self: center;
  position: relative;
  transition: transform 0.2s ease;
  padding-bottom: 2.5rem;
}

@media (hover: hover) {
  .hero-visual--link:hover {
    transform: translateY(4px);
  }

  .hero-visual--link:hover .board-preview {
    box-shadow: var(--shadow), 0 0 0 2px rgba(108, 158, 255, 0.45);
  }
}

.hero-visual-hint {
  position: absolute;
  bottom: -1.75rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-mint);
  text-shadow: 0 2px 12px var(--bg-deep);
}

@media (min-width: 768px) {
  .hero-visual--link {
    justify-self: end;
  }
}

.board-preview--pulse {
  animation: board-glow 4s ease-in-out infinite;
}

@keyframes board-glow {
  0%,
  100% {
    box-shadow: var(--shadow), inset 0 0 0 3px rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow: var(--shadow), inset 0 0 0 3px rgba(108, 158, 255, 0.35), 0 0 40px rgba(108, 158, 255, 0.15);
  }
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.lead {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  font-size: 1.02rem;
}

.lead a {
  color: var(--accent-sky);
  font-weight: 600;
  text-underline-offset: 2px;
}

.hero-cta {
  margin-bottom: 1.75rem;
}

.hero-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 400px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
}

.hero-stats li {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.75rem;
  text-align: center;
}

.hero-stats strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.hero-stats span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Board preview */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.board-preview {
  width: min(280px, 85vw);
  aspect-ratio: 1;
  border-radius: 24px;
  background:
    conic-gradient(
      from 45deg,
      var(--r-ludo) 0deg 90deg,
      var(--g-ludo) 90deg 180deg,
      var(--b-ludo) 180deg 270deg,
      var(--y-ludo) 270deg 360deg
    );
  padding: 18%;
  position: relative;
  box-shadow: var(--shadow), inset 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.board-preview::before {
  content: "";
  position: absolute;
  inset: 22%;
  background: var(--bg-elevated);
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.pawn {
  position: absolute;
  width: 14%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.pawn-r {
  top: 10%;
  left: 10%;
  background: var(--r-ludo);
}

.pawn-g {
  top: 10%;
  right: 10%;
  background: var(--g-ludo);
}

.pawn-b {
  bottom: 10%;
  right: 10%;
  background: var(--b-ludo);
}

.pawn-y {
  bottom: 10%;
  left: 10%;
  background: var(--y-ludo);
}

.dice-face {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22%;
  aspect-ratio: 1;
  background: linear-gradient(145deg, #fff, #e8e8e8);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  color: #333;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Sections */
.section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.section:nth-child(even of .section) {
  background: rgba(255, 255, 255, 0.02);
}

.section-toc h2,
.section-about h2,
.section-intro h2,
.section-history h2,
.section-board h2,
.section-strategy h2,
.section-variations h2,
.section-wellbeing h2,
.section-head h2,
.section-how h2,
.section-screens h2,
.section-faq h2,
.section-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.section-intro p,
.section-history p,
.section-board p,
.section-strategy p,
.section-variations p,
.section-wellbeing p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.toc-lead {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
}

.toc-lead a {
  color: var(--accent-sky);
  font-weight: 600;
  text-underline-offset: 2px;
}

.toc-list {
  margin: 0;
  padding: 0 0 0 1.25rem;
  color: var(--text-muted);
  display: grid;
  gap: 0.5rem;
}

.toc-list a {
  color: var(--accent-sky);
  text-decoration: none;
  font-weight: 500;
}

.toc-list a:hover {
  text-decoration: underline;
}

.section-about p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.last-updated {
  margin-top: 1.25rem !important;
  margin-bottom: 0 !important;
  font-size: 0.9rem;
  color: var(--text);
}

.section-intro p:last-child,
.section-history p:last-child,
.section-board p:last-child,
.section-wellbeing p:last-child {
  margin-bottom: 0;
}

.strategy-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.strategy-list li {
  margin-bottom: 1rem;
}

.strategy-list li:last-child {
  margin-bottom: 0;
}

.strategy-list strong {
  color: var(--text);
}

.table-scroll {
  overflow-x: auto;
  margin: 1.25rem 0 0.75rem;
  -webkit-overflow-scrolling: touch;
}

.content-table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.content-table th,
.content-table td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.65rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

.content-table th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 600;
}

.content-table td {
  color: var(--text-muted);
}

.content-table td:first-child {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}

.table-note {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

.section-head p {
  color: var(--text-muted);
  margin: 0;
}

.section-head a,
main .section .faq-item a {
  color: var(--accent-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.section-head a:hover,
main .section .faq-item a:hover {
  color: #f5d56a;
}

.footer-tag code {
  font-size: 0.78em;
  padding: 0.12em 0.4em;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--text-muted);
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(232, 197, 71, 0.25);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 640px;
  margin-inline: auto;
  counter-reset: step;
}

.steps > li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.steps > li:last-child {
  border-bottom: none;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-gold), #b8941f);
  color: var(--bg-deep);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.steps h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Screens */
.screens-lead {
  text-align: center;
  color: var(--text-muted);
  margin: 0 auto 2rem;
  max-width: 520px;
}

.screen-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.screen-frame {
  margin: 0;
  flex: 0 0 min(240px, 75vw);
  scroll-snap-align: start;
  container-type: inline-size;
  container-name: phone-mock;
}

.screen-inner {
  aspect-ratio: 9 / 19;
  border-radius: 20px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  margin-bottom: 0.6rem;
  overflow: hidden;
  font-size: 9px;
  font-size: clamp(7px, 3.6cqi, 10.5px);
}

.screen-a {
  background: linear-gradient(160deg, var(--bg-elevated), #2d2650);
}

.screen-b {
  background: linear-gradient(160deg, #1e3a5f, var(--bg-card));
}

.screen-c {
  background: linear-gradient(160deg, #2d1f3d, var(--bg-elevated));
}

/* Ludo-themed phone mockups (screenshots section) */
.mock-phone {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 5% 7% 8%;
  color: var(--text-muted);
}

.mock-notch {
  width: 32%;
  max-width: 72px;
  height: 1.6em;
  margin: 0 auto 0.6em;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 0 0 10px 10px;
  flex-shrink: 0;
}

.mock-lobby {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65em;
  min-height: 0;
}

.mock-lobby-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.85em;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.mock-lobby-sub {
  margin: -0.35em 0 0;
  font-size: 0.85em;
  opacity: 0.85;
}

.mock-pawn-row {
  display: flex;
  gap: 0.45em;
  justify-content: center;
  margin: 0.15em 0;
}

.mock-pawn-dot {
  width: 0.65em;
  height: 0.65em;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.mock-pawn-dot.mock-pawn-r {
  background: var(--r-ludo);
}

.mock-pawn-dot.mock-pawn-g {
  background: var(--g-ludo);
}

.mock-pawn-dot.mock-pawn-b {
  background: var(--b-ludo);
}

.mock-pawn-dot.mock-pawn-y {
  background: var(--y-ludo);
}

.mock-lobby-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5em;
  width: 100%;
  margin-top: 0.25em;
}

.mock-lobby-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
  padding: 0.55em 0.35em;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.65em;
  font-size: 0.75em;
  font-weight: 600;
  color: var(--text);
}

.mock-lobby-icon {
  font-size: 1.25em;
  line-height: 1;
}

.mock-lobby-hint {
  margin: auto 0 0;
  font-size: 0.7em;
  line-height: 1.35;
  opacity: 0.75;
  max-width: 22ch;
}

.mock-board-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
  min-height: 0;
}

.mock-board-label {
  margin: 0;
  font-size: 0.75em;
  font-weight: 600;
  color: var(--accent-mint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mock-mini-board {
  position: relative;
  width: 72%;
  max-width: 140px;
  aspect-ratio: 1;
  border-radius: 1em;
  background: conic-gradient(
    from 45deg,
    var(--r-ludo) 0deg 90deg,
    var(--g-ludo) 90deg 180deg,
    var(--b-ludo) 180deg 270deg,
    var(--y-ludo) 270deg 360deg
  );
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), 0 6px 20px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.mock-mini-path {
  position: absolute;
  inset: 22%;
  background: rgba(15, 12, 26, 0.92);
  border-radius: 0.45em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mock-mini-pawn {
  position: absolute;
  width: 11%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.mock-mp-r {
  top: 8%;
  left: 8%;
  background: var(--r-ludo);
}

.mock-mp-g {
  top: 8%;
  right: 8%;
  background: var(--g-ludo);
}

.mock-mp-b {
  bottom: 8%;
  right: 8%;
  background: var(--b-ludo);
}

.mock-mp-y {
  bottom: 8%;
  left: 8%;
  background: var(--y-ludo);
}

.mock-mini-dice {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95em;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
}

.mock-board-legend {
  margin: 0;
  padding: 0 0.5em;
  list-style: none;
  font-size: 0.72em;
  line-height: 1.4;
  text-align: center;
  color: var(--text-muted);
}

.mock-board-legend li {
  position: relative;
  padding-left: 0.85em;
  margin-bottom: 0.25em;
}

.mock-board-legend li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.28em;
  height: 0.28em;
  border-radius: 50%;
  background: var(--accent-gold);
}

.mock-rules {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55em;
  min-height: 0;
  overflow: auto;
}

.mock-rules-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35em;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.mock-rules-dice {
  width: 2.4em;
  height: 2.4em;
  margin: 0 auto;
  background: linear-gradient(145deg, #f8f8f8, #d8d8d8);
  border-radius: 0.35em;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 0.25em;
  gap: 0.12em;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.mock-dice-dot {
  width: 0.35em;
  height: 0.35em;
  border-radius: 50%;
  background: #1a1a1a;
  align-self: center;
  justify-self: center;
}

.mock-rules-dice .mock-dice-dot:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.mock-rules-dice .mock-dice-dot:nth-child(2) {
  grid-column: 3;
  grid-row: 1;
}

.mock-rules-dice .mock-dice-dot:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.mock-rules-dice .mock-dice-dot:nth-child(4) {
  grid-column: 1;
  grid-row: 3;
}

.mock-rules-dice .mock-dice-dot:nth-child(5) {
  grid-column: 3;
  grid-row: 3;
}

.mock-rules-list {
  margin: 0;
  padding-left: 1.15em;
  font-size: 0.72em;
  line-height: 1.45;
  color: var(--text-muted);
}

.mock-rules-list li {
  margin-bottom: 0.35em;
}

.mock-rules-foot {
  margin: auto 0 0;
  text-align: center;
  font-size: 0.65em;
  opacity: 0.65;
  font-style: italic;
}

.screen-frame figcaption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.15rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--accent-gold);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 1.15rem 1.15rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* CTA block */
.section-cta {
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

.cta-box {
  text-align: center;
  background: linear-gradient(145deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid rgba(232, 197, 71, 0.2);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3rem);
  box-shadow: var(--shadow);
}

.cta-box p {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 420px;
  margin-inline: auto 1.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2rem 0 max(2rem, env(safe-area-inset-bottom, 0px));
  background: #0a0812;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-tag {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--accent-gold);
}

.footer-copy {
  width: 100%;
  margin: 0;
  font-size: 0.75rem;
  color: rgba(168, 156, 200, 0.7);
  text-align: center;
}

@media (min-width: 640px) {
  .footer-copy {
    text-align: left;
  }
}

/* Mini-games — primary page focus */
.section-minigames {
  position: relative;
  overflow: visible;
}

main > .section-minigames {
  padding-top: clamp(2rem, 5vw, 3.25rem);
  padding-bottom: clamp(2.25rem, 5.5vw, 3.75rem);
}

.games-showcase-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(108, 158, 255, 0.28), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 80%, rgba(232, 197, 71, 0.12), transparent 50%),
    linear-gradient(180deg, #16102a 0%, var(--bg-deep) 100%);
  pointer-events: none;
}

.container--games {
  width: min(100% - 1.5rem, 1180px);
  position: relative;
  z-index: 1;
}

.games-showcase-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2rem;
}

.games-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-mint);
}

.games-showcase-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
}

.games-showcase-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.board-swipe-hint {
  display: none;
  text-align: center;
  margin: 0 auto 1.35rem;
  padding: 0 0.5rem;
  max-width: 26rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}

@media (max-width: 899px) {
  .board-swipe-hint {
    display: block;
  }
}

.games-after-note {
  text-align: center;
  margin: 2rem 0 0;
}

.link-down {
  color: var(--accent-sky);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.link-down:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.minigames-lead {
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 52rem;
  font-size: 1.02rem;
}

.minigames-grid {
  display: grid;
  gap: 2rem;
}

.minigames-grid--featured {
  gap: clamp(1.25rem, 3vw, 2rem);
  min-width: 0;
}

@media (min-width: 960px) {
  .minigames-grid--featured {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

@media (min-width: 900px) {
  .minigames-grid:not(.minigames-grid--featured) {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.mini-game-card {
  background: rgba(26, 20, 48, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  min-width: 0;
  max-width: 100%;
}

.mini-game-card--featured {
  padding: clamp(1.35rem, 3.2vw, 2rem);
  border-color: rgba(108, 158, 255, 0.22);
}

.mini-game-card--featured h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

/* Short rules block (below mini-games) */
.section-compact h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.compact-list {
  margin: 0 0 1.15rem;
  padding-left: 1.2rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.compact-list li {
  padding-left: 0.15rem;
}

.compact-foot {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.compact-foot a {
  color: var(--accent-sky);
  font-weight: 600;
}

.mini-game-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.8vw, 1.35rem);
  margin: 0 0 0.5rem;
}

.mini-game-desc {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

.mg-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

/* Isolate horizontal scroll so boards never widen the page (iOS / narrow phones) */
.mg-board-outer {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding-bottom: 2px;
  margin-inline: 0;
}

.mg-board {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.4rem;
  padding: 0.5rem 0;
  width: max-content;
  max-width: none;
  overflow: visible;
}

.mg-board--sprint {
  scroll-snap-type: x proximity;
}

.mg-board--sprint .mg-cell {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: clamp(42px, 11.5vw, 76px);
  min-height: 84px;
}

/* Duel: one row, swipe on phones & tablets; grid only on wide screens */
.mg-board--duel {
  scroll-snap-type: x mandatory;
  gap: 0.35rem;
  padding: 0.45rem 0 0.55rem;
}

.mg-board--duel .mg-cell {
  flex: 0 0 auto;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  min-height: 78px;
  scroll-snap-align: start;
}

.mg-cell {
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0.35rem 0.25rem 0.5rem;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .mg-board-outer:has(.mg-board--duel) {
    overflow-x: visible;
  }

  .mg-board--duel {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    scroll-snap-type: none;
    gap: 0.4rem;
    padding: 0.5rem 0;
  }

  .mg-board--duel .mg-cell {
    width: auto;
    min-width: 0;
    max-width: none;
    min-height: 82px;
    scroll-snap-align: none;
  }

  .mini-game-card--featured .mg-board--duel .mg-cell {
    width: auto;
    min-width: 0;
    max-width: none;
  }
}

.mg-cell--goal {
  border-color: rgba(232, 197, 71, 0.45);
  background: linear-gradient(180deg, rgba(232, 197, 71, 0.12), var(--bg-elevated));
}

.mg-cell--safe {
  border-color: rgba(78, 205, 196, 0.45);
  box-shadow: inset 0 0 0 1px rgba(78, 205, 196, 0.15);
}

.mg-cell--start {
  border-color: rgba(108, 158, 255, 0.35);
}

.mg-cell-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  order: -1;
}

.mg-pawn-slot {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.mg-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.mg-pawn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  display: inline-block;
}

.mg-pawn--red {
  background: var(--r-ludo);
}

.mg-pawn--blue {
  background: var(--b-ludo);
}

.mg-pawn--gold {
  background: linear-gradient(145deg, var(--accent-gold), #b8941f);
}

.mg-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.mg-dice {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #e4e4e4);
  color: #1a1a1a;
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  font-variant-numeric: tabular-nums;
}

.mg-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

@media (max-width: 639px) {
  .mg-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .mg-actions .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  .mg-cell-label {
    font-size: 0.58rem;
    line-height: 1.15;
  }
}

.mg-roll:disabled,
.mg-reset:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.mg-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 36rem;
}

.mg-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.mg-legend {
  font-weight: 600;
}

.mg-legend--red {
  color: #ff8a8a;
}

.mg-legend--blue {
  color: #8ec5ff;
}

/* Only size sprint cells here — duel cells must keep flex/grid widths */
.mini-game-card--featured .mg-board--sprint .mg-cell {
  width: clamp(44px, 12.5vw, 88px);
  min-height: 90px;
}

.mini-game-card--featured .mg-board--duel .mg-cell {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  min-height: 82px;
}

.mini-game-card--featured .mg-dice {
  width: 64px;
  height: 64px;
  font-size: 1.75rem;
  border-radius: 14px;
}

.mini-game-card--featured .mg-pawn {
  width: 26px;
  height: 26px;
}

.mini-game-card--featured .mg-pawn-slot {
  min-height: 34px;
}

/* -------------------------------------------------------------------------
   Mobile layout & touch (games-first landing)
   ------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .section {
    padding: clamp(1.65rem, 5vw, 2.75rem) 0;
  }

  .header-inner {
    padding-inline: max(0.75rem, env(safe-area-inset-left, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px));
  }

  .header-actions {
    gap: 0.4rem;
  }

  .btn-nav-play {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
  }

  .header-actions .btn-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
  }

  .logo-dice {
    width: 32px;
    height: 32px;
  }

  .logo-text {
    font-size: 1.05rem;
  }

  .hero {
    padding-top: clamp(1rem, 4vw, 2rem);
    padding-bottom: clamp(1.25rem, 4vw, 2rem);
  }

  .hero--games-first {
    padding-bottom: 0.5rem;
  }

  .hero-grid--games-first {
    gap: 1.35rem;
  }

  .hero-copy {
    min-width: 0;
  }

  .hero h1 {
    font-size: clamp(1.45rem, 7vw, 1.95rem);
    line-height: 1.2;
    margin-bottom: 0.75rem;
  }

  .lead,
  .lead--tight {
    font-size: 0.97rem;
    line-height: 1.58;
    margin-bottom: 1.1rem;
  }

  .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    box-sizing: border-box;
  }

  .btn-hero-secondary {
    padding-inline: 1rem;
  }

  .hero-pills {
    justify-content: center;
    gap: 0.4rem;
  }

  .hero-pills li {
    font-size: 0.68rem;
    padding: 0.32rem 0.55rem;
  }

  .hero-visual--link {
    padding-bottom: 3rem;
    width: 100%;
    max-width: min(280px, 100%);
    margin-inline: auto;
  }

  .board-preview {
    width: min(248px, calc(100vw - 2.5rem));
    max-width: 100%;
  }

  .hero-visual-hint {
    white-space: normal;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    line-height: 1.3;
    font-size: 0.74rem;
    bottom: -2.35rem;
    max-width: min(12.5rem, calc(100vw - 2rem));
  }

  main > .section-minigames {
    padding-top: clamp(1.35rem, 4vw, 2rem);
    padding-bottom: clamp(1.5rem, 4vw, 2.25rem);
  }

  .container--games {
    width: min(100% - 1.25rem, 1180px);
  }

  .games-showcase-head {
    margin-bottom: 1.35rem;
    padding-inline: 0.15rem;
  }

  .games-showcase-head h2 {
    font-size: clamp(1.55rem, 8vw, 2.15rem);
    line-height: 1.1;
  }

  .games-kicker {
    letter-spacing: 0.14em;
    font-size: 0.65rem;
  }

  .games-showcase-lead {
    font-size: 0.93rem;
    line-height: 1.55;
  }

  .games-after-note {
    margin-top: 1.5rem;
    padding-inline: 0.5rem;
  }

  .link-down {
    display: inline-block;
    padding: 0.35rem 0;
    font-size: 0.9rem;
  }

  .mini-game-card,
  .mini-game-card--featured {
    padding: 1.1rem 1rem 1.2rem;
  }

  .mini-game-desc {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .mg-panel {
    width: 100%;
    align-items: stretch;
  }

  .mg-dice {
    align-self: center;
  }

  .mini-game-card--featured .mg-dice {
    width: 58px;
    height: 58px;
    font-size: 1.55rem;
  }

  .mg-status,
  .mg-hint {
    font-size: 0.86rem;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
  }

  .feature-card {
    padding: 1.15rem 1rem;
  }

  .steps > li {
    gap: 0.75rem;
    padding: 1rem 0;
  }

  .screen-row {
    margin-inline: -0.25rem;
    padding-inline: 0.25rem;
  }
}

@media (max-width: 359px) {
  .header-actions .btn-header:first-child {
    padding-inline: 0.55rem;
  }

  .btn-nav-play {
    padding-inline: 0.65rem;
  }

  .games-showcase-head h2 {
    font-size: 1.42rem;
  }

  .mg-board--sprint .mg-cell {
    width: clamp(36px, 10vw, 68px);
    min-height: 78px;
  }

  .mini-game-card--featured .mg-board--sprint .mg-cell {
    width: clamp(38px, 10.5vw, 72px);
    min-height: 82px;
  }

  .mg-board--duel .mg-cell {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    min-height: 72px;
  }

  .mini-game-card--featured .mg-board--duel .mg-cell {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
  }
}
