/* Neutronium: one page. Colours and the typeface are the game's own (brand folder, marks/palette). */

@font-face { font-family: "SM Display"; src: url("/assets/SMDisplay-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "SM Display"; src: url("/assets/SMDisplay-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --deep: #050714;                       /* the darkest sky of the key art: the page's ground */
  --ink: #e8f4ff;
  --ink-dim: rgb(232 244 255 / .62);
  --neut: #bfebff;
  --neut-blue: #8cd9ff;
  --neut-light: #4992ff;
  --teal: #2fe6ff;
  --amber: #ffb02e;
  --charge: #ff8f1f;
  --gold: #ffd25e;
  /* tall screens: the side of the square the key art is drawn in. site.js uses the same two numbers (TALL). */
  --box: max(116.3vw, 70lvh);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--deep); color: var(--ink); color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100svh; overflow-x: hidden; font-family: "SM Display", "Arial Narrow", Arial, sans-serif;
  text-transform: uppercase; letter-spacing: .1em; line-height: 1.4; -webkit-font-smoothing: antialiased; }
h1, h2, p, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

/* ---------------------------------------------------------------- the scene behind everything */
.stage { position: fixed; inset: 0 0 auto 0; height: 100lvh; overflow: hidden; background: var(--deep); }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene.off { display: none; }
.still img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 48.7% 50%;
  transform: scale(1.06); transform-origin: 48.7% 50%; }
html[data-scene="loading"] .stage::after {              /* a small Neutronium diamond while the layers arrive */
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; background: var(--neut);
  box-shadow: 0 0 18px var(--neut-blue); opacity: 0; animation: wait 1.1s .6s ease-in-out infinite alternate both; }
@keyframes wait { from { opacity: 0; transform: rotate(45deg) scale(.6); } to { opacity: 1; transform: rotate(45deg) scale(1); } }

main { position: relative; }

/* ---------------------------------------------------------------- the plate every label sits on (the HUD's own shape:
   round top-left and bottom-right, cut top-right and bottom-left, one thin stroke, dark glass, a soft glow) */
.chip { position: relative; isolation: isolate; display: inline-block; padding: .82em 1.5em .7em; color: var(--amber);
  font-size: clamp(10px, 1.45svh, 14px); font-weight: 700; letter-spacing: .24em; line-height: 1; white-space: nowrap;
  filter: drop-shadow(0 0 8px rgb(255 176 46 / .38)); }
.chip span { display: block; margin-right: -.24em; }
.chip::before, .chip::after { content: ""; position: absolute; z-index: -1; border-radius: var(--r) 0;
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c))); }
.chip::before { --r: 9px; --c: 9px; inset: 0; background: currentColor; opacity: .9; }
.chip::after { --r: 7.6px; --c: 8.4px; inset: 1.5px; background: #0a0f1f; opacity: .93; }
.chip.ice { color: var(--neut); filter: drop-shadow(0 0 10px rgb(191 235 255 / .45)); font-size: clamp(11px, 1.5svh, 15px); }

/* ---------------------------------------------------------------- first screen */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; padding: 0 5vw 1.2svh; text-align: center; }
.hero::before { content: ""; position: absolute; inset: auto 0 0 0; height: 30svh; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgb(5 7 20 / .82), rgb(5 7 20 / .38) 45%, transparent); }
.status { position: absolute; top: max(2.4svh, 14px, env(safe-area-inset-top)); right: max(2.2vw, 14px, env(safe-area-inset-right)); }
.hero-copy { display: grid; justify-items: center; gap: 1.2svh; }
.title { font-weight: 700; font-size: clamp(18px, min(2.6vw, 4.2svh), 46px); letter-spacing: .5em; margin-right: -.5em;
  line-height: 1; color: #fff; text-shadow: 0 0 3px rgb(3 8 20 / .9), 0 0 26px rgb(73 146 255 / .7), 0 0 60px rgb(73 146 255 / .35); }
.tag { font-size: clamp(10px, min(.95vw, 1.7svh), 16px); font-weight: 400; letter-spacing: .36em; margin-right: -.36em;
  line-height: 1; color: var(--ink-dim); text-shadow: 0 0 3px rgb(3 8 20 / .9); }
.cue { display: block; margin-top: 1svh; padding: 0 22px; }
.cue span { display: block; width: 1.5px; height: 2.4svh; min-height: 12px; border-radius: 2px;
  background: linear-gradient(to bottom, transparent, var(--ink)); animation: cue 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 0; } 35% { transform: scaleY(1); opacity: .9; } 100% { transform: translateY(40%) scaleY(.4); opacity: 0; } }

/* the words arrive after the picture: site.js holds them until the scene starts (data-scene), CSS alone if there is no script */
.status, .title, .tag, .cue { animation: arrive 1.5s cubic-bezier(.16, .8, .2, 1) both; }
.title { animation-delay: 1.5s; }
.tag { animation-delay: 1.8s; }
.status { animation-delay: 2.2s; }
.cue { animation-delay: 2.8s; }
html[data-scene="loading"] :is(.status, .title, .tag, .cue) { animation-play-state: paused; }
@keyframes arrive { from { opacity: 0; transform: translateY(1.6svh); filter: blur(6px); letter-spacing: .9em; } }
.status, .cue { animation-name: arrive-plain; }
@keyframes arrive-plain { from { opacity: 0; transform: translateY(1.2svh); } }

/* tall screens (phones held upright): the art sits at the top and fades out, the words come right under it */
@media (max-aspect-ratio: 999/1000) {
  .hero { justify-content: flex-start; padding-bottom: 2.4svh; }
  .hero::before { display: none; }
  .status { position: absolute; right: auto; left: 50%; translate: -50% 0; }
  .hero-copy { margin-top: min(calc(var(--box) * .875), calc(100svh - 10.5rem)); gap: 1.5svh; }
  .title { font-size: clamp(22px, 7.6vw, 60px); letter-spacing: .32em; margin-right: -.32em; }
  .tag { font-size: clamp(10px, 2.9vw, 20px); letter-spacing: .3em; margin-right: -.3em; }
  .cue { margin-top: auto; }
  .cue span { height: 5svh; }
  .still img { inset: auto; left: calc(50vw - .4665 * var(--box)); top: calc(-.02 * var(--box)); width: var(--box); height: var(--box);
    object-fit: fill; transform-origin: 46.65% 42.5%;
    -webkit-mask-image: linear-gradient(#000 68%, transparent 96%); mask-image: linear-gradient(#000 68%, transparent 96%); }
  html[data-scene="loading"] .stage::after { top: calc(var(--box) * .405); }
}

/* ---------------------------------------------------------------- three words */
.beats { padding: 6svh 6vw 0; }
.beat { min-height: 72svh; display: grid; align-content: center; justify-items: center; gap: clamp(10px, 2svh, 22px); text-align: center; }
.step { display: flex; align-items: center; gap: 1.1em; font-size: clamp(10px, 1.4svh, 13px); font-weight: 700; letter-spacing: .42em;
  line-height: 1; color: var(--tone); }
.step::before, .step::after { content: ""; width: clamp(26px, 5vw, 64px); height: 1.5px; background: currentColor; opacity: .55; }
.step::after { margin-left: -.42em; }
.beat h2 { font-size: clamp(64px, min(17vw, 30svh), 250px); font-weight: 700; letter-spacing: .1em; margin-right: -.1em; line-height: .92;
  color: transparent; background: var(--fill); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 34px var(--halo)); }
.line { max-width: 22em; font-size: clamp(12.5px, min(1.7vw, 2.6svh), 26px); font-weight: 400; letter-spacing: .3em; margin-right: -.3em;
  line-height: 1.7; color: var(--ink); text-shadow: 0 0 3px rgb(3 8 20 / .9); text-wrap: balance; }
/* the colour story a player learns: teal is the pilot's own, amber charge goes in, blue-white Neutronium comes out */
.fly { --tone: var(--teal); --halo: rgb(47 230 255 / .42); --fill: linear-gradient(180deg, #fff 12%, #c9f6ff 52%, var(--teal) 108%); }
.fire { --tone: var(--amber); --halo: rgb(255 143 31 / .5); --fill: linear-gradient(180deg, #fff7e0 12%, var(--gold) 48%, var(--charge) 100%); }
.find { --tone: var(--neut-blue); --halo: rgb(73 146 255 / .55); --fill: linear-gradient(180deg, #fff 12%, var(--neut) 50%, var(--neut-light) 112%); }

/* ---------------------------------------------------------------- the material */
.matter { min-height: 100svh; padding: 12svh 6vw; display: grid; align-content: center; justify-items: center;
  gap: clamp(18px, 3.4svh, 40px); text-align: center; }
.matter-line { max-width: 24em; font-size: clamp(13px, min(1.9vw, 2.8svh), 28px); font-weight: 400; letter-spacing: .28em; margin-right: -.28em;
  line-height: 1.75; text-shadow: 0 0 3px rgb(3 8 20 / .9); text-wrap: balance; }
.forms { width: min(100%, 940px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(4px, 2.5vw, 40px); }
.forms figure { display: grid; justify-items: center; gap: clamp(2px, 1svh, 12px); }
.forms img { width: 100%; animation: float 7s ease-in-out infinite alternate; }
.forms figure:last-child img { animation-delay: -3.5s; }
@keyframes float { from { transform: translateY(-1.6%) rotate(-.6deg); } to { transform: translateY(1.6%) rotate(.6deg); } }
figcaption { font-size: clamp(10px, 1.5svh, 14px); font-weight: 700; letter-spacing: .4em; margin-right: -.4em; line-height: 1; color: var(--ink-dim); }
.arrow { font-size: clamp(20px, 4vw, 44px); line-height: 1; letter-spacing: 0; color: var(--neut-blue); opacity: .85;
  filter: drop-shadow(0 0 10px rgb(140 217 255 / .6)); margin-bottom: 1.6em; }

/* ---------------------------------------------------------------- the roadmap: a line of Neutronium diamonds, the next one amber */
.roadmap { min-height: 84svh; padding: 12svh 6vw; display: grid; align-content: center; justify-items: center; gap: clamp(30px, 7svh, 72px); text-align: center; }
.steps { position: relative; list-style: none; margin: 0; padding: 0; width: min(100%, 1240px); display: grid; grid-template-columns: repeat(5, 1fr); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 50%; top: 5.25px; width: 100%; height: 1.5px; opacity: .6;
  background: var(--neut-blue); }                        /* the line to the next diamond */
.steps .next::after { background: linear-gradient(to right, var(--amber), var(--neut-blue)); }
.steps li { position: relative; padding: 34px 12px 0; display: grid; align-content: start; justify-items: center; gap: 10px; }
.steps li::before { content: ""; position: absolute; z-index: 1; top: 0; left: 50%; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg);
  background: var(--neut); box-shadow: 0 0 14px var(--neut-blue); }
.steps .next::before { background: var(--amber); box-shadow: 0 0 16px var(--amber); }
.when { font-size: clamp(10px, 1.4svh, 13px); font-weight: 700; letter-spacing: .3em; margin-right: -.3em; line-height: 1; color: var(--neut-blue); }
.next .when { color: var(--amber); }
.what { font-size: clamp(13px, min(1.35vw, 2.5svh), 21px); font-weight: 700; letter-spacing: .13em; margin-right: -.13em; line-height: 1.5;
  text-shadow: 0 0 3px rgb(3 8 20 / .9); text-wrap: balance; }
@media (max-width: 860px) {                             /* narrow screens: the line runs down the left */
  .steps { grid-template-columns: 1fr; width: min(100%, 400px); gap: 30px; text-align: left; }
  .steps li:not(:last-child)::after { left: 5.25px; top: 6px; width: 1.5px; height: calc(100% + 30px); }
  .steps .next::after { background: linear-gradient(to bottom, var(--amber), var(--neut-blue)); }
  .steps li { padding: 0 0 0 36px; justify-items: start; gap: 8px; }
  .steps li::before { top: 0; left: 0; margin-left: 0; }
  .when, .what { margin-right: 0; }
  .what { font-size: clamp(15px, 4.4vw, 20px); }
}

/* ---------------------------------------------------------------- last screen */
.end { min-height: 92svh; padding: 10svh 6vw 12svh; background: linear-gradient(to bottom, transparent, rgb(5 7 20 / .78) 42%); display: grid; align-content: center; justify-items: center; gap: clamp(22px, 4.5svh, 48px); text-align: center; }
.logo { width: min(90vw, 1000px); }

/* ---------------------------------------------------------------- movement tied to scrolling (where the browser can; otherwise all of it simply shows) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero { animation: leave linear both; animation-timeline: scroll(root block); animation-range: 0 60svh; }
    @keyframes leave { to { opacity: 0; transform: translateY(-5svh); } }
    .beat { animation: pass linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    @keyframes pass {
      0%, 18% { opacity: 0; transform: translateY(7svh) scale(.93); filter: blur(10px); }
      40%, 60% { opacity: 1; transform: none; filter: none; }
      82%, 100% { opacity: 0; transform: translateY(-7svh) scale(1.04); filter: blur(10px); }
    }
    .matter > *, .roadmap > .chip, .steps li, .end > * { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
    @keyframes rise { from { opacity: 0; transform: translateY(6svh) scale(.96); filter: blur(8px); } }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
}
