/* =============================================================================
   Sequence Legends — landing page
   Palette, type and ornaments come from the game itself:
   lib/core/theme/app_colors.dart, lib/core/theme/board_theme.dart and the
   Play Store generator (tools/store_images/lib.mjs, lib2.mjs, ornaments.mjs).
   ========================================================================== */

:root {
  /* Play Store poster background (lib.mjs → C) */
  --bg-top: #3c1f76;
  --bg-mid: #271150;
  --bg-bot: #150933;
  --bg-deep: #0c0522;
  --purple-glow: #6f33b8;
  --magenta: #b23bb0;
  --blue-glow: #3457b0;

  /* In-game violet + gold (app_colors.dart) */
  --violet: #6541c5;
  --violet-bright: #7a52e5;
  --violet-bg: #2a1a5e;
  --violet-bg-deep: #1e1248;
  --game-gold: #eda800;
  --game-gold-bright: #ffc004;
  --gold-highlight: #ffd54f;

  /* Poster golds */
  --gold: #ffd24d;
  --gold-deep: #e8a11e;
  --gold-lite: #fff6d8;
  --gold-soft: #ffe9a8;
  --laurel: #f0be45;
  --ink: #2a1606;

  /* Text on dark */
  --text: #f6eeff;
  --text-soft: #ddd1f5;
  --text-muted: #b6a7d8;

  /* Teams + status */
  --team-blue: #3d8bff;
  --team-red: #ff5a6e;
  --team-green: #34d399;
  --success: #2ebd6b;
  --danger: #910317;

  --grad-gold-text: linear-gradient(180deg, #fffbec 0%, #ffe48f 38%, #fac23a 62%, #e2901a 100%);
  --grad-gold-border: linear-gradient(135deg, #ffedb0 0%, #f6be3c 28%, #b9780f 55%, #f8ce5a 78%, #ffeaa0 100%);
  --grad-gold-button: linear-gradient(180deg, #ffe27a 0%, #ffc83a 45%, #f2a600 100%);
  --grad-badge: linear-gradient(180deg, #4a2790 0%, #25124f 100%);
  --grad-panel: linear-gradient(180deg, rgba(42, 30, 99, 0.9) 0%, rgba(23, 14, 60, 0.94) 100%);
  --grad-panel-border: linear-gradient(160deg, rgba(255, 210, 77, 0.45), rgba(255, 210, 77, 0.06) 42%, rgba(155, 107, 255, 0.26));

  --font-display: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --font-ui: "Poetsen One", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  --radius-md: 13px;
  --radius-lg: 19px;
  --radius-xl: 24px;
  --shadow-md: 0 12px 30px rgba(5, 2, 20, 0.45);
  --shadow-lg: 0 24px 60px rgba(5, 2, 20, 0.55);
  --phone-shadow: drop-shadow(0 28px 36px rgba(4, 1, 18, 0.6)) drop-shadow(0 0 20px rgba(255, 194, 77, 0.22));
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  --container: 1200px;
  --gutter: 16px;
  --header-h: 64px;
  --section-pad: clamp(72px, 10vw, 128px);
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 32px; --header-h: 72px; }
}

/* ----------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  background: var(--bg-bot);
  color-scheme: dark;
}

html:has(dialog[open]) {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-soft);
  background: var(--bg-bot);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@supports (overflow-x: clip) {
  body { overflow-x: clip; }
}

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

img {
  height: auto;
}

/* Every inline icon is sized by its component; this is only a safe default. */
svg {
  width: 1em;
  height: 1em;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

strong {
  font-weight: 700;
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -64px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--gold);
  color: #1f1238;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s;
}

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ----------------------------------------------------------------------------
   Shared type
   ------------------------------------------------------------------------- */

/* Cinzel gold with the posters' dark edge + warm glow. */
.gold-text {
  display: inline-block;
  background: var(--grad-gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 1.5px 0 var(--ink))
    drop-shadow(0 -1px 0 var(--ink))
    drop-shadow(1px 0 0 var(--ink))
    drop-shadow(-1px 0 0 var(--ink))
    drop-shadow(0 8px 22px rgba(247, 154, 18, 0.28));
}

.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 1.15rem + 2.5vw, 3rem);
  line-height: 1.14;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.section-title--xl {
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.7rem);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.kicker::before,
.kicker::after {
  content: "";
  width: 30px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 210, 77, 0), var(--gold));
}

.kicker::after {
  transform: scaleX(-1);
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 780px;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}

.section-sub {
  max-width: 60ch;
  margin-top: 16px;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  color: var(--text-muted);
}

.section-text {
  margin-top: 20px;
  font-size: 1.05rem;
}

.section-text strong {
  color: var(--gold-soft);
}

/* ----------------------------------------------------------------------------
   Buttons — the gold button mirrors the in-game PLAY NOW / START GAME button
   ------------------------------------------------------------------------- */

.btn {
  --btn-h: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: var(--btn-h);
  padding: 0 1.4em;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.25s;
}

.btn__icon {
  flex: none;
  width: 1.05em;
  height: 1.05em;
}

.btn--gold {
  color: #1f1238;
  background: var(--grad-gold-button);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -4px 0 rgba(143, 86, 10, 0.42),
    0 10px 28px rgba(255, 176, 0, 0.3),
    0 2px 0 rgba(0, 0, 0, 0.25);
}

.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.6),
    inset 0 -4px 0 rgba(143, 86, 10, 0.42),
    0 16px 38px rgba(255, 176, 0, 0.45),
    0 2px 0 rgba(0, 0, 0, 0.25);
}

.btn--gold:active {
  transform: translateY(1px);
}

.btn--ghost {
  color: var(--gold-lite);
  border: 1.5px solid transparent;
  background:
    linear-gradient(rgba(26, 14, 56, 0.6), rgba(26, 14, 56, 0.6)) padding-box,
    var(--grad-gold-border) border-box;
}

.btn--ghost:hover {
  transform: translateY(-2px);
  background:
    linear-gradient(rgba(62, 32, 122, 0.85), rgba(62, 32, 122, 0.85)) padding-box,
    var(--grad-gold-border) border-box;
}

.btn--sm { --btn-h: 42px; padding: 0 1.1em; font-size: 0.86rem; }
.btn--lg { --btn-h: 56px; padding: 0 1.7em; font-size: 1.05rem; }
.btn--xl { --btn-h: 64px; padding: 0 2.2em; font-size: 1.2rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1.5px solid rgba(255, 210, 77, 0.45);
  border-radius: 50%;
  background: rgba(26, 14, 56, 0.75);
  color: var(--gold-lite);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease-out), opacity 0.2s;
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

.icon-btn:hover {
  border-color: var(--gold);
  background: rgba(62, 32, 122, 0.95);
  transform: translateY(-2px);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

/* ----------------------------------------------------------------------------
   Pills + chip bullets (the posters' feature pills)
   ------------------------------------------------------------------------- */

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-row--center {
  justify-content: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 7px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background:
    linear-gradient(180deg, rgba(58, 36, 110, 0.9), rgba(26, 14, 56, 0.9)) padding-box,
    linear-gradient(135deg, rgba(255, 233, 168, 0.9), rgba(232, 161, 30, 0.5), rgba(255, 233, 168, 0.8)) border-box;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.chip-icon {
  flex: none;
  width: 20px;
  height: 20px;
}

.chip--red { --chip: #e0544f; --chip-dark: #983936; --chip-lite: #e98480; }
.chip--blue { --chip: #3f7fd6; --chip-dark: #2b5692; --chip-lite: #75a3e1; }
.chip--gold { --chip: #f2b830; --chip-dark: #a57d21; --chip-lite: #f6cc6a; }
.chip--green { --chip: #4ade80; --chip-dark: #329757; --chip-lite: #7de7a4; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-lite);
  background:
    linear-gradient(rgba(20, 10, 44, 0.6), rgba(20, 10, 44, 0.6)) padding-box,
    linear-gradient(135deg, #ffe9a8, #e8a11e 55%, #ffe9a8) border-box;
}

/* ----------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(18, 8, 44, 0.88);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 210, 77, 0.16), 0 10px 30px rgba(0, 0, 0, 0.25);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
}

.brand__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 210, 77, 0.5), 0 6px 16px rgba(0, 0, 0, 0.4);
}

.brand__name {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-lite);
}

.brand__name span {
  margin-top: 4px;
  font-size: 0.56em;
  letter-spacing: 0.44em;
  color: var(--gold);
}

.site-nav__list {
  display: flex;
  gap: 2px;
}

.site-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-soft);
  transition: color 0.2s, background-color 0.2s;
}

.site-nav a:hover {
  color: var(--gold-lite);
  background: rgba(255, 255, 255, 0.07);
}

.nav-toggle {
  display: none;
}

@media (max-width: 1023px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 210, 77, 0.35);
    border-radius: 12px;
    background: rgba(26, 14, 56, 0.6);
    cursor: pointer;
  }

  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--gold-lite);
    transition: transform 0.25s, background-color 0.25s;
  }

  .nav-toggle__bars {
    position: relative;
  }

  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .nav-toggle__bars::before { top: -6px; }
  .nav-toggle__bars::after { top: 6px; }

  .site-header.is-open .nav-toggle__bars { background: transparent; }
  .site-header.is-open .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .site-header.is-open .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 8px var(--gutter) 20px;
    background: rgba(18, 8, 44, 0.97);
    border-bottom: 1px solid rgba(255, 210, 77, 0.16);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.4);
  }

  .site-header.is-open .site-nav {
    display: block;
  }

  .site-nav__list {
    flex-direction: column;
  }

  .site-nav a {
    padding: 14px 12px;
    border-radius: 12px;
    font-size: 1.05rem;
  }
}

/* Small phones: the header CTA collapses to its play icon. */
@media (max-width: 479px) {
  .site-header__cta {
    width: 44px;
    padding: 0;
  }

  .site-header__cta .btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .site-header__cta .btn__icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 359px) {
  .brand__name { display: none; }
}

/* ----------------------------------------------------------------------------
   Shared decor
   ------------------------------------------------------------------------- */

/* God-ray burst behind hero art (ornaments.mjs → godRays, 18 rays). */
.rays {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 1500px;
  height: 1500px;
  margin: -750px 0 0 -750px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 11deg,
    rgba(255, 217, 138, 0) 0deg,
    rgba(255, 217, 138, 0.17) 3deg,
    rgba(255, 217, 138, 0) 6deg,
    rgba(255, 217, 138, 0) 20deg
  );
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.45) 28%, transparent 60%);
  mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.45) 28%, transparent 60%);
  opacity: 0.55;
  pointer-events: none;
  animation: spin 150s linear infinite;
}

@keyframes spin {
  to { transform: rotate(1turn); }
}

.float {
  position: absolute;
  animation: bob var(--dur, 7s) ease-in-out var(--delay, 0s) infinite alternate;
}

@keyframes bob {
  from { translate: 0 0; }
  to { translate: 0 -14px; }
}

.float--sparkle {
  aspect-ratio: 1;
  height: auto;
  color: var(--gold-soft);
  animation-name: twinkle;
  --dur: 2.6s;
}

@keyframes twinkle {
  from { opacity: 0.35; scale: 0.7; }
  to { opacity: 1; scale: 1.05; }
}

.phone {
  position: relative;
  aspect-ratio: 690 / 1487;
  filter: var(--phone-shadow);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ----------------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------------- */

.section {
  position: relative;
  padding-block: var(--section-pad);
  overflow: hidden;
}

@supports (overflow: clip) {
  .section { overflow: clip; }
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(560px, 80%);
  height: 1px;
  translate: -50% 0;
  background: linear-gradient(90deg, rgba(255, 210, 77, 0), rgba(255, 210, 77, 0.55), rgba(255, 210, 77, 0));
}

.section > .container {
  position: relative;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + clamp(28px, 5vw, 48px)) 0 clamp(64px, 8vw, 96px);
  background:
    radial-gradient(62% 48% at 50% 16%, rgba(111, 51, 184, 0.58), transparent 72%),
    radial-gradient(38% 30% at 10% 14%, rgba(52, 87, 176, 0.3), transparent 70%),
    radial-gradient(36% 32% at 90% 8%, rgba(178, 59, 176, 0.26), transparent 70%),
    radial-gradient(52% 38% at 50% 100%, rgba(178, 59, 176, 0.24), transparent 70%),
    linear-gradient(172deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-bot) 100%);
}

@supports (overflow: clip) {
  .hero { overflow: clip; }
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero .rays {
  top: 62%;
}

@media (min-width: 1024px) {
  .hero .rays {
    left: 74%;
    top: 50%;
  }
}

.ghost-suit {
  position: absolute;
  color: var(--gold-soft);
  opacity: 0.045;
}

.ghost-suit--spade {
  top: 16%;
  left: -120px;
  width: 420px;
  height: 420px;
  rotate: -12deg;
}

.ghost-suit--heart {
  right: -130px;
  bottom: -60px;
  width: 380px;
  height: 380px;
  rotate: 13deg;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: clamp(40px, 5vw, 56px);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    min-height: min(760px, calc(100svh - var(--header-h) - 96px));
  }
}

.hero__copy {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
  font-weight: 400;
}

/* SEQUENCE / LEGENDS wordmark framed by laurels, as on the feature graphic. */
.wordmark {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-inline: 0.82em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.3rem, 1rem + 4.2vw, 3.6rem);
  line-height: 1;
  text-transform: uppercase;
}

@supports (width: 1cqi) {
  .wordmark { font-size: min(4.3rem, 11.6cqi); }
}

.wordmark__main {
  font-size: 1em;
  letter-spacing: 0.02em;
}

.wordmark__sub {
  margin-top: 0.14em;
  margin-right: -0.5em;
  font-size: 0.4em;
  letter-spacing: 0.5em;
}

.wordmark__laurel {
  position: absolute;
  top: 50%;
  width: 1.05em;
  height: 1.6em;
  color: var(--laurel);
  translate: 0 -50%;
}

.wordmark__laurel--l { left: -0.12em; }
.wordmark__laurel--r { right: -0.12em; }

.hero__headline {
  display: block;
  max-width: 17em;
  margin-top: 22px;
  font-family: var(--font-ui);
  font-size: clamp(1.4rem, 1rem + 1.5vw, 2.05rem);
  line-height: 1.22;
  color: var(--text);
  text-wrap: balance;
}

.hero__headline-accent {
  color: var(--gold);
}

.hero__lead {
  max-width: 34rem;
  margin-top: 16px;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.12rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.hero .pill-row {
  justify-content: center;
  margin-top: 24px;
}

@media (max-width: 479px) {
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }
}

/* Three real screens, fanned: home · live match · opponent select */
.hero__stage {
  display: flex;
  justify-content: center;
}

.stage {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 10 / 13;
}

.stage__halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 115%;
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  background: radial-gradient(circle, rgba(255, 194, 77, 0.3) 0%, rgba(232, 161, 30, 0.12) 34%, rgba(111, 51, 184, 0) 66%);
}

.stage__phone {
  position: absolute;
  top: 50%;
  left: 50%;
}

.stage__phone--front {
  z-index: 3;
  width: 57%;
  transform: translate(-50%, -50%);
  animation: phone-in-front 1.1s var(--ease-out) both;
}

.stage__phone--left {
  z-index: 2;
  width: 43%;
  transform: translate(-106%, -46%) rotate(-9deg);
  animation: phone-in-side 1.1s var(--ease-out) 0.2s both;
}

.stage__phone--right {
  z-index: 1;
  width: 43%;
  transform: translate(6%, -46%) rotate(9deg);
  animation: phone-in-side 1.1s var(--ease-out) 0.32s both;
}

@keyframes phone-in-front {
  from { transform: translate(-50%, -43%); }
}

@keyframes phone-in-side {
  from { opacity: 0; transform: translate(-50%, -44%) rotate(0deg) scale(0.9); }
}

.stage__decor {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.stage__decor img {
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.45));
}

.float--dragon { top: 3%; left: 1%; width: 17%; rotate: -12deg; --dur: 6.5s; }
.float--phoenix { top: 13%; right: 0; width: 14%; rotate: 10deg; --dur: 7.5s; --delay: -2s; }
.float--knight { bottom: 6%; left: 6%; width: 13%; rotate: 8deg; --dur: 8s; --delay: -4s; }
.float--viking { bottom: 13%; right: 5%; width: 10%; rotate: -8deg; --dur: 6s; --delay: -1s; }

.float--jack-club,
.float--jack-diamond {
  width: 12%;
  height: auto;
  aspect-ratio: 104 / 146;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.4));
}

.float--jack-club { top: 43%; left: -3%; rotate: -16deg; --dur: 9s; }
.float--jack-diamond { top: 52%; right: -2%; rotate: 14deg; --dur: 8.5s; --delay: -3s; }

.float--sparkle-1 { top: 1%; left: 30%; width: 4%; }
.float--sparkle-2 { top: 30%; right: 8%; width: 3%; --delay: -1.2s; }
.float--sparkle-3 { bottom: 2%; left: 34%; width: 3.5%; --delay: -0.6s; }

.scroll-cue {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 233, 168, 0.45);
  border-radius: 14px;
  translate: -50% 0;
}

@media (min-width: 1024px) and (min-height: 760px) {
  .scroll-cue { display: block; }
}

.scroll-cue__dot {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--gold);
  animation: cue 2s ease-in-out infinite;
}

@keyframes cue {
  0% { opacity: 0; translate: 0 0; }
  30% { opacity: 1; }
  100% { opacity: 0; translate: 0 14px; }
}

/* ----------------------------------------------------------------------------
   What is Sequence Legends?
   ------------------------------------------------------------------------- */

.about {
  background:
    radial-gradient(50% 60% at 88% 40%, rgba(111, 51, 184, 0.3), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, rgba(52, 87, 176, 0.18), transparent 70%),
    linear-gradient(180deg, var(--bg-bot) 0%, #1a0b40 100%);
}

.about__grid {
  display: grid;
  gap: clamp(44px, 6vw, 72px);
  align-items: center;
}

@media (min-width: 960px) {
  .about__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

.about__copy {
  max-width: 600px;
}

@media (max-width: 959px) {
  .about__copy {
    margin-inline: auto;
    text-align: center;
  }
}

.tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 192, 4, 0.3);
  border-radius: var(--radius-md);
  background: rgba(255, 192, 4, 0.08);
  color: var(--text);
  text-align: left;
}

.tip__icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--game-gold-bright);
}

/* Play a card → Place a chip → 5 in a row! (the in-game rules flow) */
.flow {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-top: 30px;
}

@media (max-width: 959px) {
  .flow { justify-content: center; }
}

.flow__step {
  --flow: var(--violet-bright);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 96px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  color: var(--text);
}

.flow__step + .flow__step::before {
  content: "";
  position: absolute;
  top: 24px;
  left: -26px;
  width: 24px;
  height: 10px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)) left center / 16px 2px no-repeat,
    conic-gradient(from -135deg at 100% 50%, rgba(255, 255, 255, 0.4) 90deg, transparent 0) right center / 8px 10px no-repeat;
}

.flow__step--blue { --flow: var(--team-blue); }
.flow__step--gold { --flow: var(--game-gold); }

.flow__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid color-mix(in srgb, var(--flow) 45%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--flow) 16%, transparent);
  color: var(--flow);
}

.flow__icon svg {
  width: 28px;
  height: 28px;
}

.about__visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 24px;
}

.about__chip {
  position: absolute;
  z-index: 2;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45));
  animation: bob 7s ease-in-out infinite alternate;
}

.about__chip--samurai { top: 2%; left: 0; width: 88px; rotate: -14deg; }
.about__chip--spartan { right: 0; bottom: 2%; width: 64px; rotate: 12deg; animation-delay: -3s; }

.about__sparkle {
  position: absolute;
  top: 6%;
  right: 12%;
  width: 22px;
  height: 22px;
  color: var(--gold-soft);
  animation: twinkle 2.4s ease-in-out infinite alternate;
}

/* The animated board — styled like the Home hero board in the game. */
.board-frame {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  border: 1.5px solid rgba(101, 65, 197, 0.4);
  border-radius: var(--radius-xl);
  background: rgba(30, 18, 72, 0.3);
  box-shadow:
    0 0 32px 3px rgba(101, 65, 197, 0.4),
    0 0 60px 8px rgba(237, 168, 0, 0.08),
    0 0 0 1px rgba(30, 18, 72, 0.8),
    0 30px 60px rgba(0, 0, 0, 0.45);
}

.board-frame--lg {
  width: min(100%, 500px);
}

.board-canvas {
  width: 100%;
  height: 100%;
  border-radius: 22.5px;
}

.board-toggle {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid rgba(255, 210, 77, 0.5);
  border-radius: 50%;
  background: #1e1248;
  color: var(--gold-lite);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}

.board-toggle:hover {
  border-color: var(--gold);
  transform: scale(1.06);
}

.board-toggle svg {
  width: 16px;
  height: 16px;
}

.board-toggle[hidden] {
  display: none;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(52px, 7vw, 84px);
}

@media (min-width: 768px) {
  .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

.fact {
  padding: 22px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(58, 36, 110, 0.55), rgba(22, 12, 52, 0.55)) padding-box,
    linear-gradient(160deg, rgba(255, 233, 168, 0.45), rgba(255, 233, 168, 0.06) 60%) border-box;
}

.fact__value {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.9rem, 1.4rem + 1.5vw, 2.6rem);
  line-height: 1;
  background: var(--grad-gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.fact__label {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-muted);
}

/* ----------------------------------------------------------------------------
   Game modes — tabbed tour of real screens
   ------------------------------------------------------------------------- */

.modes {
  background:
    radial-gradient(55% 50% at 28% 55%, rgba(111, 51, 184, 0.32), transparent 70%),
    radial-gradient(40% 40% at 90% 20%, rgba(178, 59, 176, 0.14), transparent 70%),
    linear-gradient(180deg, #1a0b40 0%, #200f4e 50%, #170a38 100%);
}

.tour__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

@media (max-width: 639px) {
  .tour__tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 10px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .tour__tabs::-webkit-scrollbar {
    display: none;
  }
}

.tour__tab {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  scroll-snap-align: start;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.tour__tab-icon {
  width: 18px;
  height: 18px;
}

.tour__tab:hover {
  border-color: rgba(255, 210, 77, 0.4);
  color: var(--text);
}

.tour__tab[aria-selected="true"] {
  border-color: transparent;
  background: var(--grad-gold-button);
  color: #1f1238;
  box-shadow: 0 8px 22px rgba(255, 176, 0, 0.3);
}

.tour__body {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

@media (min-width: 900px) {
  .tour__body { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
}

.tour__stage {
  --pw: clamp(200px, 56vw, 290px);
  position: relative;
  height: calc(var(--pw) * 2.155 + 32px);
  touch-action: pan-y;
}

.tour__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--pw) * 2.2);
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  background: radial-gradient(circle, rgba(255, 194, 77, 0.24) 0%, rgba(111, 51, 184, 0.18) 40%, transparent 68%);
}

.tour__phone {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 1;
  width: var(--pw);
  margin: 0 0 0 calc(var(--pw) / -2);
  cursor: pointer;
  transition: transform 0.7s var(--ease-out), opacity 0.7s var(--ease-out);
}

.tour__phone[data-pos="0"] {
  z-index: 3;
  cursor: default;
}

.tour__phone[data-pos="-1"] {
  z-index: 2;
  opacity: 0.5;
  transform: translateX(-58%) scale(0.8) rotate(-7deg);
}

.tour__phone[data-pos="1"] {
  z-index: 2;
  opacity: 0.5;
  transform: translateX(58%) scale(0.8) rotate(7deg);
}

.tour__phone[data-pos="2"] {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

.tour__phone[data-pos="-1"]:hover,
.tour__phone[data-pos="1"]:hover {
  opacity: 0.75;
}

.tour__decor {
  position: absolute;
  z-index: 4;
  pointer-events: none;
}

.tour__decor--jack {
  top: 8%;
  left: max(0px, calc(50% - var(--pw) * 0.95));
  width: 64px;
  height: auto;
  aspect-ratio: 104 / 146;
  rotate: -14deg;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.4));
  animation: bob 8s ease-in-out infinite alternate;
}

.tour__decor--chip {
  right: max(0px, calc(50% - var(--pw) * 0.92));
  bottom: 10%;
  width: 72px;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45));
  animation: bob 7s ease-in-out -2s infinite alternate;
}

.tour__decor--sparkle {
  top: 2%;
  right: calc(50% - var(--pw) * 0.62);
  width: 22px;
  height: 22px;
  color: var(--gold-soft);
  animation: twinkle 2.6s ease-in-out infinite alternate;
}

.tour__panel {
  padding: clamp(24px, 3vw, 36px);
  border: 1.5px solid transparent;
  border-radius: var(--radius-xl);
  background: var(--grad-panel) padding-box, var(--grad-panel-border) border-box;
  box-shadow: var(--shadow-lg);
}

.tour__panel[hidden] {
  display: none;
}

.js .tour__panel:not([hidden]) {
  animation: panel-in 0.5s var(--ease-out);
}

@keyframes panel-in {
  from { opacity: 0; translate: 0 12px; }
}

.tour__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--game-gold-bright);
}

.tour__title {
  margin-top: 8px;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
  line-height: 1.15;
  color: var(--text);
}

.tour__panel > p:not(.tour__eyebrow) {
  margin-top: 12px;
}

.check-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.5;
}

.check-list svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--gold);
}

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

/* ----------------------------------------------------------------------------
   Features — bento
   ------------------------------------------------------------------------- */

.features {
  background:
    radial-gradient(45% 40% at 8% 18%, rgba(178, 59, 176, 0.16), transparent 70%),
    radial-gradient(45% 40% at 92% 82%, rgba(52, 87, 176, 0.2), transparent 70%),
    var(--bg-bot);
}

.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .feature--ai,
  .feature--teams,
  .feature--skins,
  .feature--boards { grid-column: span 2; }
}

@media (min-width: 1100px) {
  .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
  }

  .feature--ai { grid-column: span 4; }
  .feature--teams { grid-column: span 2; }

  .feature--skins,
  .feature--boards,
  .feature--daily,
  .feature--progress { grid-column: span 3; }
}

.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(22px, 2.6vw, 32px);
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--radius-xl);
  background: var(--grad-panel) padding-box, var(--grad-panel-border) border-box;
  box-shadow: var(--shadow-md);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 100% 0%, rgba(255, 194, 77, 0.1), transparent 70%);
  pointer-events: none;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(5, 2, 20, 0.6), 0 0 0 1px rgba(255, 210, 77, 0.14);
}

.feature__intro {
  position: relative;
}

.badge-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 16px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--grad-badge) padding-box, var(--grad-gold-border) border-box;
  color: var(--gold);
  box-shadow: 0 0 18px rgba(255, 194, 77, 0.25);
}

.badge-icon svg {
  width: 26px;
  height: 26px;
}

.feature__title {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem);
  line-height: 1.2;
  color: var(--text);
}

.feature__text {
  max-width: 46ch;
  margin-top: 8px;
  color: var(--text-muted);
}

/* Cards that sit side by side when there is room (AI, daily) */
.feature--ai,
.feature--daily {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  align-items: center;
}

.feature--daily {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

/* Opponent picker — mirrors the in-game "Choose your opponent" panel */
.opponent {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.opponent__tiers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
}

.tier {
  position: relative;
  display: block;
}

.tier input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.tier span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(10, 6, 34, 0.5);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.tier span::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tier);
}

.tier input:hover + span {
  border-color: rgba(255, 210, 77, 0.4);
}

.tier input:checked + span {
  border-color: var(--game-gold-bright);
  background: linear-gradient(180deg, #5b3bb3, #3c2582);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(255, 192, 4, 0.3), 0 8px 18px rgba(0, 0, 0, 0.35);
}

.tier input:focus-visible + span {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.opponent__card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(10, 6, 34, 0.55);
}

.opponent__name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  font-family: var(--font-ui);
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--text);
}

.opponent__nick {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tier);
  transition: color 0.3s;
}

.stats {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.stat {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.stat dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat dd {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pips {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.pips i {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  transition: background-color 0.35s, box-shadow 0.35s;
}

.pips[data-value="1"] i:nth-child(-n + 1),
.pips[data-value="2"] i:nth-child(-n + 2),
.pips[data-value="3"] i:nth-child(-n + 3),
.pips[data-value="4"] i:nth-child(-n + 4),
.pips[data-value="5"] i {
  background: var(--tier);
  box-shadow: 0 0 10px color-mix(in srgb, var(--tier) 55%, transparent);
}

.stat__num {
  flex: none;
  width: 2.4em;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
  color: var(--text);
}

/* Team battles */
.teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding: 18px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(10, 6, 34, 0.5);
}

.team {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1.5px solid;
  border-radius: 14px;
}

.team--blue {
  --seat: var(--team-blue);
  border-color: rgba(61, 139, 255, 0.55);
  background: rgba(61, 139, 255, 0.1);
}

.team--red {
  --seat: var(--team-red);
  border-color: rgba(255, 90, 110, 0.55);
  background: rgba(255, 90, 110, 0.1);
}

.seat {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 64px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.seat::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.6) 0 16%, transparent 30%), var(--seat);
  box-shadow: 0 0 8px var(--seat);
}

.seat--you {
  box-shadow: inset 0 0 0 1.5px rgba(255, 192, 4, 0.75);
}

.teams__vs {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--grad-gold-button);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: #1f1238;
  box-shadow: 0 6px 16px rgba(255, 176, 0, 0.3);
}

/* Chip skins */
.skins {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
}

.skin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 92px;
  padding: 12px 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(10, 6, 34, 0.45);
  text-align: center;
}

.skin img {
  width: 66px;
  aspect-ratio: 1;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45));
  transition: transform 0.5s var(--ease-out);
}

.skin:hover img {
  transform: rotate(-14deg) scale(1.08);
}

.skin__name {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  line-height: 1.1;
  color: var(--text);
}

.skin__rarity {
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 99px;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.skin--common .skin__rarity { color: #c9ccd6; }
.skin--rare .skin__rarity { color: #e7a766; }
.skin--epic .skin__rarity { color: #c79bff; }
.skin--legendary .skin__rarity { color: var(--gold); }

/* A card face drawn with text, like the game's FontCardFace.
   Colours default to Royal Crimson, the game's default board. */
.card-face {
  position: relative;
  display: inline-flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12em;
  width: 2.6em;
  height: 3.4em;
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.4));
  border-radius: 0.3em;
  background: linear-gradient(180deg, var(--card-top, #fcf5e2), var(--card-bottom, #f0e1bd));
  color: var(--ink-black, #2a2118);
  font-size: 16px;
  line-height: 1;
}

.card-face--red {
  color: var(--ink-red, #b3122b);
}

.card-face__rank {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1em;
  letter-spacing: -0.03em;
}

.card-face__suit {
  width: 0.9em;
  height: 0.9em;
}

/* Board themes — values copied from lib/core/theme/board_theme.dart */
.themes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 12px;
  margin-top: auto;
}

.theme {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 96px;
  text-align: center;
}

.theme__felt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  aspect-ratio: 1.3;
  padding: 6px;
  border: 2px solid var(--felt-border);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--felt-a), var(--felt-b));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.3s var(--ease-out);
}

.theme:hover .theme__felt {
  transform: translateY(-3px);
}

.theme__corner {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--corner-a), var(--corner-b), var(--corner-c));
  color: var(--corner-icon);
  box-shadow: 0 0 6px color-mix(in srgb, var(--corner-c) 60%, transparent);
}

.theme__corner svg {
  width: 14px;
  height: 14px;
}

.theme .card-face {
  width: 24px;
  height: 34px;
  border-radius: 5px;
  font-size: 12px;
}

.theme__name {
  font-family: var(--font-ui);
  font-size: 0.84rem;
  line-height: 1.15;
  color: var(--text);
}

.theme--royal {
  --felt-a: #6e1322; --felt-b: #35070f; --felt-border: #eda800;
  --card-top: #fcf5e2; --card-bottom: #f0e1bd; --card-border: rgba(255, 255, 255, 0.4);
  --ink-red: #b3122b; --ink-black: #2a2118;
  --corner-a: #ffe9a8; --corner-b: #eda800; --corner-c: #9a6b00; --corner-icon: #2a2118;
}

.theme--classic {
  --felt-a: #1e1248; --felt-b: #16093a; --felt-border: #6541c5;
  --card-top: #ffffff; --card-bottom: #f1ecfb; --card-border: rgba(255, 255, 255, 0.3);
  --ink-red: #910317; --ink-black: #1c1d21;
  --corner-a: #ffe066; --corner-b: #eda800; --corner-c: #b87a00; --corner-icon: #ffffff;
}

.theme--casino {
  --felt-a: #0c7a43; --felt-b: #064026; --felt-border: #eda800;
  --card-top: #fbf6e9; --card-bottom: #efe3c6; --card-border: rgba(255, 255, 255, 0.4);
  --ink-red: #b3122b; --ink-black: #20242e;
  --corner-a: #ffe9a8; --corner-b: #eda800; --corner-c: #9a6b00; --corner-icon: #20242e;
}

.theme--sapphire {
  --felt-a: #11337f; --felt-b: #071640; --felt-border: #8fb6ff;
  --card-top: #ffffff; --card-bottom: #e8eefb; --card-border: rgba(255, 255, 255, 0.33);
  --ink-red: #910317; --ink-black: #152045;
  --corner-a: #cfe0ff; --corner-b: #8fb6ff; --corner-c: #3d6fd6; --corner-icon: #ffffff;
}

.theme--midnight {
  --felt-a: #0a0e27; --felt-b: #05060f; --felt-border: #2be0c8;
  --card-top: #1c2440; --card-bottom: #121a30; --card-border: rgba(43, 224, 200, 0.33);
  --ink-red: #ff6b9a; --ink-black: #59e6ff;
  --corner-a: #59e6ff; --corner-b: #2be0c8; --corner-c: #1b8e8a; --corner-icon: #05060f;
}

/* Daily rewards — real in-game dialog */
.feature__shot {
  justify-self: center;
  width: min(100%, 250px);
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 200, 58, 0.35), 0 0 30px rgba(255, 194, 77, 0.18);
  rotate: 3deg;
  transition: rotate 0.4s var(--ease-out);
}

.feature--daily:hover .feature__shot {
  rotate: 0deg;
}

.feature__shot img {
  width: 100%;
}

/* Progression — the same destinations as the in-game menu */
.nav-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

@media (max-width: 399px) {
  .nav-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 16px;
  }
}

.nav-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-tile__icon {
  display: grid;
  place-items: center;
  width: 62px;
  max-width: 100%;
  aspect-ratio: 1;
  border: 1.5px solid;
  border-radius: 16px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), 0 8px 18px rgba(0, 0, 0, 0.35);
}

.nav-tile__icon svg {
  width: 28px;
  height: 28px;
}

.nav-tile--gold .nav-tile__icon { color: #ffc004; border-color: #a87b17; background: linear-gradient(180deg, #6b4a0e, #3d2a08); }
.nav-tile--red .nav-tile__icon { color: #ff6e8a; border-color: #b0405c; background: linear-gradient(180deg, #6a1b33, #3b0e1e); }
.nav-tile--amber .nav-tile__icon { color: #ffd54f; border-color: #9b7d22; background: linear-gradient(180deg, #5e4a12, #352a0a); }
.nav-tile--violet .nav-tile__icon { color: #b69cff; border-color: #6541c5; background: linear-gradient(180deg, #3b2a86, #22175a); }

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

.how {
  background:
    radial-gradient(50% 40% at 50% 0%, rgba(111, 51, 184, 0.22), transparent 70%),
    linear-gradient(180deg, #150933 0%, #1c0c45 100%);
}

.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-xl);
  background: var(--grad-panel) padding-box, var(--grad-panel-border) border-box;
  box-shadow: var(--shadow-md);
}

@media (min-width: 1100px) {
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 94px;
    right: -21px;
    width: 22px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 210, 77, 0.7), rgba(255, 210, 77, 0));
  }
}

.step__art {
  position: relative;
  display: grid;
  place-items: center;
  height: 156px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  background: radial-gradient(75% 75% at 50% 40%, rgba(111, 51, 184, 0.5), rgba(10, 6, 34, 0.65));
}

.step__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--game-gold-bright);
}

.step__title {
  margin-top: 2px;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--text);
}

.step__text {
  margin-top: 8px;
  color: var(--text-muted);
}

/* 01 — a fanned hand with the picked card raised */
.hand {
  position: relative;
  width: 70px;
  height: 100px;
}

.hand__card {
  position: absolute;
  bottom: 0;
  left: 0;
  font-size: 26px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  transform-origin: 50% 130%;
  transform: translateX(var(--x)) rotate(var(--r));
}

.hand__card--picked {
  translate: 0 -12px;
  box-shadow: 0 0 0 2px var(--game-gold-bright), 0 0 22px rgba(255, 192, 4, 0.6), 0 10px 20px rgba(0, 0, 0, 0.4);
  animation: pick 3.2s ease-in-out infinite;
}

@keyframes pick {
  0%, 100% { translate: 0 -8px; }
  50% { translate: 0 -18px; }
}

/* Shared board fragment look (Royal Crimson felt) */
.mini-board,
.chip-line {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 2px solid var(--game-gold);
  border-radius: 12px;
  background: linear-gradient(135deg, #6e1322, #35070f);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.mini-board .card-face,
.chip-line .card-face {
  width: 34px;
  height: 44px;
  border-radius: 6px;
  font-size: 14px;
}

.mini-board {
  grid-template-columns: repeat(3, 34px);
  gap: 3px;
}

.mini-board .card-face {
  height: 40px;
}

.mini-board__target {
  animation: target-glow 2.4s ease-in-out infinite;
}

@keyframes target-glow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255, 192, 4, 0.9), 0 0 10px rgba(255, 192, 4, 0.5); }
  50% { box-shadow: 0 0 0 2px rgba(255, 192, 4, 1), 0 0 20px rgba(255, 192, 4, 0.85); }
}

/* A glossy chip — the ChipDot gradient from the game (team colours). */
.chip-dot {
  position: absolute;
  top: 58%;
  left: 50%;
  z-index: 2;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 1.2px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, var(--chip-hi) 0%, var(--chip-mid) 55%, var(--chip-lo) 100%);
  box-shadow: 0 2px 4px 0.5px rgba(0, 0, 0, 0.45), 0 0 6px var(--chip-glow);
}

.chip-dot::after {
  content: "";
  position: absolute;
  top: 12%;
  left: 18%;
  width: 28%;
  height: 16%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.chip-dot--blue { --chip-hi: #8bb9ff; --chip-mid: #3d8bff; --chip-lo: #2b61b3; --chip-glow: rgba(61, 139, 255, 0.4); }
.chip-dot--red { --chip-hi: #ff9ca8; --chip-mid: #ff5a6e; --chip-lo: #b33f4d; --chip-glow: rgba(255, 90, 110, 0.4); }

.chip-dot--drop {
  animation: chip-drop 3.2s var(--ease-out) infinite;
}

@keyframes chip-drop {
  0%, 18% { opacity: 0; transform: translateY(-24px) scale(0.6); }
  32% { opacity: 1; transform: translateY(0) scale(1.1); }
  40%, 86% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}

/* 03 — a real row of the board (6♦ 5♦ 4♦ 3♦ 2♦) completing a sequence */
.chip-line {
  grid-auto-flow: column;
}

.chip-line .chip-dot {
  animation: chip-pop 4.5s var(--ease-out) infinite;
}

.chip-line .card-face:nth-child(2) .chip-dot { animation-delay: 0.15s; }
.chip-line .card-face:nth-child(3) .chip-dot { animation-delay: 0.3s; }
.chip-line .card-face:nth-child(4) .chip-dot { animation-delay: 0.45s; }
.chip-line .card-face:nth-child(5) .chip-dot { animation-delay: 0.6s; }

@keyframes chip-pop {
  0% { opacity: 0; transform: scale(0.3); }
  8% { opacity: 1; transform: scale(1.14); }
  14%, 86% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}

.chip-line__glow {
  position: absolute;
  top: calc(7px + 44px * 0.58 - 2px);
  left: 24px;
  right: 24px;
  z-index: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--game-gold);
  box-shadow: 0 0 10px var(--game-gold), 0 0 18px rgba(237, 168, 0, 0.6);
  opacity: 0.9;
  transform-origin: left center;
  animation: line-sweep 4.5s var(--ease-out) infinite;
}

@keyframes line-sweep {
  0%, 30% { opacity: 0; transform: scaleX(0); }
  46%, 86% { opacity: 0.9; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1); }
}

/* 04 — the match score bar (sequence dots), won 3 – 1 */
.scorebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #0b0a33;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.scorebar__side {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 72px;
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
}

.scorebar__side--you {
  border: 1.5px solid var(--team-blue);
  background: linear-gradient(180deg, #1f4fb8, #173a86);
  box-shadow: 0 0 14px rgba(61, 139, 255, 0.45);
}

.scorebar__side--cpu {
  align-items: flex-end;
  border: 1.5px solid rgba(255, 90, 110, 0.5);
  background: linear-gradient(180deg, #3b1030, #240a1f);
}

.scorebar__dots {
  display: flex;
  gap: 4px;
}

.scorebar__dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.scorebar__side--you .scorebar__dots i.on {
  background: #7ab6ff;
  box-shadow: 0 0 6px var(--team-blue);
}

.scorebar__side--you .scorebar__dots i:nth-child(3) {
  animation: dot-win 3s ease-in-out infinite;
}

.scorebar__side--cpu .scorebar__dots i.on {
  background: var(--team-red);
}

@keyframes dot-win {
  0%, 30% { background: rgba(255, 255, 255, 0.2); box-shadow: none; }
  45%, 100% { background: #7ab6ff; box-shadow: 0 0 8px var(--team-blue); }
}

.scorebar__vs {
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--grad-gold-button);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: #1f1238;
}

.step__trophy {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 38px;
  color: var(--game-gold-bright);
  filter: drop-shadow(0 0 10px rgba(255, 192, 4, 0.6));
  animation: bob 3s ease-in-out infinite alternate;
}

/* Jacks are wild */
.jacks {
  display: grid;
  gap: 24px;
  align-items: center;
  margin-top: 20px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid transparent;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(115deg, rgba(46, 189, 107, 0.16), rgba(35, 22, 84, 0.95) 34%, rgba(35, 22, 84, 0.95) 66%, rgba(145, 3, 23, 0.28)) padding-box,
    var(--grad-gold-border) border-box;
  box-shadow: var(--shadow-md);
}

@media (min-width: 720px) {
  .jacks {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 40px;
  }
}

.jacks__cards {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.jack-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 88px;
  height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  background: linear-gradient(180deg, #fcf5e2, #f0e1bd);
  color: var(--jack);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}

.jack-face--wild { --jack: var(--success); rotate: -6deg; }
.jack-face--remove { --jack: var(--danger); rotate: 6deg; }

.jack-face__j {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 34px;
  line-height: 1;
}

.jack-face__icon {
  width: 34px;
  height: 34px;
}

.jack-face__badge {
  padding: 2px 8px;
  border: 1px solid var(--jack);
  border-radius: 99px;
  background: color-mix(in srgb, var(--jack) 12%, transparent);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.jacks__title {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.2rem + 0.8vw, 1.9rem);
  line-height: 1.2;
  color: var(--text);
}

.jacks__copy p {
  margin-top: 8px;
}

.text-wild { color: #4ade80; }
.text-remove { color: #ff7d95; }

.suits {
  display: inline-flex;
  gap: 2px;
  margin: 0 3px;
  vertical-align: -2px;
}

.suit {
  width: 16px;
  height: 16px;
  color: var(--text);
}

.suit--red {
  color: #ff7d95;
}

/* ----------------------------------------------------------------------------
   Strategy
   ------------------------------------------------------------------------- */

.strategy {
  background:
    radial-gradient(62% 45% at 50% 0%, rgba(111, 51, 184, 0.52), transparent 72%),
    radial-gradient(40% 40% at 100% 100%, rgba(178, 59, 176, 0.22), transparent 70%),
    linear-gradient(172deg, #2c1464 0%, #221052 45%, #150933 100%);
}

.strategy__backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.strategy .rays {
  top: 58%;
  left: 30%;
  opacity: 0.32;
}

.strategy__grid {
  display: grid;
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
}

@media (min-width: 960px) {
  .strategy__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

.strategy__board {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.board-caption {
  max-width: 36ch;
  min-height: 3.2em;
  margin-top: 20px;
  font-weight: 600;
  text-align: center;
  color: var(--gold-soft);
}

.tactics {
  display: grid;
  gap: 10px;
}

.tactic {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 14px 16px 16px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-lg);
  background: rgba(10, 6, 34, 0.45);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease-out);
}

.tactic:hover {
  border-color: rgba(255, 210, 77, 0.38);
  transform: translateX(3px);
}

.tactic[aria-pressed="true"] {
  border-color: var(--game-gold-bright);
  background: linear-gradient(90deg, rgba(255, 192, 4, 0.14), rgba(42, 30, 99, 0.65));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 192, 4, 0.22);
}

/* Loop progress while the board cycles through tactics on its own. */
.tactic::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--game-gold-bright);
  opacity: 0;
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  transition: opacity 0.3s;
}

.tactics.is-cycling .tactic[aria-pressed="true"]::after {
  opacity: 1;
}

.tactic__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 192, 4, 0.12);
  color: var(--game-gold-bright);
}

.tactic__icon svg {
  width: 22px;
  height: 22px;
}

.tactic__icon--wild { background: rgba(46, 189, 107, 0.15); color: #4ade80; }
.tactic__icon--remove { background: rgba(240, 71, 106, 0.15); color: #ff7d95; }

.tactic__title {
  display: block;
  font-family: var(--font-ui);
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--text);
}

.tactic__text {
  display: block;
  margin-top: 4px;
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ----------------------------------------------------------------------------
   Gallery
   ------------------------------------------------------------------------- */

.gallery-section {
  background:
    radial-gradient(50% 45% at 50% 58%, rgba(178, 59, 176, 0.18), transparent 70%),
    linear-gradient(180deg, #1c0c45 0%, #130830 100%);
}

.gallery__track {
  --slide-w: min(68vw, 300px);
  position: relative;
  display: flex;
  gap: clamp(12px, 2vw, 28px);
  padding: 20px calc(50% - var(--slide-w) / 2) 40px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.gallery__track::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1024px) {
  .gallery__track { --slide-w: 320px; }
}

.gallery__slide {
  flex: none;
  width: var(--slide-w);
  scroll-snap-align: center;
  transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
}

.js .gallery__slide:not(.is-active) {
  opacity: 0.55;
  transform: scale(0.86);
}

.gallery__open {
  display: block;
  width: 100%;
  aspect-ratio: 1240 / 2208;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: #1e1248;
  cursor: zoom-in;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 210, 77, 0.25);
  transition: box-shadow 0.4s;
}

.js .gallery__slide:not(.is-active) .gallery__open {
  cursor: pointer;
}

.gallery__slide.is-active .gallery__open {
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 210, 77, 0.6), 0 0 44px rgba(255, 194, 77, 0.25);
}

.gallery__open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.gallery__dots {
  display: flex;
  gap: 10px;
}

.gallery__dot {
  position: relative;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: width 0.3s var(--ease-out), background-color 0.3s;
}

.gallery__dot::before {
  content: "";
  position: absolute;
  inset: -10px -5px;
}

.gallery__dot[aria-current="true"] {
  width: 28px;
  background: var(--gold);
}

/* Full-size viewer */
.lightbox {
  width: 100%;
  max-width: 100vw;
  height: 100%;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--text);
}

.lightbox::backdrop {
  background: rgba(8, 3, 24, 0.9);
}

.lightbox[open] {
  display: grid;
}

.lightbox__inner {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 72px 16px;
}

.lightbox__img {
  width: auto;
  max-width: min(100%, 560px);
  height: auto;
  max-height: calc(100vh - 144px);
  max-height: calc(100dvh - 144px);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox__btn {
  position: absolute;
}

.lightbox__btn--close { top: 14px; right: 14px; }
.lightbox__btn--prev { top: 50%; left: 14px; translate: 0 -50%; }
.lightbox__btn--next { top: 50%; right: 14px; translate: 0 -50%; }

@media (max-width: 639px) {
  .lightbox__btn--prev,
  .lightbox__btn--next {
    top: auto;
    bottom: 14px;
    translate: none;
  }

  .lightbox__btn--prev { left: calc(50% - 60px); }
  .lightbox__btn--next { right: calc(50% - 60px); }
}

/* ----------------------------------------------------------------------------
   FAQ — native <details> accordion
   ------------------------------------------------------------------------- */

.faq {
  background:
    radial-gradient(45% 40% at 50% 0%, rgba(111, 51, 184, 0.22), transparent 70%),
    linear-gradient(180deg, #130830 0%, var(--bg-bot) 100%);
}

.faq__list {
  display: grid;
  gap: 12px;
  max-width: 1080px;
  margin-inline: auto;
  interpolate-size: allow-keywords;
}

@media (min-width: 1024px) {
  .faq__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
  }
}

.faq__col {
  display: grid;
  gap: 12px;
  align-content: start;
}

.faq__item {
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background: var(--grad-panel) padding-box, var(--grad-panel-border) border-box;
  box-shadow: 0 8px 22px rgba(5, 2, 20, 0.35);
  transition: box-shadow 0.3s var(--ease-out);
}

.faq__item[open] {
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 192, 4, 0.28);
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__title {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.15rem);
  line-height: 1.3;
  color: var(--text);
  transition: color 0.2s;
}

.faq__question:hover .faq__title,
.faq__item[open] .faq__title {
  color: var(--gold-lite);
}

/* Plus that turns into a minus */
.faq__icon {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border: 1.5px solid rgba(255, 210, 77, 0.5);
  border-radius: 50%;
  background: rgba(26, 14, 56, 0.7);
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 2px;
  background: var(--gold);
  transition: transform 0.3s var(--ease-out);
}

.faq__icon::after {
  transform: rotate(90deg);
}

.faq__item[open] .faq__icon::after {
  transform: rotate(0deg);
}

.faq__answer {
  padding: 0 18px 18px;
}

.faq__answer p {
  max-width: 70ch;
}

.faq__answer a {
  color: var(--gold-soft);
  text-underline-offset: 3px;
}

.faq__answer a:hover {
  color: var(--gold-lite);
}

/* Smooth open/close where the browser can animate <details>. */
.faq__item::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 0.35s var(--ease-out), content-visibility 0.35s;
  transition-behavior: allow-discrete;
}

.faq__item[open]::details-content {
  block-size: auto;
}

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

.cta {
  position: relative;
  overflow: hidden;
  padding-block: clamp(84px, 11vw, 140px);
  background:
    radial-gradient(55% 55% at 50% 42%, rgba(255, 194, 77, 0.16), transparent 70%),
    radial-gradient(62% 48% at 50% 8%, rgba(111, 51, 184, 0.6), transparent 72%),
    radial-gradient(52% 38% at 50% 100%, rgba(178, 59, 176, 0.28), transparent 70%),
    linear-gradient(172deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-bot) 100%);
}

@supports (overflow: clip) {
  .cta { overflow: clip; }
}

.cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 210, 77, 0), rgba(255, 210, 77, 0.6), rgba(255, 210, 77, 0));
}

.cta__backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cta .rays {
  top: 42%;
}

@media (min-width: 960px) {
  .cta .rays { left: 38%; }
}

.cta__corner {
  position: absolute;
  width: clamp(64px, 9vw, 112px);
  height: clamp(64px, 9vw, 112px);
}

.cta__corner--tl { top: 20px; left: 20px; }
.cta__corner--tr { top: 20px; right: 20px; scale: -1 1; }
.cta__corner--bl { bottom: 20px; left: 20px; scale: 1 -1; }
.cta__corner--br { right: 20px; bottom: 20px; scale: -1 -1; }

.cta__grid {
  position: relative;
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .cta__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
}

.cta__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cta__crest {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 26px;
}

.cta__laurel {
  width: 62px;
  height: 100px;
  color: var(--laurel);
}

.cta__icon {
  width: 132px;
  height: 132px;
  border-radius: 28px;
  box-shadow: 0 0 0 2px rgba(255, 210, 77, 0.7), 0 0 44px rgba(255, 194, 77, 0.45), 0 20px 40px rgba(0, 0, 0, 0.5);
}

.flourish {
  width: 170px;
  height: 34px;
  margin-top: 10px;
  color: #f6c64a;
}

.cta .section-sub {
  margin-top: 6px;
  color: var(--text-soft);
}

.cta__actions {
  margin-top: 32px;
}

.cta .pill-row {
  margin-top: 26px;
}

@media (max-width: 479px) {
  .cta__actions,
  .cta__actions .btn {
    width: 100%;
  }

  .btn--xl {
    padding: 0 1.2em;
    font-size: 1.05rem;
  }
}

.cta__art {
  position: relative;
  display: none;
  place-items: center;
  height: clamp(460px, 44vw, 580px);
}

@media (min-width: 960px) {
  .cta__art { display: grid; }
}

.cta__halo {
  position: absolute;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 194, 77, 0.3), transparent 64%);
}

.cta__phone {
  width: min(250px, 70%);
  rotate: 6deg;
}

.cta__chip {
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.45));
}

.cta__chip--lion { top: 10%; left: 0; width: 92px; rotate: -14deg; }
.cta__chip--eagle { right: 2%; bottom: 12%; width: 64px; --delay: -2s; }

.cta__jack {
  top: 6%;
  right: 0;
  width: 70px;
  height: auto;
  aspect-ratio: 104 / 146;
  rotate: 14deg;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.4));
  --dur: 8s;
}

.cta__sparkle--1 { bottom: 16%; left: 10%; width: 22px; }
.cta__sparkle--2 { top: 2%; left: 30%; width: 16px; --delay: -1s; }

/* ----------------------------------------------------------------------------
   Behind the game — company & developer
   ------------------------------------------------------------------------- */

.studio {
  padding-block: clamp(64px, 8vw, 104px);
  background:
    radial-gradient(45% 60% at 50% 0%, rgba(111, 51, 184, 0.24), transparent 70%),
    radial-gradient(35% 45% at 100% 100%, rgba(52, 87, 176, 0.14), transparent 70%),
    linear-gradient(180deg, var(--bg-bot) 0%, var(--bg-deep) 100%);
}

.studio__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 900px;
  margin-inline: auto;
}

@media (min-width: 820px) {
  .studio__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

.studio-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: clamp(22px, 2.6vw, 30px);
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--radius-xl);
  background: var(--grad-panel) padding-box, var(--grad-panel-border) border-box;
  box-shadow: var(--shadow-md);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.studio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 100% 0%, rgba(255, 194, 77, 0.1), transparent 70%);
  pointer-events: none;
}

.studio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(5, 2, 20, 0.6), 0 0 0 1px rgba(255, 210, 77, 0.14);
}

/* Gold-ringed medallion, like the feature badges */
.studio-card__badge {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--grad-badge) padding-box, var(--grad-gold-border) border-box;
  color: var(--gold);
  box-shadow: 0 0 24px rgba(255, 194, 77, 0.28);
}

.studio-card__badge svg {
  width: 36px;
  height: 36px;
}

.studio-card__badge--initials {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: 0.04em;
}

.studio-card__body {
  position: relative;
  min-width: 0;
}

.studio-card__role {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--game-gold-bright);
}

.studio-card__name {
  margin-top: 4px;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1.45rem, 1.2rem + 0.8vw, 1.8rem);
  line-height: 1.15;
  color: var(--text);
  overflow-wrap: anywhere;
}

.studio-card__link {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 2px no-repeat;
  transition: color 0.2s, background-size 0.3s var(--ease-out);
}

.studio-card__link:hover {
  color: var(--gold-lite);
  background-size: 100% 2px;
}

.studio-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.studio-card__meta img {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 210, 77, 0.45);
}

.studio-card__linkedin {
  margin-top: 14px;
  text-transform: none;
}

.studio-card__external {
  width: 0.85em;
  height: 0.85em;
  opacity: 0.75;
}

@media (max-width: 479px) {
  .studio-card {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .studio-card__meta {
    justify-content: center;
  }

  .studio-card__linkedin {
    width: 100%;
  }
}

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

.site-footer {
  position: relative;
  padding: clamp(52px, 7vw, 76px) 0 clamp(40px, 6vw, 60px);
  border-top: 1px solid rgba(255, 210, 77, 0.16);
  background: var(--bg-deep);
  font-size: 0.95rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
}

@media (min-width: 640px) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .site-footer__grid { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); }
}

.site-footer__brand p {
  max-width: 32ch;
  margin: 14px 0 20px;
  color: var(--text-muted);
}

.site-footer__heading {
  margin-bottom: 12px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.site-footer__col ul {
  display: grid;
  gap: 2px;
}

.site-footer__col a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--text-muted);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.2s;
}

.site-footer__col a:hover {
  color: var(--gold-lite);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__icon {
  flex: none;
  width: 18px;
  height: 18px;
}

/* ----------------------------------------------------------------------------
   Scroll reveal (only when JS is running)
   ------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  translate: 0 28px;
  transition:
    opacity 0.8s var(--ease-out) var(--reveal-delay, 0s),
    translate 0.8s var(--ease-out) var(--reveal-delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  translate: none;
}

/* ----------------------------------------------------------------------------
   Without JavaScript: show everything statically
   ------------------------------------------------------------------------- */

@media (max-width: 1023px) {
  html:not(.js) .site-nav {
    display: none;
  }
}

html:not(.js) .nav-toggle,
html:not(.js) .about__visual,
html:not(.js) .strategy__board,
html:not(.js) .tour__tabs,
html:not(.js) .tour__glow,
html:not(.js) .tour__decor,
html:not(.js) .gallery__controls {
  display: none;
}

html:not(.js) .tour__stage {
  display: flex;
  gap: 16px;
  height: auto;
  padding-bottom: 12px;
  overflow-x: auto;
}

html:not(.js) .tour__phone {
  position: relative;
  top: auto;
  left: auto;
  flex: none;
  margin: 0;
}

html:not(.js) .tour__panels {
  display: grid;
  gap: 16px;
}

/* ----------------------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    translate: none;
  }
}
