/* =========================================================
   Kalemati — Guardians of Letters · landing page
   "Storybook Luxury": night-blue book, parchment pages, gold foil.
   Plain static CSS — paths are relative to this file (css/).
   ========================================================= */

:root {
  --night-950: #060d22;
  --night-900: #0a1530;
  --night-800: #0e1c3d;
  --night-700: #13254c;
  --panel: #16294f;
  --panel-2: #1d3566;
  --gold: #ffc73d;
  --gold-edge: rgba(255, 199, 61, .42);
  --gold-soft: #ffe68c;
  --gold-deep: #b8811f;
  --gold-line: #d9a443;
  --cream: #fff6e0;
  --parch-1: #fff9ea;
  --parch-2: #f6e5c1;
  --parch-3: #e7cb94;
  --ink: #3a220e;
  --ink-soft: #6b4a2a;
  --wood-1: #c47f40;
  --wood-2: #8e4e1f;
  --wood-3: #5b2e12;
  --blue-1: #7cc4ff;
  --blue-2: #2f8ff2;
  --blue-3: #0a61c7;
  --blue-4: #08479a;
  --text: #edf2ff;
  --text-dim: #c0cbe6;
  --radius: 22px;
  --header-h: 64px;
  --font-display: "El Messiri", "Tajawal", "Segoe UI", Tahoma, serif;
  --font-logo: "Lalezar", "El Messiri", "Segoe UI", Tahoma, sans-serif;
  --font-body: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --gold-text: linear-gradient(180deg, #fff7d8 0%, #ffe28e 34%, #f0b84a 56%, #ffe9a6 78%, #d39a35 100%);

  /* gold corner filigree — drawn once per corner, never stretched */
  --corner-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23C8922F' stroke-linecap='round'%3E%3Cpath d='M38 4.5H17C10 4.5 4.5 10 4.5 17V38' stroke-width='1.5'/%3E%3Cpath d='M32 10.5H20C14.5 10.5 10.5 14.5 10.5 20V32' stroke-width='1' opacity='.7'/%3E%3Cpath d='M24 16C19.5 16 16 19.5 16 24' stroke-width='1.2'/%3E%3C/g%3E%3Ccircle cx='9.5' cy='9.5' r='2.3' fill='%23E2AE4A'/%3E%3C/svg%3E");
  --corner-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='matrix(-1 0 0 1 40 0)'%3E%3Cg fill='none' stroke='%23C8922F' stroke-linecap='round'%3E%3Cpath d='M38 4.5H17C10 4.5 4.5 10 4.5 17V38' stroke-width='1.5'/%3E%3Cpath d='M32 10.5H20C14.5 10.5 10.5 14.5 10.5 20V32' stroke-width='1' opacity='.7'/%3E%3Cpath d='M24 16C19.5 16 16 19.5 16 24' stroke-width='1.2'/%3E%3C/g%3E%3Ccircle cx='9.5' cy='9.5' r='2.3' fill='%23E2AE4A'/%3E%3C/g%3E%3C/svg%3E");
  --corner-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='matrix(1 0 0 -1 0 40)'%3E%3Cg fill='none' stroke='%23C8922F' stroke-linecap='round'%3E%3Cpath d='M38 4.5H17C10 4.5 4.5 10 4.5 17V38' stroke-width='1.5'/%3E%3Cpath d='M32 10.5H20C14.5 10.5 10.5 14.5 10.5 20V32' stroke-width='1' opacity='.7'/%3E%3Cpath d='M24 16C19.5 16 16 19.5 16 24' stroke-width='1.2'/%3E%3C/g%3E%3Ccircle cx='9.5' cy='9.5' r='2.3' fill='%23E2AE4A'/%3E%3C/g%3E%3C/svg%3E");
  --corner-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='matrix(-1 0 0 -1 40 40)'%3E%3Cg fill='none' stroke='%23C8922F' stroke-linecap='round'%3E%3Cpath d='M38 4.5H17C10 4.5 4.5 10 4.5 17V38' stroke-width='1.5'/%3E%3Cpath d='M32 10.5H20C14.5 10.5 10.5 14.5 10.5 20V32' stroke-width='1' opacity='.7'/%3E%3Cpath d='M24 16C19.5 16 16 19.5 16 24' stroke-width='1.2'/%3E%3C/g%3E%3Ccircle cx='9.5' cy='9.5' r='2.3' fill='%23E2AE4A'/%3E%3C/g%3E%3C/svg%3E");

  /* faint paper grain */
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .27 0 0 0 0 .1 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* star dust tile for the night sky */
  --stars:
    radial-gradient(1.2px 1.2px at 22px 34px, rgba(255, 236, 180, .75), transparent 60%),
    radial-gradient(1px 1px at 140px 80px, rgba(255, 255, 255, .55), transparent 60%),
    radial-gradient(1.4px 1.4px at 200px 190px, rgba(255, 214, 120, .6), transparent 60%),
    radial-gradient(1px 1px at 70px 150px, rgba(200, 220, 255, .5), transparent 60%),
    radial-gradient(1px 1px at 250px 40px, rgba(255, 240, 200, .45), transparent 60%),
    radial-gradient(1.2px 1.2px at 110px 250px, rgba(255, 255, 255, .4), transparent 60%);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  background: var(--night-900);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--night-900);
  background-image:
    radial-gradient(1200px 700px at 50% 0%, rgba(43, 79, 150, .28), transparent 70%),
    var(--stars);
  background-size: auto, 280px 280px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
p { text-wrap: pretty; }
span[dir="ltr"] { white-space: nowrap; }
ul, ol { padding: 0; list-style: none; }
.nw { white-space: nowrap; }
.sr-only { /* read by screen readers, never shown */
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible {
  outline: 3px solid var(--gold-soft);
  outline-offset: 3px;
  border-radius: 10px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--night-900);
  font-weight: 700;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 16px;
}
.container--narrow { max-width: 860px; }

/* ---------- Shared ornaments ---------- */
.foil {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.35;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(40, 18, 0, .55)) drop-shadow(0 0 22px rgba(255, 190, 60, .22));
}

.flourish {
  width: min(300px, 78%);
  height: 26px;
  margin-inline: auto;
  overflow: visible;
}

.kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--gold-soft);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .98rem;
}
.kicker::before, .kicker::after {
  content: "";
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line));
}
.kicker::after { transform: scaleX(-1); }
.kicker span {
  padding: 2px 14px;
  border: 1px solid var(--gold-edge);
  border-radius: 999px;
  background: rgba(22, 41, 79, .6);
}

.chapter-head {
  text-align: center;
  max-width: 780px;
  margin: 0 auto clamp(34px, 5vw, 56px);
}
.chapter-head h2 { font-size: clamp(1.95rem, 5.6vw, 3.25rem); margin-bottom: 4px; text-wrap: balance; }
.chapter-head .lead { margin-top: 12px; }
.chapter-head--start { text-align: start; margin-inline: 0; }
.chapter-head--start .kicker { justify-content: flex-start; }
.chapter-head--start .kicker::before { display: none; }
.chapter-head--start .flourish { margin-inline: 0; }

.lead {
  color: var(--text-dim);
  font-size: clamp(1.04rem, 2.4vw, 1.2rem);
  line-height: 1.85;
}

/* parchment page with a crisp gold inner rule + corner filigree */
.parchment {
  position: relative;
  color: var(--ink);
  border-radius: var(--radius);
  background:
    var(--paper-grain),
    radial-gradient(130% 90% at 50% 0%, var(--parch-1) 0%, var(--parch-2) 58%, var(--parch-3) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .7),
    inset 0 0 40px rgba(170, 110, 40, .18),
    0 0 0 1px rgba(122, 78, 30, .45),
    0 0 0 5px var(--panel),
    0 0 0 6px var(--gold-edge),
    0 28px 60px -24px rgba(0, 0, 0, .75);
}
.parchment::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(181, 128, 48, .55);
  border-radius: calc(var(--radius) - 7px);
  background:
    var(--corner-tl) top 3px left 3px / 30px 30px no-repeat,
    var(--corner-tr) top 3px right 3px / 30px 30px no-repeat,
    var(--corner-bl) bottom 3px left 3px / 30px 30px no-repeat,
    var(--corner-br) bottom 3px right 3px / 30px 30px no-repeat;
  pointer-events: none;
}
.parchment > * { position: relative; }

/* night panel — the game's own menu identity */
.panel {
  position: relative;
  border-radius: 20px;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(58, 98, 180, .32), transparent 60%),
    linear-gradient(180deg, #1b315e 0%, var(--panel) 55%, #112245 100%);
  border: 1px solid var(--gold-edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    inset 0 0 0 4px rgba(10, 21, 48, .35),
    0 18px 40px -22px rgba(0, 0, 0, .8);
}

.medal {
  flex: none;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: var(--gold-soft);
  background: radial-gradient(circle at 35% 30%, #34589e, var(--panel) 62%, #0c1a38);
  box-shadow:
    0 0 0 2px #e2ae4a,
    0 0 0 5px var(--night-800),
    0 0 0 6px rgba(255, 199, 61, .45),
    0 10px 22px rgba(0, 0, 0, .45),
    inset 0 2px 6px rgba(255, 255, 255, .16);
}
.medal svg { width: 28px; height: 28px; }

/* ---------- Buttons ---------- */
.btn-apk {
  --h: 66px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: var(--h);
  padding: 8px 22px 8px 24px;
  border: 3px solid transparent;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  background:
    linear-gradient(180deg, var(--blue-1) 0%, var(--blue-2) 34%, var(--blue-3) 64%, var(--blue-4) 100%) padding-box,
    linear-gradient(180deg, #fff3c4 0%, #ffc73d 38%, #a8741f 70%, #ffe08a 100%) border-box;
  box-shadow:
    0 0 0 1px rgba(70, 36, 0, .55),
    0 14px 30px -10px rgba(10, 97, 199, .85),
    0 0 34px rgba(255, 199, 61, .25),
    inset 0 -8px 16px rgba(0, 28, 90, .5),
    inset 0 2px 0 rgba(255, 255, 255, .4);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s;
}
.btn-apk::before { /* glossy highlight, like the game's pills */
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4px 18px auto 18px;
  height: 42%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, .04));
  pointer-events: none;
}
.btn-apk::after { /* slow light sweep — transform only, so it never forces a layout pass */
  content: "";
  position: absolute;
  z-index: -1;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 34%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: translateX(-130%) skewX(-18deg);
  animation: sweep 5.5s ease-in-out infinite 1.5s;
  pointer-events: none;
}
@keyframes sweep {
  0%, 70% { transform: translateX(-130%) skewX(-18deg); }
  100% { transform: translateX(420%) skewX(-18deg); }
}
/* Arabic reads right to left, so the light travels the same way */
html[dir="rtl"] .btn-apk::after { left: auto; right: 0; transform: translateX(130%) skewX(-18deg); animation-name: sweep-rtl; }
@keyframes sweep-rtl {
  0%, 70% { transform: translateX(130%) skewX(-18deg); }
  100% { transform: translateX(-420%) skewX(-18deg); }
}
.btn-apk:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 0 0 1px rgba(70, 36, 0, .55), 0 20px 36px -10px rgba(10, 97, 199, .9), 0 0 46px rgba(255, 199, 61, .4), inset 0 -8px 16px rgba(0, 28, 90, .5), inset 0 2px 0 rgba(255, 255, 255, .4); }
.btn-apk:active { transform: translateY(1px); }
.btn-apk:focus-visible { outline-offset: 5px; border-radius: 999px; }

.btn-apk__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #fff8dc, #ffd35e 55%, #c48b26);
  color: #0b4aa0;
  box-shadow: 0 2px 6px rgba(0, 20, 70, .5), inset 0 -2px 3px rgba(120, 70, 0, .4);
}
.btn-apk__icon svg { width: 26px; height: 26px; }
.btn-apk__text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.25; text-align: start; }
.btn-apk__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  text-shadow: 0 2px 0 rgba(0, 36, 100, .55);
}
.btn-apk__label .lat { font-family: "Tajawal", "Segoe UI", Arial, sans-serif; font-weight: 800; }
.btn-apk__meta {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-size: .78rem;
  font-weight: 500;
  color: #e3f0ff;
  opacity: .95;
}
.btn-apk__meta i { font-style: normal; opacity: .65; margin-inline: 5px; }
.meta-pair { white-space: nowrap; }

.btn-apk.btn-apk--xl { --h: 76px; padding-inline: 34px 38px; }
.btn-apk--xl .btn-apk__label { font-size: 1.7rem; }
.btn-apk--xl .btn-apk__icon { width: 52px; height: 52px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 6px 22px 6px 8px;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  background:
    linear-gradient(180deg, #fffaf0, #f2dcae) padding-box,
    linear-gradient(180deg, #ffeeb8, #c8922f) border-box;
  border: 2px solid transparent;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .7), inset 0 -3px 0 rgba(160, 100, 30, .25);
  transition: transform .25s var(--ease), box-shadow .25s;
}
html[dir="rtl"] .btn-ghost { padding: 6px 8px 6px 22px; }
.btn-ghost:hover { transform: translateY(-2px); }
.btn-ghost__disc {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--gold-soft);
  background: radial-gradient(circle at 35% 30%, #2f5aa8, var(--panel));
  box-shadow: 0 0 0 2px #e2ae4a;
}
.btn-ghost__disc svg { width: 18px; height: 18px; margin-left: 3px; }

.btn-mini {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 4px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  border: 2px solid transparent;
  background:
    linear-gradient(180deg, var(--blue-1), var(--blue-3) 60%, var(--blue-4)) padding-box,
    linear-gradient(180deg, #fff0b5, #c8922f) border-box;
  box-shadow: 0 8px 18px -8px rgba(10, 97, 199, .9), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.btn-mini svg { flex: none; width: 20px; height: 20px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .35s, box-shadow .35s, backdrop-filter .35s;
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 16px;
}
.site-header.is-scrolled {
  background: rgba(10, 21, 48, .86);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 199, 61, .2), 0 10px 30px -12px rgba(0, 0, 0, .7);
}

/* gold reading-progress hairline */
.progress {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s;
}
.site-header.is-scrolled .progress { opacity: 1; }
.progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(var(--p, 0));
  transform-origin: right center;
  background: linear-gradient(270deg, rgba(255, 199, 61, .15), var(--gold) 70%, var(--gold-soft));
  box-shadow: 0 0 10px rgba(255, 199, 61, .55);
}
html[dir="ltr"] .progress span { transform-origin: left center; background: linear-gradient(90deg, rgba(255, 199, 61, .15), var(--gold) 70%, var(--gold-soft)); }

/* sign lockup — the same carved sign as the game menu */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  text-decoration: none;
}
.brand__sign {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 60px;
  aspect-ratio: 815 / 757;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
  transition: transform .5s var(--ease);
}
.brand__sign img { position: absolute; inset: 0; width: 100%; height: 100%; }
.brand__word {
  position: relative;
  font-family: var(--font-logo);
  font-size: 1.12rem;
  line-height: 1;
  padding-top: 3px;
  color: #5b3412;
  text-shadow: 0 1px 0 rgba(255, 246, 220, .8);
}
.brand:hover .brand__sign { transform: rotate(-4deg) scale(1.05); }
.brand__sub {
  display: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--gold-soft);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}

.nav { display: none; margin-inline-start: auto; }
.nav__list { display: flex; gap: 2px; }
.nav__list a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px; /* tap target: the desktop nav also shows on touch tablets in landscape */
  padding: 0 12px;
  white-space: nowrap;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: .98rem;
  color: #f1f5ff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
  transition: background .2s, color .2s;
}
.nav__list a:hover { background: rgba(255, 230, 140, .14); color: var(--gold-soft); }
.nav__list a.is-active { color: var(--gold-soft); background: rgba(255, 230, 140, .1); }
.nav__list a.is-active::after {
  content: "";
  position: absolute;
  inset-inline: 30%;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.site-header__actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.nav + .site-header__actions { margin-inline-start: 18px; }

.lang-toggle, .menu-btn {
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  padding-inline: 12px;
  border-radius: 999px;
  border: 1px solid var(--gold-edge);
  background: rgba(14, 28, 61, .6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--gold-soft);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
}
.lang-toggle[lang="ar"] { font-size: .95rem; padding-inline: 8px; font-family: var(--font-display); }
.menu-btn svg { width: 24px; height: 24px; }
.lang-toggle:hover, .menu-btn:hover { background: rgba(29, 53, 102, .9); }

.mnav {
  margin: 0 12px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(12, 25, 56, .97);
  border: 1px solid var(--gold-edge);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .9);
}
.mnav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mnav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
}
.mnav a:hover { background: rgba(255, 230, 140, .12); color: var(--gold-soft); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(700px, 100svh, 960px);
  padding: calc(var(--header-h) + 10px) 16px 70px;
  overflow: hidden;
}
.hero__scene { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__bg, .hero__video {
  position: absolute;
  inset: -3% -2% auto;
  width: 104%;
  height: 106%;
  max-width: none;
  object-fit: cover;
  object-position: 58% 40%;
}
/* the gameplay loop only fades in once it is really playing */
.hero__video { opacity: 0; transition: opacity 1.2s var(--ease); background: transparent; }
.hero__video.is-playing { opacity: 1; }
.hero__rays {
  position: absolute;
  inset: 0;
  background:
    conic-gradient(from 200deg at 82% -6%, transparent 0deg, rgba(255, 244, 200, .22) 12deg, transparent 22deg, rgba(255, 244, 200, .16) 34deg, transparent 46deg, rgba(255, 244, 200, .12) 60deg, transparent 74deg);
  mix-blend-mode: screen;
  animation: rays 12s ease-in-out infinite alternate;
}
@keyframes rays { from { opacity: .55; } to { opacity: 1; } }

.hero__letters { position: absolute; inset: 0; }
.glow-letter {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: #ffeaa6;
  text-shadow:
    0 2px 0 #8a4d0c,
    0 0 2px #6b3a06,
    0 0 12px rgba(255, 196, 60, .95),
    0 0 30px rgba(255, 150, 20, .75),
    0 0 60px rgba(255, 190, 80, .5);
  animation: floaty 7s ease-in-out infinite;
}
.gl-1 { top: 16%; left: 6%;  font-size: 46px; animation-delay: -1s; }
.gl-2 { top: 13%; right: 7%; font-size: 40px; animation-delay: -3s; }
.gl-3 { top: 44%; left: 4%;  font-size: 30px; animation-delay: -5s; }
.gl-4 { top: 38%; right: 5%; font-size: 34px; animation-delay: -2s; }
.gl-5 { top: 66%; right: 9%; font-size: 28px; animation-delay: -4s; display: none; }
.gl-6 { top: 8%; left: 30%;  font-size: 24px; animation-delay: -6s; display: none; }
.gl-7 { top: 58%; left: 12%; font-size: 26px; animation-delay: -2.5s; display: none; }
.gl-8 { top: 26%; right: 27%; font-size: 22px; animation-delay: -4.5s; display: none; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-14px) rotate(4deg); }
}

.hero__dust {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 30%, rgba(255, 236, 170, .9), transparent 60%),
    radial-gradient(1.6px 1.6px at 28% 62%, rgba(255, 236, 170, .8), transparent 60%),
    radial-gradient(2px 2px at 66% 22%, rgba(255, 246, 210, .9), transparent 60%),
    radial-gradient(1.4px 1.4px at 78% 54%, rgba(255, 236, 170, .8), transparent 60%),
    radial-gradient(2.2px 2.2px at 90% 34%, rgba(255, 220, 120, .8), transparent 60%),
    radial-gradient(1.6px 1.6px at 44% 12%, rgba(255, 246, 210, .8), transparent 60%),
    radial-gradient(1.8px 1.8px at 55% 78%, rgba(255, 236, 170, .7), transparent 60%);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: 1; } }

.hero__bird {
  position: absolute;
  top: 11%;
  left: 18%;
  width: clamp(54px, 7vw, 110px);
  filter: drop-shadow(0 10px 14px rgba(0, 40, 80, .35));
  animation: bob 4.6s ease-in-out infinite;
  display: none;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 50% 55%, rgba(8, 17, 41, .28), transparent 72%),
    linear-gradient(180deg, rgba(8, 17, 41, .62) 0%, rgba(8, 17, 41, 0) 16%, rgba(8, 17, 41, 0) 52%, rgba(10, 21, 48, .72) 82%, var(--night-900) 100%);
}

.hero__peek {
  position: absolute;
  bottom: -2px;
  width: clamp(150px, 16vw, 250px);
  filter: drop-shadow(0 -6px 24px rgba(0, 0, 0, .35));
  /* fade out like the finale cast, instead of a hard cut where the hero ends */
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 97%);
  mask-image: linear-gradient(180deg, #000 62%, transparent 97%);
  display: none;
}
.hero__peek--girl { left: max(-10px, calc(50% - 760px)); }
.hero__peek--boy { right: max(-10px, calc(50% - 760px)); }

.hero__fox {
  position: absolute;
  bottom: 18px;
  right: 4%;
  width: clamp(92px, 11vw, 180px);
}
.hero__fox img {
  width: 100%;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .45));
  animation: sneak 5s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes sneak {
  0%, 100% { transform: translateX(0) rotate(0); }
  50% { transform: translateX(6px) rotate(-2deg); }
}
.hero__fox-letter, .wanted__letter {
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.hero__fox-letter.is-swapping, .wanted__letter.is-swapping { opacity: 0; }
.hero__fox-letter {
  position: absolute;
  top: -12%;
  left: 2%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.3;
  color: #ffeaa6;
  text-shadow: 0 2px 0 #8a4d0c, 0 0 2px #6b3a06, 0 0 12px rgba(255, 196, 60, .95), 0 0 30px rgba(255, 150, 20, .8);
  animation: floaty 3.4s ease-in-out infinite;
}
.hero__chick {
  position: absolute;
  bottom: 26px;
  left: 4%;
  width: clamp(54px, 6vw, 96px);
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .4));
  animation: bob 3.8s ease-in-out infinite;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 720px;
}

/* the carved wood title sign */
.title-sign {
  position: relative;
  container-type: inline-size;
  width: min(60vw, 240px);
  aspect-ratio: 815 / 757;
  margin: 0;
  font-weight: normal;
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .5));
  animation: signIn 1.1s var(--ease) both .15s;
}
@keyframes signIn {
  from { opacity: 0; transform: translateY(-26px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.title-sign__wood { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.title-sign__ar {
  position: absolute;
  inset-inline: 0;
  top: 17%;
  text-align: center;
  font-family: var(--font-logo);
  font-size: 27cqi;
  line-height: 1.25;
  color: #6a3410;
  text-shadow:
    0 1.5px 0 rgba(255, 246, 220, .85),
    0 -1px 0 rgba(70, 30, 0, .35);
}
.title-sign__orn {
  position: absolute;
  top: 62%;
  left: 18%;
  width: 64%;
  height: 6cqi;
  overflow: visible;
  opacity: .85;
}
.title-sign__en {
  position: absolute;
  inset-inline: 0;
  top: 66.5%;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11.5cqi;
  line-height: 1.2;
  color: #7a4317;
  text-shadow: 0 1px 0 rgba(255, 246, 220, .85);
}

/* ribbon under the sign */
.ribbon {
  position: absolute;
  left: 50%;
  bottom: -3%;
  transform: translateX(-50%);
  z-index: 1;
  white-space: nowrap;
}
.ribbon__text {
  position: relative;
  display: block;
  padding: .28em 1.25em .38em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: max(15px, 8.2cqi);
  line-height: 1.3;
  color: var(--gold-soft);
  background: linear-gradient(180deg, #2a4b8c 0%, var(--panel) 55%, #0f1f40 100%);
  border-block: 2px solid #e2ae4a;
  box-shadow: 0 10px 18px -6px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .15);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .45);
}
.ribbon::before, .ribbon::after {
  content: "";
  position: absolute;
  top: 26%;
  width: 1.1em;
  height: 100%;
  font-size: max(15px, 8.2cqi);
  background: linear-gradient(180deg, #1a3263, #0c1934);
  border-block: 2px solid #b9862b;
  z-index: -1;
}
.ribbon::before { right: -.95em; clip-path: polygon(0 0, 100% 0, 70% 50%, 100% 100%, 0 100%); }
.ribbon::after { left: -.95em; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 30% 50%); }

.hero__plaque {
  position: relative;
  width: 100%;
  margin-top: 28px;
  padding: 22px 16px 20px;
  border-radius: 26px;
  text-align: center;
  background: linear-gradient(180deg, rgba(24, 45, 88, .86) 0%, rgba(11, 23, 52, .92) 100%);
  border: 1px solid var(--gold-edge);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .1);
  animation: rise 1s var(--ease) both .3s;
}
.hero__plaque::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 199, 61, .22);
  border-radius: 21px;
  background:
    var(--corner-tl) top 2px left 2px / 26px 26px no-repeat,
    var(--corner-tr) top 2px right 2px / 26px 26px no-repeat,
    var(--corner-bl) bottom 2px left 2px / 26px 26px no-repeat,
    var(--corner-br) bottom 2px right 2px / 26px 26px no-repeat;
  pointer-events: none;
  opacity: .9;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
.hero__tagline {
  position: relative;
  max-width: 600px;
  margin: 0 auto 16px;
  font-size: 1rem;
  line-height: 1.8;
  color: #f2f5ff;
}

.cta-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.cta-row .btn-apk { width: 100%; justify-content: center; }
.cta-row .btn-ghost { justify-content: center; }

.hero__hint {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  margin-top: 8px;
  padding-inline: 8px;
  color: var(--gold-soft);
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
}
.hero__hint svg { width: 18px; height: 18px; flex: none; }
.hero__hint u { text-underline-offset: 5px; text-decoration-color: rgba(255, 230, 140, .55); }
.hero__hint:hover u { text-decoration-color: var(--gold-soft); }

.hero__chips {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  margin-top: 4px;
  font-size: .9rem;
  color: var(--text-dim);
}
.hero__chips li { display: inline-flex; align-items: center; gap: 6px; }
.hero__chips svg { width: 16px; height: 16px; color: var(--gold); }

/* ---------- Stats band (right under the hero) ---------- */
.stats { position: relative; z-index: 3; margin-top: -44px; }
.stats__band {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  max-width: 1040px;
  margin-inline: auto;
  padding: 8px;
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(58, 98, 180, .35), transparent 60%),
    linear-gradient(180deg, #1c3462 0%, var(--panel) 55%, #0f1f42 100%);
  border: 1px solid rgba(255, 199, 61, .6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 0 0 5px rgba(10, 21, 48, .5),
    inset 0 0 0 6px rgba(255, 199, 61, .16),
    0 30px 60px -26px rgba(0, 0, 0, .9),
    0 0 60px -30px rgba(255, 199, 61, .45);
}
.stats__band li {
  position: relative;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 6px 12px;
  text-align: center;
}
.stats__band li:nth-child(4), .stats__band li:nth-child(5) { grid-column: span 3; }
.stats__band li:not(:nth-child(3)):not(:nth-child(5))::after {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold-line), transparent);
}
.stats__band li:nth-child(-n+3)::before {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 164, 67, .7), transparent);
}
.stats__band strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(40, 18, 0, .5));
}
.stats__band span { font-size: .86rem; line-height: 1.45; color: var(--text-dim); }

/* ---------- Chapters ---------- */
.chapter {
  position: relative;
  padding-block: clamp(56px, 7vw, 92px);
}
.chapter::before { /* hairline gold divider between chapters */
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(560px, 70%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold-edge), transparent);
}
#how::before { display: none; }
.chapter--glow {
  background:
    radial-gradient(900px 520px at 50% 30%, rgba(46, 86, 168, .22), transparent 70%);
}

/* reveal on scroll (never used on the hero CTA) */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Chapter 1: how ---------- */
.how {
  display: grid;
  gap: 40px;
  align-items: center;
}
.steps { display: grid; gap: 22px; }
.step {
  padding: 26px 22px 22px;
  padding-inline-start: 88px;
}
.step__num {
  position: absolute;
  inset-inline-start: 22px;
  top: 24px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1;
  padding-top: 3px;
  color: var(--gold-soft);
  background: radial-gradient(circle at 35% 30%, #34589e, var(--panel) 62%, #0c1a38);
  box-shadow: 0 0 0 2px #e2ae4a, 0 0 0 4px var(--parch-2), 0 0 0 5px rgba(160, 110, 40, .5), 0 6px 14px rgba(60, 30, 0, .35);
}
.step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.4;
  color: #5a2c0c;
  margin-bottom: 4px;
}
.step p { color: var(--ink-soft); font-size: 1rem; line-height: 1.75; }

/* the one concrete example (Baa) running through the four steps */
.step__eg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 3px 14px 3px 6px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .98rem;
  line-height: 1.5;
  color: #6a3410;
  background: rgba(214, 160, 67, .18);
  border: 1px solid rgba(160, 105, 30, .4);
}
html[dir="rtl"] .step__eg { padding: 3px 6px 3px 14px; }
.eg-glyph, .eg-card {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  padding-bottom: 4px;
  color: #fff3c4;
  background: radial-gradient(circle at 35% 30%, #34589e, var(--panel) 62%, #0c1a38);
  box-shadow: 0 0 0 1.5px #d9a443;
  text-shadow: 0 0 8px rgba(255, 199, 61, .9);
}
.eg-card { border-radius: 8px; width: 30px; height: 36px; }
.eg-eq {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  padding-inline: 8px;
  border-radius: 999px;
  color: var(--gold-soft);
  background: radial-gradient(circle at 35% 30%, #34589e, var(--panel) 62%, #0c1a38);
  box-shadow: 0 0 0 1.5px #d9a443;
}
.eg-eq svg { width: 16px; height: 16px; margin-inline-end: 2px; }
.eg-eq i { width: 2.5px; height: 12px; border-radius: 2px; background: var(--gold-soft); animation: eq 1.1s ease-in-out infinite; }
.eg-eq i:nth-child(3) { animation-delay: -.35s; }
.eg-eq i:nth-child(4) { animation-delay: -.7s; }
.eg-spark {
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 50%;
  color: var(--gold-soft);
  background: radial-gradient(circle at 35% 30%, #34589e, var(--panel) 62%, #0c1a38);
  box-shadow: 0 0 0 1.5px #d9a443;
}

/* word-card showcase (mirrors the in-game word card) */
.wordcard-wrap {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding-top: 40px;
}
.wordcard {
  position: relative;
  width: min(100%, 420px);
  padding: 22px 22px 26px;
  border-radius: 26px;
  text-align: center;
  background:
    radial-gradient(300px 220px at 50% 40%, rgba(255, 199, 61, .17), transparent 70%),
    linear-gradient(180deg, #1c3463 0%, var(--panel) 60%, #10224a 100%);
  border: 1.5px solid var(--gold-line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 0 0 6px rgba(10, 21, 48, .45),
    inset 0 0 0 7px rgba(255, 199, 61, .18),
    0 40px 90px -30px rgba(0, 0, 0, .9),
    0 0 80px -30px rgba(255, 199, 61, .4);
}
.wordcard__top { display: flex; align-items: center; justify-content: flex-start; gap: 14px; }
.wordcard__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--gold-soft);
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--gold-edge);
  background: rgba(4, 10, 26, .35);
}
.wordcard__sound { display: inline-flex; align-items: center; gap: 3px; color: var(--gold-soft); }
.wordcard__sound svg { width: 22px; height: 22px; margin-inline-end: 4px; }
.wordcard__sound i { width: 3px; height: 16px; border-radius: 2px; background: var(--gold-soft); animation: eq 1.1s ease-in-out infinite; transform-origin: center; }
.wordcard__sound i:nth-child(3) { animation-delay: -.3s; }
.wordcard__sound i:nth-child(4) { animation-delay: -.6s; }
.wordcard__sound i:nth-child(5) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.wordcard__letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(6.5rem, 30vw, 9rem);
  line-height: 1.3;
  margin-top: -6px;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 190, 60, .5)) drop-shadow(0 2px 0 rgba(96, 52, 4, .8));
}
.wordcard__word {
  margin-top: -10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1.4;
  color: #fff;
}
.wordcard__word b { font-weight: inherit; color: var(--gold-soft); text-shadow: 0 0 20px rgba(255, 199, 61, .6); }
.wordcard__hint { margin-top: 6px; color: var(--text-dim); font-size: 1rem; }
.wordcard__bird {
  position: absolute;
  z-index: 2;
  top: 0;
  inset-inline-end: max(-6px, calc(50% - 250px));
  width: 108px;
  height: auto;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .45));
  animation: bob 5s ease-in-out infinite;
}
html[dir="ltr"] .wordcard__bird { scale: -1 1; }
.wordcard__note {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--gold-soft);
}

.helpers {
  margin-top: clamp(48px, 7vw, 80px);
  padding: 28px 12px 30px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(29, 53, 102, .55), rgba(14, 28, 61, .4));
  border: 1px solid rgba(255, 199, 61, .22);
}
.helpers__title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--gold-soft);
  margin-bottom: 22px;
}
.helpers__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px 6px;
}
.helpers__list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  font-weight: 500;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--text);
}
.helper-medal {
  position: relative;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #3a64b2, var(--panel) 60%, #0b1835);
  box-shadow:
    0 0 0 2px #e2ae4a,
    0 0 0 6px var(--night-800),
    0 0 0 7px rgba(255, 199, 61, .4),
    0 14px 26px -10px rgba(0, 0, 0, .8),
    inset 0 3px 8px rgba(255, 255, 255, .14);
}
.helper-medal img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }
.helper-medal--svg { color: var(--gold-soft); }
.helper-medal--svg svg { width: 34px; height: 34px; transform: rotate(-35deg); margin-top: -12px; filter: drop-shadow(0 0 8px rgba(255, 199, 61, .6)); }
.helper-medal--svg b {
  position: absolute;
  bottom: 9px;
  font-size: .78rem;
  font-weight: 800;
  color: #fff;
}

/* ---------- Chapter 2: worlds ---------- */
/* journey rail — a gilded path on night blue, like the in-game journey panel */
.journey { max-width: 900px; margin: 0 auto clamp(40px, 6vw, 60px); }
.rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 18px 10px 14px;
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(58, 98, 180, .32), transparent 60%),
    linear-gradient(180deg, #1b315e 0%, var(--panel) 55%, #0f1f42 100%);
  border: 1px solid rgba(255, 199, 61, .55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .1),
    inset 0 0 0 5px rgba(10, 21, 48, .45),
    inset 0 0 0 6px rgba(255, 199, 61, .14),
    0 24px 50px -24px rgba(0, 0, 0, .9);
}
.rail::before, .rail::after { /* the path: solid gold through open worlds, dotted to the locked ones */
  content: "";
  position: absolute;
  top: calc(18px + 25px);
  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;
}
.rail::before {
  inset-inline-start: 10%;
  width: 40%;
  background: linear-gradient(90deg, #b8811f, #ffe08a 50%, #b8811f);
  box-shadow: 0 0 10px rgba(255, 199, 61, .55);
}
.rail::after {
  inset-inline-start: 50%;
  width: 40%;
  height: 0;
  margin-top: 0;
  border-top: 2px dotted rgba(255, 199, 61, .5);
}
.rail__node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}
.rail__pic {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #2b4a86, #0e1c3d);
  box-shadow: 0 0 0 2px #e2ae4a, 0 0 0 5px var(--night-800), 0 0 0 6px rgba(255, 199, 61, .4), 0 10px 18px -8px rgba(0, 0, 0, .9);
}
.rail__pic img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.rail__pic > svg { width: 22px; height: 22px; color: rgba(255, 230, 140, .6); }
.rail__badge {
  position: absolute;
  bottom: -5px;
  inset-inline-end: -5px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #12320a;
  background: radial-gradient(circle at 35% 30%, #d8ff9a, #58b52a 70%);
  box-shadow: 0 0 0 2px var(--night-800);
}
.rail__badge svg { width: 13px; height: 13px; }
.rail__node b {
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.4;
  color: var(--gold-soft);
}
.rail__node small {
  font-size: .78rem;
  line-height: 1.4;
  color: var(--text-dim);
  white-space: nowrap;
}
.rail__node.is-locked .rail__pic { box-shadow: 0 0 0 1.5px rgba(255, 199, 61, .4), 0 0 0 5px var(--night-800), 0 0 0 6px rgba(255, 199, 61, .16); background: radial-gradient(circle at 40% 30%, #1d2f58, #0b1733); }
.rail__node.is-locked b { color: rgba(255, 230, 140, .6); }
.journey__note {
  margin-top: 14px;
  text-align: center;
  font-size: .95rem;
  color: var(--text-dim);
}

.worlds { display: grid; gap: 34px; }
.world { padding: 26px 26px 32px; text-align: center; }
.world__window {
  position: relative;
  aspect-ratio: 16 / 10;
  margin: 4px 2px 22px;
  overflow: hidden;
  border-radius: 50% 50% 14px 14px / 34% 34% 14px 14px;
  box-shadow:
    0 0 0 3px #e2ae4a,
    0 0 0 7px var(--panel),
    0 0 0 8px rgba(255, 199, 61, .55),
    0 18px 30px -16px rgba(60, 30, 0, .7);
}
.world__window img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transition: transform 1.2s var(--ease); }
.world:hover .world__window img { transform: scale(1.06); }
.world__window::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 240, 200, .1), transparent 40%, rgba(30, 15, 0, .25));
  pointer-events: none;
}
.world__badge {
  display: inline-block;
  padding: 1px 14px;
  margin-bottom: 4px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  color: #7a4a14;
  background: rgba(214, 160, 67, .2);
  border: 1px solid rgba(160, 105, 30, .4);
}
.world__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1.35;
  color: #4f240a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}
.world__desc {
  max-width: 340px;
  margin: 6px auto 20px;
  color: var(--ink-soft);
  line-height: 1.8;
}
.tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 320px;
  margin-inline: auto;
}
.tiles li {
  flex: 0 0 calc((100% - 20px) / 3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px 9px;
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 50% 0%, #2c5098 0%, var(--panel) 55%, #0e1d3e 100%);
  box-shadow:
    0 0 0 1.5px #d9a443,
    0 8px 14px -8px rgba(40, 20, 0, .8),
    inset 0 1px 0 rgba(255, 255, 255, .14);
}
.tiles b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.4;
  color: #fff3c4;
  text-shadow: 0 0 10px rgba(255, 199, 61, .75), 0 0 22px rgba(255, 160, 30, .45);
}
.tiles span { font-size: .88rem; font-weight: 500; color: #dbe5ff; line-height: 1.4; }

/* ---------- Chapter 3: heroes ---------- */
.heroes {
  display: grid;
  justify-items: center;
  gap: 26px;
}
.hero-card { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 360px; }
.hero-card > p { margin-top: 38px; color: var(--text-dim); font-size: 1.05rem; }

.portrait { position: relative; width: min(66vw, 270px); margin-top: 60px; }
.portrait__oval {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(10, 21, 48, 0) 50%, rgba(10, 21, 48, .35)),
    url("../img/brand/background.webp") 72% 30% / auto 150% no-repeat;
  box-shadow:
    0 0 0 4px #e9b54c,
    0 0 0 10px #6e3b16,
    0 0 0 12px #d9a443,
    0 0 0 13px rgba(0, 0, 0, .45),
    0 34px 60px -24px rgba(0, 0, 0, .9),
    inset 0 0 40px rgba(0, 20, 60, .35);
}
.portrait__oval img { /* head pops out of the frame, body stays inside the oval */
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: -13%;
  width: 100%;
  height: 113%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 0%;
  border-radius: 0 0 50% 50% / 0 0 44.2% 44.2%;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .35));
}
.portrait--actual .portrait__oval img {
  object-fit: contain;
  object-position: center bottom;
  border-radius: 0;
}
.portrait.portrait--actual::after { display: none; }
.plaque {
  position: absolute;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  min-width: 150px;
  padding: 6px 30px 8px;
  border-radius: 14px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.3;
  white-space: nowrap;
  color: #fff0c8;
  text-shadow: 0 2px 0 rgba(50, 20, 0, .8);
  background:
    repeating-linear-gradient(176deg, rgba(0, 0, 0, 0) 0 7px, rgba(70, 30, 5, .12) 7px 9px),
    linear-gradient(180deg, var(--wood-1), var(--wood-2) 60%, var(--wood-3));
  border: 2px solid #e2ae4a;
  box-shadow: 0 0 0 2px var(--wood-3), 0 14px 22px -10px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 220, 160, .45);
}
.plaque::before, .plaque::after { /* gold nails */
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #c8922f 70%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .5);
}
.plaque::before { left: 10px; }
.plaque::after { right: 10px; }

.heroes__or {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--night-900);
  background: radial-gradient(circle at 35% 30%, #fff3c4, #f0b84a 60%, #b8811f);
  box-shadow: 0 0 0 4px var(--night-800), 0 0 0 5px var(--gold-edge), 0 0 30px rgba(255, 199, 61, .35);
}
/* the in-game 3D look of each hero, standing at the outer lower corner of the painted oval */
.portrait__ingame {
  position: absolute;
  z-index: 2;
  bottom: -14px;
  width: auto;
  height: 54%;
  max-width: none;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .55)) drop-shadow(0 0 16px rgba(255, 199, 61, .22));
  pointer-events: none;
}
.portrait--start .portrait__ingame { inset-inline-start: var(--ingame-out, -24px); }
.portrait--end .portrait__ingame { inset-inline-end: var(--ingame-out, -24px); }
.portrait::after { /* a soft gold pool of light under the small figure */
  content: "";
  position: absolute;
  z-index: 1;
  bottom: -22px;
  width: 26%;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 210, 110, .5), transparent);
  pointer-events: none;
}
.portrait--start::after { inset-inline-start: calc(var(--ingame-out, -24px) - 4px); }
.portrait--end::after { inset-inline-end: calc(var(--ingame-out, -24px) - 4px); }

/* Drake: a third, smaller card */
.hero-mini {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  width: fit-content;
  max-width: 100%;
  margin: 64px auto 0;
  padding: 18px 28px 20px;
  border-radius: 22px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(58, 98, 180, .3), transparent 60%),
    linear-gradient(180deg, #1c3462 0%, var(--panel) 55%, #0f1f42 100%);
  border: 1px solid var(--gold-edge);
  box-shadow: inset 0 0 0 5px rgba(10, 21, 48, .45), inset 0 0 0 6px rgba(255, 199, 61, .14), 0 26px 50px -26px rgba(0, 0, 0, .9);
}
.hero-mini__stage {
  position: relative;
  flex: none;
  width: 74px;
  height: 120px;
}
.hero-mini__stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 92px;
  height: 16px;
  margin-left: -46px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 210, 110, .45), transparent);
}
.hero-mini__fig {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: -2px;
  width: auto;
  height: 210px;
  max-width: none;
  transform: translateX(-50%);
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .55));
}
.hero-mini__body { display: grid; justify-items: start; gap: 10px; padding-bottom: 2px; }
.hero-mini__body p { color: var(--text-dim); font-size: 1.02rem; line-height: 1.7; }
.plaque.plaque--sm {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  min-width: 0;
  padding: 3px 26px 5px;
  font-size: 1.3rem;
}
.plaque--sm::before { left: 8px; }
.plaque--sm::after { right: 8px; }
.heroes__ingame-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  font-size: .92rem;
  line-height: 1.6;
  color: var(--text-dim);
  text-align: center;
}
.heroes__ingame-note svg { width: 18px; height: 18px; flex: none; color: var(--gold-soft); }

/* ---------- Chapter 4: fox thief ---------- */
.chapter--night {
  overflow: hidden;
  background:
    radial-gradient(700px 420px at 80% 20%, rgba(255, 214, 120, .09), transparent 70%),
    linear-gradient(180deg, var(--night-950), #08132c 50%, var(--night-900));
}
.chapter--night::after { /* deeper star field */
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--stars);
  background-size: 190px 190px;
  opacity: .9;
  pointer-events: none;
}
.moon { /* sits on the side opposite the copy, in both directions */
  position: absolute;
  top: 5%;
  inset-inline-end: 4%;
  width: clamp(90px, 13vw, 170px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fffbe8, #ffe9a6 45%, #e9bf62 75%, #c99a3c);
  box-shadow: 0 0 60px rgba(255, 220, 140, .45), 0 0 160px rgba(255, 200, 90, .22);
  opacity: .9;
}
.moon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 62% 58%, rgba(190, 140, 60, .35) 0 9%, transparent 10%),
    radial-gradient(circle at 34% 66%, rgba(190, 140, 60, .28) 0 6%, transparent 7%),
    radial-gradient(circle at 56% 28%, rgba(190, 140, 60, .25) 0 5%, transparent 6%);
}
.fox {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 48px;
  align-items: center;
}
.beats { display: grid; gap: 14px; margin-top: 30px; }
.beats li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(22, 41, 79, .75), rgba(22, 41, 79, .45));
  border: 1px solid rgba(255, 199, 61, .25);
  border-inline-start: 3px solid rgba(255, 199, 61, .7);
}
.beats__n {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding-top: 3px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--night-900);
  background: radial-gradient(circle at 35% 30%, #fff3c4, #f0b84a 60%, #b8811f);
}
.beats h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.4; color: var(--gold-soft); }
.beats p { color: var(--text-dim); line-height: 1.7; }

.wanted {
  position: relative;
  justify-self: center;
  width: min(86vw, 380px);
  padding: 34px 26px 28px;
  text-align: center;
  color: #4a2309;
  border-radius: 8px;
  background:
    var(--paper-grain),
    radial-gradient(140% 100% at 50% 0%, #fff6dc 0%, #f1d9a6 60%, #ddb874 100%);
  box-shadow:
    inset 0 0 0 2px rgba(120, 70, 20, .35),
    inset 0 0 0 9px rgba(255, 246, 220, .5),
    inset 0 0 0 10px rgba(150, 95, 30, .4),
    inset 0 0 60px rgba(150, 90, 20, .35),
    0 40px 70px -26px rgba(0, 0, 0, .95);
  rotate: -2.5deg;
}
.wanted__pin {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9a7a, #c0392b 60%, #7a1d12);
  box-shadow: 0 6px 8px rgba(0, 0, 0, .5), inset 0 -2px 3px rgba(0, 0, 0, .3);
}
.wanted__title {
  font-family: var(--font-logo);
  font-size: clamp(3rem, 12vw, 4.2rem);
  line-height: 1.15;
  color: #8a2a10;
  text-shadow: 0 2px 0 rgba(255, 240, 210, .9), 0 -1px 0 rgba(80, 20, 0, .3);
}
html[lang="en"] .wanted__title { font-family: var(--font-display); font-weight: 700; }
.wanted__pic {
  position: relative;
  margin: 10px auto 14px;
  padding: 14px;
  width: 86%;
  border-radius: 6px;
  background: radial-gradient(circle at 50% 40%, #fff3d0, #ecd09a);
  box-shadow: inset 0 0 0 2px rgba(120, 70, 20, .45), inset 0 0 30px rgba(150, 95, 30, .35);
}
.wanted__pic img { width: 100%; filter: drop-shadow(0 10px 10px rgba(80, 40, 0, .35)); }
.wanted__letter { /* the stolen letter: a dark tile like the world tiles, so it reads on the cream poster */
  position: absolute;
  top: 6%;
  right: 6%;
  padding: 0 12px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1.4;
  color: var(--gold-soft);
  background: linear-gradient(#1f3a72, #16294f);
  border: 2px solid rgba(255, 199, 61, .6);
  text-shadow: 0 0 10px rgba(255, 199, 61, .7);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
  animation: floaty 3.6s ease-in-out infinite;
}
.wanted figcaption { display: grid; gap: 6px; }
.wanted__sub { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: #5a2c0c; }
.wanted__reward {
  justify-self: center;
  padding: 4px 18px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold-soft);
  background: linear-gradient(180deg, #24427e, var(--panel));
  box-shadow: 0 0 0 2px #d9a443;
}

/* ---------- Chapter 5: online ---------- */
.online { display: grid; gap: 40px; align-items: center; }
.online__device { position: relative; padding: 0 6px 62px; }
.device {
  position: relative;
  aspect-ratio: 16 / 9;
  padding: 10px;
  border-radius: 28px;
  background: linear-gradient(160deg, #1d2742, #070c1c 60%, #141c33);
  box-shadow:
    0 0 0 2px #e2ae4a,
    0 0 0 5px var(--night-800),
    0 0 0 6px rgba(255, 199, 61, .35),
    0 40px 70px -28px rgba(0, 0, 0, .95),
    inset 0 1px 0 rgba(255, 255, 255, .15);
}
.device::before { /* camera */
  content: "";
  position: absolute;
  top: 50%;
  right: 3px;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: #2b3656;
}
.device img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.race-medal {
  position: absolute;
  top: -28px;
  left: -4px;
  display: grid;
  place-items: center;
  align-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  text-align: center;
  color: #4a2309;
  background: radial-gradient(circle at 36% 30%, #fff7d6, #ffd45f 45%, #d99b2c 75%, #a56b16);
  box-shadow:
    0 0 0 4px var(--night-800),
    0 0 0 5px rgba(255, 199, 61, .6),
    0 18px 30px -10px rgba(0, 0, 0, .8),
    inset 0 -4px 8px rgba(120, 60, 0, .4),
    inset 0 3px 6px rgba(255, 255, 255, .6);
  transform: rotate(-8deg);
}
.race-medal b { font-family: var(--font-logo); font-weight: 400; font-size: 2.4rem; line-height: .95; padding-top: 8px; }
.race-medal span { font-family: var(--font-display); font-weight: 700; font-size: .76rem; line-height: 1.2; }

/* 10-slot goal meter under the device frame */
.race {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  white-space: nowrap;
  background: linear-gradient(180deg, #1c3462, var(--panel) 60%, #10224a);
  border: 1px solid rgba(255, 199, 61, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 16px 30px -14px rgba(0, 0, 0, .9), 0 0 30px -10px rgba(255, 199, 61, .4);
}
.race__label { font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--gold-soft); line-height: 1.4; }
.race__slots { display: flex; gap: 4px; direction: rtl; }
html[dir="ltr"] .race__slots { direction: ltr; }
.race__slots i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255, 199, 61, .45); background: rgba(4, 10, 26, .4); }
.race__slots i.on { background: radial-gradient(circle at 40% 35%, #fff3bf, #ffc73d 60%, #c98a1e); border-color: transparent; box-shadow: 0 0 8px rgba(255, 199, 61, .7); }
.race__count { font-weight: 800; font-size: .95rem; color: #fff; font-variant-numeric: tabular-nums; }

.online__steps { display: grid; gap: 14px; }
.online__steps li { display: flex; align-items: center; gap: 18px; padding: 16px 18px; }
.online__steps h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.4; color: var(--gold-soft); }
.online__steps p { color: var(--text-dim); line-height: 1.65; }
.online__steps b { color: #fff; font-weight: 800; }
.panel--gold {
  border-color: rgba(255, 199, 61, .75);
  box-shadow: 0 0 0 1px rgba(255, 199, 61, .25), 0 0 40px -6px rgba(255, 199, 61, .3), 0 18px 40px -22px rgba(0, 0, 0, .8);
}

.maps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 760px;
  margin: 56px auto 0;
}
.maps li { position: relative; text-align: center; }
.maps img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  border-radius: 50% 50% 12px 12px / 30% 30% 12px 12px;
  box-shadow: 0 0 0 2px #e2ae4a, 0 0 0 5px var(--night-800), 0 0 0 6px rgba(255, 199, 61, .4), 0 16px 28px -14px rgba(0, 0, 0, .9);
}
.maps span {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold-soft);
}

.safety-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 720px;
  margin: 40px auto 0;
  padding: 14px 20px;
  border-radius: 18px;
  text-align: start;
  color: var(--text);
  background: rgba(22, 41, 79, .7);
  border: 1px solid var(--gold-edge);
}
.safety-note svg { flex: none; width: 30px; height: 30px; color: var(--gold-soft); }

/* ---------- Chapter 6: trailer ---------- */
.trailer { overflow: hidden; isolation: isolate; }
.trailer__ambient { /* the poster glows softly behind the frame */
  position: absolute;
  inset: 28% 2% 10%;
  z-index: -1;
  opacity: .45;
  filter: blur(60px) saturate(170%);
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent);
  mask-image: radial-gradient(closest-side, #000 55%, transparent);
  pointer-events: none;
}
.trailer__ambient img { width: 100%; height: 100%; object-fit: cover; }
.cinema { max-width: 1040px; margin-inline: auto; }
.cinema__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: clamp(16px, 2.4vw, 28px);
  overflow: hidden;
  border: 1.5px solid transparent;
  background:
    linear-gradient(#050a18, #050a18) padding-box,
    linear-gradient(135deg, #fff3c4, #c8922f 28%, #ffe08a 50%, #a8741f 72%, #fff0b5) border-box;
  box-shadow:
    0 0 0 8px rgba(255, 199, 61, .05),
    0 50px 120px -40px rgba(0, 0, 0, .95),
    0 0 140px -50px rgba(255, 190, 60, .45);
}
.cinema__video { width: 100%; height: 100%; object-fit: cover; background: #050a18; }
.cinema__cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background:
    radial-gradient(60% 70% at 50% 50%, rgba(6, 13, 34, .15), rgba(6, 13, 34, .7)),
    linear-gradient(0deg, rgba(4, 10, 26, .75), transparent 55%);
  transition: opacity .5s var(--ease);
}
.cinema__play { position: relative; display: grid; place-items: center; }
.cinema__ring { /* pulsing gold ring around the play disc */
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 214, 107, .7);
  animation: ring 2.8s var(--ease) infinite;
}
@keyframes ring {
  0% { transform: scale(.82); opacity: .9; }
  100% { transform: scale(1.3); opacity: 0; }
}
.cinema__disc {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(74px, 11vw, 104px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  border: 3px solid transparent;
  background:
    linear-gradient(180deg, var(--blue-1), var(--blue-3) 62%, var(--blue-4)) padding-box,
    linear-gradient(180deg, #fff3c4, #ffc73d 40%, #a8741f 75%, #ffe08a) border-box;
  box-shadow:
    0 0 0 9px rgba(255, 255, 255, .08),
    0 0 0 10px rgba(255, 230, 140, .25),
    0 0 50px rgba(255, 199, 61, .45),
    inset 0 -8px 14px rgba(0, 28, 90, .5),
    inset 0 2px 0 rgba(255, 255, 255, .4);
  transition: transform .35s var(--ease);
}
.cinema__disc svg { width: 40%; height: 40%; margin-left: 7%; }
.cinema__cover:hover .cinema__disc { transform: scale(1.07); }
/* real trailer poster: its logo sits in the centre, so the play control moves to the lower corner */
.cinema__frame.has-poster .cinema__cover {
  display: grid;
  grid-template-columns: auto auto;
  align-content: end;
  justify-content: start;
  align-items: center;
  column-gap: clamp(12px, 2vw, 18px);
  row-gap: 0;
  padding: 0 clamp(20px, 4.5%, 46px) clamp(16px, 4.5%, 42px);
  text-align: start;
  background: linear-gradient(0deg, rgba(4, 10, 26, .82), rgba(4, 10, 26, .3) 34%, transparent 58%);
}
.has-poster .cinema__play { grid-row: 1 / span 2; }
.has-poster .cinema__disc { width: clamp(46px, 7vw, 84px); }
.has-poster .cinema__ring { inset: -10px; }
.has-poster .cinema__title { margin-top: 0; align-self: end; }
.has-poster .cinema__sub { margin-top: 0; align-self: start; }
@media (max-width: 639px) {
  .has-poster .cinema__title { grid-row: 1 / span 2; align-self: center; font-size: 1.1rem; }
}
@media (max-width: 479px) { /* small frame: the gold play disc alone, clear of the poster's ribbon */
  .has-poster .cinema__title { display: none; }
}
/* the frame clips anything outside it, so the focus ring is drawn inside */
.cinema__cover:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: -8px; border-radius: inherit; }
.cinema__cover:focus-visible .cinema__disc { box-shadow: 0 0 0 4px var(--gold-soft), 0 0 50px rgba(255, 199, 61, .6); }
.cinema__title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  line-height: 1.4;
  color: var(--gold-soft);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
}
.cinema__sub { display: none; margin-top: -8px; font-size: .92rem; color: var(--text-dim); text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.corner { /* thin gold corner brackets */
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
  border: 0 solid rgba(255, 230, 140, .75);
  transition: opacity .5s;
}
.corner--tl { top: 14px; left: 14px; border-top-width: 1.5px; border-left-width: 1.5px; border-top-left-radius: 8px; }
.corner--tr { top: 14px; right: 14px; border-top-width: 1.5px; border-right-width: 1.5px; border-top-right-radius: 8px; }
.corner--bl { bottom: 14px; left: 14px; border-bottom-width: 1.5px; border-left-width: 1.5px; border-bottom-left-radius: 8px; }
.corner--br { bottom: 14px; right: 14px; border-bottom-width: 1.5px; border-right-width: 1.5px; border-bottom-right-radius: 8px; }
.cinema__frame.is-playing .cinema__cover { opacity: 0; pointer-events: none; }
.cinema__frame.is-playing .corner { opacity: 0; }
.cinema__soon {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--gold-soft);
  background: rgba(10, 21, 48, .92);
  border: 1px solid var(--gold-edge);
}
.cinema__soon svg { width: 18px; height: 18px; flex: none; }
.cinema__frame.is-missing .cinema__cover { cursor: default; }
.cinema__frame.is-missing .cinema__play, .cinema__frame.is-missing .cinema__sub { display: none; }

/* ---------- Chapter 7: gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: dense;
  gap: 10px;
}
.gallery li { aspect-ratio: 16 / 9; min-width: 0; }
.gallery .g-big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.shot {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: var(--night-800);
  box-shadow: 0 0 0 1px rgba(255, 199, 61, .35), 0 14px 26px -16px rgba(0, 0, 0, .9);
  transition: box-shadow .3s, transform .3s var(--ease);
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, transparent 55%, rgba(6, 13, 34, .55));
  box-shadow: inset 0 0 0 1px rgba(255, 230, 140, .15);
  transition: opacity .3s;
}
.shot::before {
  content: attr(data-caption);
  content: attr(data-caption) / ""; /* visual only: the image alt already names the shot */
  position: absolute;
  z-index: 1;
  inset-inline-start: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 2px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .82rem;
  line-height: 1.6;
  color: var(--gold-soft);
  background: rgba(10, 21, 48, .82);
  border: 1px solid var(--gold-edge);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .3s, transform .3s;
}
.g-big .shot::before { opacity: 1; transform: none; font-size: .95rem; padding: 3px 14px; inset-inline-start: 14px; bottom: 14px; }
.shot:hover::before, .shot:focus-visible::before { opacity: 1; transform: none; }
@media (hover: none) { .shot::before { opacity: 1; transform: none; } }
.shot:hover { box-shadow: 0 0 0 2px #e2ae4a, 0 0 30px -4px rgba(255, 199, 61, .45), 0 18px 30px -14px rgba(0, 0, 0, .9); }
.shot:hover img { transform: scale(1.05); }

/* ---------- Parents ---------- */
.parents { display: grid; gap: 28px; }
.goals { width: 100%; max-width: 900px; margin-inline: auto; padding: 30px 24px 28px; }
.goals h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.4;
  color: #5a2c0c;
  text-align: center;
  margin-bottom: 16px;
}
.goals ul { display: grid; gap: 12px; }
.goals li { display: flex; align-items: flex-start; gap: 12px; color: var(--ink); line-height: 1.7; }
.goals li svg {
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  padding: 5px;
  border-radius: 50%;
  color: var(--gold-soft);
  background: radial-gradient(circle at 35% 30%, #34589e, var(--panel) 62%, #0c1a38);
  box-shadow: 0 0 0 1.5px #d9a443;
}
.age-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin: 22px auto 0;
  padding: 6px 18px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  color: var(--gold-soft);
  background: linear-gradient(180deg, #24427e, var(--panel));
  box-shadow: 0 0 0 2px #d9a443, 0 10px 18px -10px rgba(60, 30, 0, .8);
  text-wrap: balance;
}
.age-chip svg { flex: none; width: 18px; height: 18px; color: #ff9a7a; }

.trust { display: grid; gap: 16px; }
.trust li { padding: 22px 20px 20px; display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: center; align-content: start; }
.trust .medal { grid-row: span 2; }
.trust h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.4; color: var(--gold-soft); }
.trust p { color: var(--text-dim); line-height: 1.7; }

/* ---------- Install ---------- */
.install { position: relative; display: grid; gap: 26px; }
.install::before { /* dotted gold path */
  content: "";
  position: absolute;
  top: 40px;
  bottom: 40px;
  inset-inline-start: 39px;
  border-inline-start: 2px dotted rgba(255, 199, 61, .55);
}
.install__step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 18px;
  align-items: center;
}
.install__medal {
  position: relative;
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  color: var(--gold-soft);
  background: radial-gradient(circle at 38% 30%, #3a64b2, var(--panel) 60%, #0b1835);
  box-shadow:
    0 0 0 3px #e2ae4a,
    0 0 0 8px var(--night-900),
    0 0 0 9px rgba(255, 199, 61, .4),
    0 16px 26px -12px rgba(0, 0, 0, .9),
    inset 0 3px 8px rgba(255, 255, 255, .15);
}
.install__medal svg { width: 34px; height: 34px; }
.install__medal i {
  position: absolute;
  top: -6px;
  inset-inline-end: -6px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  padding-top: 2px;
  font-style: normal;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  color: var(--night-900);
  background: radial-gradient(circle at 35% 30%, #fff3c4, #f0b84a 60%, #b8811f);
  box-shadow: 0 0 0 2px var(--night-900);
}
.install__step h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.22rem; line-height: 1.4; color: var(--gold-soft); align-self: end; }
.install__step p { color: var(--text-dim); line-height: 1.7; align-self: start; }

.install__note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 820px;
  margin: 48px auto 0;
  padding: 30px 28px;
}
.install__note p { line-height: 1.85; color: var(--ink); }
.install__note b { color: #7a3a0e; }
.install__note-icon { flex: none; width: 40px; height: 40px; color: #8a5a1c; }

.reqs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.reqs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 500;
  color: var(--text);
  background: rgba(22, 41, 79, .75);
  border: 1px solid var(--gold-edge);
}
.reqs svg { width: 20px; height: 20px; color: var(--gold-soft); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq__item {
  border-radius: 18px;
  background: linear-gradient(180deg, #1a305c, var(--panel));
  border: 1px solid rgba(255, 199, 61, .3);
  box-shadow: 0 14px 30px -20px rgba(0, 0, 0, .9);
  transition: border-color .3s, box-shadow .3s;
}
.faq__item[open] { border-color: rgba(255, 199, 61, .65); box-shadow: 0 0 30px -10px rgba(255, 199, 61, .3), 0 14px 30px -20px rgba(0, 0, 0, .9); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 60px;
  padding: 12px 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.5;
  color: var(--gold-soft);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary svg {
  flex: none;
  width: 30px;
  height: 30px;
  padding: 5px;
  border-radius: 50%;
  border: 1px solid var(--gold-edge);
  transition: transform .3s var(--ease);
}
.faq__item[open] summary svg { transform: rotate(180deg); }
.faq__item p { padding: 0 20px 20px; color: var(--text-dim); line-height: 1.85; }

/* ---------- Finale: the cast around the sign ---------- */
.finale {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(80px, 11vw, 140px) clamp(72px, 8vw, 104px);
  text-align: center;
}
.finale__bg { position: absolute; inset: 0; z-index: -1; }
.finale__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.finale__bg::before { /* night-blue wash keeps the painting but darkens it */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #1b3a78, #0e2152);
  mix-blend-mode: multiply;
  opacity: .72;
}
.finale__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--night-900) 0%, rgba(6, 13, 34, .35) 26%, rgba(6, 13, 34, .5) 68%, var(--night-950) 100%),
    radial-gradient(70% 60% at 50% 55%, rgba(6, 13, 34, .15), rgba(6, 13, 34, .75));
}
.finale__inner { display: grid; justify-items: center; }
.finale__cast {
  position: relative;
  width: min(100%, 520px);
  height: 228px;
  margin-bottom: 10px;
}
.finale__sign {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  width: 196px;
  aspect-ratio: 815 / 757;
  transform: translateX(-50%);
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .6));
  animation: sway 7s ease-in-out infinite;
}
@keyframes sway {
  0%, 100% { transform: translateX(-50%); }
  50% { transform: translateX(-50%) rotate(-1.5deg) translateY(-4px); }
}
.finale__sign img { position: absolute; inset: 0; width: 100%; height: 100%; }
.finale__sign-word {
  position: relative;
  font-family: var(--font-logo);
  font-size: 3.2rem;
  line-height: 1.2;
  padding-top: 6px;
  color: #6a3410;
  text-shadow: 0 1.5px 0 rgba(255, 246, 220, .85);
}
.finale__sign-en {
  position: relative;
  margin-top: -4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  color: #7a4317;
}
.cast { position: absolute; height: auto; filter: drop-shadow(0 20px 26px rgba(0, 0, 0, .55)); }
.cast--girl, .cast--boy {
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 98%);
  mask-image: linear-gradient(180deg, #000 70%, transparent 98%);
}
.cast--girl { width: 112px; bottom: 0; right: 0; }
.cast--boy { width: 106px; bottom: 0; left: 0; }
.cast--fox { width: 84px; bottom: -6px; left: 27%; z-index: 3; }
.cast--bird { width: 64px; top: 4px; right: 13%; z-index: 3; animation: bob 5s ease-in-out infinite; }
.finale .flourish { margin-top: 6px; }
.finale__title {
  max-width: 16em;
  margin-top: 6px;
  font-size: clamp(1.8rem, 6vw, 3.3rem);
  text-wrap: balance;
}
.finale__lead { max-width: 34em; margin: 10px auto 0; color: #e3eaff; text-shadow: 0 1px 14px rgba(0, 0, 0, .8); }
.finale__cta { display: grid; justify-items: center; gap: 10px; width: 100%; margin-top: 28px; }
.finale__free {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--gold-soft);
}
.finale__free svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; color: var(--night-900); background: var(--gold-soft); }
.finale__help {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--text-dim);
  font-weight: 700;
  text-underline-offset: 6px;
}
.finale__help:hover { color: var(--gold-soft); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  padding: 44px 0 36px;
  background: var(--night-950);
  border-top: 1px solid var(--gold-edge);
}
.site-footer__inner { display: grid; gap: 20px; justify-items: center; text-align: center; }
.site-footer__brand { display: grid; justify-items: center; gap: 8px; }
.brand__sign--lg { width: 84px; }
.brand__sign--lg .brand__word { font-size: 1.55rem; }
.site-footer__brand p { color: var(--text-dim); font-size: .95rem; }
.site-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 12px;
  text-decoration: none;
  color: var(--text-dim);
}
.site-footer__links a:hover { color: var(--gold-soft); }
.site-footer__copy { color: #93a2c6; font-size: .9rem; }
@media (max-width: 759px) { /* room for the sticky download dock, which stays up at the very bottom */
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* ---------- Mobile dock ---------- */
.dock {
  position: fixed;
  inset: auto 10px calc(10px + env(safe-area-inset-bottom)) 10px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px;
  padding-inline-start: 18px;
  border-radius: 999px;
  background: rgba(10, 21, 48, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--gold-edge);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .9);
  transform: translateY(140%);
  transition: transform .45s var(--ease);
}
.dock.is-visible { transform: none; }
.dock__text { display: grid; min-width: 0; line-height: 1.3; }
.dock__text b { font-family: var(--font-logo); font-weight: 400; font-size: 1.3rem; color: var(--gold-soft); line-height: 1.2; padding-top: 3px; }
.dock__meta { display: inline-flex; align-items: center; font-size: .8rem; font-weight: 700; color: #fff; white-space: nowrap; }
.dock__meta i { font-style: normal; opacity: .6; margin-inline: 5px; }
.dock__free { font-size: .74rem; color: var(--text-dim); white-space: nowrap; }
.btn-apk.btn-apk--dock { --h: 54px; flex: none; padding: 4px 18px 4px 8px; gap: 10px; }
html[dir="rtl"] .btn-apk.btn-apk--dock { padding: 4px 8px 4px 18px; }
.btn-apk--dock .btn-apk__icon { width: 38px; height: 38px; }
.btn-apk--dock .btn-apk__icon svg { width: 22px; height: 22px; }
.btn-apk--dock .btn-apk__label { font-size: 1.15rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(calc(100% - 24px), 560px);
  padding: 14px;
  padding-inline-start: 18px;
  border-radius: 18px;
  color: var(--ink);
  background: linear-gradient(180deg, #fffaf0, #f3dfb6);
  border: 2px solid #d9a443;
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .9);
  transform: translateX(-50%);
  animation: toastIn .45s var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px); } }
.toast > svg { flex: none; width: 26px; height: 26px; color: #b8811f; }
.toast p { flex: 1; line-height: 1.6; font-size: .95rem; }
.toast a { color: #0a61c7; font-weight: 700; }
.toast__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(120, 70, 20, .1);
  cursor: pointer;
}
.toast__close svg { width: 20px; height: 20px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 16px;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 9, 24, .92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox__figure { position: relative; width: min(100%, 1280px, calc((100vh - 150px) * 1.7778)); animation: lbIn .35s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: scale(.97); } }
.lightbox__frame {
  border-radius: 16px;
  overflow: hidden;
  background: var(--night-800);
  box-shadow: 0 0 0 1.5px #e2ae4a, 0 40px 80px -20px rgba(0, 0, 0, 1);
  margin: 8px;
}
.lightbox__img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #050a18; }
.lightbox__cap {
  margin-top: 16px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--gold-soft);
}
.lightbox__count { color: var(--text-dim); font-family: var(--font-body); font-size: .9rem; margin-inline-start: 8px; }
.lb-btn {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #d9a443;
  background: rgba(16, 32, 66, .9);
  color: var(--gold-soft);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.lb-btn:hover { background: #1d3566; transform: scale(1.06); }
.lb-btn svg { width: 24px; height: 24px; }
.lb-btn--close { top: 14px; inset-inline-end: 14px; }
.lb-btn--prev, .lb-btn--next { top: 50%; margin-top: -26px; }
.lb-btn--prev { inset-inline-start: 10px; }
.lb-btn--next { inset-inline-end: 10px; }
/* the arrow glyph points left; flip according to direction */
html[dir="rtl"] .lb-btn--prev svg { transform: scaleX(-1); }
html[dir="ltr"] .lb-btn--next svg { transform: scaleX(-1); }
@media (max-width: 699px) {
  .lb-btn--prev, .lb-btn--next { top: auto; bottom: 18px; margin-top: 0; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 399px) {
  /* keep the APK meta on one clean line on small phones */
  .meta-lbl { display: none; }
  .meta-ver::before { content: "v"; }
  .btn-apk__meta { font-size: .74rem; }
  .btn-apk__meta i { margin-inline: 4px; }
  .btn-apk { gap: 12px; padding-inline: 16px; }
  .btn-apk.btn-apk--xl { padding-inline: 16px; }
  .stats__band span { font-size: .8rem; }
  .finale__title { font-size: 1.7rem; }
  .finale__cast { height: 200px; }
  .finale__sign { width: 168px; }
  .finale__sign-word { font-size: 2.75rem; }
  .finale__sign-en { font-size: .9rem; }
  .cast--girl { width: 104px; }
  .cast--boy { width: 98px; }
  .cast--fox { width: 74px; left: 24%; }
  .cast--bird { width: 56px; right: 17%; }
  .dock__free { display: none; }
}

@media (max-width: 480px) {
  .reqs { gap: 8px; }
  .reqs li { padding: 6px 12px; font-size: .9rem; gap: 6px; }
  .reqs svg { width: 18px; height: 18px; }
  .age-chip { font-size: .92rem; border-radius: 16px; padding: 6px 14px; }
  .goals { padding: 28px 20px 26px; }
  /* heroes side by side with smaller ovals */
  .heroes { grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; }
  .hero-card > p { margin-top: 32px; font-size: .9rem; line-height: 1.6; }
  .portrait { width: 100%; margin-top: 34px; }
  .portrait__oval {
    box-shadow:
      0 0 0 3px #e9b54c,
      0 0 0 7px #6e3b16,
      0 0 0 9px #d9a443,
      0 24px 40px -20px rgba(0, 0, 0, .9),
      inset 0 0 30px rgba(0, 20, 60, .35);
  }
  .plaque { min-width: 0; font-size: 1.2rem; padding: 4px 22px 6px; bottom: -20px; }
  .plaque::before { left: 7px; }
  .plaque::after { right: 7px; }
  .heroes__or { width: 40px; height: 40px; font-size: .95rem; margin-top: 110px; }
  .portrait { --ingame-out: -10px; }
  .portrait__ingame { bottom: -10px; height: 50%; }
  .portrait::after { display: none; }
  .hero-mini { margin-top: 52px; gap: 14px; padding: 16px 18px 18px; }
  .hero-mini__stage { width: 62px; height: 104px; }
  .hero-mini__fig { height: 180px; }
  .hero-mini__body p { font-size: .95rem; }

  .helpers__list li { font-size: .9rem; }
  .step { padding-inline-start: 78px; padding-inline-end: 18px; }
  .step__num { inset-inline-start: 18px; width: 44px; height: 44px; font-size: 1.3rem; }
  .world { padding: 22px 18px 28px; }
  .rail { padding-inline: 4px; }
  .rail__pic { width: 46px; height: 46px; }
  .rail::before, .rail::after { top: calc(18px + 23px); }
  .rail__node b { font-size: .88rem; }
  .rail__node small { font-size: .72rem; }
  .race { padding: 8px 12px; gap: 8px; }
  .race__slots i { width: 10px; height: 10px; }
  .race-medal { width: 84px; height: 84px; top: -30px; }
  .race-medal b { font-size: 2.1rem; }
  .race-medal span { font-size: .7rem; }
}

/* tablets in portrait: keep the two heroes side by side, as on phones and desktop */
@media (min-width: 481px) and (max-width: 899px) {
  .heroes { grid-template-columns: 1fr auto 1fr; align-items: start; gap: 16px; }
  .portrait { width: 100%; max-width: 270px; }
  .heroes__or { margin-top: 130px; }
}

/* phones: give the fox thief and the chick their own strip between the plaque and the stats band */
@media (max-width: 639px) {
  .hero { padding-bottom: 120px; }
  .hero__fox { bottom: 52px; width: 84px; }
  .hero__fox-letter { top: 2%; left: -34%; } /* beside its head, not hidden under the plaque */
  .hero__chick { bottom: 56px; }
}

@media (min-width: 420px) {
  .cta-row .btn-apk { width: auto; }
  .btn-apk { padding: 8px 26px 8px 30px; }
  html[dir="rtl"] .btn-apk { padding: 8px 30px 8px 26px; }
  .btn-apk__meta { font-size: .82rem; }
}

@media (min-width: 640px) {
  .container { padding-inline: 24px; }
  .title-sign { width: min(46vw, 320px); }
  .hero__plaque { padding: 28px 34px 22px; }
  .hero__tagline { font-size: 1.1rem; }
  .gl-5, .gl-6 { display: block; }
  .hero__bird { display: block; }
  .stats__band { grid-template-columns: repeat(5, 1fr); padding: 6px; }
  .stats__band li, .stats__band li:nth-child(4), .stats__band li:nth-child(5) { grid-column: auto; padding: 18px 8px 16px; }
  .stats__band li::before { display: none; }
  .stats__band li:not(:last-child)::after {
    content: "";
    position: absolute;
    inset-inline-end: 0;
    top: 24%;
    bottom: 24%;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--gold-line), transparent);
  }
  .stats__band li:nth-child(3)::after { display: block; }
  .stats__band span { font-size: .9rem; }
  .helper-medal { width: 84px; height: 84px; }
  .helper-medal img { width: 58px; height: 58px; }
  .rail { padding: 22px 18px 18px; }
  .rail__pic { width: 64px; height: 64px; }
  .rail::before, .rail::after { top: calc(22px + 32px); }
  .rail__node b { font-size: 1.05rem; }
  .rail__node small { font-size: .85rem; }
  .rail__badge { width: 24px; height: 24px; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .trust li { grid-template-columns: 1fr; justify-items: center; text-align: center; row-gap: 10px; }
  .trust .medal { grid-row: auto; margin-bottom: 6px; }
  .maps { gap: 24px; }
  .gallery { gap: 14px; }
  .cinema__sub { display: block; }
  .goals { padding: 36px 40px 32px; }
  .finale__cast { width: min(100%, 680px); height: 290px; }
  .finale__sign { width: 250px; }
  .finale__sign-word { font-size: 4rem; }
  .finale__sign-en { font-size: 1.15rem; }
  .cast--girl { width: 160px; right: 3%; }
  .cast--boy { width: 150px; left: 3%; }
  .cast--fox { width: 108px; left: 26%; }
  .cast--bird { width: 80px; right: 22%; }
}

@media (min-width: 760px) {
  .dock { display: none; }
  .btn-mini { display: inline-flex; }
}

@media (min-width: 900px) {
  :root { --header-h: 76px; }
  .container { padding-inline: 32px; }
  .site-header__inner { padding-inline: 28px; }
  .brand__sign { width: 66px; }
  .brand__word { font-size: 1.22rem; }
  .brand__sub { display: block; }

  .hero { padding-bottom: 96px; }
  .title-sign { width: clamp(300px, 27vw, 390px); }
  .hero__plaque { margin-top: 36px; padding: 30px 44px 22px; }
  .hero__tagline { font-size: 1.18rem; }
  .gl-1 { top: 20%; left: 12%; font-size: 72px; }
  .gl-2 { top: 22%; right: 13%; font-size: 60px; }
  .gl-3 { top: 52%; left: 19%; font-size: 44px; }
  .gl-4 { top: 48%; right: 20%; font-size: 50px; }
  .gl-5 { top: 70%; right: 26%; font-size: 36px; }
  .gl-6 { top: 11%; left: 34%; font-size: 30px; }
  .gl-7, .gl-8 { display: block; }
  .gl-7 { top: 72%; left: 27%; font-size: 32px; }
  .gl-8 { top: 10%; right: 33%; font-size: 28px; }
  .hero__bird { top: 15%; left: 24%; }
  .hero__peek { display: block; }
  /* anchored to the centred 720px plaque: they stand just outside it at every width */
  .hero__fox { right: auto; left: max(6px, calc(50% - 368px - clamp(92px, 11vw, 180px))); bottom: 70px; }
  .hero__chick { right: auto; left: calc(50% + 372px); bottom: 76px; }
  .stats { margin-top: -64px; }

  .how { grid-template-columns: 1.15fr .85fr; gap: 48px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 20px; }
  .step { display: flex; flex-direction: column; align-items: center; padding: 90px 26px 26px; text-align: center; }
  .step__num { inset-inline-start: 50%; transform: translateX(50%); top: 24px; }
  html[dir="ltr"] .step__num { transform: translateX(-50%); }
  .step p { flex: 1; }
  .helpers { padding: 34px 28px 36px; }
  .helpers__list { grid-template-columns: repeat(6, 1fr); }

  .worlds { grid-template-columns: repeat(3, 1fr); gap: 30px; }
  .rail__pic { width: 76px; height: 76px; }
  .rail::before, .rail::after { top: calc(22px + 38px); }

  .heroes { grid-template-columns: 1fr auto 1fr; align-items: start; gap: 40px; max-width: 960px; margin-inline: auto; }
  .heroes__or { margin-top: 150px; }
  .portrait { --ingame-out: -46px; }

  .fox { grid-template-columns: 1.1fr .9fr; gap: 60px; }

  .online { grid-template-columns: 1.15fr .85fr; gap: 56px; }
  .race-medal { width: 124px; height: 124px; left: -22px; top: -40px; }
  .race-medal b { font-size: 3.1rem; }
  .race-medal span { font-size: .84rem; }
  .race { padding: 10px 20px; gap: 12px; }
  .race__slots { gap: 5px; }
  .race__slots i { width: 14px; height: 14px; }

  .gallery { grid-template-columns: repeat(4, 1fr); gap: 16px; }

  .parents { gap: 36px; }
  .goals ul { grid-template-columns: 1fr 1fr; gap: 14px 34px; }
  .trust { grid-template-columns: repeat(3, 1fr); gap: 20px; }

  .install { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .install::before {
    top: 40px;
    bottom: auto;
    inset-inline: 12.5%;
    border-inline-start: 0;
    border-top: 2px dotted rgba(255, 199, 61, .55);
  }
  .install__step { grid-template-columns: 1fr; justify-items: center; align-content: start; text-align: center; row-gap: 14px; }
  .install__medal { grid-row: auto; margin-bottom: 6px; }
  .install__step h3 { align-self: auto; }

  .finale__cast { width: min(100%, 780px); height: 330px; }
  .finale__sign { width: 290px; }
  .finale__sign-word { font-size: 4.6rem; }
  .cast--girl { width: 196px; right: 2%; }
  .cast--boy { width: 186px; left: 2%; }
  .cast--fox { width: 124px; left: 25%; }
  .cast--bird { width: 92px; right: 24%; }
}

@media (min-width: 1100px) {
  .nav { display: block; }
  .menu-btn, .mnav { display: none !important; }
  .site-header__actions { margin-inline-start: 0; }
  .hero__peek { width: clamp(200px, 15vw, 250px); }
}

/* below 1366px there is no room for the kids beside the fox and the chick */
@media (min-width: 900px) and (max-width: 1365px) {
  .hero__peek { display: none; }
}

/* English nav is wider: drop the subtitle until the full row fits */
@media (min-width: 1100px) and (max-width: 1239px) {
  html[lang="en"] .brand__sub { display: none; }
}

/* short landscape screens: keep the CTA in view */
@media (min-width: 900px) and (max-height: 760px) {
  .title-sign { width: 270px; }
  .hero__plaque { margin-top: 30px; padding-block: 22px 18px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  .btn-apk::after, .cinema__ring { display: none; }
}

/* ---------- ?shot QA mode: everything visible, nothing moving ---------- */
html.is-shot *, html.is-shot *::before, html.is-shot *::after {
  animation: none !important;
  transition: none !important;
}
html.is-shot .reveal { opacity: 1 !important; transform: none !important; }
html.is-shot .btn-apk::after, html.is-shot .cinema__ring { display: none; }
html.is-shot .dock { display: none; }
.cinema__frame.is-missing .cinema__title { display: none; }
.cinema__frame.is-missing .cinema__soon { bottom: 50%; transform: translate(-50%, 50%); }
@media (max-width: 519px) {
  .finale__cta .btn-apk { width: min(100%, 420px); justify-content: center; }
}
