/* Shared landing-page styles - "casual game" design system.
   Learned from matchmasters.com / monopolygo.com:
   - warm light page background, dark purple text (never pure black/white)
   - chunky display font, uppercase headings with a hard (non-blurred) shadow
   - "physical" buttons: hard bottom shadow in a darker shade, inner highlights, press-down + bounce-back
   - white cards with a thick hard shadow + soft drop shadow, big radii
   - content pops in with an overshoot when scrolled into view, staggered
   Fonts (@font-face) are declared in views/partials/head.ejs so their URLs get cache-busted. */

:root {
  /* Brand */
  --brand-purple: #4a1c8c;
  --brand-purple-deep: #24093f;
  --brand-purple-ink: #2d0f57;
  --brand-magenta: #e0287a;
  --brand-gold: #ffc21a;
  --brand-gold-light: #ffe066;
  --brand-gold-deep: #c97a00;
  --brand-green: #5bd12a;
  --brand-green-light: #8ef05a;
  --brand-green-deep: #2b8a0c;
  --brand-red: #e8343c;
  --brand-blue: #2f8cff;

  /* Surfaces & text */
  --page-bg: #fdf4ea;
  --page-bg-alt: #f7e9da;
  --card-bg: #ffffff;
  --card-edge: #ead9c6;
  --ink: #3a2357;
  --ink-soft: #7a6488;

  /* Motion */
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring-back: cubic-bezier(0.2, 1.9, 0.6, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* Bootstrap overrides */
  --bs-body-bg: var(--page-bg);
  --bs-body-color: var(--ink);
  --bs-body-font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-link-color: var(--brand-purple);
  --bs-link-color-rgb: 74, 28, 140;
  --bs-link-hover-color: var(--brand-magenta);
  --bs-link-hover-color-rgb: 224, 40, 122;
  --bs-secondary-color: var(--ink-soft);
  --bs-border-radius: 1rem;
}

body { font-family: var(--bs-body-font-family); font-weight: 500; overflow-x: hidden; }
.text-secondary { color: var(--ink-soft) !important; }
.text-gold { color: var(--brand-gold) !important; }

/* ---------- Typography ---------- */
.font-display, h1, h2, .h1, .h2, .display-title, .section-title, .btn-game { font-family: "Lilita One", "Nunito", system-ui, sans-serif; font-weight: 400; letter-spacing: 0.01em; }
h3, h4, .h5, .h6 { font-weight: 800; }

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--brand-purple);
  text-shadow: 0 3px 0 #d9c4f2, 0 8px 18px rgba(74, 28, 140, 0.18);
  margin-bottom: 0.5rem;
}
.section-kicker {
  display: inline-block;
  font-weight: 800;
  color: var(--brand-magenta);
  transform: rotate(-2deg);
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}
.section-lead { color: var(--ink-soft); font-size: 1.15rem; max-width: 40rem; margin: 0 auto; }

/* Gold title on dark backgrounds (hero / page header / CTA) */
.title-gold {
  color: var(--brand-gold-light);
  background: linear-gradient(180deg, #fff6c2 0%, var(--brand-gold-light) 35%, var(--brand-gold) 70%, #ff9d00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 0 #7a3a00) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
  text-transform: uppercase;
}

/* ---------- Game buttons ---------- */
.btn-game {
  --btn-top: var(--brand-green-light);
  --btn-bottom: var(--brand-green);
  --btn-edge: var(--brand-green-deep);
  --btn-text: #ffffff;
  --btn-text-shadow: rgba(20, 70, 0, 0.55);
  --btn-depth: 6px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border: 0;
  border-radius: 999px;
  color: var(--btn-text);
  font-size: 1.35rem;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 2px 0 var(--btn-text-shadow);
  background: linear-gradient(180deg, var(--btn-top) 0%, var(--btn-bottom) 100%);
  box-shadow:
    0 var(--btn-depth) 0 0 var(--btn-edge),
    0 calc(var(--btn-depth) + 6px) 18px rgba(40, 10, 70, 0.28),
    inset 0 3px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 0 rgba(0, 0, 0, 0.12);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s var(--ease-spring-back), box-shadow 0.25s var(--ease-spring-back), filter 0.15s ease;
}
/* Glossy diagonal highlight on the upper half */
.btn-game::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.12) 45%, rgba(255, 255, 255, 0) 46%);
  pointer-events: none;
}
.btn-game:hover { color: var(--btn-text); transform: translateY(-2px); filter: brightness(1.06) saturate(1.05); }
.btn-game:focus-visible { outline: 3px solid var(--brand-purple); outline-offset: 4px; }
.btn-game:active {
  transform: translateY(calc(var(--btn-depth) - 1px));
  box-shadow:
    0 1px 0 0 var(--btn-edge),
    0 3px 6px rgba(40, 10, 70, 0.25),
    inset 0 3px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  filter: brightness(0.96);
  transition-duration: 0.06s;
  transition-timing-function: linear;
}
.btn-game .bi { width: 1.1em; height: 1.1em; }

.btn-game--gold { --btn-top: #ffe76a; --btn-bottom: var(--brand-gold); --btn-edge: var(--brand-gold-deep); --btn-text: #7a2e00; --btn-text-shadow: rgba(255, 255, 255, 0.55); }
.btn-game--purple { --btn-top: #8a52e0; --btn-bottom: #6327c4; --btn-edge: #3a1180; --btn-text-shadow: rgba(30, 0, 70, 0.6); }
.btn-game--white { --btn-top: #ffffff; --btn-bottom: #f4ecff; --btn-edge: #d6c4ee; --btn-text: var(--brand-purple); --btn-text-shadow: rgba(255, 255, 255, 0.8); }
.btn-game--sm { font-size: 1.05rem; padding: 0.6rem 1.25rem; --btn-depth: 4px; }
.btn-game--lg { font-size: clamp(1.4rem, 3vw, 1.9rem); padding: 1.05rem 2.6rem; --btn-depth: 8px; }

/* Shine sweep on the primary CTA (draws the eye, every ~5s) */
.btn-shine::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.65) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg);
  animation: shine 5s ease-in-out 1.2s infinite;
  pointer-events: none;
}
@keyframes shine { 0% { left: -60%; } 18%, 100% { left: 130%; } }

/* Store badges */
.store-badge { display: inline-block; transition: transform 0.25s var(--ease-spring-back); }
.store-badge:hover { transform: translateY(-3px) scale(1.03); }
.store-badge:active { transform: translateY(1px) scale(0.97); transition-duration: 0.06s; }
.store-badge img { height: 48px; width: auto; display: block; border-radius: 10px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35); }

/* ---------- Nav: floating white "island" + game menu ----------
   Desktop (>=992px): inline links with a springy pill + bouncing gem icon on hover.
   Mobile: hamburger morphs into an X; a white "game menu" card springs open from the top
   (scaleY overshoot like matchmasters.com), tiles pop in one after another. Toggle logic: public/js/app.js. */
.site-nav-wrap { position: sticky; top: 0; z-index: 1030; padding: 0.75rem 0.75rem 0; pointer-events: none; }
.site-nav {
  position: relative;
  pointer-events: auto;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 26px;
  box-shadow: 0 6px 0 var(--card-edge), 0 14px 34px rgba(40, 10, 70, 0.18);
  padding: 0.5rem 0.6rem;
}

.nav-brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--brand-purple); font-family: "Lilita One", sans-serif; font-size: 1.35rem; letter-spacing: 0.02em; text-decoration: none; margin-right: auto; white-space: nowrap; }
.nav-brand:hover { color: var(--brand-purple); }
.nav-brand img { border-radius: 14px; box-shadow: 0 3px 0 rgba(74, 28, 140, 0.25); transition: transform 0.45s var(--ease-spring-back); }
.nav-brand:hover img { transform: rotate(-10deg) scale(1.12); }
.nav-brand:active img { transform: scale(0.9); transition-duration: 0.08s; }
@media (max-width: 374px) { .nav-brand span { font-size: 1.1rem; } }

.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: 0.25rem; }
@media (min-width: 992px) { .nav-links { display: flex; margin-right: auto; } .nav-brand { margin-right: 0; } }
.nav-link-game {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  isolation: isolate;
  transition: color 0.15s ease, transform 0.35s var(--ease-spring-back);
}
.nav-link-game::before { /* pill that springs in on hover */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: #f1e7ff;
  transform: scale(0.4);
  opacity: 0;
  transition: transform 0.4s var(--ease-spring-back), opacity 0.15s ease;
}
.nav-link-game .nav-ico { width: 1.15rem; height: 1.15rem; color: var(--ico, var(--brand-purple)); transition: transform 0.45s var(--ease-spring-back); }
.nav-link-game:hover { color: var(--brand-purple); }
.nav-link-game:hover::before { transform: scale(1); opacity: 1; }
.nav-link-game:hover .nav-ico { transform: translateY(-3px) rotate(-12deg) scale(1.25); }
.nav-link-game:active { transform: scale(0.92); transition-duration: 0.08s; }
.nav-link-game.active { color: #fff; }
.nav-link-game.active::before { transform: scale(1); opacity: 1; background: var(--brand-purple); box-shadow: 0 4px 0 #2d0f57; }
.nav-link-game.active .nav-ico { color: var(--brand-gold); }

/* Hamburger -> X */
.menu-toggle {
  position: relative;
  width: 3rem;
  height: 2.75rem;
  border: 0;
  border-radius: 16px;
  background: #f1e7ff;
  box-shadow: 0 4px 0 #d6c4ee;
  transition: transform 0.25s var(--ease-spring-back), box-shadow 0.25s var(--ease-spring-back), background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.menu-toggle:active { transform: translateY(3px); box-shadow: 0 1px 0 #d6c4ee; transition-duration: 0.06s; }
.menu-toggle:focus-visible { outline: 3px solid var(--brand-purple); outline-offset: 3px; }
.menu-toggle span { position: absolute; left: 50%; width: 1.35rem; height: 3px; margin-left: -0.675rem; border-radius: 3px; background: var(--brand-purple); transition: transform 0.45s var(--ease-spring-back), opacity 0.2s ease, top 0.45s var(--ease-spring-back); }
.menu-toggle span:nth-child(1) { top: 0.85rem; }
.menu-toggle span:nth-child(2) { top: calc(50% - 1.5px); }
.menu-toggle span:nth-child(3) { top: calc(100% - 0.85rem - 3px); }
.site-nav.is-open .menu-toggle { background: var(--brand-purple); box-shadow: 0 4px 0 #2d0f57; }
.site-nav.is-open .menu-toggle span { background: #fff; top: calc(50% - 1.5px); }
.site-nav.is-open .menu-toggle span:nth-child(1) { transform: rotate(45deg); }
.site-nav.is-open .menu-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.site-nav.is-open .menu-toggle span:nth-child(3) { transform: rotate(-45deg); }
@media (min-width: 992px) { .menu-toggle { display: none; } }

/* The game menu card (mobile) */
.game-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  right: 0;
  padding: 1rem;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 8px 0 var(--card-edge), 0 24px 60px rgba(40, 10, 70, 0.35);
  transform-origin: 50% 0;
  max-height: calc(100dvh - 6.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.site-nav.is-open .game-menu, .site-nav.is-closing .game-menu { display: block; }
.site-nav.is-open .game-menu { animation: menu-open 0.55s var(--ease-out-expo) both; }
.site-nav.is-closing .game-menu { animation: menu-close 0.18s ease-in both; }
@keyframes menu-open {
  0% { opacity: 0; transform: translateY(-10px) scaleY(0.3) scaleX(0.92); }
  40% { opacity: 1; transform: translateY(0) scaleY(1.06) scaleX(1.01); }
  65% { transform: scaleY(0.97) scaleX(1); }
  100% { opacity: 1; transform: none; }
}
@keyframes menu-close { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px) scaleY(0.6); } }
@media (min-width: 992px) { .game-menu { display: none !important; } }

.menu-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; list-style: none; margin: 0 0 0.9rem; padding: 0; }
.menu-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem 0.85rem;
  border-radius: 22px;
  background: #faf5ff;
  box-shadow: 0 5px 0 #e6daf5;
  color: var(--brand-purple-ink);
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.3s var(--ease-spring-back), box-shadow 0.3s var(--ease-spring-back);
  -webkit-tap-highlight-color: transparent;
}
.menu-tile:hover { color: var(--brand-purple); transform: translateY(-2px); }
.menu-tile:active { transform: translateY(4px); box-shadow: 0 1px 0 #e6daf5; transition-duration: 0.06s; }
.menu-tile.active { background: #f1e7ff; box-shadow: 0 5px 0 #d6c4ee, inset 0 0 0 2px var(--brand-purple); }
.menu-tile .gem { width: 3.4rem; height: 3.4rem; border-radius: 18px; }
.menu-tile .gem .bi { width: 1.6rem; height: 1.6rem; }
.menu-play { width: 100%; }
.menu-stores { display: flex; justify-content: center; gap: 0.5rem; margin-top: 0.9rem; }
.menu-stores img { height: 40px; width: auto; }
.site-nav.is-open .menu-pop { animation: tile-pop 0.5s var(--ease-out-expo) both; animation-delay: calc(120ms + var(--i, 0) * 60ms); }
@keyframes tile-pop {
  0% { opacity: 0; transform: scale(0.5) translateY(10px); }
  55% { opacity: 1; transform: scale(1.08); }
  80% { transform: scale(0.97); }
  100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .site-nav.is-open .game-menu, .site-nav.is-open .menu-pop { animation: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin-top: -5.5rem; /* slide under the floating nav */
  padding: 8.5rem 0 7rem;
  color: #fff;
  background-color: var(--brand-purple-deep);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  isolation: isolate;
}
.hero::before { /* spotlight + vignette */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 55% at 70% 45%, rgba(255, 194, 26, 0.28) 0%, rgba(255, 194, 26, 0) 60%),
    radial-gradient(70% 60% at 20% 40%, rgba(224, 40, 122, 0.25) 0%, rgba(224, 40, 122, 0) 65%),
    linear-gradient(180deg, rgba(36, 9, 63, 0.55) 0%, rgba(36, 9, 63, 0.25) 50%, rgba(36, 9, 63, 0.7) 100%);
}
.hero::after { /* curved bottom edge into the page */
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -1px;
  height: 90px;
  background: var(--page-bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hero-title { font-size: clamp(2.6rem, 6.2vw, 4.75rem); line-height: 0.98; margin-bottom: 1rem; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.hero-eyebrow .bi { width: 1em; height: 1em; color: var(--brand-gold); }
.hero-subtitle { font-size: 1.2rem; color: #efe6ff; max-width: 36rem; }
.hero-bullets { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; list-style: none; }
.hero-bullets li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem 0.4rem 0.5rem;
  border-radius: 999px;
  background: rgba(20, 4, 40, 0.45);
  font-weight: 700;
  font-size: 0.95rem;
}
.hero-bullets .bi { width: 1.15rem; height: 1.15rem; color: var(--brand-green-light); }
@media (min-width: 992px) { .hero-bullets { justify-content: flex-start !important; } }
.hero-rating { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.35rem 1rem; font-weight: 700; color: #e6dbff; font-size: 0.95rem; }
.hero-rating .stars { color: var(--brand-gold); letter-spacing: 0.08em; }

.hero-art { position: relative; display: inline-block; width: min(100%, 420px); aspect-ratio: 1; }
.hero-icon {
  position: relative;
  z-index: 2;
  display: block;
  width: 78%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 11%;
  border-radius: 24%;
  box-shadow: 0 14px 0 rgba(0, 0, 0, 0.28), 0 30px 60px rgba(0, 0, 0, 0.45);
  animation: bob 4.5s ease-in-out infinite;
}
.hero-glow { position: absolute; inset: -6%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 60, 0.55) 0%, rgba(255, 210, 60, 0) 65%); animation: pulse-glow 3.5s ease-in-out infinite; }
.hero-card { /* floating playing cards around the icon */
  position: absolute;
  z-index: 3;
  width: 22%;
  aspect-ratio: 5 / 7;
  border-radius: 12%;
  background: #fff;
  box-shadow: 0 6px 0 #d9cbe8, 0 14px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Lilita One", sans-serif;
  font-size: clamp(1.1rem, 2.6vw, 1.8rem);
  animation: float-card 5s ease-in-out infinite;
}
.hero-card .bi { width: 55%; height: 55%; }
.hero-card--red { color: var(--brand-red); }
.hero-card--ink { color: #1d1430; }
.hero-card--1 { top: 2%; left: -2%; --r: -14deg; animation-delay: -1s; }
.hero-card--2 { top: 6%; right: -4%; --r: 12deg; animation-delay: -2.5s; }
.hero-card--3 { bottom: 4%; left: 2%; --r: 8deg; animation-delay: -3.7s; }
.hero-card--4 { bottom: 0; right: 4%; --r: -10deg; animation-delay: -0.4s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(2deg); } }
@keyframes float-card { 0%, 100% { transform: translateY(0) rotate(var(--r)); } 50% { transform: translateY(-12px) rotate(calc(var(--r) * -0.4)); } }
@keyframes pulse-glow { 0%, 100% { opacity: 0.75; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.05); } }

/* ---------- Sections & cards ---------- */
.section { padding: 5rem 0; position: relative; isolation: isolate; }
.section-alt { background: var(--page-bg-alt); }
.section-blob { /* soft colour wash behind a section, like the matchmasters deals area */
  position: absolute;
  inset: 8% 4%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(224, 40, 122, 0.16), rgba(224, 40, 122, 0));
  pointer-events: none;
}

.game-card {
  position: relative;
  height: 100%;
  background: var(--card-bg);
  border-radius: 28px;
  padding: 2.1rem 1.6rem 1.7rem;
  box-shadow: 0 8px 0 var(--card-edge), 0 18px 40px rgba(58, 35, 87, 0.12);
  transition: transform 0.3s var(--ease-spring-back), box-shadow 0.3s var(--ease-spring-back);
}
.game-card:hover { transform: translateY(-6px) rotate(-0.6deg); box-shadow: 0 12px 0 var(--card-edge), 0 26px 50px rgba(58, 35, 87, 0.18); }
.game-card h3 { color: var(--brand-purple-ink); font-size: 1.25rem; }
.game-card p { color: var(--ink-soft); }

/* Gem-style icon badge (sticks out of the top of the card) */
.gem {
  --gem-top: #a875ff;
  --gem-bottom: #6a2fd0;
  --gem-edge: #3e1290;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(180deg, var(--gem-top), var(--gem-bottom));
  box-shadow: 0 5px 0 var(--gem-edge), 0 10px 18px rgba(40, 10, 70, 0.25), inset 0 3px 0 rgba(255, 255, 255, 0.4);
  transform: rotate(-6deg);
  transition: transform 0.4s var(--ease-spring-back);
}
.gem .bi { width: 2rem; height: 2rem; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.25)); }
.game-card:hover .gem { transform: rotate(6deg) scale(1.12); }
.gem--gold { --gem-top: #ffe46b; --gem-bottom: #ffb300; --gem-edge: #b86a00; }
.gem--green { --gem-top: #8ef05a; --gem-bottom: #3fb51a; --gem-edge: #217a07; }
.gem--red { --gem-top: #ff7a7f; --gem-bottom: #e02f3a; --gem-edge: #97121b; }
.gem--blue { --gem-top: #7cc0ff; --gem-bottom: #2f7fff; --gem-edge: #1048a8; }
.gem--magenta { --gem-top: #ff7ab8; --gem-bottom: #e0287a; --gem-edge: #96104d; }
.game-card .gem { position: absolute; top: -1.6rem; left: 1.5rem; }
.game-card--icon { padding-top: 3rem; }

/* Screenshot rail: horizontal scroll-snap, no JS library */
.shot-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 560px);
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem max(1rem, calc((100vw - 1200px) / 2)) 2.5rem;
  scrollbar-width: none;
}
.shot-rail::-webkit-scrollbar { display: none; }
.shot {
  scroll-snap-align: center;
  margin: 0;
  background: #fff;
  border-radius: 26px;
  padding: 0.6rem 0.6rem 0.9rem;
  box-shadow: 0 8px 0 var(--card-edge), 0 18px 36px rgba(58, 35, 87, 0.16);
  transition: transform 0.35s var(--ease-spring-back);
}
.shot:nth-child(odd) { transform: rotate(-1.2deg); }
.shot:nth-child(even) { transform: rotate(1.2deg); }
.shot:hover { transform: rotate(0) scale(1.03); }
.shot img { width: 100%; height: auto; border-radius: 18px; display: block; }
.shot figcaption { font-weight: 800; color: var(--brand-purple-ink); padding: 0.7rem 0.4rem 0; text-align: center; }
.rail-hint { display: flex; justify-content: center; gap: 0.75rem; }
.rail-btn {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: 0;
  color: var(--brand-purple);
  background: #fff;
  box-shadow: 0 5px 0 var(--card-edge), 0 10px 20px rgba(58, 35, 87, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease-spring-back), box-shadow 0.25s var(--ease-spring-back);
}
.rail-btn:hover { transform: translateY(-2px); }
.rail-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--card-edge); transition-duration: 0.06s; }
.rail-btn .bi { width: 1.4rem; height: 1.4rem; }

/* Grid of screenshots (features page) */
.shot-grid .shot { transform: none; height: 100%; }
.shot-grid .shot:hover { transform: translateY(-4px) scale(1.02); }

/* Steps */
.steps { counter-reset: step; }
.step { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border-radius: 22px; padding: 1.1rem 1.25rem; margin-bottom: 1rem; box-shadow: 0 6px 0 var(--card-edge), 0 12px 26px rgba(58, 35, 87, 0.1); }
.step-num {
  flex: 0 0 3rem;
  height: 3rem;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Lilita One", sans-serif;
  font-size: 1.5rem;
  color: #7a2e00;
  background: linear-gradient(180deg, #ffe76a, var(--brand-gold));
  box-shadow: 0 4px 0 var(--brand-gold-deep), inset 0 2px 0 rgba(255, 255, 255, 0.6);
  transform: rotate(-5deg);
}
.step h3, .step strong { color: var(--brand-purple-ink); }
.step p, .step span { color: var(--ink-soft); }

/* Scoring / tips panels */
.panel { background: #fff; border-radius: 28px; padding: 1.75rem; box-shadow: 0 8px 0 var(--card-edge), 0 18px 40px rgba(58, 35, 87, 0.12); }
.panel dt { color: var(--brand-magenta); font-weight: 900; }
.panel dd { color: var(--ink-soft); margin-bottom: 0.9rem; }
.tips { list-style: none; padding: 0; margin: 0; }
.tips li { position: relative; padding-left: 2rem; margin-bottom: 0.75rem; color: var(--ink); }
.tips li::before { content: ""; position: absolute; left: 0; top: 0.2rem; width: 1.3rem; height: 1.3rem; border-radius: 7px; background: linear-gradient(180deg, var(--brand-green-light), var(--brand-green)); box-shadow: 0 3px 0 var(--brand-green-deep); transform: rotate(-6deg); }

/* Events chips */
.event { height: 100%; background: #fff; border-radius: 22px; padding: 1.1rem 1.25rem; box-shadow: 0 6px 0 var(--card-edge); border-left: 6px solid var(--brand-gold); }
.event h3 { color: var(--brand-purple-ink); }

/* FAQ accordion as game cards */
.accordion {
  --bs-accordion-bg: #fff;
  --bs-accordion-border-width: 0;
  --bs-accordion-btn-color: var(--brand-purple-ink);
  --bs-accordion-active-color: var(--brand-purple);
  --bs-accordion-active-bg: #fff;
  --bs-accordion-btn-focus-box-shadow: 0 0 0 3px rgba(74, 28, 140, 0.25);
  --bs-accordion-inner-border-radius: 22px;
  --bs-accordion-border-radius: 22px;
}
.accordion-item { border-radius: 22px !important; margin-bottom: 1rem; box-shadow: 0 6px 0 var(--card-edge), 0 12px 26px rgba(58, 35, 87, 0.08); overflow: hidden; }
.accordion-button { font-weight: 800; font-size: 1.08rem; padding: 1.15rem 1.4rem; }
.accordion-button::after { background-color: #f4ecff; border-radius: 50%; background-position: center; width: 2rem; height: 2rem; background-size: 1rem; }
.accordion-body { padding: 0 1.4rem 1.25rem; color: var(--ink-soft); }

/* ---------- Page header (inner pages) ---------- */
.page-header {
  position: relative;
  margin-top: -5.5rem;
  padding: 8rem 0 5.5rem;
  color: #fff;
  background:
    radial-gradient(60% 80% at 80% 20%, rgba(255, 194, 26, 0.25), rgba(255, 194, 26, 0) 60%),
    radial-gradient(60% 80% at 10% 90%, rgba(224, 40, 122, 0.35), rgba(224, 40, 122, 0) 60%),
    linear-gradient(135deg, var(--brand-purple-deep), var(--brand-purple));
  overflow: hidden;
  isolation: isolate;
}
.page-header::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -1px; height: 70px; background: var(--page-bg); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.page-header .page-title { font-size: clamp(2.4rem, 5.5vw, 4rem); line-height: 1; }
.page-header .lead { color: #e6dbff; max-width: 44rem; }
.breadcrumb { --bs-breadcrumb-divider-color: rgba(255, 255, 255, 0.5); --bs-breadcrumb-item-active-color: rgba(255, 255, 255, 0.75); font-weight: 700; }
.breadcrumb-item a { color: #fff; text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* ---------- CTA band + footer ---------- */
.cta-band {
  position: relative;
  padding: 6rem 0 5rem;
  color: #fff;
  background:
    radial-gradient(50% 70% at 50% 100%, rgba(255, 194, 26, 0.35), rgba(255, 194, 26, 0) 70%),
    linear-gradient(135deg, var(--brand-purple) 0%, #7a1fa8 55%, var(--brand-magenta) 100%);
  overflow: hidden;
  isolation: isolate;
}
.cta-band::before { content: ""; position: absolute; left: -10%; right: -10%; top: -1px; height: 70px; background: var(--page-bg); border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.cta-band .cta-title { font-size: clamp(2.4rem, 6vw, 4.25rem); line-height: 1; }
.cta-band p { color: #f3e9ff; font-size: 1.2rem; }
.cta-suits { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cta-suits .bi { position: absolute; width: 4rem; height: 4rem; color: rgba(255, 255, 255, 0.12); animation: float-card 6s ease-in-out infinite; }
.cta-suits .bi:nth-child(1) { left: 6%; top: 30%; --r: -15deg; }
.cta-suits .bi:nth-child(2) { right: 8%; top: 22%; --r: 18deg; animation-delay: -2s; width: 5rem; height: 5rem; }
.cta-suits .bi:nth-child(3) { left: 16%; bottom: 10%; --r: 10deg; animation-delay: -3.5s; }
.cta-suits .bi:nth-child(4) { right: 18%; bottom: 14%; --r: -8deg; animation-delay: -1.2s; }

.site-footer { background: var(--brand-purple-deep); color: #cbb8ea; padding: 3.5rem 0 2rem; }
.site-footer a { color: #e6dbff; text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--brand-gold); }
.footer-brand { font-family: "Lilita One", sans-serif; font-size: 1.4rem; color: #fff !important; }
.footer-brand img { border-radius: 14px; }
.footer-title { font-family: "Lilita One", sans-serif; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--brand-gold); margin-bottom: 0.9rem; }
.footer-links li { margin-bottom: 0.55rem; }
.footer-links a { font-weight: 600; overflow-wrap: anywhere; }
.footer-social { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: #0866ff; box-shadow: 0 4px 0 #003fa6; color: #fff !important; transition: transform 0.25s var(--ease-spring-back), box-shadow 0.25s var(--ease-spring-back); }
.footer-social:hover { transform: translateY(-2px); }
.footer-social:active { transform: translateY(3px); box-shadow: 0 1px 0 #003fa6; transition-duration: 0.06s; }
.footer-social .bi { width: 1.3rem; height: 1.3rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 2.5rem; padding-top: 1.5rem; color: #a995c9; }

/* Legal pages */
.legal h2 { color: var(--brand-purple-ink); font-weight: 900; }
.legal p { color: var(--ink); }
.legal-links li { margin-bottom: 0.4rem; }

/* ---------- 404 ---------- */
.big-404 { font-family: "Lilita One", sans-serif; font-size: clamp(6rem, 20vw, 11rem); line-height: 1; }

/* ---------- Reveal on scroll ----------
   [data-reveal] is hidden from the first paint (only when scripting is on), then public/js/app.js adds .is-in
   once via IntersectionObserver. app.js adds html.reveal-on as soon as it runs, which cancels the safety
   fallback (a CSS timer that reveals everything if the script never loads). Without that cancel, the fallback
   used to show below-the-fold blocks early and they re-animated when scrolled to = the "jumping" bug on iPhone.
   - pop  : small things (cards, tiles, buttons) - scale with a light overshoot
   - up/down: big blocks and text - fade + short slide, no overshoot
   - stagger (--d) only on wide screens; on phones each item enters on its own scroll position. */
:root { --stagger: 90ms; }
@media (max-width: 767.98px) { :root { --stagger: 0ms; } }
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  [data-reveal]:not(.is-in) { opacity: 0; }
  html:not(.reveal-on) [data-reveal]:not(.is-in) { animation: reveal-fallback 0.01s linear 3s forwards; }
  [data-reveal="pop"]:not(.is-in) { transform: scale(0.85); }
  [data-reveal="up"]:not(.is-in) { transform: translateY(24px); }
  [data-reveal="down"]:not(.is-in) { transform: translateY(-18px); }
  [data-reveal="pop"].is-in { animation: pop-in 0.55s var(--ease-out-expo) both; animation-delay: calc(var(--d, 0) * var(--stagger)); }
  [data-reveal="up"].is-in { animation: rise-in 0.5s var(--ease-out-expo) both; animation-delay: calc(var(--d, 0) * var(--stagger)); }
  [data-reveal="down"].is-in { animation: drop-in 0.45s var(--ease-out-expo) both; animation-delay: calc(var(--d, 0) * var(--stagger)); }
  html.reveal-instant [data-reveal] { animation: none !important; opacity: 1 !important; transform: none !important; }
}
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }
@keyframes pop-in {
  0% { opacity: 0; transform: scale(0.85); }
  55% { opacity: 1; transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes rise-in { 0% { opacity: 0; transform: translateY(24px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes drop-in { 0% { opacity: 0; transform: translateY(-18px); } 100% { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
