/* =========================================================
   Shadow Jump — website styles
   Visual language mirrors the in-game UI: cream panels,
   orange beveled frames, maroon outlines, gold buttons,
   and the sunset / shadow split world.
   ========================================================= */

:root {
  /* Palette */
  --maroon: #5a1a1f;
  --maroon-soft: #7a3a33;
  --cream: #fff6e6;
  --cream-2: #fcebd2;
  --cream-3: #f3dcc0;
  --orange: #e8693a;
  --orange-2: #f2874d;
  --orange-dark: #c4492c;
  --gold: #ffd257;
  --gold-2: #f8b02c;
  --gold-3: #d9822b;
  --green: #7bb33a;
  --purple: #3b3352;
  --purple-2: #2a2340;
  --purple-3: #4e4568;
  --lavender: #d9d0f0;
  --sky-1: #e9806c;
  --sky-2: #f6a878;
  --sky-3: #ffd49a;

  /* Type */
  --font-display: 'Lilita One', 'Fredoka', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Geometry */
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --ground-h: 84px;
  --container: 1180px;

  /* Reusable maroon outline for display text */
  --outline:
    0 -5px 0 var(--maroon), 0 5px 0 var(--maroon), 5px 0 0 var(--maroon), -5px 0 0 var(--maroon),
    4px 4px 0 var(--maroon), -4px 4px 0 var(--maroon), 4px -4px 0 var(--maroon), -4px -4px 0 var(--maroon),
    2px 5px 0 var(--maroon), -2px 5px 0 var(--maroon), 2px -5px 0 var(--maroon), -2px -5px 0 var(--maroon),
    5px 2px 0 var(--maroon), -5px 2px 0 var(--maroon), 5px -2px 0 var(--maroon), -5px -2px 0 var(--maroon);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-weight: 600;
  background: var(--cream-2);
  color: var(--maroon);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

strong {
  font-weight: 900;
}

:focus-visible {
  outline: 3px dashed var(--orange-dark);
  outline-offset: 3px;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  --press: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  padding: 12px 24px;
  border-radius: 16px;
  border: 3px solid var(--maroon);
  cursor: pointer;
  transform: translateY(var(--press));
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.2s;
  white-space: nowrap;
}

.btn .ico {
  width: 22px;
  height: 22px;
  fill: currentColor;
  margin-top: -2px;
}

.btn-gold {
  color: var(--maroon);
  background: linear-gradient(180deg, #ffe17a 0%, var(--gold) 45%, var(--gold-2) 100%);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.65),
    inset 0 -5px 0 var(--gold-3),
    0 5px 0 var(--maroon);
}

.btn-gold:hover {
  --press: -2px;
  filter: brightness(1.05);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.65),
    inset 0 -5px 0 var(--gold-3),
    0 7px 0 var(--maroon);
}

.btn-gold:active {
  --press: 4px;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.65),
    inset 0 -3px 0 var(--gold-3),
    0 1px 0 var(--maroon);
}

.btn-ghost {
  color: #f3eeff;
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--lavender);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35);
}

.btn-ghost:hover {
  --press: -2px;
  background: rgba(255, 255, 255, 0.14);
}

.btn-sm {
  font-size: 1rem;
  padding: 7px 16px;
  border-radius: 12px;
}

.btn-lg {
  font-size: 1.25rem;
  padding: 15px 28px;
  border-radius: 18px;
}

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: fixed;
  z-index: 50;
  top: 14px;
  left: 50%;
  translate: -50% 0;
  width: min(100% - 28px, var(--container));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 18px;
  border-radius: 20px;
  border: 3px solid transparent;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.nav.scrolled {
  background: var(--cream);
  border-color: var(--maroon);
  box-shadow: 0 0 0 5px var(--orange), 0 0 0 8px var(--maroon), 0 12px 24px rgba(90, 26, 31, 0.25);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--maroon);
}

.nav-logo b {
  font-weight: 400;
  color: var(--orange-dark);
  margin-left: 4px;
}

.mini-blob {
  width: 26px;
  height: 28px;
  border-radius: 9px;
  border: 3px solid var(--maroon);
  background: linear-gradient(180deg, #ff9a6a, #ee5b3c);
  position: relative;
  box-shadow: 0 3px 0 var(--maroon);
}

.mini-blob::before,
.mini-blob::after {
  content: '';
  position: absolute;
  top: 7px;
  width: 4px;
  height: 6px;
  border-radius: 3px;
  background: var(--maroon);
}

.mini-blob::before {
  left: 5px;
}

.mini-blob::after {
  right: 5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a:not(.btn) {
  font-weight: 800;
  font-size: 0.98rem;
  padding: 8px 14px;
  border-radius: 12px;
  transition: background 0.2s;
}

.nav-links a:not(.btn):hover {
  background: rgba(90, 26, 31, 0.08);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 42px;
  border: 3px solid var(--maroon);
  border-radius: 12px;
  background: var(--cream);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  box-shadow: 0 3px 0 var(--maroon);
}

.nav-toggle span {
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: var(--maroon);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================================
   Hero — the split world
   ========================================================= */
.hero {
  --ground-h: 93px;
  --runner-w: 51px;
  --runner-h: 48px;
  --lane-h: 218px;
  position: relative;
  display: grid;
  grid-template-rows: clamp(450px, 64svh, 620px) var(--ground-h) minmax(340px, auto);
  isolation: isolate;
  overflow: hidden;
}

.hero-sky {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-top: 0;
  background-color: #f7a97b;
  background-image: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 55%, var(--sky-3) 100%);
  z-index: 1;
}

/* The game's three planes: slow sky, distant hills, then nearby cottages.
   Each PNG contains a tile and its mirror, matching the app's repeating ring. */
.hero-scenery {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.parallax-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  background-repeat: repeat-x;
  background-position: 0 bottom;
  background-size: auto 100%;
}

.parallax-sky {
  height: 100%;
  bottom: 0;
  background-size: 200% 100%;
}

.parallax-far { height: 115%; }
.parallax-near { height: 110%; }

.hero-sky .parallax-sky { background-image: url('../images/game/parallax-main-sky-loop.png'); }
.hero-sky .parallax-far { background-image: url('../images/game/parallax-main-far-loop.png'); }
.hero-sky .parallax-near { background-image: url('../images/game/parallax-main-near-loop.png'); }

/* Flip vertically so the shadow village hangs from the shared ground.
   Horizontal travel stays leftward in both worlds, just as it does in-game. */
.hero-shadow .hero-scenery { transform: scaleY(-1); }
.hero-shadow .parallax-sky { background-image: url('../images/game/parallax-shadow-sky-loop.png'); }
.hero-shadow .parallax-far { background-image: url('../images/game/parallax-shadow-far-loop.png'); }
.hero-shadow .parallax-near {
  height: 82%;
  background-image: url('../images/game/parallax-shadow-near-loop.png');
}

.hero-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 100%;
  gap: 8px;
  padding: 80px 20px 70px;
  transition: opacity 0.2s ease;
}

.hero[data-game-state='playing'] .hero-copy { opacity: 0; }
.hero[data-game-state='playing'] .hero-logo-wrap { animation-play-state: paused; }

.hero-copy .hero-kicker {
  flex: none;
  min-height: 32px;
  max-width: 100%;
  margin-bottom: 0;
  font-size: clamp(0.65rem, 1vw, 0.8rem);
  letter-spacing: 0.08em;
}

.hero-kicker {
  display: inline-block;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--maroon);
  background: rgba(255, 246, 230, 0.75);
  border: 2px solid var(--maroon);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.6rem, 11vw, 8.6rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-title {
  text-shadow: var(--outline), 0 12px 0 var(--maroon), 0 22px 30px rgba(90, 26, 31, 0.35);
}

.hero-title .t-shadow {
  color: var(--lavender);
}

.hero-title .t-jump {
  color: var(--gold);
}

/* Clouds */
.cloud {
  position: absolute;
  height: 46px;
  border-radius: 999px;
  background: #fff1df;
  opacity: 0.85;
  filter: drop-shadow(0 6px 0 rgba(233, 128, 108, 0.35));
  animation: drift linear infinite;
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud::before {
  width: 60px;
  height: 60px;
  left: 18%;
  bottom: 18px;
}

.cloud::after {
  width: 84px;
  height: 84px;
  left: 42%;
  bottom: 10px;
}

.c1 {
  width: 200px;
  top: 22%;
  left: -220px;
  animation-duration: 70s;
}

.c2 {
  width: 150px;
  top: 12%;
  left: -160px;
  animation-duration: 95s;
  animation-delay: -40s;
  transform: scale(0.8);
}

.c3 {
  width: 240px;
  top: 38%;
  left: -260px;
  animation-duration: 120s;
  animation-delay: -80s;
  opacity: 0.6;
}

@keyframes drift {
  to {
    translate: calc(100vw + 300px) 0;
  }
}

/* Hills */
.hills {
  display: none;
}

/* Ground band (bricks above, stones below) */
.ground {
  position: relative;
  z-index: 5;
  background: #854040;
  outline-offset: 5px;
}

.ground-plane {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  background-repeat: repeat-x;
  background-position: 0 0;
}

.ground-main {
  top: 0;
  background-color: #854040;
  background-image: url('../images/game/ground-main-loop.png');
  background-size: 147.5256769% 100%;
}

.ground-shadow {
  bottom: 0;
  background-color: #40364f;
  background-image: url('../images/game/ground-shadow-loop.png');
  background-size: 149.0619137% 100%;
  transform: scaleY(-1);
}

/* Runner lanes */
.runner {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lane {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--lane-h);
  overflow: hidden;
}

.lane-top {
  bottom: 100%;
}

.lane-bottom {
  top: 100%;
  transform: scaleY(-1);
}

.lane>* {
  position: absolute;
  bottom: 0;
}

/* Characters */
.blob {
  width: 50px;
  height: 48px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  will-change: transform;
}

.hero .blob {
  width: var(--runner-w);
  height: var(--runner-h);
}

.runner-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgba(90, 26, 31, 0.45));
  user-select: none;
  pointer-events: none;
}

.blob-shadow .runner-sprite {
  filter: drop-shadow(0 3px 0 rgba(20, 16, 32, 0.6));
}

/* Obstacles */
.pillar {
  width: 42px;
  height: 38px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  will-change: transform;
}

.pillar.pillar-tall {
  width: 42px;
  height: 56px;
}

.barrier-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 2px 0 rgba(90, 26, 31, 0.35));
}

.pillar.dark .barrier-sprite {
  filter: drop-shadow(0 2px 0 rgba(20, 16, 32, 0.5));
}

.hero .barrier-sprite,
.hero .runner-sprite { object-fit: fill; }

/* Controls sit on the road so both obstacle lanes remain unobstructed. */
.game-scoreboard {
  position: absolute;
  right: max(16px, 3vw);
  bottom: calc(100% + 16px);
  display: grid;
  justify-items: center;
  gap: 4px;
}

.game-scoreboard .score-badge { min-width: 98px; padding: 6px 22px; }
.game-best {
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--maroon);
  font-size: 0.75rem;
  font-weight: 900;
}

.game-inputs {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 8;
}

.game-jump,
.game-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 4px 14px;
  border: 2px solid var(--maroon);
  border-radius: 12px;
  background: var(--cream);
  color: var(--maroon);
  font: 900 1rem var(--font-body);
  box-shadow: 0 3px 0 rgba(40, 20, 30, 0.5);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.game-jump-shadow { background: #e5daf4; }
.game-jump img { width: 24px; height: 24px; object-fit: contain; }
.game-jump:active,
.game-pause:active { transform: translateY(2px); box-shadow: none; }
.game-jump:disabled { opacity: 0.45; cursor: default; }
.game-pause { width: 46px; padding: 0; }
.game-pause[hidden],
.game-state-panel[hidden] { display: none; }

.game-state-panel {
  position: absolute;
  z-index: 12;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(470px, calc(100% - 32px));
  padding: 18px 22px;
  border: 3px solid var(--maroon);
  border-radius: 18px;
  background: var(--cream);
  color: var(--maroon);
  text-align: center;
  box-shadow: 0 6px 0 rgba(40, 20, 30, 0.35), 0 14px 36px rgba(30, 15, 30, 0.25);
}

.game-state-title { margin-bottom: 4px; font-size: 1.4rem; font-weight: 900; }
.game-state-panel p { line-height: 1.4; }
.game-instructions { display: flex; justify-content: center; gap: 24px; margin: 12px 0; font-weight: 900; }
.game-instructions span { display: inline-flex; align-items: center; gap: 8px; }
.hero kbd {
  display: inline-block;
  min-width: 26px;
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-bottom-width: 3px;
  border-radius: 5px;
  font: 800 0.85em var(--font-body);
  line-height: 1.2;
}
.game-state-panel .btn { gap: 12px; margin: 0 auto; }
.game-touch-hint { display: none; margin: 10px 0; font-size: 0.85rem; }

/* HUD score in hero */
.score-badge {
  --edge: 16px;
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  padding: 6px 28px 8px;
  font-family: var(--font-display);
  color: var(--maroon);
  line-height: 1;
  isolation: isolate;
}

.score-badge::before,
.score-badge::after {
  content: '';
  position: absolute;
  z-index: -1;
  clip-path: polygon(var(--edge) 0, calc(100% - var(--edge)) 0, 100% 50%, calc(100% - var(--edge)) 100%, var(--edge) 100%, 0 50%);
}

.score-badge::before {
  inset: 0;
  background: var(--maroon);
}

.score-badge::after {
  inset: 3px;
  --edge: 15px;
  background: linear-gradient(180deg, #ffe07a, var(--gold-2));
  box-shadow: inset 0 -4px 0 var(--gold-3);
}

.score-badge small {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.score-badge span {
  font-size: 1.9rem;
}

.hero-score {
  position: absolute;
  right: max(24px, 4vw);
  bottom: calc(100% + 110px);
}

/* Shadow world half */
.hero-shadow {
  position: relative;
  overflow: hidden;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--lane-h) + 24px) 20px 36px;
  background-color: #241c38;
  background-image:
    radial-gradient(1200px 300px at 50% 0, rgba(78, 69, 104, 0.9), transparent 70%),
    linear-gradient(180deg, var(--purple-3) 0%, var(--purple) 40%, var(--purple-2) 100%);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  color: #f3eeff;
  text-align: center;
}

.moon {
  display: none;
}

.hero-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.hero-note {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--lavender);
  opacity: 0.8;
  letter-spacing: 0.04em;
}

/* =========================================================
   Sections
   ========================================================= */
.section {
  position: relative;
  padding: 110px 0;
}

.section-tight {
  padding-top: 40px;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-head h2,
.split-copy h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  margin: 16px 0 14px;
}

.section-head p,
.split-copy p {
  font-size: 1.1rem;
  color: var(--maroon-soft);
}

.split-copy p+p {
  margin-top: 14px;
}

/* Hex-ish label like the in-game SCORE badge */
.badge {
  --edge: 12px;
  display: inline-block;
  position: relative;
  padding: 6px 26px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--maroon);
  isolation: isolate;
}

.badge::before,
.badge::after {
  content: '';
  position: absolute;
  z-index: -1;
  clip-path: polygon(var(--edge) 0, calc(100% - var(--edge)) 0, 100% 50%, calc(100% - var(--edge)) 100%, var(--edge) 100%, 0 50%);
}

.badge::before {
  inset: 0;
  background: var(--maroon);
}

.badge::after {
  inset: 3px;
  --edge: 11px;
  background: linear-gradient(180deg, #ffe07a, var(--gold-2));
}

.badge-dark {
  color: #f3eeff;
}

.badge-dark::before {
  background: var(--lavender);
}

.badge-dark::after {
  background: linear-gradient(180deg, #5d5480, var(--purple));
}

/* ---------- Panels (game modal look) ---------- */
.panel {
  position: relative;
  background: var(--cream);
  border: 3px solid var(--maroon);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 12px;
  box-shadow:
    inset 0 0 0 4px #fff,
    0 0 0 9px var(--orange),
    0 0 0 12px var(--maroon),
    0 22px 0 12px rgba(90, 26, 31, 0.22);
}

.panel::before {
  /* bevel highlight on the orange frame */
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: calc(var(--radius-lg) + 9px);
  border-top: 3px solid rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  text-transform: uppercase;
  color: var(--maroon);
  text-shadow: 0 3px 0 rgba(232, 105, 58, 0.35);
}

.panel-title.center {
  justify-content: center;
}

.panel-ico {
  width: 40px;
  height: 40px;
}

/* Segmented control (MAIN / SHADOW / BOTH) */
.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 3px solid var(--maroon);
  border-radius: 16px;
  background: #e9ddd0;
  box-shadow: 0 4px 0 var(--maroon);
}

.segmented button {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--maroon-soft);
  background: transparent;
  border: 0;
  border-radius: 11px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.segmented button:hover {
  color: var(--maroon);
  background: rgba(255, 255, 255, 0.5);
}

.segmented button[aria-selected='true'] {
  color: var(--maroon);
  background: linear-gradient(180deg, #ffe17a, var(--gold-2));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -3px 0 var(--gold-3), 0 0 0 2px var(--maroon);
}

/* Screenshot frame */
.shot-frame img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 3px solid var(--maroon);
  cursor: zoom-in;
  transition: opacity 0.25s;
}

.shot-frame img.fading {
  opacity: 0;
}

.shot-frame figcaption {
  text-align: center;
  margin-top: 16px;
  font-weight: 800;
  color: var(--maroon-soft);
}

.intro-gameplay { margin: 0 10px 36px; }

/* ---------- Feature tiles (wardrobe item cards) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tile {
  background: #fff1dc;
  border: 3px solid #ecc9a0;
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.tile:hover {
  transform: translateY(-6px);
  border-color: var(--gold-2);
  box-shadow: 0 12px 0 -4px rgba(248, 176, 44, 0.45);
}

.tile-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  border: 3px solid var(--maroon);
  background: linear-gradient(180deg, #ffe17a, var(--gold-2));
  box-shadow: inset 0 -5px 0 var(--gold-3), 0 4px 0 var(--maroon);
}

.tile-icon svg {
  width: 46px;
  height: 46px;
}

.tile h3 {
  font-size: 1.55rem;
  margin-bottom: 8px;
}

.tile p {
  color: var(--maroon-soft);
}

/* ---------- Split layouts ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  align-items: center;
  gap: 70px;
}

.split.reverse .split-copy {
  order: 2;
}

.framed {
  border-radius: var(--radius-md);
  border: 3px solid var(--maroon);
  box-shadow:
    0 0 0 7px var(--orange),
    0 0 0 10px var(--maroon),
    0 24px 40px rgba(0, 0, 0, 0.3);
  cursor: zoom-in;
}

.tilt {
  transform: rotate(1.5deg);
  transition: transform 0.3s;
}

.tilt:hover {
  transform: rotate(0deg) scale(1.02);
}

.stack {
  position: relative;
  padding-bottom: 18%;
}

.stack-back {
  width: 86%;
  transform: rotate(-2deg);
}

.stack-front {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 66%;
  transform: rotate(2.5deg);
  transition: transform 0.3s;
}

.stack-front:hover {
  transform: rotate(0deg) scale(1.03);
}

/* ---------- Dark (shadow world) section ---------- */
.section-dark {
  background: linear-gradient(180deg, var(--purple-2) 0%, var(--purple) 60%, var(--purple-3) 100%);
  color: #f3eeff;
  overflow: hidden;
}

.section-dark::before,
.section-dark::after {
  /* scalloped tree-line edges */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 40px;
  background: radial-gradient(circle at 30px 0, transparent 29px, var(--cream-2) 30px) 0 0 / 60px 40px repeat-x;
}

.section-dark::before {
  top: -1px;
  transform: scaleY(-1);
}

.section-dark::after {
  bottom: -1px;
}

.section-dark .split-copy p {
  color: var(--lavender);
}

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

.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff8 50%, transparent 51%),
    radial-gradient(2px 2px at 30% 70%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 30%, #fff9 50%, transparent 51%),
    radial-gradient(2px 2px at 80% 15%, #fff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 60%, #fff6 50%, transparent 51%),
    radial-gradient(2px 2px at 65% 85%, #fff5 50%, transparent 51%);
  pointer-events: none;
}

.stat-row {
  list-style: none;
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.stat-row li {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 104px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 3px solid var(--lavender);
  background: rgba(255, 255, 255, 0.06);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 3px 0 var(--maroon);
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lavender);
  margin-top: 4px;
}

/* ---------- Wardrobe extras ---------- */
.wardrobe-combinations img { width: 100%; }

.check-list {
  list-style: none;
  margin: 24px 0;
  display: grid;
  gap: 12px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.check {
  flex: none;
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--maroon);
  background: radial-gradient(circle at 40% 35%, #a6d65e, var(--green));
}

.check::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 7px;
  height: 12px;
  border: solid var(--maroon);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.pts-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 10px;
  border-radius: 999px;
  border: 2px solid #ecc9a0;
  background: #fff1dc;
  font-weight: 900;
}

.coin {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--gold-3);
  background: radial-gradient(circle at 35% 35%, #ffe9a0, var(--gold-2));
}

/* ---------- Reviews ---------- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review {
  background: var(--cream);
  border: 3px solid var(--maroon);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: 0 6px 0 var(--orange), 0 9px 0 var(--maroon);
  display: flex;
  flex-direction: column;
}

.stars-5 {
  color: var(--gold-2);
  font-size: 1.3rem;
  letter-spacing: 3px;
  text-shadow: 0 2px 0 var(--gold-3);
  margin-bottom: 10px;
}

.review blockquote {
  flex: 1;
  color: var(--maroon-soft);
  font-size: 1.02rem;
}

.review figcaption {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.review figcaption span {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--orange-dark);
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(180deg, var(--cream-2) 0%, var(--sky-3) 45%, var(--sky-2) 100%);
  padding-bottom: 130px;
}

.cta-panel {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 56px 32px 48px;
}

.cta-panel p {
  font-size: 1.15rem;
  color: var(--maroon-soft);
  margin: 10px 0 28px;
}

.cta-blobs {
  position: absolute;
  top: -40px;
  left: 50%;
  translate: -50% 0;
  display: flex;
  gap: 26px;
}

.blob.static {
  position: relative;
  animation: bob 2.4s ease-in-out infinite;
}

.blob.static.blob-shadow {
  animation-delay: 0.25s;
}

@keyframes bob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--purple-2);
  color: var(--lavender);
  padding: 40px 0;
  border-top: 4px solid var(--maroon);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer .nav-logo {
  color: #f3eeff;
}

.footer .nav-logo b {
  color: var(--gold);
}

.footer-links {
  display: flex;
  gap: 22px;
  font-weight: 800;
}

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

.footer p {
  font-size: 0.9rem;
  opacity: 0.75;
}

/* ---------- Lightbox ---------- */
.lightbox {
  margin: auto;
  border: 0;
  background: transparent;
  max-width: 94vw;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(20, 14, 30, 0.88);
}

.lightbox img {
  max-height: 86vh;
  border-radius: var(--radius-md);
  border: 3px solid var(--maroon);
  box-shadow: 0 0 0 7px var(--orange), 0 0 0 10px var(--maroon);
}

.close-x {
  position: absolute;
  top: -22px;
  right: -22px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--maroon);
  background: var(--cream);
  color: var(--maroon);
  font-size: 1.9rem;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 0 3px #f2c9a6, 0 4px 0 3px var(--maroon);
}

/* =========================================================
   Content pages (privacy / support)
   ========================================================= */
.page-hero {
  position: relative;
  padding: 150px 20px 90px;
  text-align: center;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 60%, var(--sky-3) 100%);
  overflow: hidden;
}

.page-hero h1 {
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: var(--outline), 0 9px 0 var(--maroon);
}

.page-hero p {
  margin-top: 18px;
  font-weight: 800;
}

.page-hero .hills-front {
  bottom: 0;
  height: 50px;
  fill: var(--cream-2);
}

.doc {
  max-width: 860px;
  margin: -30px auto 100px;
  position: relative;
  z-index: 2;
}

.doc .panel {
  padding: 40px clamp(22px, 5vw, 48px);
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  padding: 16px 20px;
  margin-bottom: 30px;
  border-radius: var(--radius-sm);
  background: #fff1dc;
  border: 2px solid #ecc9a0;
}

.doc h2 {
  font-size: 1.7rem;
  margin: 34px 0 12px;
  color: var(--maroon);
}

.doc h2:first-of-type {
  margin-top: 0;
}

.doc p,
.doc li {
  color: var(--maroon-soft);
  font-size: 1.03rem;
}

.doc p+p {
  margin-top: 12px;
}

.doc .doc-meta p {
  margin: 0;
}

.doc ul {
  margin: 12px 0 12px 22px;
}

.doc li {
  margin-bottom: 8px;
}

.doc li::marker {
  color: var(--orange);
}

.doc strong {
  color: var(--maroon);
}

.doc a:not(.btn) {
  color: var(--orange-dark);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.faq {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.faq details {
  border: 3px solid #ecc9a0;
  border-radius: var(--radius-sm);
  background: #fff1dc;
  padding: 14px 18px;
  transition: border-color 0.2s;
}

.faq details[open] {
  border-color: var(--gold-2);
}

.faq summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--maroon);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

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

.faq summary::after {
  content: '+';
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--orange-dark);
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin-top: 10px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .split {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .split.reverse .split-copy {
    order: 0;
  }

  .feature-grid,
  .review-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-inline: auto;
  }

  .hero-score {
    display: none;
  }
}

@media (max-width: 820px) {
  .hero-copy { padding-top: 112px; }

  .nav-toggle {
    display: flex;
  }

  .nav {
    background: var(--cream);
    border-color: var(--maroon);
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 16px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: var(--cream);
    border: 3px solid var(--maroon);
    border-radius: 18px;
    box-shadow: 0 0 0 5px var(--orange), 0 0 0 8px var(--maroon), 0 16px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-links a {
    text-align: center;
  }

  .section {
    padding: 80px 0;
  }

  .panel {
    padding: 20px;
  }

  .panel-head {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  :root {
    --ground-h: 72px;
  }

  .game-inputs { gap: 6px; }
  .game-jump { gap: 5px; padding-inline: 9px; font-size: 0.85rem; }
  .game-scoreboard .score-badge { min-width: 84px; padding-inline: 18px; }
  .game-state-panel { padding: 14px 16px; font-size: 0.9rem; }

  .hero-hud {
    right: 14px;
    bottom: calc(100% + 10px);
  }

  .interactive-tap-btn {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    box-shadow: 0 3px 0 var(--maroon);
  }

  .interactive-tap-btn span {
    display: none;
  }

  .tap-ico {
    width: 30px;
    height: 30px;
  }

  .segmented button {
    padding: 7px 11px;
    font-size: 0.92rem;
  }

  .btn-lg {
    font-size: 1.08rem;
    padding: 13px 20px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .moon {
    width: 56px;
    height: 56px;
    left: auto;
    right: 8%;
    bottom: auto;
    top: 46%;
  }

  .stat-row li {
    flex: 1;
    min-width: 0;
    padding: 10px 8px;
  }
}

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

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

@media (pointer: coarse) {
  .game-instructions,
  .game-jump kbd,
  #gameActionBtn kbd { display: none; }
  .game-touch-hint { display: block; }
}
/* =========================================================
   iOS Asset Integration Updates
   ========================================================= */

.nav-app-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 2px solid var(--maroon);
  box-shadow: 0 2px 0 var(--maroon);
  display: block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.soundtrack-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 14px;
  border: 2px solid var(--maroon);
  background: var(--cream);
  color: var(--maroon);
  font-family: var(--font-display);
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--maroon);
  transition: transform 0.15s, background 0.2s, box-shadow 0.15s;
}

.soundtrack-toggle:hover {
  background: #fff;
  transform: translateY(-1px);
}

.soundtrack-toggle.playing {
  background: linear-gradient(180deg, #ffe17a, var(--gold-2));
}

.sound-icon {
  display: flex;
  align-items: center;
}

.ico-music {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.sound-bars {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.soundtrack-toggle.playing .sound-bars {
  display: inline-flex;
}

.sound-bars span {
  width: 3px;
  background: var(--maroon);
  border-radius: 1px;
  animation: soundBar 0.8s ease-in-out infinite alternate;
}

.sound-bars span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.sound-bars span:nth-child(2) { height: 14px; animation-delay: 0.3s; }
.sound-bars span:nth-child(3) { height: 9px; animation-delay: 0.2s; }

@keyframes soundBar {
  0% { height: 4px; }
  100% { height: 14px; }
}

.hero-logo-wrap {
  width: min(90vw, 640px);
  max-width: 100%;
  flex: none;
  margin: 0 auto;
  filter: drop-shadow(0 14px 20px rgba(90, 26, 31, 0.35));
  animation: heroLogoFloat 4s ease-in-out infinite alternate;
}

.hero-logo-img {
  width: 100%;
  height: clamp(210px, 36svh, 320px);
  object-fit: contain;
  display: block;
}

@keyframes heroLogoFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.hero-hud {
  position: absolute;
  right: max(20px, 4vw);
  bottom: calc(100% + 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 6;
}

.hero-score {
  position: relative;
}

.interactive-tap-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 3px solid var(--maroon);
  background: linear-gradient(180deg, #ffe17a, var(--gold-2));
  color: var(--maroon);
  font-family: var(--font-display);
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--maroon);
  transition: transform 0.1s, filter 0.15s;
}

.interactive-tap-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.interactive-tap-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--maroon);
}

.tap-ico {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: block;
}

.tile-img-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.card-victory-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.victory-title-img {
  max-width: 320px;
  width: 100%;
  filter: drop-shadow(0 8px 16px rgba(90, 26, 31, 0.25));
}

/* ---------- Interactive Trophy Room Exhibition ---------- */
.trophy-gallery-panel {
  background: rgba(36, 30, 52, 0.85);
  border: 3px solid var(--lavender);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 40px);
  margin-bottom: 50px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.trophy-feature-card {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  align-items: center;
  gap: clamp(24px, 5vw, 50px);
  padding-bottom: 36px;
  border-bottom: 2px dashed rgba(217, 208, 240, 0.25);
  margin-bottom: 30px;
}

.trophy-disc-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.6));
}

.trophy-disc-img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.trophy-disc-img.pulse {
  animation: trophyDiscPop 0.4s ease-out;
}

@keyframes trophyDiscPop {
  0% { transform: scale(0.92); opacity: 0.8; }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}

.trophy-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trophy-number {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: 0.15em;
}

.trophy-name {
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin: 0;
}

.trophy-pairing {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold);
}

.trophy-desc {
  font-size: 1.05rem;
  color: var(--lavender);
  line-height: 1.6;
  max-width: 600px;
}

.trophy-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 10px;
  background: rgba(123, 179, 58, 0.2);
  border: 2px solid var(--green);
  color: #a6d65e;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.check-mini {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.trophy-grid-selector {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 12px;
}

.trophy-tab {
  position: relative;
  background: rgba(42, 35, 64, 0.8);
  border: 2px solid rgba(217, 208, 240, 0.3);
  border-radius: 14px;
  padding: 8px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.trophy-tab img {
  width: 100%;
  max-width: 64px;
  height: auto;
  border-radius: 50%;
  filter: brightness(0.7) grayscale(0.2);
  transition: filter 0.2s, transform 0.2s;
}

.trophy-tab span {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--lavender);
}

.trophy-tab:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  background: rgba(60, 50, 90, 0.9);
}

.trophy-tab:hover img {
  filter: brightness(1);
}

.trophy-tab.active {
  border-color: var(--gold);
  background: rgba(78, 69, 104, 0.95);
  box-shadow: 0 0 16px rgba(255, 210, 87, 0.35);
  transform: translateY(-4px);
}

.trophy-tab.active img {
  filter: brightness(1.1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.trophy-tab.active span {
  color: var(--gold);
  font-weight: bold;
}

.trophy-screenshots-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 36px;
}

.shot-card figcaption {
  text-align: center;
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--lavender);
}

.cta-icon-wrap {
  margin: -70px auto 20px;
  width: 90px;
  height: 90px;
}

.cta-app-icon {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  border: 3px solid var(--maroon);
  box-shadow: 0 8px 24px rgba(90, 26, 31, 0.35);
}

@media (max-width: 980px) {
  .trophy-feature-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .trophy-meta {
    align-items: center;
  }
  .trophy-grid-selector {
    grid-template-columns: repeat(5, 1fr);
  }
  .trophy-screenshots-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .sound-label {
    display: none;
  }
  .soundtrack-toggle {
    padding: 6px 10px;
  }
  .trophy-grid-selector {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }
  .trophy-tab {
    padding: 6px 3px;
  }
  .trophy-tab span {
    font-size: 0.75rem;
  }
}
/* Screen reader utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
