/* Hullrot landing — one page, mobile first. Palette and face match the app's
   @theme tokens (frontend/src/styles/app.css); duplicated rather than imported
   because this page must keep working as a standalone static file. */
@font-face {
  font-family: "Oxanium";
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/oxanium-latin.woff2") format("woff2");
}

:root {
  --bg: #05080e;
  --surface: #1b2433;
  --surface-2: #111824;
  --border: #2a3850;
  --text: #e4f2ff;
  --text-dim: #8ea3bf;
  --gold: #2ee6ff;          /* the app's accent token is named gold; it is crystal cyan */
  --gold-bright: #a2f6ff;
  --amber: #ffb22e;
  --magenta: #e04ff5;
  --font-heading: "Oxanium", "Segoe UI", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: max(1rem, env(safe-area-inset-left));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 700; letter-spacing: .02em; margin-bottom: 1.5rem; }
h3 { font-size: 1.15rem; font-weight: 700; color: var(--gold-bright); margin-bottom: .4rem; }
p { margin: 0; color: var(--text-dim); }
a { color: var(--gold); }

/* Hero — art band on top, copy under it, so the headline never covers the crew */
.hero { position: relative; overflow: hidden; }
.hero-media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; max-height: 72svh; width: 100%; }
@media (min-width: 48rem) { .hero-media { aspect-ratio: 16 / 7; } }
.hero-art, .hero-video, .hero-dust { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art, .hero-video { object-fit: cover; object-position: 50% 62%; }
.hero-video { opacity: 0; transition: opacity .8s ease; }
.hero-media.playing .hero-video { opacity: 1; }
.hero-dust { pointer-events: none; }
.hero-shade { position: absolute; left: 0; right: 0; top: 0; height: min(72svh, 75vw); background: linear-gradient(180deg, rgba(5,8,14,.65) 0%, rgba(5,8,14,0) 25%, rgba(5,8,14,0) 60%, var(--bg) 99%); pointer-events: none; }
@media (min-width: 48rem) { .hero-shade { height: min(72svh, 43.75vw); } }
.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 78rem; margin: 0 auto; padding: max(1rem, env(safe-area-inset-top)) var(--gutter) 1rem;
}
.topbar-logo img { height: 2.75rem; width: auto; filter: drop-shadow(0 2px 12px rgba(0,0,0,.6)); }
.hero-copy {
  position: relative; margin: clamp(-5rem, -6vw, -2rem) auto 0; max-width: 54rem; text-align: center;
  padding: 0 var(--gutter) clamp(3rem, 7vw, 5rem);
}
.hero h1 { font-size: clamp(3rem, 11vw, 6.5rem); font-weight: 800; line-height: .95; letter-spacing: -.02em; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.glow { color: var(--gold); text-shadow: 0 0 40px rgba(46,230,255,.45); }
.pitch { color: #c3d3e6; font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 42rem; margin: 1.5rem auto 0; }
.note { margin-top: 1.25rem; font-size: .9rem; }

.cta { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.8rem;
  font: 800 1.05rem/1 var(--font-heading); letter-spacing: .02em; text-decoration: none;
  border-radius: 999px; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn-primary { min-height: 56px; padding: 0 2.2rem; background: var(--gold); color: #03141a; box-shadow: 0 0 28px rgba(46,230,255,.35); }
.btn-primary:hover, .btn-primary:focus-visible { transform: translateY(-1px); background: var(--gold-bright); box-shadow: 0 0 40px rgba(46,230,255,.55); }
.btn-ghost { min-height: 56px; padding: 0 2.2rem; color: var(--text); background: rgba(228,242,255,.08); font-weight: 700; }
.btn-ghost:hover, .btn-ghost:focus-visible { background: rgba(228,242,255,.16); }
.btn-outline { border: 1px solid var(--gold); color: var(--gold); background: rgba(5,8,14,.4); }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--gold); color: #03141a; }
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* Sections */
.section { padding: clamp(3.5rem, 9vw, 6rem) var(--gutter); max-width: 78rem; margin: 0 auto; }
.big { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; margin-bottom: 2rem; }
.dim { color: var(--text-dim); }
p { line-height: 1.6; }

.verbs { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.verb { font-size: clamp(2.6rem, 6vw, 3.5rem); font-weight: 800; line-height: 1; margin-bottom: .75rem; }
.verb-mine { color: var(--gold); }
.verb-fight { color: var(--amber); }
.verb-leave { color: var(--magenta); }
.verbs p { color: #c3d3e6; font-size: 1.05rem; }

.layers { display: grid; gap: 1.25rem; }
.layer { position: relative; overflow: hidden; border-radius: 14px; min-height: 15rem; display: flex; align-items: center; background: var(--surface-2); }
.layer > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.layer::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(5,8,14,.78) 45%, rgba(5,8,14,.1) 100%); }
.layer-copy { position: relative; z-index: 1; padding: clamp(1.5rem, 4vw, 2.5rem); max-width: 30rem; }
.layer-tag { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .5rem; }
.layer h3 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); color: var(--text); margin-bottom: .4rem; }
.layer p { color: #c3d3e6; }
.layer-crust .layer-tag { color: var(--gold); }
.layer-mantle .layer-tag { color: var(--amber); }
.layer-core .layer-tag { color: var(--magenta); }
@media (max-width: 40rem) {
  .layer::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(5,8,14,.8) 55%, rgba(5,8,14,.15) 100%); }
  .layer { align-items: flex-end; min-height: 17rem; }
}

.band { background: #0b111b; border-block: 1px solid #1a2433; }
.stakes { display: flex; flex-wrap: wrap; gap: 3rem; align-items: center; }
.stakes-copy { flex: 1 1 22rem; }
.stakes-copy .big { margin-bottom: 1rem; }
.stakes-copy p { color: #c3d3e6; font-size: 1.05rem; }
.outcomes { flex: 1 1 24rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.outcome { background: var(--bg); border: 1px solid; border-radius: 14px; padding: 1.5rem; }
.outcome b { display: block; font: 700 1.15rem var(--font-heading); margin-bottom: .35rem; }
.outcome p { color: #c3d3e6; }
.outcome-win { border-color: #1f6f7c; }
.outcome-win b { color: var(--gold); }
.outcome-lose { border-color: #6b2a75; }
.outcome-lose b { color: #f08cff; }

.classes { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.classes article { display: flex; gap: 1rem; align-items: center; background: #0b111b; border-radius: 14px; padding: 1rem; }
.classes article > img { width: 5.5rem; height: 5.5rem; flex: none; }
.classes h3 { color: var(--text); font-size: 1.25rem; margin-bottom: .2rem; }
.classes p { color: #c3d3e6; }

.closer { text-align: center; padding-bottom: clamp(5rem, 12vw, 8rem); }
.closer .big { font-size: clamp(2.2rem, 6vw, 4rem); }

.footer {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  padding: 1.5rem var(--gutter) max(1.5rem, env(safe-area-inset-bottom)); padding-left: calc(var(--gutter) + 3.5rem);
  border-top: 1px solid #1a2433; color: var(--text-dim); font-size: .9rem;
}

.music-toggle {
  position: fixed;
  left: max(0.9rem, env(safe-area-inset-left));
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  color: var(--text-dim);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.music-toggle:hover,
.music-toggle:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

/* ── Interaction layer ──────────────────────────────────────────────────────
   Hover only ever *enhances*: every effect below has a focus or :active twin
   or is decoration, so touch users lose nothing. Pointer-follow glows read
   --mx/--my, set by the script for fine pointers only. All motion is dropped
   under prefers-reduced-motion at the bottom of this block. */

.topbar { transition: background-color .25s ease, padding .25s ease, box-shadow .25s ease; }
.topbar.stuck {
  position: fixed; max-width: none; z-index: 50;
  padding: .6rem max(var(--gutter), calc((100% - 78rem) / 2 + var(--gutter)));
  background: rgba(5,8,14,.86); backdrop-filter: blur(10px); box-shadow: 0 1px 0 #1a2433;
}
.topbar.stuck .topbar-logo img { height: 2.25rem; }
.topbar-logo { display: inline-flex; border-radius: 6px; }
.topbar-logo img { transition: filter .2s ease, transform .2s ease, height .25s ease; }
.topbar-logo:hover img, .topbar-logo:focus-visible img { filter: drop-shadow(0 0 14px rgba(46,230,255,.6)); transform: scale(1.04); }

.btn:active { transform: translateY(1px) scale(.97); }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  pointer-events: none;
}
.btn-primary:hover::after, .btn-primary:focus-visible::after { transform: translateX(120%); transition: transform .6s ease; }

.hero-art, .hero-video { transition: transform .4s ease-out, opacity .8s ease; will-change: transform; transform: translate3d(var(--px, 0), var(--py, 0), 0) scale(1.04); }
.glow { display: inline-block; cursor: pointer; transition: text-shadow .2s ease; }
.glow:hover { text-shadow: 0 0 60px rgba(46,230,255,.8); }
.glow.ringing { animation: ring-word .55s ease-out; }
@keyframes ring-word {
  0% { transform: rotate(0); } 20% { transform: rotate(-3deg) scale(1.04); } 40% { transform: rotate(2.5deg); }
  60% { transform: rotate(-1.5deg); } 80% { transform: rotate(.8deg); } 100% { transform: rotate(0); }
}

/* Pointer-follow glow shared by the cards */
.verbs > div, .layer, .outcome, .classes article { --mx: 50%; --my: 50%; position: relative; }
.verbs > div::before, .outcome::before, .classes article::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(260px circle at var(--mx) var(--my), var(--tint, rgba(46,230,255,.14)), transparent 70%);
  transition: opacity .25s ease;
}
.verbs > div:hover::before, .outcome:hover::before, .classes article:hover::before { opacity: 1; }

.verbs > div { border-radius: 14px; padding: 1rem; margin: -1rem; transition: transform .25s ease; }
.verbs > div:nth-child(1) { --tint: rgba(46,230,255,.12); }
.verbs > div:nth-child(2) { --tint: rgba(255,178,46,.12); }
.verbs > div:nth-child(3) { --tint: rgba(224,79,245,.12); }
.verb { display: inline-block; transition: transform .25s ease, text-shadow .25s ease; }
.verbs > div:hover .verb, .verbs > div:active .verb { transform: translateX(6px) skewX(-6deg); text-shadow: 0 0 30px currentColor; }

.layer { border: 1px solid transparent; transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease, opacity .3s ease; }
.layer > img { transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .4s ease; transform-origin: var(--mx) var(--my); }
.layer-tag { transition: letter-spacing .3s ease; }
.layer h3 { transition: transform .3s ease; }
.layer:hover > img, .layer:active > img { transform: scale(1.08); filter: brightness(1.2) saturate(1.15); }
.layer:hover .layer-tag { letter-spacing: .22em; }
.layer:hover h3 { transform: translateX(6px); }
.layer-crust:hover { border-color: rgba(46,230,255,.5); box-shadow: 0 0 40px rgba(46,230,255,.15); }
.layer-mantle:hover { border-color: rgba(255,178,46,.5); box-shadow: 0 0 40px rgba(255,178,46,.15); }
.layer-core:hover { border-color: rgba(224,79,245,.55); box-shadow: 0 0 40px rgba(224,79,245,.2); }
@media (hover: hover) { .layers:hover .layer:not(:hover) { opacity: .55; } }

.outcome { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.outcome-win { --tint: rgba(46,230,255,.16); }
.outcome-lose { --tint: rgba(224,79,245,.16); }
.outcome-win:hover, .outcome-win:active { border-color: var(--gold); box-shadow: 0 0 30px rgba(46,230,255,.2); transform: translateY(-3px); }
.outcome-lose:hover, .outcome-lose:active { border-color: var(--magenta); box-shadow: 0 0 30px rgba(224,79,245,.22); transform: translateY(-3px); }
.outcome-lose:hover > p { animation: shake .35s ease; }
@keyframes shake { 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }

.classes article { border: 1px solid transparent; transition: transform .25s ease, border-color .25s ease, background-color .25s ease; }
.classes article:nth-child(1) { --tint: rgba(255,140,60,.16); }
.classes article:nth-child(2) { --tint: rgba(255,90,90,.16); }
.classes article:nth-child(3) { --tint: rgba(46,230,255,.16); }
.classes article:nth-child(4) { --tint: rgba(255,210,60,.16); }
.classes article > img { transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.classes article:hover, .classes article:active { transform: translateY(-4px); border-color: #2a3850; background: #0f1724; }
.classes article:hover > img, .classes article:active > img { transform: translateY(-6px) rotate(-6deg) scale(1.08); }

.footer a { transition: color .2s ease; }

.footer a:hover { color: var(--gold-bright); }

/* 3-D Secure / PCI DSS badges — full row under the footer line, per domain */
.pay-security { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.pay-security[hidden] { display: none; }
.pay-badges { display: flex; gap: .5rem; align-items: center; }
/* Official plates keep their colours; dimmed and ringed so they sit in the footer's tone. */
.pay-badges img { display: block; height: 28px; width: auto; border-radius: 4px; box-shadow: 0 0 0 1px var(--border); opacity: .85; transition: opacity .2s ease; }
.pay-badges img:hover { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .pay-badges img { transition: none; } }
.pay-security p { margin: 0; flex: 1 1 18rem; max-width: 45rem; font-size: .75rem; line-height: 1.6; }

/* Tap / click ring: every swing rings */
.tap-ring {
  position: fixed; z-index: 80; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  border: 2px solid var(--gold); box-shadow: 0 0 12px rgba(46,230,255,.7); pointer-events: none;
  animation: tap-ring .6s ease-out forwards;
}
@keyframes tap-ring { to { transform: scale(7); opacity: 0; border-width: 1px; } }

/* Scroll reveal — only hidden once the script has marked the page, so no-JS shows everything */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .topbar, .topbar-logo img, .hero-art, .hero-video, .verb, .verbs > div, .layer, .layer > img, .layer h3, .layer-tag,
  .outcome, .classes article, .classes article > img, .btn-primary::after { transition: none !important; }
  .hero-art, .hero-video { transform: none; }
  .hero-video, .hero-dust { display: none; }
  .glow.ringing, .outcome-lose:hover > p { animation: none; }
  .tap-ring { display: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Expandable cards ───────────────────────────────────────────────────────
   Every card is a disclosure: a real <button> in its heading carries
   aria-expanded, and a click anywhere on a closed card presses it. Panels are
   open by default and only collapse once the script adds .xp-on, so the facts
   are all there without JS. One card open per group; an open grid card spans
   the whole row and `dense` flow backfills the gap. */
.xp-toggle {
  appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit;
  letter-spacing: inherit; text-align: inherit; text-transform: inherit; cursor: pointer;
}
.xp-toggle:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 4px; }
.xp-on .xp:not(.open) { cursor: pointer; }

.xp-icon {
  position: absolute; top: .9rem; right: .9rem; z-index: 2; width: 2rem; height: 2rem; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent, var(--gold)) 55%, transparent);
  background: rgba(5,8,14,.55); pointer-events: none; transition: transform .35s ease, background-color .25s ease, border-color .25s ease;
}
.xp-icon::before, .xp-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: .8rem; height: 2px; margin: -1px 0 0 -.4rem;
  background: var(--accent, var(--gold)); border-radius: 1px;
}
.xp-icon::after { transform: rotate(90deg); }
.xp:hover .xp-icon { background: color-mix(in srgb, var(--accent, var(--gold)) 22%, rgba(5,8,14,.6)); }
.xp.open .xp-icon { transform: rotate(135deg); border-color: var(--accent, var(--gold)); }
.no-xp .xp-icon { display: none; }

.xp-more { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s cubic-bezier(.2,.7,.2,1); }
.xp-inner { overflow: hidden; min-height: 0; transition: opacity .35s ease .05s; }
.xp-on .xp:not(.open) .xp-more { grid-template-rows: 0fr; }
.xp-on .xp:not(.open) .xp-inner { opacity: 0; transition-delay: 0s; }
.xp-inner > :first-child { margin-top: 1.25rem; }
.xp-inner > * + * { margin-top: 1rem; }

.xp-h { font-size: 1.1rem; color: var(--text); }
.xp-p { color: #c3d3e6; }
.facts { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); margin-bottom: 0; }
.facts > div { background: rgba(228,242,255,.05); border: 1px solid rgba(228,242,255,.08); border-radius: 10px; padding: .7rem .9rem; }
.facts dt { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.facts dd { margin: .15rem 0 0; font: 800 1.5rem/1.1 var(--font-heading); color: var(--accent, var(--gold)); }
.notes, .kit, .phases { list-style: none; margin-bottom: 0; padding: 0; display: grid; gap: .55rem; }
.notes li { position: relative; padding-left: 1.2rem; color: #c3d3e6; line-height: 1.55; }
.notes li::before {
  content: ""; position: absolute; left: .1rem; top: .6em; width: .45rem; height: .45rem; transform: rotate(45deg);
  background: var(--accent, var(--gold)); border-radius: 1px;
}
.kit li, .phases li { color: #c3d3e6; line-height: 1.5; }
.kit b, .phases b { display: block; font: 700 1rem var(--font-heading); color: var(--accent, var(--gold)); }
.phases { counter-reset: ph; }
.phases li { counter-increment: ph; position: relative; padding-left: 2.4rem; }
.phases li::before {
  content: counter(ph); position: absolute; left: 0; top: .1rem; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: grid; place-items: center; font: 800 .85rem var(--font-heading); color: #05080e; background: var(--accent, var(--gold));
}
.role { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent, var(--gold)); }
.aside-note { margin-top: 1.5rem; max-width: 46rem; color: var(--text-dim); }

/* Accents */
.verbs > .xp:nth-child(1) { --accent: var(--gold); }
.verbs > .xp:nth-child(2) { --accent: var(--amber); }
.verbs > .xp:nth-child(3) { --accent: var(--magenta); }
.layer-crust { --accent: var(--gold); }
.layer-mantle { --accent: var(--amber); }
.layer-core { --accent: var(--magenta); }
.layer-golem { --accent: #f08cff; }
.layer-golem .layer-tag { color: #f08cff; }
.layer-golem > img { object-position: 50% 40%; }
.outcome-win { --accent: var(--gold); }
.outcome-lose { --accent: #f08cff; }
.classes > .xp:nth-child(1) { --accent: #ff9a4d; }
.classes > .xp:nth-child(2) { --accent: #ff7a6b; }
.classes > .xp:nth-child(3) { --accent: var(--gold); }
.classes > .xp:nth-child(4) { --accent: #ffd23f; }

/* Grid reflow */
.verbs, .classes, .outcomes { grid-auto-flow: dense; }
.verbs > .xp.open, .classes > .xp.open, .outcomes > .xp.open { grid-column: 1 / -1; }
.verbs > .xp { padding-right: 3rem; }
.verbs > .xp.open { background: #0b111b; }
.verbs > .xp.open .xp-inner { max-width: 52rem; }
.outcome { padding-right: 3.25rem; }
.classes article { display: grid; grid-template-columns: auto minmax(0, 1fr); padding-right: 3.25rem; }
.classes article.open { grid-template-columns: minmax(0, 1fr); }
.classes .xp-more { grid-column: 1 / -1; }
.classes article.open { background: #0f1724; border-color: #2a3850; }
.classes article.open > img { display: none; }
.classes article.open .xp-inner { max-width: 60rem; }
.layer-copy { transition: max-width .35s ease; }
.layer.open .layer-copy { max-width: 46rem; }
.layer.open::after { background: linear-gradient(90deg, var(--bg) 0%, rgba(5,8,14,.9) 55%, rgba(5,8,14,.35) 100%); }
@media (max-width: 40rem) {
  .layer.open::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(5,8,14,.9) 70%, rgba(5,8,14,.3) 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .xp-more, .xp-inner, .xp-icon, .layer-copy { transition: none !important; }
}
.kit { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); column-gap: 1.25rem; }

/* ── Backgrounds: the page is a descent ─────────────────────────────────────
   A fixed low-poly rock layer (the game's cave facets) sits behind everything;
   three tints cross-fade cyan → amber → magenta as you scroll; the script
   sets their opacities (--tc/--ta/--tm). Without JS it stays a cyan-tinted
   cave, which is fine. */
.bg-depth { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.bg-facets { position: absolute; inset: 0; background: url(assets/facets.svg) center / cover no-repeat; opacity: .32; }
.bg-facets::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 50% 45%, transparent 0%, var(--bg) 100%); }
.tint { position: absolute; inset: 0; }
.tint-cyan { background: radial-gradient(ellipse 70% 50% at 15% 10%, rgba(46,230,255,.13), transparent 70%); opacity: var(--tc, 1); }
.tint-amber { background: radial-gradient(ellipse 70% 55% at 85% 50%, rgba(255,178,46,.10), transparent 70%); opacity: var(--ta, 0); }
.tint-magenta { background: radial-gradient(ellipse 80% 60% at 30% 90%, rgba(224,79,245,.15), transparent 70%); opacity: var(--tm, 0); }
/* Root paints the base colour so the fixed layer (z -1) shows through the body */
html { background: var(--bg); }
body { background: transparent; }

/* Scenes: a game render behind a section, faded into the page at both ends */
.scene { position: relative; isolation: isolate; }
.scene::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; filter: blur(2px) saturate(.9);
  background-size: cover; background-position: center;
}
.scene::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(5,8,14,.55) 22%, rgba(5,8,14,.7) 78%, var(--bg) 100%);
}
.scene-station::before { background-image: url(assets/scenes/tile-contracts.webp); background-position: center 40%; }
.scene-lobby::before { background-image: url(assets/scenes/tile-vendor.webp); }
.scene-delve::before { background-image: url(assets/scenes/tile-delve.webp); opacity: .7; filter: saturate(1.05); }
.scene-insure::before { background-image: url(assets/scenes/tile-insurance.webp); opacity: .3; }
.band.scene { background: transparent; }
.band.scene::after { background: linear-gradient(180deg, rgba(11,17,27,.95) 0%, rgba(11,17,27,.8) 50%, rgba(11,17,27,.95) 100%); }
.closer-wrap .closer { padding-top: clamp(6rem, 14vw, 10rem); padding-bottom: clamp(6rem, 14vw, 10rem); }
.closer-wrap .big { text-shadow: 0 4px 30px rgba(0,0,0,.8); }

/* Depth meter: fixed rail on wide screens, doubles as section nav */
.depth-meter { display: none; }
@media (min-width: 80rem) {
  .depth-meter {
    display: flex; position: fixed; right: 1.25rem; top: 50%; transform: translateY(-50%); z-index: 40;
    gap: .75rem; align-items: stretch; height: min(60vh, 26rem);
    opacity: 0; transition: opacity .4s ease;
  }
  .depth-meter.on { opacity: 1; }
  .dm-track { position: relative; width: 3px; border-radius: 3px; background: rgba(228,242,255,.12); order: 2; }
  .dm-fill { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--p, 0) * 100%); border-radius: 3px;
    background: linear-gradient(180deg, var(--gold), var(--amber) 55%, var(--magenta)); }
  .dm-dot { position: absolute; left: 50%; top: calc(var(--p, 0) * 100%); width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 12px rgba(255,255,255,.8); }
  .depth-meter ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: space-between; text-align: right; }
  .depth-meter a {
    display: block; padding: .3rem .4rem; font: 600 .7rem var(--font-heading); letter-spacing: .14em; text-transform: uppercase;
    color: var(--text-dim); text-decoration: none; transition: color .2s ease, transform .2s ease;
  }
  .depth-meter a:hover, .depth-meter a:focus-visible { color: var(--text); transform: translateX(-3px); }
  .depth-meter a.here { color: var(--gold-bright); }
}

/* Verb icons */
.verb-icon { width: 4rem; height: 4rem; object-fit: contain; margin-bottom: .5rem; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.verbs > .xp:hover .verb-icon, .verbs > .xp.open .verb-icon { transform: translateY(-4px) rotate(-6deg) scale(1.06); }

/* Loot strip */
.loot-strip { padding-bottom: clamp(2rem, 6vw, 4rem); overflow: hidden; }
.loot-head { padding-bottom: 1.5rem; }
.loot-head .big { margin-bottom: .5rem; }
.loot-head p { color: #c3d3e6; }
.marquee { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover { animation-play-state: paused; }
.marquee-row { list-style: none; margin: 0; padding: 0 0 0 1rem; display: flex; gap: 1rem; }
.marquee-row li {
  flex: none; width: 11rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem;
  padding: 1rem .75rem; border-radius: 14px; background: rgba(11,17,27,.85); border: 1px solid #1a2433;
  transition: transform .25s ease, border-color .25s ease, background-color .25s ease;
}
.marquee-row li:hover { transform: translateY(-6px); border-color: #2a3850; background: #0f1724; }
.marquee-row img { width: 5.5rem; height: 5.5rem; object-fit: contain; margin-bottom: .35rem; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.marquee-row li:hover img { transform: scale(1.12) rotate(-5deg); }
.marquee-row b { font: 700 .95rem var(--font-heading); color: var(--text); }
.marquee-row .v { font: 800 1.1rem var(--font-heading); color: var(--gold); }
.marquee-row .d { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; width: auto; overflow-x: auto; padding-bottom: .5rem; }
  .marquee-row[aria-hidden="true"] { display: none; }
}

/* Panel media */
.xp-split { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 56rem) { .xp-split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; } }
.xp-shot { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid #1f2a3c; background: #0b111b; }
.xp-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.xp-shot figcaption { padding: .6rem .8rem; font-size: .85rem; color: var(--text-dim); }

.finds { list-style: none; margin-bottom: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); }
.finds li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .1rem; padding: .6rem; border-radius: 10px; background: rgba(228,242,255,.05); border: 1px solid rgba(228,242,255,.08); }
.finds img { width: 3.5rem; height: 3.5rem; object-fit: contain; }
.finds b { font: 700 .8rem var(--font-heading); color: var(--text); line-height: 1.2; }
.finds span { font: 800 .95rem var(--font-heading); color: var(--accent, var(--gold)); }

.outcome-shot { display: block; width: calc(100% + 3.25rem + 1.5rem); max-width: none; margin: -1.5rem -3.25rem 1rem -1.5rem; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 13px 13px 0 0; opacity: .9; transition: opacity .25s ease, filter .25s ease; }
.outcome:hover .outcome-shot { opacity: 1; filter: brightness(1.1); }
.outcome { overflow: hidden; }
.outcome .xp-icon { top: .75rem; }
.chip { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .75rem .35rem .4rem; border-radius: 999px; background: rgba(228,242,255,.06); border: 1px solid rgba(228,242,255,.1); font-size: .85rem; color: var(--text); }
.chip img { width: 1.25rem; height: 1.25rem; object-fit: contain; }

.class-split { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 48rem) { .class-split { grid-template-columns: 11rem minmax(0, 1fr); align-items: start; } }
.class-full { width: 11rem; height: auto; justify-self: center; filter: drop-shadow(0 10px 24px rgba(0,0,0,.6)); }
.class-split > div > * + * { margin-top: 1rem; }
.xp-sub { font: 700 .75rem var(--font-heading); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.talents { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.talents li { display: flex; gap: .75rem; align-items: flex-start; }
.talents img { width: 3rem; height: 3rem; flex: none; border-radius: 10px; transition: transform .3s ease, filter .3s ease; }
.talents li:hover img { transform: scale(1.1); filter: drop-shadow(0 0 10px var(--accent, var(--gold))); }
.talents b { display: block; font: 700 .95rem var(--font-heading); color: var(--text); }
.talents span { display: block; font-size: .88rem; font-style: italic; color: var(--text-dim); line-height: 1.45; }
@media (max-width: 47.99rem) { .class-full { width: 7.5rem; } }
