/* ════════════════════════════════════════════════════════════
   SOUL RUSH — marketing site (GitHub Pages, /docs)
   Palette + type are lifted straight from the game itself:
   near-black void, bone white, soul glow, crimson kept for
   danger only (in-game, red exists solely in sentinel eyes).
   ════════════════════════════════════════════════════════════ */

:root {
  --void: #050505;          /* page ground */
  --panel: #0b0b0d;         /* raised surfaces */
  --line: #232327;          /* hairlines, unlit rail */
  --bone: #e9e7e2;          /* primary text */
  --mist: #8f8d95;          /* secondary text */
  --soul: #ffffff;          /* glow cores */
  --crimson: #a41221;       /* deep accent — fills, glows */
  --crimson-bright: #d43a4a; /* legible accent on black */
  --sacred: #f2f0ea;        /* the pale liquid the depths ramp to — light bands */
  --ink: #26262b;           /* text on light bands */

  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Crimson Text", Georgia, serif;
  --font-utility: "JetBrains Mono", Consolas, monospace;

  --container: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--crimson); color: var(--soul); }

img { display: block; max-width: 100%; height: auto; }

a { color: var(--bone); text-decoration-color: var(--crimson-bright); text-underline-offset: 3px; }
a:hover { color: var(--soul); }

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* ── utility type ─────────────────────────────────────────── */

.eyebrow {
  font-family: var(--font-utility);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--mist);
}

.quote { font-style: italic; color: var(--mist); }

/* ── header: a sacred-white band over the void ────────────── */

.site-head {
  background: var(--sacred);
}

.site-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 20px;
}

.site-head a {
  font-family: var(--font-utility);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.site-head a:hover { color: var(--crimson); }
.site-head a:focus-visible { outline-color: var(--ink); }

/* the back arrow reads at a glance, larger than the tracked label */
.back-arrow {
  display: inline-block;
  font-size: 1.7em;
  line-height: 0;
  vertical-align: -0.14em;
  margin-right: 0.5em;
  letter-spacing: 0;
}

/* ── hero: the game's own menu, re-set in HTML ────────────── */

.hero {
  position: relative;
  padding-block: clamp(3rem, 9vh, 7rem) clamp(4rem, 10vh, 8rem);
  overflow: hidden;
}

/* the central light shaft the game casts down the play field */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 30%, rgba(255, 255, 255, 0.045) 50%, transparent 70%),
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(255, 255, 255, 0.05), transparent 60%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.hero-menu { text-align: center; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.4rem, 9.5vw, 6.6rem);
  line-height: 0.95;
  letter-spacing: 0.1em;
  color: var(--soul);
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.55),
    0 0 70px rgba(255, 255, 255, 0.22);
}
.hero-title span { display: block; }

.orn {
  display: block;
  width: min(260px, 62%);
  margin: 1.6rem auto 1.4rem;
  color: var(--bone);
  opacity: 0.85;
}

.tagline {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  letter-spacing: 0.14em;
  font-variant: small-caps;
}

.hero-stats {
  margin-top: 1.1rem;
  font-family: var(--font-utility);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--mist);
}

.hero-copy {
  max-width: 42ch;
  margin: 1.6rem auto 0;
  color: var(--mist);
}

/* plaque CTA — echo of the game's PLAY button */
.plaque {
  display: inline-block;
  margin-top: 2.2rem;
  padding: 1.05rem 2.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--bone);
  background: #0a0a0c;
  border: 1px solid rgba(233, 231, 226, 0.65);
  border-radius: 999px;
  box-shadow:
    0 0 22px rgba(255, 255, 255, 0.16),
    inset 0 0 14px rgba(255, 255, 255, 0.05);
  animation: plaque-breathe 4.5s ease-in-out infinite;
}
.plaque:hover {
  border-color: var(--crimson-bright);
  box-shadow:
    0 0 26px rgba(164, 18, 33, 0.35),
    inset 0 0 14px rgba(164, 18, 33, 0.12);
}

@keyframes plaque-breathe {
  0%, 100% { box-shadow: 0 0 18px rgba(255, 255, 255, 0.12), inset 0 0 14px rgba(255, 255, 255, 0.04); }
  50% { box-shadow: 0 0 30px rgba(255, 255, 255, 0.24), inset 0 0 16px rgba(255, 255, 255, 0.07); }
}

.plaque-sub {
  margin-top: 1rem;
  font-family: var(--font-utility);
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--mist);
}

/* floating motes, as in the game's cavern air */
.mote {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--soul);
  opacity: 0.22;
  animation: mote-drift 16s ease-in-out infinite alternate;
  pointer-events: none;
}
.mote:nth-child(2n) { animation-duration: 21s; width: 3px; height: 3px; }
.mote:nth-child(3n) { animation-delay: -7s; }

@keyframes mote-drift {
  from { transform: translate(0, 0); }
  to { transform: translate(22px, -60px); }
}

/* ── phone frames ─────────────────────────────────────────── */

.phone {
  position: relative;
  border: 1px solid #2a2a2e;
  border-radius: 30px;
  padding: 10px;
  background: #000;
  box-shadow:
    0 0 40px rgba(255, 255, 255, 0.05),
    0 24px 60px rgba(0, 0, 0, 0.6);
}
.phone img { border-radius: 20px; width: 100%; }

.hero-phone {
  width: min(320px, 80%);
  margin-inline: auto;
  transform: rotate(1.5deg);
}

/* ── sections ─────────────────────────────────────────────── */

.section { padding-block: clamp(4.5rem, 11vh, 8rem); }

.section-head { text-align: center; margin-bottom: clamp(2.5rem, 6vh, 4.5rem); }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: 0.12em;
  color: var(--soul);
  text-shadow: 0 0 26px rgba(255, 255, 255, 0.25);
  margin-top: 0.9rem;
}

.section-sub {
  max-width: 52ch;
  margin: 1rem auto 0;
  color: var(--mist);
}

/* ── the rite (how it plays) ──────────────────────────────── */

.rite-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.rite h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone);
  margin-bottom: 0.6rem;
}

.rite .eyebrow { display: block; margin-bottom: 1.1rem; }

.rite p { color: var(--mist); font-size: 1.05rem; max-width: 30ch; margin-inline: auto; }

/* ── gallery ──────────────────────────────────────────────── */

.strip-wrap {
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.strip {
  display: flex;
  gap: clamp(18px, 3vw, 30px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-block: 18px 26px;
  padding-inline: max(24px, calc(50vw - 620px));
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.shot {
  flex: 0 0 auto;
  width: clamp(200px, 24vw, 250px);
  scroll-snap-align: center;
}

.shot figcaption {
  margin-top: 0.85rem;
  text-align: center;
  font-family: var(--font-utility);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mist);
}

/* ── the descent (six phases on two rails) ────────────────── */

.descent { position: relative; }

.descent-track {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.descent-track svg { width: 100%; height: 100%; display: block; overflow: visible; }

.rail-base { stroke: var(--line); stroke-width: 2; fill: none; }
.rail-lit {
  stroke: var(--soul);
  stroke-width: 2;
  fill: none;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

.descent-orb {
  position: absolute;
  top: 0;   /* anchor to the track origin — without this, the static position */
  left: 0;  /* (below the 100%-tall svg) offsets every translate() past the page */
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--soul);
  box-shadow:
    0 0 10px 2px rgba(255, 255, 255, 0.9),
    0 0 26px 10px rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.phase {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: clamp(190px, 26vh, 250px);
  padding-block: 2.2rem;
}

.phase-body { grid-column: 2; padding-left: clamp(1.5rem, 5vw, 4rem); }
.phase.alt .phase-body { grid-column: 1; grid-row: 1; padding-left: 0; padding-right: clamp(1.5rem, 5vw, 4rem); text-align: right; }

.phase-node {
  position: absolute;
  top: 50%;
  left: 22%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--void);
  transition: border-color 0.5s ease, background-color 0.5s ease, box-shadow 0.5s ease;
}
.phase.alt .phase-node { left: 78%; }
.phase-node.lit {
  border-color: var(--soul);
  background: var(--soul);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.7);
}
.phase.final .phase-node.lit {
  border-color: var(--crimson-bright);
  background: var(--crimson);
  box-shadow: 0 0 16px rgba(212, 58, 74, 0.75);
}

.phase-num {
  font-family: var(--font-utility);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  color: var(--mist);
}

.phase-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: 0.1em;
  color: var(--soul);
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.28);
  margin: 0.35rem 0 0.5rem;
}
.phase.final .phase-name {
  color: #f3c9ce;
  text-shadow: 0 0 22px rgba(212, 58, 74, 0.5);
}

.phase-quote { font-size: 1.15rem; }

.phase-desc { color: var(--mist); font-size: 1rem; margin-top: 0.4rem; }

/* ── final call ───────────────────────────────────────────── */

.finale { text-align: center; }
.finale .orn { margin-top: 0; }

/* ── footer: the pale liquid rises to meet the page ───────── */
/* Layered waves echo the game's liquid bands (dark → mist → sacred),
   then the footer body sits inside the white liquid itself. */

.liquid {
  display: block;
  margin-top: clamp(3rem, 8vh, 6rem);
}
.liquid svg {
  display: block;
  width: 100%;
  height: clamp(56px, 9vw, 110px);
}

.site-foot {
  background: var(--sacred);
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.4rem;
  justify-content: space-between;
  align-items: center;
  padding-block: 2.4rem;
  font-family: var(--font-utility);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
}
.foot-row a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(38, 38, 43, 0.45);
  text-underline-offset: 5px;
}
.foot-row a:hover { color: var(--crimson); text-decoration-color: var(--crimson); }
.foot-row a:focus-visible { outline-color: var(--ink); }

/* ── scroll reveal ────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── page-load rite (hero only) ───────────────────────────── */

.rise { animation: rise 1.1s ease-out both; }
.rise-2 { animation: rise 1.1s ease-out 0.25s both; }
.rise-3 { animation: rise 1.1s ease-out 0.5s both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ── privacy page ─────────────────────────────────────────── */

.doc { max-width: 70ch; margin-inline: auto; padding-block: clamp(2rem, 6vh, 4rem) clamp(4rem, 8vh, 6rem); }

.doc h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: 0.1em;
  color: var(--soul);
  text-shadow: 0 0 26px rgba(255, 255, 255, 0.22);
}

.doc-updated {
  font-family: var(--font-utility);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mist);
  margin: 1rem 0 2.5rem;
}

.doc h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.1em;
  color: var(--bone);
  margin: 2.6rem 0 0.8rem;
}

.doc h3 {
  font-family: var(--font-utility);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mist);
  margin: 1.8rem 0 0.6rem;
}

.doc p, .doc li { color: var(--mist); }
.doc p { margin-block: 0.8rem; }
.doc a { text-decoration-color: rgba(233, 231, 226, 0.4); }
.doc a:hover { text-decoration-color: var(--bone); }
.doc ul { padding-left: 1.4rem; margin-block: 0.6rem; }
.doc li { margin-block: 0.35rem; }
.doc strong { color: var(--bone); font-weight: 600; }

/* ── responsive ───────────────────────────────────────────── */

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-phone { margin-top: 1rem; transform: none; width: min(280px, 74%); }
  .rite-grid { grid-template-columns: 1fr; gap: 2.6rem; }
}

@media (max-width: 480px) {
  .plaque {
    white-space: nowrap;
    padding: 0.95rem 1.7rem;
    font-size: 0.74rem;
    letter-spacing: 0.2em;
  }
}

@media (max-width: 720px) {
  /* descent collapses to a single left rail */
  .phase { grid-template-columns: 1fr; min-height: 0; }
  .phase-body,
  .phase.alt .phase-body {
    grid-column: 1;
    padding: 0 0 0 56px;
    text-align: left;
  }
  .phase-node,
  .phase.alt .phase-node { left: 26px; }
}

/* ── reduced motion ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .rise-2, .rise-3, .plaque, .mote { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .descent-orb { display: none; }
  .rail-lit { display: none; }
  .phase-node { border-color: var(--bone); }
}
