/* assimilMATE — Warm Current / Night Current semantic surface system.
   Token values follow brand/ui-surfaces/SURFACE_COLOR_DIRECTION.md. */

/* ————————————————————— Tokens ————————————————————— */

:root {
  --shell: #DDD9E3;
  --rail: #182037;
  --queue: #ECE8ED;
  --content: #FAF7F2;
  --inspector: #F0EBF4;
  --raised: #FFFFFF;
  --sunken: #DED9E3;
  --hov: #E3DFE6;
  --sel: #DCE4FA;
  --rail-hov: #222B46;
  --rail-sel: #2A3657;
  --ink: #111831;
  --ink-2: #465068;
  --ink-3: #566078;
  --rail-ink: #F7F5F1;
  --rail-ink-2: #C5CDDC;
  --rail-ink-3: #9FAABD;
  --action: #2450CF;
  --action-fill: #2450CF;
  --on-action: #F7F5F1;
  --sel-stroke: #3157C9;
  --bd-strong: #6F788F;
  --bd-soft: #C9C4D0;
  --src-sapphire: #2450CF;      --src-sapphire-soft: #E8EEFF;
  --src-coral: #A8443D;         --src-coral-soft: #FBE9E7;
  --src-amber: #805000;         --src-amber-soft: #FFF2D9;
  --src-lilac: #5E43D1;         --src-lilac-soft: #EEEAFE;
  /* Status hues darkened slightly from the candidate spec values so status
     words pass 4.5:1 on the warm planes (spec asks for implementation QA). */
  --st-healthy: #237654;
  --st-attention: #8F500B;
  --st-critical: #A03B4A;
  --st-paused: #576179;
  --midnight-band: #131A2E;     /* stays midnight in both appearances */
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

:root[data-theme="night"] {
  --shell: #080B14;
  --rail: #05070D;
  --queue: #11172A;
  --content: #0A0D15;
  --inspector: #151426;
  --raised: #171E2E;
  --sunken: #060810;
  --hov: #1B2438;
  --sel: #26345F;
  --rail-hov: #1B2438;
  --rail-sel: #26345F;
  --ink: #F7F5F1;
  --ink-2: #BBC4D6;
  --ink-3: #98A3BA;
  --rail-ink: #F7F5F1;
  --rail-ink-2: #BBC4D6;
  --rail-ink-3: #98A3BA;
  --action: #9BB4FF;
  --action-fill: #86A4FF;
  --on-action: #111831;
  --sel-stroke: #86A4FF;
  --bd-strong: #74809E;
  --bd-soft: #3A4663;
  --src-sapphire: #76A8FF;      --src-sapphire-soft: #172B4D;
  --src-coral: #FF9A8D;         --src-coral-soft: #3A2429;
  --src-amber: #F3C66E;         --src-amber-soft: #352B19;
  --src-lilac: #BBA4FF;         --src-lilac-soft: #292345;
  --st-healthy: #57C690;
  --st-attention: #E0A34E;
  --st-critical: #F08897;
  --st-paused: #98A3BA;
  color-scheme: dark;
}

/* ————————————————————— Base ————————————————————— */

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

html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--content);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; color: var(--ink); }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

::selection { background: var(--sel); color: var(--ink); }

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

html.theming, html.theming *, html.theming *::before, html.theming *::after {
  transition: background-color 0.55s ease, color 0.55s ease,
    border-color 0.55s ease, fill 0.55s ease, stroke 0.55s ease,
    box-shadow 0.55s ease !important;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -3.5rem;
  z-index: 60;
  padding: 0.55rem 1rem;
  background: var(--rail); color: var(--rail-ink);
  font-size: 0.875rem; font-weight: 500;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  transition: top 0.25s var(--ease);
}
.skip-link:focus-visible { top: 0; }

/* ————————————————————— Midnight rail ————————————————————— */

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 76px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.1rem 0 1.2rem;
  background: var(--rail);
}

.rail-mark { display: block; line-height: 0; border-radius: 10px; }
.rail-mark img { width: 40px; height: 40px; border-radius: 10px; }

.wordmark {
  margin: 1.3rem 0 0;
  height: 158px;
  width: 24px;
  position: relative;
  user-select: none;
}
.wordmark img {
  position: absolute;
  left: 50%; top: 50%;
  width: 158px; height: auto;
  max-width: none;
  transform: translate(-50%, -50%) rotate(90deg);
}

.rail-nav { flex: 1; display: flex; align-items: center; }
.rail-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; }
.rail-nav a {
  position: relative;
  display: flex; align-items: center;
  padding: 0.3rem;
  color: var(--rail-ink-3);
  text-decoration: none;
  font-size: 0.8125rem;
}
.rn-tick {
  display: block;
  width: 14px; height: 2px;
  background: var(--rail-ink-3);
  border-radius: 1px;
  transition: width 0.3s var(--ease), background-color 0.3s var(--ease);
}
.rail-nav a { white-space: nowrap; }
.rn-label {
  /* revealed as a chip beside the rail on hover/focus */
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  translate: 0 -50%;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--rail-ink);
  background: var(--rail-hov);
  padding: 0.3rem 0.7rem;
  border-radius: 7px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.rail-nav a:hover .rn-label, .rail-nav a:focus-visible .rn-label { opacity: 1; }
.rail-nav a:hover .rn-tick { background: var(--rail-ink-2); }
.rail-nav a[aria-current="true"] .rn-tick {
  width: 26px;
  background: #86A4FF;
}

.rail-foot { display: grid; justify-items: center; gap: 1rem; }

.source-dots { display: inline-flex; gap: 5px; align-items: center; }
.sd {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex: none;
}
.sd-sapphire { background: var(--src-sapphire); }
.sd-coral { background: var(--src-coral); }
.sd-amber { background: var(--src-amber); }
.sd-lilac { background: var(--src-lilac); }
.rail .sd-sapphire { background: #86A4FF; }
.rail .sd-coral { background: #FF9A8D; }
.rail .sd-amber { background: #F3C66E; }
.rail .sd-lilac { background: #BBA4FF; }

.theme-toggle {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1.5px solid var(--rail-ink-3);
  border-radius: 50%;
  background: transparent;
  color: var(--rail-ink);
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.theme-toggle:hover { background: var(--rail-hov); border-color: var(--rail-ink-2); }
.theme-toggle svg { fill: var(--rail-ink); }
.tt-sun { display: none; }
:root[data-theme="night"] .tt-sun { display: block; }
:root[data-theme="night"] .tt-moon { display: none; }

/* ————————————————————— Planes & sections ————————————————————— */

main { margin-left: 76px; }

.plane-content { background: var(--content); }
.plane-shell { background: var(--shell); }
.plane-queue { background: var(--queue); }
.plane-inspector { background: var(--inspector); }
.plane-midnight { background: var(--midnight-band); }

.section { padding: clamp(4.5rem, 9vw, 7.5rem) clamp(1.25rem, 5vw, 4.5rem); }
.section > * { max-width: 1180px; margin-inline: auto; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 38rem) 1fr;
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: start;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-lead h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
}
.section-lead p { color: var(--ink-2); max-width: 34rem; }

/* ————————————————————— Hero ————————————————————— */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  min-height: min(92vh, 60rem);
  padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 5vw, 4.5rem);
  max-width: 1440px;
  margin-inline: auto;
}

.hero-logo { margin-bottom: 2rem; }
.hero-logo img { width: clamp(150px, 16vw, 210px); height: auto; }
img.lp { display: none; }
:root[data-theme="night"] img.li { display: none; }
:root[data-theme="night"] img.lp { display: block; }

.hero h1 {
  font-size: clamp(2.7rem, 6vw, 5.25rem);
  line-height: 1.01;
  letter-spacing: -0.018em;
}
.hero-lede {
  margin-top: 1.6rem;
  max-width: 32rem;
  font-size: clamp(1.05rem, 1.4vw, 1.1875rem);
  color: var(--ink-2);
}
.hero-status {
  margin-top: 2.6rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.hero-stage { position: relative; }

.hero-connectors {
  grid-column: 1 / -1;
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}
.hero-connectors ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2.3rem;
}
.hero-connectors li {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  color: var(--ink-2);
}
.hero-connectors svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  opacity: 0.88;
}
.hero-connectors li span {
  font-size: 0.75rem;
  color: var(--ink-3);
}
.hc-more span { font-size: 0.8125rem; font-style: italic; font-family: var(--serif); }
@media (min-width: 900px) {
  .hero-connectors ul { gap: 2rem 3.1rem; }
  .hero-connectors svg { width: 40px; height: 40px; }
  .hero-connectors li { gap: 0.7rem; }
  .hero-connectors li span { font-size: 0.8125rem; }
  .hc-more span { font-size: 0.9375rem; }
}
.hero-current {
  position: absolute;
  inset: auto -6% 8% -6%;
  width: 112%;
  height: auto;
  z-index: 0;
}
.thread {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.8;
}
.thread-sapphire { stroke: var(--src-sapphire); }
.thread-coral { stroke: var(--src-coral); }
.thread-amber { stroke: var(--src-amber); }
.thread-lilac { stroke: var(--src-lilac); }

.hero-mascot {
  position: relative;
  z-index: 1;
  width: min(48vw, 750px);
  animation: glide 7s ease-in-out infinite;
}
.hero-shadow {
  position: absolute;
  left: 18%; right: 18%; bottom: -2%;
  height: 26px;
  z-index: 0;
  background: radial-gradient(closest-side, rgba(17, 24, 49, 0.18), transparent 70%);
  animation: glide-shadow 7s ease-in-out infinite;
}
:root[data-theme="night"] .hero-shadow {
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent 70%);
}

@keyframes glide {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes glide-shadow {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.93); opacity: 0.75; }
}

/* ————————————————————— Product comps (library art) ————————————————————— */

.comp { max-width: 1080px; }
.comp img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--bd-soft);
  box-shadow: 0 30px 70px -34px rgba(17, 24, 49, 0.4);
}
:root[data-theme="night"] .comp img { box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.7); }

/* Section 01 swaps its artwork with the appearance. */
.comp-night { display: none; }
:root[data-theme="night"] .comp-warm { display: none; }
:root[data-theme="night"] .comp-night { display: block; }

.comp-caption, .prov-caption {
  margin-top: 1.2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9975rem;
  color: var(--ink-3);
  text-align: center;
}

/* ————————————————————— Provenance ————————————————————— */

.prov-stage { position: relative; max-width: 1180px; }
.prov-current { display: block; width: 100%; height: auto; }
.prov-current .thread { stroke-width: 2.5; }
.end { opacity: 0.9; }
.end-sapphire { fill: var(--src-sapphire); }
.end-coral { fill: var(--src-coral); }
.end-amber { fill: var(--src-amber); }
.end-lilac { fill: var(--src-lilac); }

.prov-mascot {
  position: absolute;
  left: 50%;
  top: -9%;
  translate: -50% 0;
  width: min(34vw, 340px);
  animation: glide 8s ease-in-out infinite;
  filter: drop-shadow(0 18px 22px rgba(17, 24, 49, 0.18));
}
:root[data-theme="night"] .prov-mascot { filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.5)); }

/* ————————————————————— Concept previews ————————————————————— */

.previews { display: grid; gap: clamp(2.5rem, 6vw, 5rem); }
.agents-block h3 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.12;
  margin-bottom: 0.8rem;
}
.agents-block .section-lead { margin-bottom: 1.8rem; }
.agents-block .section-lead p { color: var(--ink-2); max-width: 34rem; }

/* ——— Spreads: live copy layered on the comps' designed blank zones ——— */

.spread {
  position: relative;
  container-type: inline-size;
  max-width: 1180px;
}
.spread picture img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--bd-soft);
  box-shadow: 0 30px 70px -34px rgba(17, 24, 49, 0.4);
}
:root[data-theme="night"] .spread picture img { box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.7); }

.spread-copy { padding: 0 0 1.4rem; }
.spread-copy h2, .spread-copy h3 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.12;
  margin-bottom: 0.8rem;
}
.spread-copy > p { color: var(--ink-2); max-width: 32rem; }

@container (min-width: 760px) {
  .spread-copy {
    position: absolute;
    z-index: 1;
    left: var(--csl);
    top: var(--cst);
    width: var(--csw);
    padding: 0;
  }
  .spread-copy h2, .spread-copy h3 { font-size: 3.1cqw; margin-bottom: 1.2cqw; }
  .spread-copy > p { font-size: 1.34cqw; line-height: 1.55; max-width: none; }
    /* Overlay text matches the artwork, not the page theme. */
  .spread-ink .spread-copy h2, .spread-ink .spread-copy h3 { color: #111831; }
  .spread-ink .spread-copy > p { color: #465068; }
  .spread-light .spread-copy h2, .spread-light .spread-copy h3 { color: #F7F5F1; }
  .spread-light .spread-copy > p { color: #C5CDDC; }
  .spread-terminal .spread-copy h3 { color: #F7F5F1; }
  .spread-terminal .spread-copy > p { color: #C5CDDC; }
}

/* ————————————————————— Appearance (always midnight) ————————————————————— */

.plane-midnight { color: #C5CDDC; }
.plane-midnight .section-lead h2 { color: #F7F5F1; }
.plane-midnight .section-lead p { color: #C5CDDC; }



/* ————————————————————— Colophon ————————————————————— */

.colophon {
  padding: clamp(3.5rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 4.5rem) clamp(2.5rem, 5vw, 4rem);
}
.colo-inner { max-width: 1180px; margin-inline: auto; }
.colo-mark { display: flex; align-items: center; gap: 16px; }
.colo-mark > img { width: 190px; height: auto; }
.colo-coming {
  margin-top: 1.6rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  color: var(--ink);
}
.colo-type {
  margin-top: 2.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--bd-soft);
  font-size: 0.8125rem;
  color: var(--ink-3);
}

/* ————————————— Prologue (scroll-driven, pearl on midnight) ————————————— */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.prologue {
  position: relative;
  height: 420vh;
  background: #05070D;
}
html:not(.js) .prologue,
html.static .prologue,
html.nointro .prologue { display: none; }
.prologue-reduced { height: 100vh; height: 100svh; }

.prologue-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.prologue-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.5)),
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(247, 245, 241, 0.028) 2px 3px);
  pointer-events: none;
}

.prologue-swim {
  position: absolute;
  left: 0;
  top: 50%;
  translate: 0 -58%;
  will-change: transform;
}
.prologue-reduced .prologue-swim {
  left: 50%;
  translate: -50% -58%;
}

.prologue-ray {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(7px, 1.6vw, 15px);
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: #F7F5F1;
  text-shadow: 0 0 10px rgba(247, 245, 241, 0.28);
}
.prologue-ray i { font-style: normal; }
.ie { color: #9BB4FF; text-shadow: 0 0 9px rgba(155, 180, 255, 0.6); }

/* Wing sockets are faint pearl until their orb docks; each lights in its own
   hue and stays distinct. */
.prologue-ray .iq { color: rgba(247, 245, 241, 0.28); transition: color 0.3s ease, text-shadow 0.3s ease; }
.prologue-ray.c0 .iq0 { color: #76A8FF; text-shadow: 0 0 10px rgba(118, 168, 255, 0.7); }
.prologue-ray.c1 .iq1 { color: #FF9A8D; text-shadow: 0 0 10px rgba(255, 154, 141, 0.7); }
.prologue-ray.c2 .iq2 { color: #F3C66E; text-shadow: 0 0 10px rgba(243, 198, 110, 0.7); }
.prologue-ray.c3 .iq3 { color: #BBA4FF; text-shadow: 0 0 10px rgba(187, 164, 255, 0.7); }

@keyframes station-bob {
  from { transform: translateY(-7px); }
  to { transform: translateY(7px); }
}

/* Source glyphs: pearl marks, each glowing in its assigned provenance hue. */
.prologue-station {
  position: absolute;
  top: 50%;
  width: 30px; height: 30px;
  margin-top: -15px;
  color: #F7F5F1;
  animation: station-bob 1.8s ease-in-out infinite alternate;
  transition: opacity 0.35s ease, scale 0.35s ease;
}
.prologue-station svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.st-a { filter: drop-shadow(0 0 9px rgba(187, 164, 255, 0.85)); animation-delay: 0.3s; }
.st-b { filter: drop-shadow(0 0 9px rgba(243, 198, 110, 0.85)); animation-delay: 0.65s; }
.st-c { filter: drop-shadow(0 0 9px rgba(255, 154, 141, 0.85)); animation-delay: 0.1s; }
.st-d { filter: drop-shadow(0 0 9px rgba(118, 168, 255, 0.85)); animation-delay: 0.45s; }
.prologue-station.got { opacity: 0; scale: 2; }

.prologue-end {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  justify-items: center;
  gap: 1.4rem;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  width: max-content;
  max-width: 92vw;
}
.prologue-end.end-in { opacity: 1; }
.prologue-wm img { width: clamp(240px, 34vw, 430px); height: auto; }
.prologue-typed {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(0.8125rem, 1.6vw, 1rem);
  letter-spacing: 0.05em;
  color: #C5CDDC;
}
.pt-caret {
  display: inline-block;
  width: 0.55em; height: 1.05em;
  margin-left: 2px;
  background: #C5CDDC;
  vertical-align: text-bottom;
  animation: caret-blink 1.1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.prologue-hud {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  margin-top: -100vh;
  margin-top: -100svh;
  pointer-events: none;
  z-index: 2;
}

.prologue-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  translate: -50% 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  color: #C5CDDC;
  transition: opacity 0.4s ease;
}
.cue-hidden { opacity: 0; }
.cue-chev {
  display: inline-block;
  animation: cue-pulse 1.6s ease-in-out infinite;
}
@keyframes cue-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.65; }
  50% { transform: translateY(5px); opacity: 1; }
}

.prologue-skip {
  position: absolute;
  right: 22px;
  bottom: 20px;
  pointer-events: auto;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: #C5CDDC;
  text-decoration: none;
  border: 1px solid rgba(197, 205, 220, 0.45);
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
}
.prologue-skip:hover { background: rgba(197, 205, 220, 0.12); color: #F7F5F1; }
.prologue-skip:focus-visible { outline: 2px solid #C5CDDC; outline-offset: 3px; }

/* ——— Companion: the little ray keeps swimming with you after the prologue ——— */

.companion {
  position: fixed;
  top: 0;
  right: 14px;
  z-index: 40;
  margin: 0;
  pointer-events: none;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 3.5px;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
}
.companion.on { opacity: 0.85; }
.companion.companion-invert { color: #C5CDDC; }
.companion i { font-style: normal; }
.companion .ie { color: var(--action); }
/* He keeps the orbs he gathered in the prologue. */
.companion .iq0 { color: var(--src-sapphire); }
.companion .iq1 { color: var(--src-coral); }
.companion .iq2 { color: var(--src-amber); }
.companion .iq3 { color: var(--src-lilac); }

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .companion { display: none; }
}

/* ————————————————————— Section survey marks ————————————————————— */

.sec-mark {
  height: 1px;
  background: var(--bd-soft);
  margin-bottom: clamp(1.6rem, 3vw, 2.6rem);
}
.plane-midnight .sec-mark { background: rgba(159, 170, 189, 0.3); }
.plane-midnight .comp + .spread { margin-top: clamp(3rem, 6vw, 5rem); }

/* ————————————————————— Reveal on scroll ————————————————————— */

html.js .reveal { opacity: 0; transform: translateY(16px); }
html.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
html.js .hero-copy .reveal.in:nth-child(2) { transition-delay: 0.08s; }
html.js .hero-copy .reveal.in:nth-child(3) { transition-delay: 0.16s; }
html.js .hero-copy .reveal.in:nth-child(4) { transition-delay: 0.24s; }

/* ————————————————————— Reduced motion ————————————————————— */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-mascot, .hero-shadow, .prov-mascot { animation: none; }
  html.theming, html.theming * { transition: none !important; }
  .rn-tick, .rn-label { transition: none; }
}

/* QA-only static mode (?static): everything visible, nothing animated. */
html.static .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
html.static .hero-mascot, html.static .hero-shadow, html.static .prov-mascot { animation: none; }

/* ————————————————————— Responsive ————————————————————— */

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 3.5rem; }
  .hero-stage { max-width: 640px; display: grid; justify-items: center; }
  .hero-mascot { width: min(80vw, 640px); }
  .section-head { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .rail {
    position: fixed;
    inset: 0 0 auto 0;
    width: auto;
    height: 58px;
    flex-direction: row;
    padding: 0 1rem;
    gap: 0.8rem;
  }
  .rail-mark img { width: 32px; height: 32px; border-radius: 8px; }
  .wordmark { height: auto; width: auto; margin: 0; }
  .wordmark img { position: static; width: 118px; transform: none; }
  .rail-nav { display: none; }
  .rail-foot { margin-left: auto; display: flex; align-items: center; gap: 0.9rem; }
  .theme-toggle { width: 36px; height: 36px; }
  main { margin-left: 0; padding-top: 58px; }
}

@media (max-width: 780px) {
      }

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .hero-logo { margin-bottom: 2rem; }
.hero-logo img { width: clamp(150px, 16vw, 210px); height: auto; }
img.lp { display: none; }
:root[data-theme="night"] img.li { display: none; }
:root[data-theme="night"] img.lp { display: block; }

.hero h1 { font-size: clamp(2.35rem, 11vw, 2.9rem); }
}
