/* ==========================================================
   NullStone Online — nullstoneonline.com
   ========================================================== */

:root {
  --night: #070b1f;
  --navy: #0c1436;
  --indigo: #16235c;
  --sky: #3f7fe6;
  --sky-light: #9cc8ff;
  --cream: #fdf1e2;
  --gold: #f3d9a4;
  --cape: #e0483a;
  --lavender: #b9a7ff;

  --text: #cdd6f4;
  --muted: #8f9bc6;
  --line: rgba(156, 200, 255, .16);
  --panel: rgba(22, 35, 92, .38);

  --display: "Marcellus", "Palatino Linotype", Palatino, Georgia, serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--cream); color: var(--night); padding: 10px 16px; border-radius: 10px;
  font-weight: 700; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 16px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { --wrap: 780px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px;
  font: 700 16px/1 var(--body); letter-spacing: .02em; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
}
.btn svg { width: 18px; height: 18px; stroke-width: 2.2; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary {
  background: linear-gradient(180deg, #fff9f0, var(--gold));
  color: #1a1638;
  box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset, 0 8px 30px rgba(243, 217, 164, .28);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255,255,255,.6) inset, 0 12px 40px rgba(243, 217, 164, .45); }
.btn--ghost { border-color: rgba(253, 241, 226, .35); color: var(--cream); background: rgba(7, 11, 31, .35); backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: var(--cream); background: rgba(253, 241, 226, .08); transform: translateY(-2px); }
.btn--sm { padding: 11px 20px; font-size: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: border-color .3s;
  border-bottom: 1px solid transparent;
}
/* blur lives on a pseudo-element so the fixed mobile menu isn't trapped inside the bar */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -2; opacity: 0; transition: opacity .3s;
  background: rgba(7, 11, 31, .78);
  backdrop-filter: blur(14px) saturate(1.3);
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav.is-stuck::before { opacity: 1; }
.nav__inner {
  max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--cream); text-shadow: 0 1px 12px rgba(7, 11, 31, .6); }
.brand__star { width: 14px; height: 14px; align-self: center; color: var(--gold); }
.brand__name { font: 400 22px/1 var(--display); letter-spacing: .01em; }
.brand__sub { font: 400 11px/1 var(--display); letter-spacing: .34em; text-transform: uppercase; opacity: .8; }

.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.nav__links a:not(.btn) {
  position: relative; text-decoration: none; font-size: 15px; font-weight: 600; color: var(--cream);
  text-shadow: 0 1px 10px rgba(7, 11, 31, .7); opacity: .88; transition: opacity .2s;
}
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--gold);
  transform: scaleX(0); transition: transform .3s var(--ease);
}
.nav__links a:not(.btn):hover { opacity: 1; }
.nav__links a:not(.btn):hover::after { transform: scaleX(1); }

.nav__toggle { display: none; width: 44px; height: 44px; background: none; border: 0; padding: 0; cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--cream); border-radius: 2px; transition: transform .3s var(--ease), top .3s var(--ease); }
.nav__toggle span:nth-child(1) { top: 17px; }
.nav__toggle span:nth-child(2) { top: 26px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: 28px;
    background: rgba(7, 11, 31, .96); backdrop-filter: blur(16px);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; }
  .nav__links a:not(.btn) { font: 400 28px/1 var(--display); }
}

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero__art {
  position: relative; overflow: hidden;
  height: min(80svh, 80vw); min-height: 300px;
  background: #2f66c8;
}
.hero__art img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%;
}
.hero__art::before {            /* top shade so the nav stays readable */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 140px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 11, 31, .55), transparent);
}
.hero__art::after {             /* fade into the page */
  content: ""; position: absolute; inset: auto 0 0 0; height: 36%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(7, 11, 31, .6) 55%, var(--night) 97%);
}
#sparkles { position: absolute; top: 0; left: 0; width: 100%; height: 100vh; z-index: 40; pointer-events: none; }

.hero__art::after { height: 16%; background: linear-gradient(180deg, transparent, var(--night)); }

/* Headline band: sits on the dark page background, below the image */
.hero__content {
  position: relative; z-index: 3;
  padding: clamp(14px, 3vw, 22px) 16px clamp(18px, 4vw, 30px);
  text-align: center; background: var(--night);
}
.hero__title { margin: 0; font: 400 clamp(20px, 6.4vw, 44px)/1.15 var(--display); letter-spacing: -.005em; }
.hero__first { display: block; color: var(--gold); }
.hero__genre {
  display: block;
  background: linear-gradient(100deg, var(--cream) 0%, var(--cream) 38%, #fff 46%, var(--sky-light) 50%, #fff 54%, var(--cream) 62%, var(--cream) 100%);
  background-size: 260% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen { 0%, 35% { background-position: 100% 0; } 75%, 100% { background-position: 0 0; } }

/* Wide screens: image + headline band together fill exactly the first screen, headline on one line */
@media (min-aspect-ratio: 5/4) {
  .hero { height: 100svh; min-height: 420px; display: flex; flex-direction: column; }
  .hero__art { flex: 1; height: auto; min-height: 0; }
  .hero__content { flex: none; padding: clamp(12px, 2.4vh, 24px) 16px clamp(16px, 3.4vh, 34px); }
  .hero__title { white-space: nowrap; font-size: clamp(20px, 3.7vw, 58px); }
  .hero__first, .hero__genre { display: inline; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(56px, 7vw, 100px) 0; }

.kicker {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font: 400 13px/1 var(--display); letter-spacing: .38em; text-transform: uppercase; color: var(--gold);
}
.kicker::before, .kicker::after { content: ""; width: clamp(28px, 6vw, 72px); height: 1px; }
.kicker::before { background: linear-gradient(90deg, transparent, var(--gold)); }
.kicker::after { background: linear-gradient(270deg, transparent, var(--gold)); }

.title {
  margin-top: 20px; text-align: center;
  font: 400 clamp(30px, 4.4vw, 54px)/1.12 var(--display); color: var(--cream); text-wrap: balance;
}

/* ---------- Features: the game loop, acted out (ore → trees → creatures → forge → level up) ---------- */
.features { padding-top: clamp(16px, 3vw, 40px); overflow: hidden; }
.loop {
  --dur: 2.4s;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); align-items: center;
  column-gap: clamp(20px, 5vw, 72px); row-gap: clamp(18px, 3vw, 34px);
}
.loop__count { font: 400 15px/1 var(--display); letter-spacing: .24em; color: var(--muted); }
.loop__count span { color: var(--accent); transition: color .4s; }
.loop__title {
  margin-top: 14px; font: 400 clamp(44px, 8.2vw, 116px)/.98 var(--display); letter-spacing: -.015em; color: var(--cream);
  text-shadow: 0 0 60px color-mix(in srgb, var(--accent) 60%, transparent);
  animation: titleIn .55s var(--ease) both;
}
.loop__sub {
  margin-top: clamp(12px, 1.6vw, 22px); font: 400 clamp(15px, 1.7vw, 22px)/1.2 var(--display); letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); animation: titleIn .55s .08s var(--ease) both;
}
@keyframes titleIn { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } }

.loop__stage { position: relative; aspect-ratio: 240 / 200; }
.loop__stage::before {          /* coloured glow behind the scene */
  content: ""; position: absolute; inset: -6% -10%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 30%, transparent), transparent);
}
.scene { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; stroke: none; opacity: 0; }   /* leaves instantly, so a felled tree never pops back */
.scene.is-active { opacity: 1; transition: opacity .35s; }
.scene text { font-family: var(--display); text-anchor: middle; }
.a-loot { font-size: 22px; fill: var(--accent); opacity: 0; paint-order: stroke; stroke: rgba(7, 11, 31, .85); stroke-width: 5px; stroke-linejoin: round; }
.a-dmg { font-size: 21px; fill: #fff; opacity: 0; paint-order: stroke; stroke: rgba(7, 11, 31, .85); stroke-width: 4px; stroke-linejoin: round; }
.a-dmg.d3 { font-size: 27px; fill: #ffd95e; }
.lv-label { font-size: 13px; letter-spacing: 4px; fill: var(--muted); }
.lv-num { font-size: 56px; fill: var(--cream); }

/* ----- tiers: every level-up brings better ore, bigger trees, tougher creatures, better gear ----- */
.t2, .t3, .t4 { display: none; }
.loop[data-tier="1"] { --ore-a:#e0955a; --ore-b:#f6c19a; --ore-c:#b86a35; --leaf-a:#5aa84a; --leaf-b:#79c860; --leaf-c:#a5e07e; --tree:.72; --mob:#8fe08a; --mob-l:#d8ffd2; --mob-d:#4f9e4a; --eye:#141a44; --brow:#141a44; --mob-size:.72; --blade:.55; --tool:#9aa3bd; --metal:#e0955a; }
.loop[data-tier="2"] { --ore-a:#a9bfe2; --ore-b:#e3ecfb; --ore-c:#7088b5; --leaf-a:#3f8f3f; --leaf-b:#58ad4c; --leaf-c:#86cf62; --tree:.92; --mob:#b9a7ff; --mob-l:#e6deff; --mob-d:#7a63d6; --eye:#141a44; --brow:#141a44; --mob-size:.92; --blade:.78; --tool:#e0955a; --metal:#cfdcf2; }
.loop[data-tier="3"] { --ore-a:#f5c542; --ore-b:#fff0b0; --ore-c:#d99a1c; --leaf-a:#1f6f5c; --leaf-b:#2f927a; --leaf-c:#56c2a0; --tree:1.1; --mob:#ff7a6b; --mob-l:#ffd0c8; --mob-d:#b83a2e; --eye:#2a0a12; --brow:#2a0a12; --mob-size:1.1; --blade:.94; --tool:#cfdcf2; --metal:#f7cf4f; }
.loop[data-tier="4"] { --ore-a:#a98bff; --ore-b:#ecdfff; --ore-c:#6fd3ff; --leaf-a:#8a4fd0; --leaf-b:#c477f0; --leaf-c:#ffb1e6; --tree:1.24; --mob:#3a2d78; --mob-l:#b79bff; --mob-d:#1c1446; --eye:#ff3b5c; --brow:#ff9aa9; --mob-size:1.26; --blade:1.06; --tool:#f7cf4f; --metal:#b79bff; }
.loop[data-tier="5"] { --ore-a:#a98bff; --ore-b:#ecdfff; --ore-c:#6fd3ff; --leaf-a:#8a4fd0; --leaf-b:#c477f0; --leaf-c:#ffb1e6; --tree:1.24; --mob:#3a2d78; --mob-l:#b79bff; --mob-d:#1c1446; --eye:#ff3b5c; --brow:#ff9aa9; --mob-size:1.26; --blade:1.06; --tool:#b79bff; --metal:#b79bff; }
.loop[data-tier="2"] .t2, .loop[data-tier="3"] .t2, .loop[data-tier="4"] .t2, .loop[data-tier="5"] .t2 { display: inline; }
.loop[data-tier="3"] .t3, .loop[data-tier="4"] .t3, .loop[data-tier="5"] .t3 { display: inline; }
.loop[data-tier="4"] .t4, .loop[data-tier="5"] .t4 { display: inline; }
.tree-size { transform: scale(var(--tree)); transition: transform .6s var(--ease); }
.mob-size { transform: scale(var(--mob-size)); transition: transform .6s var(--ease); }
.a-heat { transform: scaleX(var(--blade)); }
.loop[data-tier="4"] .a-break, .loop[data-tier="5"] .a-break { filter: drop-shadow(0 0 10px var(--ore-a)); }

/* ----- scene animation: three hits at 12.5% / 41.6% / 70.8% of --dur, then a payoff ----- */
.scene.is-active.has-hits { animation: quake var(--dur) both; }
.scene.is-active .a-tool    { animation: swing var(--dur) both; }
.scene.is-active .a-target  { animation: hit var(--dur) both; }
.scene.is-active .a-flash   { animation: hit var(--dur) both, flash var(--dur) both; }
.scene.is-active .a-shard   { animation: shard var(--dur) both; }
.scene.is-active .a-impact  { animation: impact var(--dur) both; }
.scene.is-active .a-boom    { animation: boom var(--dur) both; }
.scene.is-active .a-loot    { animation: loot var(--dur) both; }
.scene.is-active .a-break   { animation: breakup var(--dur) both; }
.scene.is-active .a-fall    { animation: fall var(--dur) both; }
.scene.is-active .a-pop     { animation: pop var(--dur) both; }
.scene.is-active .a-slash   { animation: slash var(--dur) both; }
.scene.is-active .a-hp      { animation: hp var(--dur) both; }
.scene.is-active .a-hpwrap  { animation: hpwrap var(--dur) both; }
.scene.is-active .a-dmg     { animation: dmg calc(var(--dur) * .3) both; }
.scene.is-active .a-dmg.d1  { animation-delay: calc(var(--dur) * .125); }
.scene.is-active .a-dmg.d2  { animation-delay: calc(var(--dur) * .416); }
.scene.is-active .a-dmg.d3  { animation-delay: calc(var(--dur) * .708); }
.scene.is-active .a-heat    { animation: heat var(--dur) both; }
.scene.is-active .a-ember   { animation: ember var(--dur) both; }
.scene.is-active .a-twinkle { animation: twinkle2 var(--dur) both; }
.scene.is-active .a-xp      { animation: xp var(--dur) both; }
.scene.is-active .a-burst   { animation: burst var(--dur) both; }
.scene.is-active .a-bump    { animation: bump var(--dur) both; }
.a-pulse { animation: pulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.a-shard, .a-boom, .a-slash, .a-impact, .a-twinkle, .a-burst { opacity: 0; }
.a-tool { transform: rotate(var(--up)); }

@keyframes swing {              /* wind up, strike, rebound */
  0%, 26%, 55%, 84%, 100% { transform: rotate(var(--up)); animation-timing-function: ease-out; }
  7%, 36%, 65% { transform: rotate(calc(var(--up) + var(--dir) * 11deg)); animation-timing-function: cubic-bezier(.7, 0, 1, .5); }
  12.5%, 41.6%, 70.8% { transform: rotate(var(--down)); animation-timing-function: ease-out; }
  15.5%, 44.6%, 73.8% { transform: rotate(calc(var(--down) + var(--dir) * 7deg)); animation-timing-function: ease-in-out; }
}
@keyframes hit {                /* squash, recoil, settle */
  0%, 12.4%, 22%, 41.5%, 51%, 70.7%, 80%, 100% { transform: none; }
  13.5%, 42.6%, 71.8% { transform: translate(4px, 2px) rotate(1.8deg) scale(1.06, .93); }
  16%, 45%, 74% { transform: translate(-3px, 0) rotate(-1.2deg) scale(.97, 1.04); }
  19%, 48%, 77% { transform: translate(1px, 0) rotate(.5deg); }
}
@keyframes quake {
  0%, 12.4%, 17%, 41.5%, 46%, 70.7%, 76%, 100% { transform: none; }
  13.2%, 42.3%, 71.5% { transform: translate(-3px, 2px); }
  14.6%, 43.7%, 73% { transform: translate(3px, -1px); }
}
@keyframes shard {
  0%, 12.4%, 26.1%, 41.5%, 55.1%, 70.7%, 84.1%, 100% { opacity: 0; transform: none; }
  13%, 42%, 71.2% { opacity: 1; transform: none; animation-timing-function: cubic-bezier(.1, .7, .4, 1); }
  26%, 55%, 84% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(220deg) scale(.5); }
}
@keyframes impact {
  0%, 12.4%, 19%, 41.5%, 48%, 70.7%, 78%, 100% { opacity: 0; transform: scale(.2) rotate(0deg); }
  13.2%, 42.3%, 71.5% { opacity: 1; transform: scale(1.25) rotate(20deg); }
}
@keyframes boom {
  0%, 73.9% { opacity: 0; transform: none; }
  75% { opacity: 1; transform: none; animation-timing-function: cubic-bezier(.1, .7, .3, 1); }
  97%, 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(260deg) scale(.4); }
}
@keyframes loot {
  0%, 73% { opacity: 0; transform: translateY(16px) scale(.5); }
  79% { opacity: 1; transform: scale(1.28); }
  84%, 93% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-12px); }
}
@keyframes dmg {
  0% { opacity: 0; transform: translateY(10px) scale(.5); }
  18% { opacity: 1; transform: scale(1.35); }
  36% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-28px); }
}
@keyframes breakup { 0%, 72% { transform: none; opacity: 1; } 75% { transform: scale(1.12); opacity: 1; } 80%, 100% { transform: scale(.5); opacity: 0; } }
@keyframes fall {
  0%, 72% { transform: none; opacity: 1; animation-timing-function: cubic-bezier(.7, 0, 1, .7); }
  87% { transform: rotate(88deg); opacity: 1; animation-timing-function: ease-out; }
  90% { transform: rotate(82deg); opacity: 1; }
  93% { transform: rotate(88deg); opacity: 1; }
  99%, 100% { transform: rotate(88deg); opacity: 0; }
}
@keyframes pop { 0%, 72% { transform: none; opacity: 1; } 76% { transform: scale(1.25, .78); opacity: 1; } 79% { transform: scale(.8, 1.25); opacity: 1; } 83%, 100% { transform: scale(1.8, .05); opacity: 0; } }
@keyframes flash { 0%, 12.4%, 18%, 41.5%, 47%, 70.7%, 76%, 100% { filter: none; } 13%, 42%, 71.2% { filter: brightness(2.4) saturate(.4); } }
@keyframes slash { 0%, 11%, 20%, 40%, 49%, 69.5%, 78.5%, 100% { opacity: 0; } 13%, 42%, 71.2% { opacity: .95; } }
@keyframes hp { 0%, 12.4% { transform: scaleX(1); } 15%, 41.5% { transform: scaleX(.66); } 44%, 70.7% { transform: scaleX(.3); } 73.5%, 100% { transform: scaleX(0); } }
@keyframes hpwrap { 0%, 74% { opacity: 1; } 80%, 100% { opacity: 0; } }
@keyframes heat { 0% { fill: #ff5a1f; } 70% { fill: #ffc56b; filter: none; } 80%, 100% { fill: var(--metal); filter: drop-shadow(0 0 9px var(--metal)); } }
@keyframes ember { 0%, 12%, 100% { opacity: 0; } 14%, 43%, 72% { opacity: .26; } 26%, 55%, 84% { opacity: .05; } }
@keyframes twinkle2 { 0%, 76% { opacity: 0; transform: scale(0) rotate(0deg); } 84% { opacity: 1; transform: scale(1.1) rotate(45deg); } 100% { opacity: 0; transform: scale(.2) rotate(90deg); } }
@keyframes xp { 0% { stroke-dashoffset: 364.5; animation-timing-function: cubic-bezier(.5, 0, .3, 1); } 70%, 100% { stroke-dashoffset: 0; } }
@keyframes burst { 0%, 70% { opacity: 0; transform: scale(.7); } 78% { opacity: 1; transform: scale(1.14); } 100% { opacity: 0; transform: scale(1.34) rotate(15deg); } }
@keyframes bump { 0%, 71% { transform: none; } 76% { transform: scale(1.5); fill: #f3d9a4; } 82% { transform: scale(.92); } 90%, 100% { transform: none; } }
@keyframes pulse { 50% { transform: scale(1.12); opacity: .08; } }

.loop__rail { grid-column: 1 / -1; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(6px, 1.2vw, 16px); }
.loop__step {
  display: block; width: 100%; padding: 12px 0 0; background: none; border: 0; cursor: pointer; text-align: left;
  font: 400 clamp(14px, 1.5vw, 19px)/1.2 var(--display); color: var(--muted); transition: color .3s;
}
.loop__step i { display: block; height: 3px; margin-bottom: 12px; border-radius: 3px; background: rgba(156, 200, 255, .18); overflow: hidden; }
.loop__step i::after { content: ""; display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.loop__step:hover { color: var(--cream); }
.loop__step.is-active { color: var(--cream); }
.loop__step.is-done i::after { transform: scaleX(1); opacity: .45; }
.loop__step.is-active i::after { animation: railfill var(--step, 2.7s) linear both; }
@keyframes railfill { to { transform: scaleX(1); } }

@media (max-width: 760px) {
  .loop { grid-template-columns: 1fr; text-align: center; }
  .loop__stage { width: min(100%, 340px); margin: 14px auto 0; }
  .loop__step { padding-top: 6px; }
  .loop__step span { display: none; }
  .loop__step i { height: 4px; margin-bottom: 0; }
}

/* ---------- Features: scrolling word bands ---------- */
.marquee {
  margin-top: clamp(40px, 6vw, 80px); display: grid; gap: clamp(6px, 1vw, 14px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: clamp(18px, 2.6vw, 40px); width: max-content;
  padding-right: clamp(18px, 2.6vw, 40px);
  font: 400 clamp(34px, 6vw, 84px)/1.1 var(--display); color: var(--cream); white-space: nowrap;
  animation: slide 38s linear infinite;
}
.marquee__track--rev { animation-direction: reverse; animation-duration: 44s; }
.marquee__track span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 1px rgba(253, 241, 226, .55); }
.marquee__track--rev span:nth-of-type(even) { color: var(--cream); -webkit-text-stroke: 0; }
.marquee__track--rev span:nth-of-type(odd) { color: transparent; -webkit-text-stroke: 1px rgba(253, 241, 226, .55); }
.marquee__track svg { width: .3em; height: .3em; flex: none; color: var(--gold); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Platforms: key-art gate ---------- */
.platforms { text-align: center; padding-top: clamp(8px, 2vw, 24px); }
.gate {
  position: relative; overflow: hidden; border-radius: clamp(20px, 2.6vw, 32px);
  border: 1px solid rgba(156, 200, 255, .28); background: var(--navy);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5), 0 0 80px rgba(63, 127, 230, .14);
}
.gate__art { position: relative; overflow: hidden; width: 100%; height: clamp(190px, 29vw, 366px); }
.gate__art img { width: 100%; height: 100%; object-fit: cover; animation: drift 22s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.1) translateY(-1.5%); } }
.gate__art::after {             /* blend the art into the card */
  content: ""; position: absolute; inset: auto 0 0 0; height: 22%;
  background: linear-gradient(180deg, transparent, var(--navy));
}
.gate::after {                  /* light sweep */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .13) 50%, transparent 58%);
  background-size: 300% 100%; animation: sweep 7s ease-in-out infinite;
}
@keyframes sweep { 0%, 55% { background-position: 120% 0; } 100% { background-position: -40% 0; } }
.gate__body { position: relative; padding: clamp(14px, 2vw, 24px) clamp(16px, 3vw, 40px) clamp(24px, 3.4vw, 44px); }
.gate__title { margin-top: 14px; font: 400 clamp(30px, 4.4vw, 54px)/1.1 var(--display); color: var(--cream); }

.stores { margin-top: clamp(22px, 3vw, 34px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.store {
  display: flex; align-items: center; gap: 14px; text-align: left; text-decoration: none;
  padding: 16px 18px; border-radius: 16px;
  background: rgba(7, 11, 31, .55); border: 1px solid var(--line);
  transition: transform .3s var(--ease), border-color .3s, background .3s, box-shadow .3s;
}
.store:hover { transform: translateY(-3px); border-color: rgba(243, 217, 164, .5); background: rgba(22, 35, 92, .6); }
.store svg { width: 30px; height: 30px; flex: none; color: var(--sky-light); }
.store__text { display: grid; flex: 1; min-width: 0; }
.store__name { font: 400 22px/1.15 var(--display); color: var(--cream); }
.store__meta { font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.store__status {
  flex: none; padding: 6px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(243, 217, 164, .35);
}
.store.is-live:hover { box-shadow: 0 14px 40px rgba(63, 127, 230, .22); }
.store.is-live .store__status { background: linear-gradient(180deg, #fff9f0, var(--gold)); color: #1a1638; border-color: transparent; }
.store:not(.is-live) { cursor: default; }
@media (max-width: 860px) { .stores { grid-template-columns: 1fr; } }

.community { margin-top: 26px; }
.community__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 44px; text-align: center; background: linear-gradient(180deg, transparent, rgba(22, 35, 92, .25)); }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.footer .brand__name { font-size: 28px; }
.footer__line { font: 400 18px/1.3 var(--display); color: var(--muted); }
.footer__legal { margin-top: 14px; font-size: 13px; color: var(--muted); opacity: .8; max-width: 60ch; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

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

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 40px var(--gutter);
  background: radial-gradient(60% 50% at 50% 35%, rgba(63, 127, 230, .22), transparent 70%); }
.lost__code { font: 400 clamp(90px, 22vw, 200px)/1 var(--display); color: var(--cream); letter-spacing: .02em; }
.lost p { margin: 12px auto 30px; max-width: 420px; }
