/*
  Rome King landing page design system
  Update brand colors, radii, type, and spacing here before editing components.
*/
:root {
  --red: #b93634;
  --red-bright: #d54d43;
  --red-dark: #742522;
  --turquoise: #149f9b;
  --turquoise-dark: #08706f;
  --aqua: #b9eee7;
  --gold: #f6b91c;
  --gold-light: #ffd86b;
  --green: #5dbd27;
  --green-dark: #397f17;
  --blue: #2385d0;
  --purple: #7652d2;
  --cream: #fff4d9;
  --cream-deep: #f1d9ad;
  --paper: #fffbec;
  --terracotta: #d9783d;
  --coral: #ef6457;
  --brown: #5b3327;
  --brown-deep: #2e1713;
  --navy: #14213f;
  --white: #ffffff;
  --text: #4b2d23;
  --muted: #765c50;
  --shadow-sm: 0 8px 20px rgba(70, 38, 23, 0.14);
  --shadow-md: 0 18px 45px rgba(60, 28, 19, 0.2);
  --shadow-lg: 0 34px 90px rgba(45, 19, 16, 0.3);
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 38px;
  --radius-pill: 999px;
  --container: 1220px;
  --header-height: 78px;
  --ease-out: cubic-bezier(.2, .75, .25, 1);
  --font-display: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

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

button, input { font: inherit; }

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 4px solid #1b73d1;
  outline-offset: 4px;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s ease;
}

.skip-link:focus { transform: translateY(0); }

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

.section { padding: clamp(82px, 10vw, 144px) 0; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.eyebrow--light { color: var(--gold-light); }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -.035em;
  line-height: 1.03;
}

h2 {
  color: var(--brown-deep);
  font-size: clamp(2.45rem, 5.4vw, 5rem);
  text-wrap: balance;
}

h3 { color: var(--brown-deep); }

p { margin: 0; }

.section-heading {
  max-width: 810px;
  margin: 0 auto clamp(44px, 6vw, 76px);
  text-align: center;
}

.section-heading > p:last-child {
  max-width: 680px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
}

.section-heading--compact { margin-bottom: 54px; }
.section-heading--light h2,
.section-heading--light > p:last-child { color: var(--white); }

.scroll-progress {
  position: fixed;
  z-index: 120;
  inset: 0 0 auto;
  height: 4px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--coral));
  box-shadow: 0 0 14px rgba(246, 185, 28, .8);
}

/* Header */
.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-height);
  padding: 8px 18px;
  transition: background-color .25s ease, box-shadow .25s ease, backdrop-filter .25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 246, 222, .91);
  box-shadow: 0 10px 30px rgba(69, 34, 20, .12);
  backdrop-filter: blur(15px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1360px;
  height: 100%;
  margin: 0 auto;
  gap: 24px;
}

.brand {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 126px;
  transition: transform .2s var(--ease-out);
}

.brand:hover { transform: rotate(-2deg) scale(1.04); }

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: var(--radius-pill);
  background: rgba(255, 249, 231, .8);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.primary-nav a {
  padding: 9px 13px;
  border-radius: var(--radius-pill);
  color: var(--brown);
  font-size: .87rem;
  font-weight: 800;
  text-decoration: none;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.primary-nav a:hover,
.primary-nav a.is-active {
  background: var(--red);
  color: var(--white);
  transform: translateY(-1px);
}

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

.sound-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(91, 51, 39, .17);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.7);
  color: var(--brown);
  cursor: pointer;
  font-size: .75rem;
  font-weight: 800;
}

.sound-toggle svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.menu-toggle { display: none; }

/* Reusable game buttons */
.game-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 13px 28px 16px;
  border: 0;
  border-radius: 18px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 2px 1px rgba(69, 36, 11, .35);
  transition: transform .2s var(--ease-out), filter .2s ease;
}

.game-button::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: center / cover no-repeat;
  content: "";
}

.game-button:hover { transform: translateY(-3px) scale(1.02); filter: saturate(1.08); }
.game-button:active { transform: translateY(2px) scale(.99); }
.game-button--green::before { background-image: url("../game/ui/buttons/button_primary_green.png"); }
.game-button--gold::before { background-image: url("../game/ui/buttons/button_reward_gold.png"); }
.game-button--compact { min-height: 44px; padding: 8px 20px 10px; font-size: .86rem; }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  color: var(--brown-deep);
  font-weight: 850;
  text-underline-offset: 5px;
}

.text-link span { transition: transform .2s ease; }
.text-link:hover span { transform: translateX(4px); }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: max(760px, 100svh);
  align-items: center;
  overflow: hidden;
  padding: calc(var(--header-height) + 56px) 0 96px;
  background: var(--cream) url("../backgrounds/bg_rome_forum_sunrise.webp") center / cover no-repeat;
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 247, 223, .97) 0%, rgba(255, 244, 213, .84) 42%, rgba(255, 244, 213, .16) 71%, rgba(255,255,255,.04) 100%),
    linear-gradient(0deg, rgba(255, 248, 230, .7), transparent 30%);
  content: "";
}

.hero-wash {
  position: absolute;
  z-index: -1;
  top: 11%;
  left: -10%;
  width: 650px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 216, 107, .34);
  filter: blur(20px);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .85fr);
  align-items: center;
  gap: clamp(36px, 7vw, 100px);
}

.hero-copy { position: relative; z-index: 4; max-width: 690px; }

.hero h1 {
  max-width: 780px;
  color: var(--brown-deep);
  font-size: clamp(3.35rem, 7.4vw, 7.2rem);
  line-height: .88;
  text-shadow: 0 4px 0 rgba(255,255,255,.42);
}

.hero h1 span {
  display: inline-block;
  color: var(--red);
  text-shadow: 0 4px 0 var(--gold-light), 0 10px 24px rgba(185, 54, 52, .18);
}

.hero-lede {
  max-width: 600px;
  margin: 28px 0 30px;
  color: #654235;
  font-size: clamp(1.08rem, 1.55vw, 1.3rem);
  font-weight: 560;
}

.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; }

.fact-row {
  display: flex;
  max-width: 600px;
  margin: 38px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(91, 51, 39, .2);
}

.fact-row div { display: flex; flex: 1; align-items: center; gap: 10px; padding-right: 16px; }
.fact-row div + div { padding-left: 16px; border-left: 1px solid rgba(91, 51, 39, .2); }
.fact-row dt { color: var(--red); font-family: var(--font-display); font-size: 2rem; font-weight: 900; line-height: 1; }
.fact-row dd { margin: 0; color: var(--brown); font-size: .76rem; font-weight: 800; line-height: 1.25; text-transform: uppercase; }

.hero-stage {
  position: relative;
  min-height: 590px;
  perspective: 1200px;
}

.sun-disc {
  position: absolute;
  top: 12%;
  left: 1%;
  width: 460px;
  aspect-ratio: 1;
  border: 2px solid rgba(246, 185, 28, .65);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 243, 184, .92) 0 22%, rgba(246, 185, 28, .32) 23% 42%, rgba(246, 185, 28, .08) 43% 64%, transparent 65%);
  animation: sunPulse 4s ease-in-out infinite;
}

.phone {
  position: relative;
  overflow: hidden;
  padding: 8px;
  border: 4px solid #2d2020;
  border-radius: 36px;
  background: #1c1515;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.22), var(--shadow-lg);
}

.phone img {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  object-fit: cover;
  object-position: top center;
}

.phone-speaker {
  position: absolute;
  z-index: 3;
  top: 15px;
  left: 50%;
  width: 34%;
  height: 17px;
  border-radius: 0 0 13px 13px;
  background: #211818;
  transform: translateX(-50%);
}

.phone--hero {
  position: absolute;
  z-index: 2;
  top: 1%;
  left: 10%;
  width: min(300px, 60%);
  aspect-ratio: 864 / 1821;
  transform: rotate(-5deg) translateZ(0);
  animation: phoneFloat 5s ease-in-out infinite;
}

.hero-leo {
  position: absolute;
  z-index: 4;
  right: -11%;
  bottom: -3%;
  width: min(420px, 77%);
  filter: drop-shadow(0 22px 16px rgba(77, 34, 20, .28));
  transform-origin: 50% 100%;
  animation: leoBounce 4.4s ease-in-out infinite;
}

.floating-reward {
  position: absolute;
  z-index: 5;
  display: grid;
  width: 100px;
  aspect-ratio: 1;
  place-items: center;
  border: 4px solid var(--gold-light);
  border-radius: 24px;
  background: rgba(255, 247, 220, .92);
  box-shadow: 0 14px 30px rgba(91, 51, 39, .22);
  animation: rewardFloat 3.8s ease-in-out infinite;
}

.floating-reward img { width: 84%; height: auto; object-fit: contain; }
.floating-reward--gem { top: 10%; right: -3%; transform: rotate(8deg); }
.floating-reward--bread { bottom: 9%; left: -3%; transform: rotate(-7deg); animation-delay: -1.5s; }

.hero-float {
  position: absolute;
  z-index: 2;
  width: clamp(58px, 8vw, 116px);
  filter: drop-shadow(0 16px 12px rgba(79, 39, 22, .2));
  opacity: .93;
  animation: drift 6s ease-in-out infinite;
}

.hero-float--wheat { top: 16%; left: 2%; transform: rotate(-14deg); }
.hero-float--column { right: 2%; bottom: 17%; transform: rotate(10deg); animation-delay: -3s; }
.hero-float--coin { right: 10%; top: 13%; width: clamp(44px, 5vw, 74px); animation-delay: -1s; }

.hero-scroll {
  position: absolute;
  bottom: 25px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--brown);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.hero-scroll svg { width: 26px; fill: none; stroke: currentColor; stroke-width: 2; animation: scrollNudge 1.8s ease-in-out infinite; }

/* Features */
.feature-section { position: relative; background: var(--paper); }
.feature-section::before, .feature-section::after {
  position: absolute;
  width: 170px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--aqua);
  filter: blur(0);
  opacity: .35;
  content: "";
}
.feature-section::before { top: 8%; left: -95px; }
.feature-section::after { right: -100px; bottom: 6%; background: var(--gold-light); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.feature-card {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  padding: 26px 28px 34px;
  border: 2px solid rgba(246, 185, 28, .72);
  border-radius: var(--radius-lg);
  background-color: var(--cream);
  background-image: url("../game/ui/panels/panel_modal_cream.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: var(--shadow-md);
  transform-style: preserve-3d;
  transition: transform .25s var(--ease-out), box-shadow .25s ease;
}

.feature-card:hover { box-shadow: 0 25px 60px rgba(66, 31, 20, .24); }

.feature-card::after {
  position: absolute;
  right: -30%;
  bottom: -52%;
  width: 95%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(20, 159, 155, .13);
  content: "";
}

.feature-card--city::after { background: rgba(246, 185, 28, .14); }
.feature-card--festival::after { background: rgba(239, 100, 87, .12); }

.feature-badge { position: absolute; z-index: 3; top: 18px; left: 18px; width: 74px; filter: drop-shadow(0 6px 7px rgba(64, 28, 16, .2)); }
.feature-badge--right { right: 17px; left: auto; width: 58px; }

.feature-art {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 230px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transform: translateZ(28px);
}

.feature-art img { width: 28%; height: auto; object-fit: contain; filter: drop-shadow(0 12px 10px rgba(67, 32, 17, .18)); }
.feature-art img:last-child { width: 35%; }
.merge-plus, .merge-equals { color: var(--red); font-family: var(--font-display); font-size: 1.7rem; font-weight: 900; }
.building-pair img { width: 42%; }
.building-pair .upgrade-arrow { width: 15%; animation: arrowPulse 1.9s ease-in-out infinite; }
.feature-card--festival .feature-art > img:first-child { width: 62%; }
.feature-card--festival .reward-chest-mini { position: absolute; right: 4%; bottom: 2%; width: 35%; }
.card-kicker { position: relative; z-index: 2; color: var(--turquoise-dark); font-size: .76rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.feature-card h3 { position: relative; z-index: 2; margin: 8px 0 13px; font-size: clamp(1.45rem, 2vw, 2rem); }
.feature-card > p:last-child { position: relative; z-index: 2; color: var(--muted); line-height: 1.55; }

/* Interactive gameplay */
.gameplay-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--turquoise-dark);
  color: var(--white);
}

.gameplay-backdrop {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: url("../backgrounds/bg_merge_imperial_workshop.webp") center / cover no-repeat;
  opacity: .55;
}

.gameplay-section::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 66, 67, .97) 0 44%, rgba(4, 47, 52, .74) 67%, rgba(4, 39, 46, .8));
  content: "";
}

.gameplay-layout {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(480px, 1fr);
  align-items: center;
  gap: clamp(50px, 8vw, 115px);
}

.gameplay-copy h2 { color: var(--white); }
.gameplay-copy > p:not(.eyebrow):not(.demo-note) { max-width: 540px; margin: 24px 0; color: rgba(255,255,255,.78); font-size: 1.08rem; }

.instruction-list {
  display: grid;
  gap: 14px;
  margin: 30px 0 22px;
  padding: 0;
  list-style: none;
}

.instruction-list li { display: flex; align-items: center; gap: 13px; font-weight: 760; }
.instruction-list span { display: grid; width: 34px; aspect-ratio: 1; place-items: center; border: 2px solid var(--gold); border-radius: 50%; color: var(--gold-light); font-family: var(--font-display); }
.demo-note { color: rgba(255,255,255,.58); font-size: .82rem; }

.merge-demo {
  position: relative;
  padding: 18px;
  border: 3px solid var(--gold);
  border-radius: 34px;
  background: linear-gradient(#f8e8b6, #efd28e);
  box-shadow: 0 30px 75px rgba(0,0,0,.35), inset 0 0 0 4px rgba(255,255,255,.34);
  color: var(--brown);
}

.merge-demo::before {
  position: absolute;
  z-index: -1;
  top: -48px;
  left: -52px;
  width: 130px;
  aspect-ratio: 1;
  background: url("../game/effects/fx_spotlight.png") center / contain no-repeat;
  content: "";
}

.demo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.demo-title { display: flex; align-items: center; gap: 8px; }
.demo-title img { width: 52px; }
.demo-title div { display: grid; }
.demo-title span { color: var(--red); font-size: .68rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.demo-title strong { font-family: var(--font-display); font-size: 1.08rem; }

.resource-pill {
  display: flex;
  min-width: 88px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 12px 5px 6px;
  border: 2px solid var(--gold);
  border-radius: var(--radius-pill);
  background: var(--paper);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
}
.resource-pill img { width: 34px; }

.merge-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  padding: 12px;
  border: 4px solid #cf7e4d;
  border-radius: 23px;
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    #65d6cd;
  background-size: 25% 33.333%, 25% 33.333%;
  box-shadow: inset 0 5px 12px rgba(0, 73, 77, .18);
}

.merge-tile {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  padding: 7px;
  border: 2px solid rgba(0, 91, 99, .18);
  border-radius: 17px;
  background: rgba(237, 255, 247, .65);
  color: var(--brown);
  cursor: pointer;
  transition: transform .18s var(--ease-out), background .18s ease, box-shadow .18s ease;
}

.merge-tile:hover { transform: translateY(-3px); background: rgba(255,255,255,.88); box-shadow: 0 9px 16px rgba(0, 83, 84, .16); }
.merge-tile.is-selected { background: #fff9d6; box-shadow: 0 0 0 4px var(--gold), 0 0 24px rgba(255, 208, 51, .9); transform: scale(1.04); }
.merge-tile.is-empty { border-style: dashed; background: rgba(255,255,255,.22); cursor: default; }
.merge-tile.is-empty:hover { transform: none; box-shadow: none; }
.merge-tile img { width: 86%; max-height: 90px; object-fit: contain; filter: drop-shadow(0 7px 5px rgba(57, 27, 11, .16)); pointer-events: none; }
.merge-tile small { position: absolute; right: 6px; bottom: 4px; min-width: 22px; padding: 2px 5px; border-radius: 8px; background: rgba(91, 51, 39, .88); color: #fff; font-size: .62rem; font-weight: 900; }
.merge-tile.is-merging { animation: mergePop .45s var(--ease-out); }
.merge-tile.is-wrong { animation: wrongShake .36s ease; }

.merge-sparkle {
  position: absolute;
  z-index: 5;
  width: 95%;
  pointer-events: none;
  animation: sparkleOut .58s ease forwards;
}

.demo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 3px 2px;
}
.demo-controls p { max-width: 55%; font-size: .82rem; font-weight: 780; line-height: 1.35; }
.demo-controls > div { display: flex; gap: 8px; }
.demo-button { min-height: 42px; padding: 8px 14px; border: 0; border-bottom: 4px solid var(--green-dark); border-radius: 13px; background: var(--green); color: var(--white); cursor: pointer; font-family: var(--font-display); font-size: .78rem; font-weight: 900; text-shadow: 0 1px 1px rgba(0,0,0,.22); }
.demo-button:active { border-bottom-width: 1px; transform: translateY(3px); }
.demo-button--secondary { border-bottom-color: #14629b; background: var(--blue); }

/* Core loop */
.loop-section { overflow: hidden; background: linear-gradient(180deg, var(--paper), #fff1cc); }
.loop-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.loop-track::before {
  position: absolute;
  top: 42%;
  right: 7%;
  left: 7%;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 14px, transparent 14px 26px);
  content: "";
}

.loop-card {
  position: relative;
  z-index: 1;
  min-height: 390px;
  padding: 24px;
  border: 1px solid rgba(159, 103, 47, .18);
  border-radius: 28px;
  background: rgba(255, 251, 236, .92);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.loop-number { position: absolute; top: 18px; left: 20px; color: rgba(185, 54, 52, .24); font-family: var(--font-display); font-size: 2.2rem; font-weight: 900; }
.loop-card > img, .loop-stack { width: 210px; height: 220px; margin: 20px auto 7px; object-fit: contain; object-position: center; filter: drop-shadow(0 14px 11px rgba(80, 38, 19, .17)); }
.loop-stack { position: relative; }
.loop-stack img { position: absolute; width: 150px; }
.loop-stack img:first-child { top: 13px; left: 0; }
.loop-stack img:last-child { right: 0; bottom: 12px; }
.loop-card h3 { margin-bottom: 11px; font-size: 1.75rem; }
.loop-card p { color: var(--muted); font-size: .93rem; line-height: 1.55; }

/* Progression */
.progression-section { overflow: hidden; background: #d7f4ef; }
.progression-layout { display: grid; grid-template-columns: minmax(380px, .8fr) minmax(0, 1fr); align-items: center; gap: clamp(55px, 8vw, 110px); }
.progression-visual { position: relative; }
.city-map-frame { position: relative; max-width: 460px; margin: auto; overflow: hidden; border: 8px solid var(--cream); border-radius: 52px; box-shadow: var(--shadow-lg); }
.city-map-frame::after { position: absolute; inset: 0; border: 2px solid rgba(91, 51, 39, .14); border-radius: 43px; content: ""; pointer-events: none; }
.city-map-bg { width: 100%; aspect-ratio: 941/1672; object-fit: cover; }
.stage-building { position: absolute; z-index: 3; top: 37%; left: 50%; width: 61%; filter: drop-shadow(0 16px 12px rgba(62, 35, 18, .25)); transform: translate(-50%, -50%); transition: opacity .25s ease, transform .4s var(--ease-out); }
.stage-building.is-changing { opacity: 0; transform: translate(-50%, -44%) scale(.8); }
.stage-glow { position: absolute; z-index: 2; top: 34%; left: 50%; width: 80%; opacity: .65; transform: translate(-50%, -50%); animation: glowSpin 16s linear infinite; }

.progression-copy > p:not(.eyebrow) { max-width: 650px; margin: 23px 0 28px; color: #59706c; font-size: 1.05rem; }
.stage-selector { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }
.stage-tab { min-height: 44px; padding: 9px 16px; border: 2px solid rgba(8, 112, 111, .18); border-radius: var(--radius-pill); background: rgba(255,255,255,.65); color: var(--turquoise-dark); cursor: pointer; font-weight: 850; }
.stage-tab:hover, .stage-tab.is-active { border-color: var(--turquoise); background: var(--turquoise); color: var(--white); }
.stage-detail { display: flex; align-items: center; gap: 16px; min-height: 148px; padding: 18px 22px; border: 2px solid rgba(246, 185, 28, .62); border-radius: 24px; background-color: var(--cream); background-image: url("../game/ui/panels/panel_card_cream.png"); background-position: center; background-size: cover; background-repeat: no-repeat; box-shadow: var(--shadow-sm); }
.stage-detail > img { flex: 0 0 92px; width: 92px; filter: drop-shadow(0 8px 5px rgba(68, 35, 17, .18)); }
.stage-detail p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.stage-detail p:first-child { color: var(--red); font-size: .68rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.stage-detail h3 { margin: 3px 0 7px; font-size: 1.5rem; }
.landmark-row { display: flex; align-items: center; gap: 7px; margin-top: 18px; }
.landmark-row img { width: 22%; filter: drop-shadow(0 8px 7px rgba(62, 34, 18, .12)); transition: transform .2s ease; }
.landmark-row img:hover { transform: translateY(-5px) scale(1.06); }

/* Story */
.story-section { position: relative; isolation: isolate; overflow: hidden; min-height: 880px; background: #184c73; color: var(--white); }
.story-image { position: absolute; z-index: -2; inset: 0; background: url("../backgrounds/bg_roman_harbor_sunset.webp") center / cover no-repeat; }
.story-section::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(20, 33, 63, .96) 0 48%, rgba(20, 33, 63, .44) 72%, rgba(20, 33, 63, .15)); content: ""; }
.story-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(400px, .75fr); min-height: 680px; align-items: center; gap: 50px; }
.story-copy { max-width: 670px; }
.story-copy h2 { color: var(--white); }
.story-copy > p:not(.eyebrow) { margin-top: 22px; color: rgba(255,255,255,.76); font-size: 1.08rem; }
.story-copy .game-button { margin-top: 30px; }
.story-leo { position: relative; align-self: end; min-height: 660px; }
.story-leo > img { position: absolute; right: -2%; bottom: -20px; width: min(520px, 93%); filter: drop-shadow(0 25px 14px rgba(5, 14, 31, .34)); }
.speech-card { position: absolute; z-index: 2; right: 5%; bottom: 60px; display: flex; width: min(380px, 90%); align-items: center; gap: 10px; padding: 11px 18px 11px 10px; border: 3px solid var(--gold); border-radius: 24px 24px 4px 24px; background: var(--cream); box-shadow: var(--shadow-md); color: var(--brown); }
.speech-card img { width: 64px; border-radius: 50%; }
.speech-card p { font-family: var(--font-display); font-size: .92rem; font-weight: 900; line-height: 1.35; }

/* Characters */
.character-section { background: linear-gradient(180deg, #fff7df, #f8e0b4); }
.character-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 23px; }
.character-card { position: relative; min-height: 440px; overflow: hidden; padding: 290px 24px 28px; border: 1px solid rgba(154, 88, 45, .2); border-radius: 34px; background: linear-gradient(160deg, #c6f2ec 0 56%, #fff6de 56%); box-shadow: var(--shadow-sm); transition: transform .25s var(--ease-out), box-shadow .25s ease; }
.character-card:nth-child(2), .character-card:nth-child(5) { background: linear-gradient(160deg, #ffe2a5 0 56%, #fff6de 56%); }
.character-card:nth-child(3), .character-card:nth-child(6) { background: linear-gradient(160deg, #f8b1a8 0 56%, #fff6de 56%); }
.character-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.character-full { position: absolute; top: 18px; left: 50%; width: 230px; height: 290px; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 13px 9px rgba(58, 29, 16, .22)); transform: translateX(-50%); transition: transform .3s var(--ease-out); }
.character-card:hover .character-full { transform: translateX(-50%) scale(1.05); }
.character-portrait { position: absolute; top: 246px; right: 20px; width: 74px; aspect-ratio: 1; border: 4px solid var(--gold); border-radius: 50%; background: var(--cream); object-fit: contain; box-shadow: var(--shadow-sm); }
.character-card > p { color: var(--red); font-size: .69rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.character-card h3 { margin: 4px 0 8px; font-size: 2rem; }
.character-card > span { display: block; color: var(--muted); font-size: .92rem; line-height: 1.5; }

/* Merge chain collection */
.collection-section { position: relative; overflow: hidden; background: var(--navy); color: var(--white); }
.collection-section::before { position: absolute; inset: 0; opacity: .1; background: url("../backgrounds/bg_colosseum_festival_night.webp") center / cover no-repeat; content: ""; }
.chain-grid { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.chain-card { display: grid; grid-template-columns: 124px minmax(140px, .7fr) 1fr; align-items: center; gap: 17px; padding: 18px; border: 1px solid rgba(255, 216, 107, .34); border-radius: 28px; background: rgba(10, 21, 45, .75); box-shadow: 0 20px 40px rgba(2, 6, 20, .25); backdrop-filter: blur(8px); }
.chain-card .producer { width: 120px; height: 120px; object-fit: contain; filter: drop-shadow(0 10px 8px rgba(0,0,0,.3)); }
.chain-card > div p { color: var(--gold-light); font-size: .68rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.chain-card h3 { margin-top: 6px; color: var(--white); font-size: 1.25rem; }
.chain-card ol { display: flex; margin: 0; padding: 0; list-style: none; }
.chain-card li { position: relative; display: grid; width: 33.333%; aspect-ratio: 1; place-items: center; border: 1px solid rgba(255,255,255,.11); border-radius: 18px; background: rgba(255,255,255,.08); }
.chain-card li + li::before { position: absolute; top: 50%; left: -9px; color: var(--gold); content: "›"; font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; transform: translateY(-52%); }
.chain-card li img { width: 83%; height: auto; object-fit: contain; filter: drop-shadow(0 7px 6px rgba(0,0,0,.24)); }

/* Rewards */
.reward-section { position: relative; isolation: isolate; overflow: hidden; padding: clamp(70px, 8vw, 112px) 0; background: radial-gradient(circle at 18% 30%, #fff4c6, #ffc94e 50%, #e59b17); }
.reward-section::before { position: absolute; z-index: -1; inset: 0; opacity: .17; background: repeating-radial-gradient(circle at 20% 40%, transparent 0 40px, #fff 41px 43px, transparent 44px 82px); content: ""; }
.reward-confetti { position: absolute; z-index: -1; top: 0; left: 50%; width: min(1000px, 100%); opacity: .75; transform: translateX(-50%); }
.reward-burst { position: absolute; right: 3%; bottom: -40px; width: 270px; opacity: .62; }
.reward-layout { display: grid; grid-template-columns: minmax(420px, .9fr) 1fr; align-items: center; gap: 80px; }
.reward-chests { position: relative; min-height: 390px; }
.reward-chests img { position: absolute; filter: drop-shadow(0 20px 13px rgba(99, 55, 10, .3)); }
.reward-chests img:first-child { top: 50%; left: 47%; width: 390px; opacity: .72; filter: none; transform: translate(-50%, -50%); animation: glowSpin 18s linear infinite; }
.reward-chests img:nth-child(2) { bottom: 5px; left: 3%; width: 225px; transform: rotate(-7deg); }
.reward-chests img:nth-child(3) { right: 2%; bottom: 32px; width: 320px; transform: rotate(4deg); }
.reward-copy h2 { font-size: clamp(2.55rem, 5vw, 4.8rem); }
.reward-copy > p:not(.eyebrow) { max-width: 580px; margin-top: 20px; color: #6a471b; font-size: 1.06rem; }
.reward-items { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.reward-items div { display: flex; align-items: center; gap: 5px; padding: 5px 13px 5px 6px; border: 1px solid rgba(111, 65, 13, .14); border-radius: var(--radius-pill); background: rgba(255, 250, 224, .72); font-size: .78rem; font-weight: 850; }
.reward-items img { width: 45px; height: auto; object-fit: contain; }

/* Screens */
.screens-section { overflow: hidden; background: #08706f; }
.screens-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 54px; }
.screens-heading h2 { max-width: 800px; color: var(--white); }
.carousel-controls { display: flex; flex: 0 0 auto; gap: 10px; }
.carousel-controls button { display: grid; width: 52px; aspect-ratio: 1; place-items: center; border: 2px solid rgba(255,255,255,.32); border-radius: 50%; background: rgba(255,255,255,.11); color: var(--white); cursor: pointer; transition: background .2s ease, transform .2s ease; }
.carousel-controls button:hover { background: var(--gold); color: var(--brown); transform: translateY(-2px); }
.carousel-controls svg { width: 25px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
.screen-carousel { display: flex; width: 100%; gap: clamp(22px, 3vw, 44px); overflow-x: auto; padding: 10px max(24px, calc((100vw - var(--container))/2)) 46px; scroll-behavior: smooth; scroll-padding-inline: max(24px, calc((100vw - var(--container))/2)); scroll-snap-type: x mandatory; scrollbar-width: none; }
.screen-carousel::-webkit-scrollbar { display: none; }
.screen-card { flex: 0 0 clamp(238px, 25vw, 320px); margin: 0; scroll-snap-align: start; text-align: center; }
.screen-card .phone { width: 100%; aspect-ratio: 9/18.8; border-color: #31201a; border-width: 5px; border-radius: 44px; background: #1d1210; transition: transform .3s var(--ease-out), box-shadow .3s ease; }
.screen-card:hover .phone { transform: translateY(-8px) rotate(1deg); box-shadow: 0 36px 80px rgba(0,0,0,.35); }
.screen-card .phone::before { position: absolute; z-index: 2; top: 14px; left: 50%; width: 34%; height: 17px; border-radius: 0 0 14px 14px; background: #251815; content: ""; transform: translateX(-50%); }
.screen-card figcaption { margin-top: 17px; color: var(--white); font-family: var(--font-display); font-size: 1rem; font-weight: 900; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; }
.carousel-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.35); cursor: pointer; transition: width .2s ease, background .2s ease; }
.carousel-dots button.is-active { width: 32px; border-radius: 6px; background: var(--gold); }

/* FAQ */
.faq-section { background: var(--paper); }
.faq-layout { display: grid; grid-template-columns: minmax(300px, .65fr) 1fr; align-items: start; gap: clamp(50px, 9vw, 120px); }
.faq-intro { position: sticky; top: 120px; }
.faq-intro h2 { font-size: clamp(2.5rem, 4.7vw, 4.5rem); }
.faq-intro > p:not(.eyebrow) { margin-top: 22px; color: var(--muted); }
.faq-intro > img { width: 230px; max-height: 290px; margin: 30px auto 0; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 14px 8px rgba(66, 35, 18, .2)); }
.faq-list { border-top: 1px solid rgba(91, 51, 39, .18); }
.faq-list details { border-bottom: 1px solid rgba(91, 51, 39, .18); }
.faq-list summary { position: relative; padding: 27px 50px 27px 0; color: var(--brown-deep); cursor: pointer; font-family: var(--font-display); font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 900; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { position: absolute; top: 50%; right: 10px; display: grid; width: 30px; aspect-ratio: 1; place-items: center; border-radius: 50%; background: var(--cream-deep); color: var(--brown); content: "+"; font-family: var(--font-body); font-size: 1.35rem; line-height: 1; transform: translateY(-50%); transition: transform .2s ease, background .2s ease; }
.faq-list details[open] summary::after { background: var(--gold); transform: translateY(-50%) rotate(45deg); }
.faq-list details p { max-width: 760px; padding: 0 50px 26px 0; color: var(--muted); }

/* Download */
.download-section { position: relative; isolation: isolate; min-height: 760px; overflow: hidden; padding: 100px 0; background: var(--red-dark); color: var(--white); }
.download-bg { position: absolute; z-index: -2; inset: 0; background: url("../backgrounds/bg_colosseum_festival_ui.webp") center / cover no-repeat; opacity: .45; }
.download-section::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(91, 28, 28, .97) 0 48%, rgba(91, 28, 28, .55) 72%, rgba(91, 28, 28, .25)); content: ""; }
.download-layout { display: grid; grid-template-columns: 1fr minmax(420px, .85fr); align-items: center; gap: 45px; }
.download-logo { width: 230px; margin-bottom: 14px; filter: drop-shadow(0 12px 9px rgba(34, 10, 9, .28)); }
.download-copy h2 { color: var(--white); }
.download-copy > p:not(.eyebrow):not(.store-status) { max-width: 630px; margin: 22px 0; color: rgba(255,255,255,.78); }
.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 27px; }
.store-button { display: flex; min-width: 190px; min-height: 62px; align-items: center; gap: 10px; padding: 9px 17px; border: 2px solid rgba(255,255,255,.6); border-radius: 14px; background: #181414; color: var(--white); text-decoration: none; transition: transform .2s ease, background .2s ease; }
.store-button:hover { background: #000; transform: translateY(-3px); }
.store-button svg { width: 30px; fill: currentColor; }
.store-button span { display: grid; }
.store-button small { font-size: .64rem; line-height: 1.1; }
.store-button strong { font-size: 1.05rem; line-height: 1.25; }
.store-status { min-height: 1.5em; margin-top: 13px; color: rgba(255,255,255,.59); font-size: .76rem; }
.download-art { position: relative; min-height: 560px; }
.download-palace { position: absolute; right: -12%; bottom: -8%; width: 540px; filter: drop-shadow(0 22px 18px rgba(37, 12, 11, .4)); }
.download-livia { position: absolute; z-index: 2; left: -7%; bottom: -11%; width: 350px; filter: drop-shadow(0 23px 16px rgba(37, 12, 11, .38)); }
.download-sparkle { position: absolute; z-index: 3; top: 5%; right: 9%; width: 150px; animation: spin 12s linear infinite; }

/* Footer and utility controls */
.site-footer { padding: 44px 0 100px; background: var(--brown-deep); color: rgba(255,255,255,.68); }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 24px; }
.footer-brand { width: 112px; }
.footer-brand img { width: 100%; height: auto; object-fit: contain; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-inner nav a { color: var(--white); font-size: .86rem; font-weight: 800; text-decoration: none; }
.footer-inner nav a:hover { color: var(--gold-light); }
.footer-powered {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  color: rgba(255,255,255,.55);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}
.footer-powered img { width: 132px; height: auto; object-fit: contain; filter: brightness(1.08); }
.footer-powered:hover { color: var(--gold-light); }
.footer-note { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.11); font-size: .72rem; }
.footer-note a { color: var(--gold-light); }

.mobile-game-nav { display: none; }

.back-to-top { position: fixed; z-index: 90; right: 22px; bottom: 22px; display: grid; width: 48px; aspect-ratio: 1; place-items: center; border: 2px solid var(--gold-light); border-radius: 50%; background: var(--red); box-shadow: var(--shadow-md); color: var(--white); cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(18px); transition: opacity .2s ease, transform .2s ease; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top svg { width: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.4; }

/* Reveal and motion */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes sunPulse { 0%,100% { transform: scale(.96); opacity: .75; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes phoneFloat { 0%,100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(-13px); } }
@keyframes leoBounce { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes rewardFloat { 0%,100% { margin-top: 0; } 50% { margin-top: -13px; } }
@keyframes drift { 0%,100% { margin-top: 0; } 50% { margin-top: -18px; } }
@keyframes scrollNudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@keyframes arrowPulse { 0%,100% { transform: scale(.92) translateY(4px); } 50% { transform: scale(1.08) translateY(-4px); } }
@keyframes glowSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes mergePop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes wrongShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes sparkleOut { 0% { opacity: 0; transform: scale(.3) rotate(-20deg); } 40% { opacity: 1; } 100% { opacity: 0; transform: scale(1.5) rotate(25deg); } }

@media (max-width: 1120px) {
  :root { --header-height: 72px; }
  .primary-nav a { padding-inline: 9px; font-size: .8rem; }
  .sound-toggle span { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(370px, .75fr); gap: 28px; }
  .hero-stage { min-height: 540px; }
  .hero-leo { right: -15%; }
  .feature-grid { gap: 16px; }
  .feature-card { padding-inline: 22px; }
  .gameplay-layout { grid-template-columns: minmax(0, .72fr) minmax(430px, 1fr); gap: 44px; }
  .loop-track { grid-template-columns: repeat(2, 1fr); }
  .loop-track::before { display: none; }
  .chain-card { grid-template-columns: 100px minmax(120px, .65fr) 1fr; }
  .chain-card .producer { width: 96px; height: 96px; }
  .reward-layout { gap: 34px; }
}

@media (max-width: 900px) {
  .page-shell { width: min(calc(100% - 32px), var(--container)); }
  .site-header { padding-inline: 10px; }
  .brand { width: 108px; }
  .menu-toggle { position: relative; z-index: 3; display: grid; width: 46px; height: 46px; align-content: center; gap: 5px; padding: 10px; border: 1px solid rgba(91, 51, 39, .16); border-radius: 50%; background: rgba(255, 248, 227, .92); cursor: pointer; }
  .menu-toggle span:not(.sr-only) { display: block; width: 100%; height: 2px; border-radius: 2px; background: var(--brown); transition: transform .2s ease, opacity .2s ease; }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }
  .primary-nav { position: fixed; inset: 0; flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; padding: 100px 28px; border: 0; border-radius: 0; background: rgba(255, 244, 217, .98); opacity: 0; pointer-events: none; visibility: hidden; transform: translateY(-12px); transition: opacity .2s ease, transform .2s ease, visibility .2s ease; }
  .primary-nav.is-open { opacity: 1; pointer-events: auto; visibility: visible; transform: translateY(0); }
  .primary-nav a { padding: 12px; font-family: var(--font-display); font-size: clamp(1.5rem, 7vw, 2.5rem); text-align: center; }
  .nav-actions { margin-left: auto; }
  .sound-toggle { min-width: 46px; min-height: 46px; justify-content: center; padding: 8px; }
  .nav-actions .game-button { display: none; }
  .hero { min-height: auto; padding-top: 128px; background-position: 64% center; }
  .hero::before { background: linear-gradient(180deg, rgba(255, 247, 223, .98) 0 53%, rgba(255, 244, 213, .5) 72%, rgba(255,255,255,.05)); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { max-width: 740px; margin: 0 auto; text-align: center; }
  .hero h1 { max-width: 800px; margin: 0 auto; }
  .hero-lede { margin-inline: auto; }
  .hero-actions, .fact-row { justify-content: center; margin-inline: auto; }
  .hero-stage { width: min(600px, 100%); min-height: 600px; margin: 20px auto 0; }
  .phone--hero { left: 20%; width: min(285px, 56%); }
  .hero-leo { right: 0; width: min(410px, 72%); }
  .sun-disc { left: 12%; }
  .hero-float--wheat { top: 35%; }
  .hero-float--coin { top: 42%; }
  .feature-grid { grid-template-columns: 1fr; max-width: 680px; margin: auto; }
  .feature-card { min-height: 380px; }
  .feature-art { min-height: 205px; }
  .gameplay-section::before { background: rgba(4, 61, 65, .9); }
  .gameplay-layout { grid-template-columns: 1fr; }
  .gameplay-copy { max-width: 720px; text-align: center; }
  .gameplay-copy > p:not(.eyebrow):not(.demo-note) { margin-inline: auto; }
  .instruction-list { display: flex; flex-wrap: wrap; justify-content: center; }
  .instruction-list li { flex: 1 1 180px; justify-content: center; }
  .merge-demo { width: min(620px, 100%); margin: auto; }
  .progression-layout { grid-template-columns: 1fr; }
  .progression-visual { order: 2; }
  .progression-copy { text-align: center; }
  .progression-copy > p:not(.eyebrow) { margin-inline: auto; }
  .stage-selector, .landmark-row { justify-content: center; }
  .stage-detail { text-align: left; }
  .city-map-frame { max-width: 500px; }
  .story-section::before { background: linear-gradient(180deg, rgba(20, 33, 63, .96) 0 53%, rgba(20, 33, 63, .42)); }
  .story-layout { grid-template-columns: 1fr; }
  .story-copy { max-width: 740px; text-align: center; }
  .story-leo { width: min(600px, 100%); margin: auto; }
  .character-grid { grid-template-columns: repeat(2, 1fr); }
  .chain-grid { grid-template-columns: 1fr; }
  .reward-layout { grid-template-columns: 1fr; text-align: center; }
  .reward-copy { order: -1; }
  .reward-copy > p:not(.eyebrow), .reward-items { justify-content: center; margin-inline: auto; }
  .reward-chests { width: min(620px, 100%); margin: auto; }
  .faq-layout { grid-template-columns: 1fr; }
  .faq-intro { position: static; text-align: center; }
  .faq-intro > p:not(.eyebrow) { max-width: 660px; margin-inline: auto; }
  .faq-intro > img { width: 190px; max-height: 230px; }
  .download-section::before { background: linear-gradient(180deg, rgba(91, 28, 28, .97) 0 58%, rgba(91, 28, 28, .6)); }
  .download-layout { grid-template-columns: 1fr; text-align: center; }
  .download-logo, .store-buttons { justify-content: center; margin-inline: auto; }
  .download-copy > p:not(.eyebrow):not(.store-status) { margin-inline: auto; }
  .download-art { width: min(640px, 100%); min-height: 500px; margin: auto; }
  .footer-inner { grid-template-columns: auto 1fr; }
  .footer-inner nav { grid-column: 1 / -1; }
  .footer-powered { grid-column: 1 / -1; align-items: flex-start; }
}

@media (max-width: 620px) {
  :root { --header-height: 66px; }
  body { padding-bottom: 77px; }
  .page-shell { width: min(calc(100% - 24px), var(--container)); }
  .section { padding: 76px 0; }
  .site-header { height: var(--header-height); }
  .brand { width: 92px; }
  .menu-toggle, .sound-toggle { width: 42px; height: 42px; min-width: 42px; min-height: 42px; }
  .nav-shell { gap: 8px; }
  .hero { padding: 108px 0 70px; }
  .hero h1 { font-size: clamp(3rem, 16vw, 4.6rem); }
  .hero-lede { margin-top: 22px; font-size: 1rem; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .game-button { width: min(300px, 100%); }
  .fact-row { width: 100%; margin-top: 28px; }
  .fact-row div { flex-direction: column; gap: 5px; padding-inline: 8px; }
  .fact-row div + div { padding-left: 8px; }
  .fact-row dt { font-size: 1.6rem; }
  .fact-row dd { font-size: .62rem; text-align: center; }
  .hero-stage { min-height: 500px; }
  .phone--hero { left: 8%; width: 55%; }
  .hero-leo { right: -10%; width: 77%; }
  .sun-disc { top: 11%; left: -4%; width: 95%; }
  .floating-reward { width: 75px; border-radius: 18px; }
  .floating-reward--gem { right: 1%; }
  .floating-reward--bread { bottom: 3%; left: 2%; }
  .hero-float { display: none; }
  .hero-scroll { display: none; }
  h2 { font-size: clamp(2.25rem, 12vw, 3.5rem); }
  .section-heading { margin-bottom: 38px; }
  .feature-card { min-height: 410px; padding: 22px 22px 28px; border-radius: 30px; }
  .feature-art { min-height: 220px; }
  .gameplay-layout { gap: 35px; }
  .instruction-list { display: grid; }
  .instruction-list li { justify-content: flex-start; }
  .merge-demo { padding: 10px; border-radius: 25px; }
  .demo-topbar { padding: 4px; }
  .demo-title img { width: 42px; }
  .demo-title strong { font-size: .92rem; }
  .resource-pill { min-width: 75px; padding-right: 9px; }
  .merge-board { gap: 6px; padding: 8px; border-width: 3px; border-radius: 18px; }
  .merge-tile { padding: 4px; border-radius: 12px; }
  .merge-tile small { right: 3px; bottom: 2px; min-width: 18px; padding: 1px 4px; font-size: .54rem; }
  .demo-controls { align-items: flex-start; flex-direction: column; }
  .demo-controls p { max-width: 100%; }
  .demo-controls > div { width: 100%; }
  .demo-button { flex: 1; }
  .loop-track { grid-template-columns: 1fr; }
  .loop-card { min-height: 355px; }
  .stage-selector { display: grid; grid-template-columns: 1fr 1fr; }
  .stage-tab { width: 100%; }
  .stage-detail { align-items: flex-start; padding: 16px; }
  .stage-detail > img { flex-basis: 68px; width: 68px; }
  .landmark-row img { width: 24%; }
  .story-section { padding-bottom: 0; }
  .story-layout { gap: 0; }
  .story-leo { min-height: 520px; }
  .story-leo > img { right: -12%; width: 108%; }
  .speech-card { right: 1%; bottom: 38px; width: 94%; }
  .character-grid { grid-template-columns: 1fr; }
  .character-card { min-height: 420px; }
  .chain-card { grid-template-columns: 76px 1fr; gap: 11px; padding: 14px; }
  .chain-card .producer { width: 74px; height: 74px; }
  .chain-card ol { grid-column: 1 / -1; }
  .chain-card h3 { font-size: 1.15rem; }
  .reward-chests { min-height: 300px; }
  .reward-chests img:first-child { width: 300px; }
  .reward-chests img:nth-child(2) { width: 170px; }
  .reward-chests img:nth-child(3) { width: 230px; }
  .screens-heading { align-items: flex-start; flex-direction: column; }
  .screen-carousel { padding-inline: 26px; scroll-padding-inline: 26px; }
  .screen-card { flex-basis: min(74vw, 280px); }
  .faq-list summary { padding-right: 42px; }
  .faq-list details p { padding-right: 10px; }
  .store-buttons { flex-direction: column; align-items: center; }
  .store-button { width: min(280px, 100%); }
  .download-art { min-height: 420px; }
  .download-palace { right: -22%; width: 450px; }
  .download-livia { left: -18%; width: 300px; }
  .download-sparkle { right: 0; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-brand { margin: auto; }
  .footer-inner nav { grid-column: auto; flex-wrap: wrap; justify-content: center; }
  .footer-powered { align-items: center; }
  .site-footer { padding-bottom: 44px; }
  .mobile-game-nav { position: fixed; z-index: 95; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px max(8px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); border-top: 2px solid var(--gold); background: rgba(255, 247, 222, .97); box-shadow: 0 -10px 30px rgba(54, 27, 17, .15); backdrop-filter: blur(12px); }
  .mobile-game-nav a { display: grid; min-width: 0; justify-items: center; color: var(--brown); font-size: .6rem; font-weight: 850; line-height: 1; text-decoration: none; }
  .mobile-game-nav img { width: 43px; height: 43px; object-fit: contain; margin-bottom: 2px; filter: drop-shadow(0 4px 3px rgba(73, 39, 18, .18)); transition: transform .2s ease; }
  .mobile-game-nav a:active img { transform: scale(.9); }
  .back-to-top { right: 13px; bottom: 92px; width: 43px; }
}

@media (max-width: 370px) {
  .hero h1 { font-size: 2.85rem; }
  .hero-stage { min-height: 445px; }
  .phone--hero { left: 5%; width: 58%; }
  .hero-leo { width: 80%; }
  .feature-card { min-height: 390px; }
  .merge-tile { border-radius: 10px; }
  .mobile-game-nav img { width: 39px; height: 39px; }
}

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

@media (prefers-contrast: more) {
  :root { --muted: #52382e; }
  .gameplay-copy > p:not(.eyebrow):not(.demo-note),
  .story-copy > p:not(.eyebrow),
  .download-copy > p:not(.eyebrow):not(.store-status) { color: var(--white); }
}
