/* ==========================================================================
   Openworld -- the download page. Colours of the emblem (grass, dirt,
   stone, water, the torch), night sky background, Nunito like the launcher.
   ========================================================================== */
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("../fonts/Nunito-Bold.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("../fonts/Nunito-ExtraBold.woff") format("woff"); }

:root {
  --bg: #0a0f1c;
  --bg-2: #0e1628;
  --bg-3: #131d35;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.1);
  --ink: #eef3ff;
  --muted: #a6b3cd;
  --grass: #7ed957;
  --grass-2: #4fa83d;
  --grass-3: #2f6b27;
  --dirt: #9a6a3e;
  --stone: #7f8aa0;
  --water: #5ac9dc;
  --torch: #f5a623;
  --gold: #ffcc4d;
  --sky: #8fb8ff;
  --rose: #ff7aa8;
  --violet: #b38cff;
  --red: #ff6b6b;
  --display: "Nunito", ui-rounded, system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 20px;
  --parade-h: clamp(140px, 23vh, 250px);
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--text); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
b, strong { font-weight: 700; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---- progress + top bar ------------------------------------------------------ */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; }
.progress span {
  display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--grass), var(--water), var(--gold));
}
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 24px;
  padding: 10px var(--gutter); padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(10, 15, 28, 0.72); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  transform: translateY(-110%); transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.scrolled .topbar { transform: none; }
.topbar-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.05rem var(--display); letter-spacing: 0.12em; }
.topbar-nav { display: flex; gap: 22px; margin-left: auto; }
.topbar-nav a { text-decoration: none; color: var(--muted); font: 700 0.95rem var(--display); transition: color 0.2s; }
.topbar-nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .topbar-nav { display: none; } .topbar .btn { margin-left: auto; } }

/* ---- buttons (a voxel block: a darker side under the face) ----------------- */
.btn {
  --face: var(--grass); --side: var(--grass-3); --text-c: #0d2a0f;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 12px 22px; border: 0; border-radius: 14px; cursor: pointer; text-decoration: none;
  font: 800 1rem var(--display); color: var(--text-c);
  background: var(--face);
  background: linear-gradient(180deg, color-mix(in srgb, var(--face) 88%, white), var(--face));
  box-shadow: 0 6px 0 var(--side), 0 14px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--side), 0 18px 34px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35); filter: brightness(1.05); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--side), 0 6px 14px rgba(0, 0, 0, 0.3); }
.btn small { font: 700 0.78rem var(--display); opacity: 0.75; }
.btn-sm { padding: 8px 16px; border-radius: 11px; font-size: 0.92rem; box-shadow: 0 4px 0 var(--side), 0 8px 18px rgba(0, 0, 0, 0.3); }
.btn-sm:hover { box-shadow: 0 5px 0 var(--side), 0 10px 20px rgba(0, 0, 0, 0.35); }
.btn-sm:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--side); }
.btn-ghost { --face: #2a3654; --side: #151d31; --text-c: var(--ink); background: linear-gradient(180deg, #33415f, #28334f); }
.btn-xl { padding: 16px 30px 16px 22px; border-radius: 18px; text-align: left; }
.btn-xl .btn-icon { width: 36px; height: 36px; display: grid; place-items: center; }
.btn-xl .btn-icon svg { width: 30px; height: 30px; }
.btn-xl .btn-text { display: flex; flex-direction: column; line-height: 1.15; }
.btn-xl b { font: 800 clamp(1.1rem, 2.6vw, 1.35rem) var(--display); }
.btn-xl small { font-size: 0.84rem; }
.link-button { background: none; border: 0; color: var(--muted); font: 700 0.9rem var(--display); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; }

/* ---- hero: everything within the first screen, the parade at its foot --------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(26px, 6vh, 80px) var(--gutter) calc(var(--parade-h) + 0.5vh);
}
.hero-bg { position: absolute; inset: -12% 0 -2%; z-index: -3; will-change: transform; }
.hero-pan {
  position: absolute; inset: -20px; transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transform: translate3d(calc(var(--px, 0) * -18px), calc(var(--py, 0) * -12px), 0);
}
.hero-bg .shot { position: absolute; inset: 0; opacity: 0; }
.hero-bg .shot.is-on { opacity: 1; }
.hero-bg .shot img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); }
.hero-bg .shot.is-on img { animation: drift 9s ease-out both; }
@keyframes drift { from { transform: scale(1.12); } to { transform: scale(1.03); } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(10, 15, 28, 0.2), rgba(10, 15, 28, 0.8) 75%),
    linear-gradient(180deg, rgba(10, 15, 28, 0.5), rgba(10, 15, 28, 0.15) 30%, rgba(10, 15, 28, 0.3) 62%, rgba(10, 15, 28, 0.94) 100%);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 36px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--bg));
}
.fireflies { position: absolute; inset: 0; z-index: -1; pointer-events: none; transform: translate3d(calc(var(--px, 0) * 14px), calc(var(--py, 0) * 10px), 0); transition: transform 1s ease-out; }
.fireflies i {
  position: absolute; width: 5px; height: 5px; background: #fff3a6; border-radius: 1px;
  box-shadow: 0 0 10px 3px rgba(255, 220, 90, 0.55); opacity: 0;
  animation: firefly var(--d, 9s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes firefly {
  0%, 100% { opacity: 0; transform: translate3d(0, 0, 0); }
  20%, 70% { opacity: 0.9; }
  50% { transform: translate3d(var(--dx, 30px), var(--dy, -60px), 0); opacity: 0.4; }
}
.hero-inner { position: relative; z-index: 3; text-align: center; width: 100%; max-width: 1060px; display: flex; flex-direction: column; align-items: center; }
/* The launcher's lockup: the emblem, « PASCARD » over « OPENWORLD » (Nunito
   ExtraBold, white, a navy outline stamped twelve times like the launcher's). */
.lockup {
  --ring: rgba(14, 24, 48, 0.45);
  display: flex; align-items: center; gap: 0.28em; margin: 0;
  font: 800 clamp(2.5rem, 6.4vw + 1.2vh, 6.2rem)/1 var(--display); animation: rise 0.9s 0.15s both;
}
.lockup-emblem { width: auto; height: 1.15em; filter: drop-shadow(0 0.06em 0.1em rgba(14, 24, 48, 0.5)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -0.08em; } }
.lockup-words { display: flex; flex-direction: column; align-items: flex-start; }
.lockup-word, .lockup-by {
  color: #fff;
  text-shadow: 0.05em 0 var(--ring), 0.043em 0.025em var(--ring), 0.025em 0.043em var(--ring), 0 0.05em var(--ring),
    -0.025em 0.043em var(--ring), -0.043em 0.025em var(--ring), -0.05em 0 var(--ring), -0.043em -0.025em var(--ring),
    -0.025em -0.043em var(--ring), 0 -0.05em var(--ring), 0.025em -0.043em var(--ring), 0.043em -0.025em var(--ring),
    0 0.08em 0.4em rgba(0, 0, 0, 0.35);
}
.lockup-word { letter-spacing: 0.02em; }
.lockup-by { font-size: 0.32em; letter-spacing: 0.55em; margin: 0 0 0.375em 0.06em; color: rgba(255, 255, 255, 0.96); }
@media (max-width: 560px) { .lockup { font-size: clamp(2rem, 10.5vw, 3rem); } }
.tagline { margin-top: clamp(14px, 2.6vh, 30px); max-width: 26em; font: 800 clamp(1.15rem, 2.3vh + 0.6vw, 2rem)/1.25 var(--display); animation: rise 0.9s 0.5s both; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6); }
.tagline span { display: block; margin-top: 6px; font-size: 0.62em; font-weight: 700; color: #d6e0f2; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.cta { margin-top: clamp(14px, 2.8vh, 30px); display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 1.4vh, 14px); animation: rise 0.9s 0.7s both; }
.cta-alt { color: var(--muted); font-size: 0.95rem; }
.cta-alt a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
.cta-alt a + a::before { content: "·"; display: inline-block; margin: 0 8px; color: var(--muted); }
.cta-note { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px 8px; font-size: 0.86rem; color: var(--muted); padding: 6px 14px; border-radius: 99px; background: rgba(10, 15, 28, 0.55); border: 1px solid var(--line); }
.cta-note a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
.cta-note .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--grass); box-shadow: 0 0 0 0 rgba(126, 217, 87, 0.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(126, 217, 87, 0); } 100% { box-shadow: 0 0 0 0 rgba(126, 217, 87, 0); } }

.phone-joke {
  margin-top: 18px; max-width: 440px; padding: 20px 20px 14px; border-radius: 22px; text-align: center;
  background: rgba(14, 22, 40, 0.82); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); animation: rise 0.9s 0.9s both;
}
.phone-title { font: 800 1.3rem var(--display); }
.phone-title::before { content: ""; display: inline-block; width: 16px; height: 26px; margin-right: 10px; vertical-align: -5px; border: 3px solid var(--gold); border-radius: 5px; animation: wobble 2.2s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { rotate: -8deg; } 50% { rotate: 8deg; } }
.phone-text { margin-top: 8px; font: 700 1.02rem/1.45 var(--display); color: var(--gold); min-height: 3em; transition: opacity 0.25s; }
.phone-sub { margin-top: 8px; color: var(--muted); font-size: 0.92rem; }
.phone-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

.parade { position: absolute; left: 0; right: 0; bottom: 0; height: var(--parade-h); z-index: 1; touch-action: pan-y; }
.parade-hint {
  position: absolute; left: var(--gutter); top: 6px; z-index: 2; pointer-events: none;
  font: 700 0.82rem var(--display); color: rgba(255, 255, 255, 0.8); padding: 4px 12px; border-radius: 99px;
  background: rgba(10, 15, 28, 0.55); opacity: 0; animation: hint 7s 4s both;
}
@keyframes hint { 10%, 80% { opacity: 1; } 100% { opacity: 0; } }
.bones {
  position: absolute; right: var(--gutter); top: 6px; z-index: 2; padding: 5px 12px; border-radius: 99px;
  font: 800 0.85rem var(--display); background: rgba(10, 15, 28, 0.7); border: 1px solid var(--line); pointer-events: none;
}
.bones span { color: var(--muted); font-weight: 700; margin-right: 4px; }
.bones b { color: var(--gold); }
.bones.bump { animation: bump 0.4s; }
@keyframes bump { 40% { transform: scale(1.25); } }

/* ---- 3D stages ------------------------------------------------------------------- */
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-tag {
  position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; white-space: nowrap;
  padding: 4px 11px 4px 9px; border-radius: 8px; font: 800 0.85rem var(--display); color: #fff;
  background: rgba(8, 12, 24, 0.78); border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0; transition: opacity 0.18s;
}
.stage-tag::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 7px; background: var(--grass); vertical-align: 0; }
.stage-tag[data-mood="hostile"]::before { background: var(--red); }
.stage-tag[data-mood="neutre"]::before { background: var(--gold); }
.stage-tag[data-mood="joueur"]::before { background: var(--sky); }
.stage-tag.on { opacity: 1; }
.stage-pop {
  position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, -50%);
  font: 800 1.1rem var(--display); color: var(--gold); text-shadow: 0 2px 0 #7a4b00, 0 4px 14px rgba(0, 0, 0, 0.6);
  animation: popup 1.4s ease-out forwards;
}
@keyframes popup { from { opacity: 0; margin-top: 10px; } 15% { opacity: 1; } to { opacity: 0; margin-top: -70px; } }

/* ---- sections ------------------------------------------------------------------- */
section { position: relative; }
.section-head { max-width: 760px; margin: 0 auto; text-align: center; padding: 0 var(--gutter); }
.section-head h2 { font-size: clamp(2rem, 5.2vw, 3.5rem); }
.section-head > p:last-child { margin-top: 16px; color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.15rem); }
.kicker { display: inline-block; margin-bottom: 14px; font: 800 0.8rem var(--display); letter-spacing: 0.28em; text-transform: uppercase; color: var(--grass); }
.kicker::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; background: currentColor; border-radius: 2px; box-shadow: 3px 3px 0 var(--grass-3); }

[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---- the world (sticky story) ------------------------------------------------------ */
.world { padding: clamp(80px, 11vw, 150px) 0 clamp(40px, 6vw, 80px); }
.story { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 80px); max-width: 1280px; margin: clamp(40px, 6vw, 80px) auto 0; padding: 0 var(--gutter); }
.story-frame {
  position: sticky; top: 13vh; height: 74vh; border-radius: 26px; overflow: hidden; background: var(--bg-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--line);
}
.story-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.story-frame img.is-on { opacity: 1; animation: drift 7s ease-out both; }
.frame-corner { position: absolute; width: 22px; height: 22px; z-index: 2; }
.frame-corner.tl { left: 14px; top: 14px; border-left: 4px solid var(--grass); border-top: 4px solid var(--grass); }
.frame-corner.br { right: 14px; bottom: 14px; border-right: 4px solid var(--grass); border-bottom: 4px solid var(--grass); }
.story-steps { list-style: none; margin: 0; padding: 0; }
.step { min-height: 74vh; display: flex; flex-direction: column; justify-content: center; opacity: 0.28; transition: opacity 0.5s; }
.step.is-active { opacity: 1; }
.step-shot { display: none; }
.step-num { font: 800 3.6rem/1 var(--display); color: transparent; -webkit-text-stroke: 2px rgba(126, 217, 87, 0.6); margin-bottom: 10px; }
.step h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.step p { margin-top: 14px; color: var(--muted); font-size: 1.08rem; max-width: 30em; }
@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; }
  .story-frame { display: none; }
  .step { min-height: 0; opacity: 1; margin-bottom: 44px; }
  .step-shot { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; margin-bottom: 18px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45); }
  .step-num { font-size: 2.4rem; }
}

/* ---- numbers ------------------------------------------------------------------- */
.numbers {
  padding: clamp(60px, 8vw, 110px) var(--gutter); overflow: hidden;
  background: linear-gradient(180deg, var(--bg), #0f2218 45%, #0c1a22 70%, var(--bg));
}
.stats { list-style: none; margin: 0 auto; padding: 0; max-width: 1180px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 34px 20px; text-align: center; }
.stats li { --i: 0; }
.stats li:nth-child(2) { --i: 1; } .stats li:nth-child(3) { --i: 2; } .stats li:nth-child(4) { --i: 3; } .stats li:nth-child(5) { --i: 4; } .stats li:nth-child(6) { --i: 5; }
.stats b { display: block; font: 800 clamp(2.6rem, 6vw, 4.2rem)/1 var(--display); font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff, var(--grass)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { display: block; margin-top: 8px; color: var(--muted); font: 700 0.95rem var(--display); }
.cubes i {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 4px; background: var(--c); opacity: 0.55;
  box-shadow: inset -5px -5px 0 rgba(0, 0, 0, 0.25), inset 4px 4px 0 rgba(255, 255, 255, 0.25);
}

/* ---- creatures (the island) --------------------------------------------------- */
.creatures {
  padding: clamp(80px, 10vw, 140px) 0 clamp(60px, 8vw, 110px); overflow: hidden;
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 64%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 12%, #dfe8ff 50%, transparent 51%), radial-gradient(1px 1px at 63% 38%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 81% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 91% 58%, #cfe0ff 50%, transparent 51%),
    radial-gradient(1px 1px at 7% 84%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 52% 88%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 76%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 36% 36%, #fff 50%, transparent 51%),
    radial-gradient(ellipse 70% 50% at 50% 55%, #16244a 0%, transparent 70%),
    linear-gradient(180deg, var(--bg), #0b1430 30%, #0b1430 75%, var(--bg));
}
.sky { position: absolute; inset: 0; pointer-events: none; }
.moon {
  position: absolute; right: 12%; top: 12%; width: clamp(60px, 9vw, 110px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fffdf0, #e9e4cf 55%, #cfc9b0);
  box-shadow: 0 0 60px 10px rgba(255, 250, 220, 0.18), inset -12px -10px 0 rgba(0, 0, 0, 0.08);
}
.moon::before, .moon::after { content: ""; position: absolute; border-radius: 50%; background: rgba(160, 150, 120, 0.3); }
.moon::before { width: 22%; height: 22%; left: 28%; top: 50%; }
.moon::after { width: 14%; height: 14%; left: 60%; top: 28%; }
.island { position: relative; height: clamp(420px, 76vh, 820px); margin-top: 10px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.island:active { cursor: grabbing; }
.island-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 20px; }
.island.has-webgl .island-fallback { display: none; }
.chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 900px; margin: 6px auto 0; padding: 0 var(--gutter); }
.chips button {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; cursor: pointer;
  font: 800 0.9rem var(--display); color: var(--ink); background: var(--panel-2); border: 1px solid var(--line);
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}
.chips button::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--c, var(--grass)); }
.chips button:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.12); border-color: var(--c, var(--grass)); }

/* ---- features ------------------------------------------------------------------- */
.features { padding: clamp(80px, 10vw, 140px) var(--gutter); }
.cards { list-style: none; margin: clamp(40px, 5vw, 64px) auto 0; padding: 0; max-width: 1200px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card {
  position: relative; padding: 26px 24px 24px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); overflow: hidden;
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.3s, background 0.3s;
  transition-delay: calc(var(--i, 0) * 70ms), 0s, 0s, 0s;
}
.card::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 200px; height: 200px; border-radius: 50%; background: var(--accent); opacity: 0; filter: blur(60px); transition: opacity 0.4s; }
.card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: var(--panel-2); }
.card:hover::after { opacity: 0.22; }
.card svg { width: 38px; height: 38px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; padding: 8px; box-sizing: content-box; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.card h3 { margin-top: 18px; font-size: 1.28rem; }
.card p { margin-top: 8px; color: var(--muted); font-size: 0.98rem; }
/* "Read the guide": a card's way into the guides (build.py, [data-guides]) */
.card-more { display: inline-block; margin-top: 12px; font: 800 0.92rem var(--display); color: var(--accent); text-decoration: none; }
.card-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- download ------------------------------------------------------------------- */
.download {
  padding: clamp(80px, 10vw, 140px) var(--gutter) clamp(120px, 14vw, 180px);
  background: radial-gradient(ellipse 60% 50% at 50% 30%, rgba(126, 217, 87, 0.1), transparent 70%), linear-gradient(180deg, var(--bg), #0d1a14 60%, var(--bg-2));
}
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 1080px; margin: clamp(40px, 5vw, 60px) auto 0; }
.platform {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 34px 22px 24px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line);
}
.platform.is-yours { background: linear-gradient(180deg, rgba(126, 217, 87, 0.12), rgba(126, 217, 87, 0.03)); border-color: rgba(126, 217, 87, 0.55); box-shadow: 0 0 0 1px rgba(126, 217, 87, 0.25), 0 24px 60px rgba(40, 120, 40, 0.25); }
.platform.is-yours.in { transform: translateY(-8px); }
.yours { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: 3px 12px; border-radius: 99px; background: var(--grass); color: #0d2a0f; font: 800 0.78rem var(--display); letter-spacing: 0.04em; opacity: 0; }
.platform.is-yours .yours { opacity: 1; }
.os-logo { width: 50px; height: 50px; color: var(--ink); }
.platform h3 { font-size: 1.5rem; }
.req { color: var(--muted); font-size: 0.92rem; min-height: 2.9em; }
.platform .btn { margin-top: 6px; }
.platform:not(.is-yours) .btn { --face: #3a4a6b; --side: #1d2740; --text-c: var(--ink); background: linear-gradient(180deg, #465a80, #3a4a6b); }
.file { font: 0.8rem ui-monospace, "SF Mono", Menlo, monospace; color: var(--muted); opacity: 0.8; }
.warn { font-size: 0.85rem; color: var(--gold); }
.alt-link { font-size: 0.85rem; color: var(--muted); }
.alt-link a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
@media (max-width: 820px) {
  .platforms { grid-template-columns: 1fr; max-width: 460px; }
  .platform.is-yours { order: -1; }
}
.status { max-width: 1080px; margin: 34px auto 0; padding: 22px clamp(16px, 3vw, 28px) 20px; border-radius: 24px; background: linear-gradient(180deg, rgba(126, 217, 87, 0.09), rgba(126, 217, 87, 0.02)); border: 1px solid rgba(126, 217, 87, 0.35); text-align: center; }
.status-now { display: inline-flex; align-items: center; gap: 10px; font: 700 clamp(1.05rem, 2vw, 1.25rem) var(--display); color: var(--ink); }
.status-now b { color: var(--grass); }
.status-now .dot { flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--grass); box-shadow: 0 0 0 0 rgba(126, 217, 87, 0.7); animation: pulse 2s infinite; }
.status-track { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; padding: 0; counter-reset: stage; }
.status-track li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); border: 1px dashed var(--line); text-align: start; }
.status-track li.is-now { background: rgba(126, 217, 87, 0.12); border: 1px solid rgba(126, 217, 87, 0.55); }
.status-track b { font: 800 1.05rem var(--display); color: var(--muted); }
.status-track li.is-now b { color: var(--grass); }
.status-track em { position: absolute; top: -11px; inset-inline-end: 12px; padding: 2px 10px; border-radius: 99px; background: var(--grass); color: #0d2a0f; font: 800 0.74rem var(--display); font-style: normal; letter-spacing: 0.03em; }
.status-track span { color: var(--muted); font-size: 0.92rem; }
.status-note { margin-top: 14px; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 820px) { .status-track { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 1080px; margin: 44px auto 0; padding: 0; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.03); border: 1px dashed var(--line); }
.steps b { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; font: 800 1.1rem var(--display); color: #0d2a0f; background: var(--grass); box-shadow: 0 4px 0 var(--grass-3); }
.steps span { color: var(--muted); font-size: 0.97rem; }
.steps strong { color: var(--ink); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; max-width: 460px; } }
.faq { max-width: 760px; margin: 44px auto 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font: 800 1.05rem var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--grass); transition: transform 0.25s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 14px; }
.faq details p + p { margin-top: -4px; }
.faq pre { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: #060a14; border: 1px solid var(--line); overflow-x: auto; font-size: 0.88rem; }

/* ---- footer ------------------------------------------------------------------- */
.footer { position: relative; background: var(--bg-2); border-top: 1px solid var(--line); padding: 56px var(--gutter) max(40px, env(safe-area-inset-bottom)); }
.nap { position: absolute; right: clamp(12px, 8vw, 120px); top: -150px; width: 210px; height: 150px; }
.zzz { position: absolute; left: 58%; top: 8px; font: 800 1rem var(--display); color: var(--sky); pointer-events: none; transition: opacity 0.3s; }
.zzz, .zzz i { display: inline-block; animation: zzz 2.6s ease-in-out infinite; font-style: normal; }
.zzz i { margin-left: 3px; font-size: 1.2em; animation-delay: 0.4s; }
.zzz i + i { font-size: 1.4em; animation-delay: 0.8s; }
@keyframes zzz { 0%, 100% { opacity: 0.2; transform: translateY(4px); } 50% { opacity: 1; transform: translateY(-6px); } }
.nap.awake .zzz { opacity: 0; }
.nap.no-webgl { display: none; }
.footer-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr; gap: 14px 30px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.footer-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.footer-brand b { font: 800 1.1rem var(--display); letter-spacing: 0.12em; }
.footer-brand small { color: var(--muted); font: 700 0.85rem var(--display); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; }
.footer-links a { color: var(--muted); text-decoration: none; font: 700 0.95rem var(--display); }
.footer-links a:hover { color: var(--ink); }
.footer-legal { grid-column: 1 / -1; }
.footer-legal a { font-size: 0.85rem; }
.footer-small { grid-column: 1 / -1; color: var(--muted); font-size: 0.85rem; opacity: 0.8; }
.footer-creator { grid-column: 1 / -1; color: var(--muted); font-size: 0.9rem; }
.footer-creator a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } .footer-links { justify-content: flex-start; } .nap { top: -122px; width: 170px; height: 122px; } }

/* ---- toast + confetti ------------------------------------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 70; width: min(460px, calc(100% - 32px));
  transform: translateX(-50%); padding: 18px 44px 18px 20px; border-radius: 18px;
  background: rgba(16, 26, 46, 0.94); border: 1px solid rgba(126, 217, 87, 0.45); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: toast-in 0.45s cubic-bezier(0.2, 1.2, 0.4, 1);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 30px); } }
.toast-title { font: 800 1.1rem var(--display); }
.toast-text { margin-top: 6px; color: var(--muted); font-size: 0.94rem; }
.toast-text b { color: var(--ink); }
.toast-text code { font-size: 0.85rem; padding: 2px 6px; border-radius: 6px; background: #060a14; color: var(--ink); }
.toast-close { position: absolute; right: 10px; top: 8px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.4rem; cursor: pointer; }
.toast-close:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.confetti { position: fixed; z-index: 80; width: 10px; height: 10px; border-radius: 2px; pointer-events: none; box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.25); animation: confetti 1.1s cubic-bezier(0.2, 0.6, 0.4, 1) forwards; }
@keyframes confetti { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

/* ---- small screens and calm motion --------------------------------------------- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  /* Phones: the parade stays in the first screen; the text may cover its empty sky. */
  :root { --parade-h: 150px; }
  .hero { padding-top: 34px; padding-bottom: calc(var(--parade-h) * 0.5); }
  .phone-joke { margin-top: 12px; padding: 14px 14px 8px; }
  .phone-title { font-size: 1.12rem; }
  .phone-title::before { width: 12px; height: 20px; border-width: 2px; margin-right: 8px; vertical-align: -3px; }
  .phone-text { font-size: 0.95rem; min-height: 0; }
  .phone-sub { font-size: 0.84rem; }
  .phone-actions { margin-top: 12px; gap: 8px; flex-wrap: nowrap; }
  .phone-actions .btn { padding: 9px 13px; font-size: 0.9rem; }
  .btn-xl { width: 100%; justify-content: flex-start; }
  .cta { width: 100%; max-width: 380px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
