/* ═══════════════════════════════════════════════════════════════
   AETHERFORGE INTERACTIVE — aether.css
   Palette:  obsidian #0B0E13 · slate #131820 · parchment #E8E4D8
             glacier #7FB4D8 · forge-amber #C8935A
   Type:     Bricolage Grotesque (display) · Newsreader (editorial)
             IBM Plex Mono (annotation)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --obsidian: #0B0E13;
  --slate: #131820;
  --slate-deep: #0E1219;
  --parchment: #E8E4D8;
  --parchment-dim: rgba(232, 228, 216, 0.62);
  --glacier: #7FB4D8;
  --amber: #C8935A;
  --hairline: rgba(232, 228, 216, 0.14);
  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --editorial: "Newsreader", Georgia, serif;
  --annot: "IBM Plex Mono", "Courier New", monospace;
  --rail-w: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--obsidian);
  color: var(--parchment);
  font-family: var(--editorial);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

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

::selection { background: var(--amber); color: var(--obsidian); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--amber); color: var(--obsidian);
  padding: 0.6rem 1.2rem; z-index: 300; font-family: var(--annot);
}
.skip-link:focus { left: 0; }

/* ── Loader ─────────────────────────────────────────────────── */

.forge-loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--obsidian);
  display: grid; place-content: center; gap: 2rem;
  color: var(--amber);
  transition: opacity 0.7s ease 0.2s, visibility 0.7s ease 0.2s;
}
.forge-loader.is-cooled { opacity: 0; visibility: hidden; }
html:not(.js) .forge-loader { display: none; }

.forge-loader-glyph { width: 108px; height: 108px; margin-inline: auto; }
.glyph-stroke, .glyph-heat {
  stroke-dasharray: 400; stroke-dashoffset: 400;
  animation: forge-draw 1.6s ease forwards;
}
.glyph-heat { stroke: var(--glacier); animation-delay: 0.7s; }
@keyframes forge-draw { to { stroke-dashoffset: 0; } }

.forge-loader-count {
  font-family: var(--annot); font-size: 1.5rem; text-align: center;
  letter-spacing: 0.15em;
}
.forge-loader-count small {
  display: block; font-size: 0.65rem; color: var(--parchment-dim);
  letter-spacing: 0.3em; text-transform: uppercase; margin-top: 0.6rem;
}

/* ── Page transition veil ───────────────────────────────────── */

.page-veil {
  position: fixed; inset: 0; z-index: 190; pointer-events: none;
  background: var(--slate-deep);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.55s cubic-bezier(0.7, 0, 0.2, 1);
}
.page-veil.is-falling { clip-path: inset(0 0 0 0); pointer-events: all; }

/* ── Masthead ───────────────────────────────────────────────── */

.masthead {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  background: linear-gradient(to bottom, rgba(11, 14, 19, 0.92), rgba(11, 14, 19, 0));
  pointer-events: none;
}
.masthead > * { pointer-events: auto; }

.masthead-mark {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.masthead-nav { display: flex; gap: clamp(1rem, 2.5vw, 2.2rem); }
.masthead-nav a {
  font-family: var(--annot); font-size: 0.72rem;
  letter-spacing: 0.22em; text-transform: uppercase;
  text-decoration: none; color: var(--parchment-dim);
  position: relative; padding-bottom: 3px;
  transition: color 0.3s ease;
}
.masthead-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--amber);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.6, 0, 0.2, 1);
}
.masthead-nav a:hover, .masthead-nav a:focus-visible { color: var(--parchment); }
.masthead-nav a:hover::after, .masthead-nav a:focus-visible::after {
  transform: scaleX(1); transform-origin: left;
}
.masthead-signal { color: var(--amber) !important; }

.masthead-burger {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 34px; position: relative;
}
.masthead-burger span {
  position: absolute; left: 8px; right: 8px; height: 2px;
  background: var(--parchment); transition: transform 0.35s ease, top 0.35s ease;
}
.masthead-burger span:first-child { top: 12px; }
.masthead-burger span:last-child { top: 20px; }
.masthead-burger[aria-expanded="true"] span:first-child { top: 16px; transform: rotate(45deg); }
.masthead-burger[aria-expanded="true"] span:last-child { top: 16px; transform: rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 90;
  background: var(--slate-deep);
  display: flex; flex-direction: column; justify-content: center;
  padding-left: 12vw; gap: 0.4rem;
  clip-path: circle(0 at calc(100% - 2.5rem) 2rem);
  transition: clip-path 0.6s cubic-bezier(0.7, 0, 0.2, 1);
  visibility: hidden;
}
.drawer.is-open { clip-path: circle(150% at calc(100% - 2.5rem) 2rem); visibility: visible; }
.drawer a {
  font-family: var(--display); font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 400; text-decoration: none; color: var(--parchment-dim);
  transition: color 0.3s, letter-spacing 0.3s;
}
.drawer a:hover { color: var(--amber); letter-spacing: 0.04em; }

/* ── Pipeline rail (signature) ──────────────────────────────── */

.pipeline-rail {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--rail-w);
  z-index: 80; display: flex; align-items: center; justify-content: center;
}
.rail-track {
  position: absolute; top: 12vh; bottom: 12vh; left: 50%;
  width: 1px; background: var(--hairline);
}
.rail-heat {
  position: absolute; top: 0; left: 0; width: 100%; height: 0;
  background: linear-gradient(to bottom, var(--glacier), var(--amber));
  box-shadow: 0 0 12px rgba(200, 147, 90, 0.5);
}
.rail-stops {
  list-style: none; position: absolute; top: 12vh; bottom: 12vh; left: 0; right: 0;
}
.rail-stops li {
  position: absolute; left: 50%; transform: translate(-50%, -50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--hairline); transition: background 0.4s, box-shadow 0.4s;
}
.rail-stops li.is-lit { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.rail-stops li::before {
  content: attr(data-name);
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-family: var(--annot); font-size: 0.58rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--amber); white-space: nowrap;
  opacity: 0; transition: opacity 0.3s;
}
.rail-stops li.is-lit::before { opacity: 1; }

main { padding-left: var(--rail-w); }

/* ── 01 Manifesto ───────────────────────────────────────────── */

.manifesto {
  min-height: 100vh; position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: 18vh clamp(1.5rem, 7vw, 7rem) 12vh;
}
.manifesto-embers { position: absolute; inset: 0; width: 100%; height: 100%; }

.manifesto-eyebrow {
  font-family: var(--annot); font-size: 0.7rem; letter-spacing: 0.35em;
  text-transform: uppercase; color: var(--glacier); margin-bottom: 3rem;
  position: relative;
}

.manifesto-title {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2.6rem, 8.5vw, 7.2rem); line-height: 1.02;
  position: relative; text-wrap: balance;
}
.manifesto-title span { display: block; overflow: hidden; }
.manifesto-title .line-b { margin-left: clamp(1.5rem, 8vw, 9rem); font-weight: 600; }
.manifesto-title .line-c { margin-left: clamp(0.5rem, 3vw, 3.5rem); }
.manifesto-title em { font-family: var(--editorial); font-style: italic; color: var(--amber); }

.manifesto-oath {
  max-width: 34rem; margin: 3.2rem 0 0 auto;
  color: var(--parchment-dim); position: relative;
  border-left: 1px solid var(--amber); padding-left: 1.4rem;
}

.manifesto-descend {
  position: absolute; bottom: 5vh; left: clamp(1.5rem, 7vw, 7rem);
  display: inline-flex; align-items: center; gap: 1rem;
  font-family: var(--annot); font-size: 0.7rem; letter-spacing: 0.28em;
  text-transform: uppercase; text-decoration: none; color: var(--parchment-dim);
  transition: color 0.3s;
}
.manifesto-descend:hover { color: var(--amber); }
.manifesto-descend svg { animation: descend-drift 2.4s ease-in-out infinite; }
@keyframes descend-drift { 50% { transform: translateY(6px); } }

.manifesto-coord {
  position: absolute; right: 1.8rem; top: 50%;
  transform: rotate(90deg) translateX(-50%); transform-origin: right top;
  font-family: var(--annot); font-size: 0.62rem; letter-spacing: 0.4em;
  color: rgba(232, 228, 216, 0.3);
}

/* ── 02 Philosophy ──────────────────────────────────────────── */

.philosophy {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "head body" "quote body";
  gap: 3rem clamp(2rem, 6vw, 6rem);
  padding: 16vh clamp(1.5rem, 7vw, 7rem);
  background: var(--slate-deep);
}
.philosophy-header { grid-area: head; }
.philosophy-numeral {
  font-family: var(--editorial); font-style: italic;
  font-size: clamp(4rem, 9vw, 7rem); color: rgba(127, 180, 216, 0.22);
  display: block; line-height: 1;
}
.philosophy-header h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.4rem); margin-top: -1.4rem;
}
.philosophy-body { grid-area: body; max-width: 38rem; }
.philosophy-body p + p { margin-top: 1.4rem; }
.philosophy-lede { font-size: 1.2rem; line-height: 1.7; }
.dropcap {
  float: left; font-family: var(--display); font-weight: 600;
  font-size: 4.6rem; line-height: 0.82; padding: 0.08em 0.12em 0 0;
  color: var(--amber);
}
.philosophy-quote {
  grid-area: quote; align-self: end;
  transform: rotate(-2deg);
  border: 1px solid var(--hairline); padding: 1.6rem 1.8rem;
  background: var(--obsidian);
}
.philosophy-quote p {
  font-family: var(--editorial); font-style: italic;
  font-size: 1.25rem; line-height: 1.5;
}
.philosophy-quote cite {
  display: block; margin-top: 1rem; font-family: var(--annot);
  font-style: normal; font-size: 0.68rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--glacier);
}

/* ── Dividers ───────────────────────────────────────────────── */

.divider-ridge { color: var(--slate-deep); line-height: 0; background: var(--obsidian); }
.divider-ridge svg { width: 100%; height: clamp(40px, 7vw, 90px); transform: scaleY(-1); }

.divider-stitch { color: var(--hairline); padding: 0 15vw; background: var(--obsidian); }
.divider-stitch svg { width: 100%; height: 40px; }
.divider-stitch circle { fill: var(--amber); }

/* ── 03 Pipeline ────────────────────────────────────────────── */

.pipeline {
  padding: 14vh clamp(1.5rem, 7vw, 7rem) 12vh;
  position: relative;
}
.pipeline-title {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2.2rem, 5.5vw, 4.4rem); line-height: 1.05;
}
.pipeline-hint {
  font-family: var(--annot); font-size: 0.7rem; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--glacier); margin-top: 1.2rem;
}
.pipeline-diagram {
  width: 100%; height: auto; margin-top: 2rem;
  color: rgba(127, 180, 216, 0.4);
}
.pipeline-stages {
  list-style: none; display: flex; flex-wrap: wrap;
  gap: 0.8rem 1.6rem; margin-top: -1rem;
}
.stage-node {
  font-family: var(--display); font-weight: 500; font-size: 1.05rem;
  background: none; border: 0; border-bottom: 1px solid transparent;
  color: var(--parchment-dim); cursor: pointer; padding: 0.4rem 0.1rem;
  letter-spacing: 0.02em; transition: color 0.3s, border-color 0.3s;
}
.stage-node:hover { color: var(--parchment); }
.stage-node.is-open { color: var(--amber); border-bottom-color: var(--amber); }

.pipeline-dossier { margin-top: 3.4rem; position: relative; min-height: 15rem; }
.dossier-card {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
  max-width: 42rem;
}
.dossier-card.is-current { opacity: 1; transform: none; pointer-events: auto; position: relative; }
.dossier-card h3 {
  font-family: var(--annot); font-weight: 500; font-size: 0.8rem;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--glacier);
  margin-bottom: 1.1rem;
}
.dossier-card p + p { margin-top: 1rem; }
.dossier-meta {
  font-family: var(--annot); font-size: 0.72rem; color: var(--parchment-dim);
  letter-spacing: 0.08em;
}

/* ── 04 Technology Lab ──────────────────────────────────────── */

.lab {
  background: var(--slate);
  padding: 13vh clamp(1.5rem, 7vw, 7rem);
  display: grid; grid-template-columns: minmax(14rem, 1fr) 2.4fr;
  gap: clamp(2rem, 5vw, 5rem);
}
.lab-intro { position: sticky; top: 18vh; align-self: start; }
.lab-intro h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
}
.lab-intro p { margin-top: 1.2rem; color: var(--parchment-dim); max-width: 20rem; }

.lab-bench { list-style: none; }
.instrument {
  border-top: 1px solid var(--hairline);
  padding: 1.6rem 0 1.6rem 2.6rem; position: relative;
  cursor: default; transition: padding-left 0.4s cubic-bezier(0.6, 0, 0.2, 1);
}
.instrument:last-child { border-bottom: 1px solid var(--hairline); }
.instrument::before {
  content: ""; position: absolute; left: 0.4rem; top: 2.2rem;
  width: 9px; height: 9px; border: 1px solid var(--glacier);
  transform: rotate(45deg); transition: background 0.35s, transform 0.5s;
}
.instrument:hover, .instrument:focus-visible { padding-left: 3.4rem; }
.instrument:hover::before, .instrument:focus-visible::before {
  background: var(--glacier); transform: rotate(225deg);
}
.instrument h3 {
  font-family: var(--display); font-weight: 600; font-size: 1.35rem;
  display: inline-block;
}
.instrument-class {
  font-family: var(--annot); font-size: 0.66rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--amber); margin-left: 1rem;
}
.instrument p {
  max-height: 0; overflow: hidden; opacity: 0;
  color: var(--parchment-dim); max-width: 36rem;
  transition: max-height 0.5s ease, opacity 0.4s ease 0.1s, margin-top 0.5s ease;
}
.instrument:hover p, .instrument:focus-visible p, .instrument:focus-within p {
  max-height: 12rem; opacity: 1; margin-top: 0.8rem;
}

/* ── 05 World Building ──────────────────────────────────────── */

.worldcraft { position: relative; padding: 0 0 14vh; }
.worldcraft-vista { overflow: hidden; max-height: 78vh; }
.worldcraft-vista img {
  width: 100%; object-fit: cover; min-height: 50vh;
  will-change: transform;
}
.worldcraft-plate {
  position: relative; z-index: 2;
  margin: clamp(-6rem, -12vh, -9rem) clamp(1.5rem, 7vw, 7rem) 0 auto;
  max-width: 34rem; width: min(34rem, calc(100% - 3rem));
  background: var(--obsidian); border: 1px solid var(--hairline);
  border-top: 3px solid var(--amber);
  padding: 2.4rem clamp(1.4rem, 3vw, 2.6rem);
}
.worldcraft-kicker {
  font-family: var(--annot); font-size: 0.66rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--glacier);
}
.worldcraft-plate h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0.7rem 0 1.1rem;
}
.worldcraft-plate p + p { margin-top: 1rem; }
.worldcraft-plate p { color: var(--parchment-dim); }
.worldcraft-ledger { margin-top: 1.8rem; border-top: 1px solid var(--hairline); }
.worldcraft-ledger div {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.55rem 0; border-bottom: 1px dashed var(--hairline);
}
.worldcraft-ledger dt { font-family: var(--annot); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--parchment-dim); }
.worldcraft-ledger dd { font-family: var(--display); font-weight: 600; color: var(--glacier); }

/* ── 06 Concept Art ─────────────────────────────────────────── */

.plates { padding: 6vh clamp(1.5rem, 7vw, 7rem) 12vh; }
.plates-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem 3rem; margin-bottom: 2.4rem; }
.plates-header h2 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.8rem);
}
.plates-header p { max-width: 26rem; color: var(--parchment-dim); font-size: 0.95rem; }

.plate-compare {
  position: relative; overflow: hidden; user-select: none;
  border: 1px solid var(--hairline); max-width: 62rem;
  touch-action: pan-y;
}
.plate-compare img { width: 100%; }
.plate-under { filter: grayscale(1) contrast(1.08) brightness(0.92); }
.plate-over {
  position: absolute; inset: 0;
  clip-path: inset(0 0 0 50%);
  will-change: clip-path;
}
.plate-over img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.plate-seam {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; background: var(--amber); border: 0; cursor: ew-resize;
  display: flex; align-items: center; justify-content: center;
  color: var(--obsidian); padding: 0;
}
.plate-seam svg {
  background: var(--amber); border-radius: 50%;
  padding: 8px; width: 34px; height: 34px; flex: none;
}
.plate-seam:focus-visible { outline: 2px solid var(--glacier); outline-offset: 4px; }
.plates-caption {
  font-family: var(--annot); font-size: 0.7rem; letter-spacing: 0.12em;
  color: var(--parchment-dim); margin-top: 1rem; max-width: 62rem;
  text-align: right;
}

/* ── 07 Motion Capture ──────────────────────────────────────── */

.capture {
  background: var(--slate-deep);
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  padding: 13vh clamp(1.5rem, 7vw, 7rem);
  align-items: center;
}
.capture-stage { position: relative; }
.capture-stage img { border: 1px solid var(--hairline); }
.capture-rec {
  position: absolute; top: 1rem; left: 1rem;
  font-family: var(--annot); font-size: 0.64rem; letter-spacing: 0.2em;
  color: #E86A5E; background: rgba(11, 14, 19, 0.75);
  padding: 0.35rem 0.7rem;
  animation: rec-pulse 1.6s steps(2) infinite;
}
@keyframes rec-pulse { 50% { opacity: 0.35; } }

.capture-notes h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
}
.capture-notes > p { margin-top: 1.2rem; color: var(--parchment-dim); max-width: 32rem; }
.capture-solver {
  margin-top: 2rem; position: relative; display: inline-block;
  border: 1px dashed rgba(127, 180, 216, 0.35);
}
#skeletonCanvas { display: block; width: min(360px, 100%); }
.solver-tag {
  position: absolute; bottom: 0.5rem; right: 0.7rem;
  font-family: var(--annot); font-size: 0.6rem; letter-spacing: 0.18em;
  color: var(--glacier);
}

/* ── 08 Audio ───────────────────────────────────────────────── */

.resonance {
  padding: 14vh clamp(1.5rem, 7vw, 7rem);
  text-align: center;
}
.resonance-title {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.8rem);
}
.resonance-brief {
  max-width: 40rem; margin: 1.4rem auto 0; color: var(--parchment-dim);
}
.resonance-wave { margin: 3rem auto 0; max-width: 58rem; }
#waveCanvas { width: 100%; height: 160px; display: block; cursor: crosshair; }
.resonance-stems {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.7rem 2.8rem; margin-top: 2.6rem;
  font-size: 0.92rem; color: var(--parchment-dim); font-style: italic;
}
.resonance-stems span {
  font-family: var(--annot); font-style: normal; font-size: 0.62rem;
  letter-spacing: 0.2em; color: var(--amber); margin-right: 0.7rem;
  text-transform: uppercase;
}

/* ── 09 Projects ────────────────────────────────────────────── */

.slate {
  background: var(--slate);
  padding: 13vh clamp(1.5rem, 7vw, 7rem);
  position: relative;
}
.slate-title {
  font-family: var(--annot); font-weight: 500; font-size: 0.78rem;
  letter-spacing: 0.35em; text-transform: uppercase; color: var(--glacier);
  margin-bottom: 3rem;
}
.slate-index { list-style: none; }
.slate-entry { border-top: 1px solid var(--hairline); }
.slate-entry:last-child { border-bottom: 1px solid var(--hairline); }
.slate-link {
  display: grid; grid-template-columns: 9rem 1fr auto;
  align-items: baseline; gap: 1.5rem;
  padding: 1.9rem 0; text-decoration: none;
}
.slate-year { font-family: var(--annot); font-size: 0.7rem; letter-spacing: 0.15em; color: var(--parchment-dim); }
.slate-name {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(1.7rem, 4vw, 3.2rem); line-height: 1.1;
  transition: letter-spacing 0.45s cubic-bezier(0.5, 0, 0.2, 1), color 0.35s;
}
.slate-entry:hover .slate-name { letter-spacing: 0.03em; color: var(--amber); }
.slate-form { font-family: var(--annot); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--parchment-dim); }
.slate-note {
  max-width: 38rem; color: var(--parchment-dim);
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.55s ease, opacity 0.4s ease, padding-bottom 0.55s ease;
}
.slate-entry:hover .slate-note, .slate-entry:focus-within .slate-note {
  max-height: 10rem; opacity: 1; padding-bottom: 1.8rem;
}
.slate-preview {
  position: fixed; z-index: 60; width: 260px; height: auto;
  pointer-events: none; opacity: 0; transform: scale(0.9) rotate(-2deg);
  transition: opacity 0.25s ease, transform 0.3s ease;
  border: 1px solid var(--hairline); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.slate-preview.is-haunting { opacity: 1; transform: scale(1) rotate(-2deg); }

/* ── 10 Behind the Scenes ───────────────────────────────────── */

.backstage { padding: 13vh clamp(1.5rem, 7vw, 7rem); }
.backstage-header { max-width: 40rem; }
.backstage-header h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
}
.backstage-header p { color: var(--parchment-dim); margin-top: 0.8rem; }
.backstage-split {
  display: grid; grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 5rem); margin-top: 3rem; align-items: start;
}
.backstage-floor { position: sticky; top: 14vh; overflow: hidden; }
.backstage-floor img { will-change: transform; }
.backstage-floor figcaption {
  font-family: var(--annot); font-size: 0.68rem; letter-spacing: 0.1em;
  color: var(--parchment-dim); margin-top: 0.8rem; line-height: 1.7;
}
.backstage-log { list-style: none; }
.backstage-log li {
  position: relative; padding: 1.3rem 0 1.3rem 5.4rem;
  border-bottom: 1px dotted var(--hairline);
  color: var(--parchment-dim);
}
.backstage-log li:hover { color: var(--parchment); }
.backstage-log time {
  position: absolute; left: 0; top: 1.35rem;
  font-family: var(--annot); font-size: 0.78rem; color: var(--glacier);
  letter-spacing: 0.1em;
}

/* ── 11 Journal ─────────────────────────────────────────────── */

.journal {
  background: var(--slate-deep);
  padding: 13vh clamp(1.5rem, 7vw, 7rem);
}
.journal-title {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.8rem); margin-bottom: 3rem;
}
.journal-shelf {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.4rem, 3vw, 2.8rem);
}
.journal-leaf {
  padding: 1.9rem 1.7rem 2.2rem;
  background: linear-gradient(155deg, rgba(232, 228, 216, 0.045), rgba(232, 228, 216, 0.012));
  border-left: 1px solid var(--hairline);
  transition: transform 0.4s cubic-bezier(0.5, 0, 0.2, 1), border-color 0.4s;
}
.journal-leaf:nth-child(even) { transform: translateY(2.2rem); }
.journal-leaf:hover { transform: translateY(-4px); border-left-color: var(--amber); }
.journal-leaf:nth-child(even):hover { transform: translateY(calc(2.2rem - 4px)); }
.journal-leaf time {
  font-family: var(--annot); font-size: 0.64rem; letter-spacing: 0.22em;
  color: var(--glacier); text-transform: uppercase;
}
.journal-leaf h3 {
  font-family: var(--display); font-weight: 500; font-size: 1.3rem;
  margin: 0.9rem 0 0.8rem; line-height: 1.25;
}
.journal-leaf p { color: var(--parchment-dim); font-size: 0.98rem; }
.journal-hand {
  display: block; margin-top: 1.3rem; font-style: italic;
  font-size: 0.9rem; color: rgba(232, 228, 216, 0.45);
}

/* ── 12 Careers ─────────────────────────────────────────────── */

.guild { padding: 13vh clamp(1.5rem, 7vw, 7rem); }
.guild-preface { max-width: 44rem; margin-bottom: 3.4rem; }
.guild-preface h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem); margin-bottom: 1rem;
}
.guild-preface p { color: var(--parchment-dim); }
.guild-roster { list-style: none; max-width: 54rem; }
.guild-post { border-bottom: 1px solid var(--hairline); }
.guild-post:first-child { border-top: 1px solid var(--hairline); }
.guild-toggle {
  width: 100%; display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 1.4rem; text-align: left;
  background: none; border: 0; color: inherit; cursor: pointer;
  padding: 1.5rem 0.2rem; font: inherit;
}
.guild-role { font-family: var(--display); font-weight: 500; font-size: 1.25rem; transition: color 0.3s; }
.guild-toggle:hover .guild-role { color: var(--glacier); }
.guild-terms { font-family: var(--annot); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--parchment-dim); }
.guild-cross { position: relative; width: 15px; height: 15px; }
.guild-cross::before, .guild-cross::after {
  content: ""; position: absolute; background: var(--amber);
  transition: transform 0.4s cubic-bezier(0.6, 0, 0.2, 1);
}
.guild-cross::before { left: 7px; top: 0; width: 1.5px; height: 15px; }
.guild-cross::after { left: 0; top: 7px; width: 15px; height: 1.5px; }
.guild-toggle[aria-expanded="true"] .guild-cross::before { transform: rotate(90deg); }
.guild-scroll {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.6, 0, 0.2, 1);
}
.guild-scroll > * { overflow: hidden; min-height: 0; }
.guild-post.is-unrolled .guild-scroll { grid-template-rows: 1fr; }
.guild-scroll p { color: var(--parchment-dim); max-width: 42rem; }
.guild-scroll p:first-child { padding-top: 0.2rem; }
.guild-apply { padding: 1rem 0 1.7rem; font-size: 0.95rem; }
.guild-apply a { color: var(--amber); text-decoration-color: rgba(200, 147, 90, 0.4); }

/* ── 13 FAQ ─────────────────────────────────────────────────── */

.almanac {
  background: var(--slate);
  padding: 13vh clamp(1.5rem, 7vw, 7rem);
  display: grid; grid-template-columns: minmax(10rem, 1fr) 2.6fr;
  gap: 2rem clamp(2rem, 5vw, 5rem);
}
.almanac-title {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  position: sticky; top: 18vh; align-self: start;
}
.almanac-ledger { counter-reset: almanac; }
.almanac-entry { counter-increment: almanac; position: relative; padding-left: 3.2rem; }
.almanac-entry::before {
  content: counter(almanac, decimal-leading-zero);
  position: absolute; left: 0; top: 1.35rem;
  font-family: var(--annot); font-size: 0.7rem; color: var(--glacier);
  letter-spacing: 0.1em;
}
.almanac-entry dt button {
  width: 100%; text-align: left; background: none; border: 0;
  border-top: 1px solid var(--hairline); color: inherit; cursor: pointer;
  font-family: var(--editorial); font-size: 1.12rem;
  padding: 1.2rem 0.2rem; transition: color 0.3s;
}
.almanac-entry:last-child dd { border-bottom: 1px solid var(--hairline); }
.almanac-entry dt button:hover { color: var(--amber); }
.almanac-entry dt button[aria-expanded="true"] { color: var(--amber); font-style: italic; }
.almanac-entry dd {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s ease;
}
.almanac-entry dd p { overflow: hidden; min-height: 0; color: var(--parchment-dim); max-width: 38rem; }
.almanac-entry.is-open dd { grid-template-rows: 1fr; }
.almanac-entry.is-open dd p { padding-bottom: 1.4rem; }

/* ── 14 Contact ─────────────────────────────────────────────── */

.signal {
  padding: 15vh clamp(1.5rem, 7vw, 7rem) 10vh;
  display: grid; grid-template-columns: 1fr 1.4fr;
  gap: clamp(2rem, 6vw, 7rem);
}
.signal-hail {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: 0.98;
  background: linear-gradient(120deg, var(--parchment) 30%, var(--amber) 75%, var(--glacier));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  align-self: start; position: sticky; top: 18vh;
}
.signal-body { display: grid; gap: 3rem; }
.signal-form { display: grid; gap: 0.4rem; max-width: 30rem; }
.signal-form label {
  font-family: var(--annot); font-size: 0.64rem; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--glacier); margin-top: 1.2rem;
}
.signal-form input, .signal-form textarea {
  background: transparent; border: 0; border-bottom: 1px solid var(--hairline);
  color: var(--parchment); font-family: var(--editorial); font-size: 1.05rem;
  padding: 0.55rem 0.1rem; transition: border-color 0.3s;
  resize: vertical;
}
.signal-form input:focus, .signal-form textarea:focus {
  outline: none; border-bottom-color: var(--amber);
}
.signal-send {
  margin-top: 2.2rem; justify-self: start;
  background: none; border: 1px solid var(--amber); color: var(--amber);
  font-family: var(--annot); font-size: 0.72rem; letter-spacing: 0.3em;
  text-transform: uppercase; padding: 1rem 2.2rem; cursor: pointer;
  position: relative; overflow: hidden; transition: color 0.4s;
}
.signal-send::before {
  content: ""; position: absolute; inset: 0; background: var(--amber);
  transform: translateY(101%); transition: transform 0.45s cubic-bezier(0.6, 0, 0.2, 1);
}
.signal-send:hover::before, .signal-send:focus-visible::before { transform: translateY(0); }
.signal-send:hover, .signal-send:focus-visible { color: var(--obsidian); }
.signal-send span { position: relative; }
.signal-received { font-style: italic; color: var(--glacier); font-size: 1.15rem; max-width: 28rem; }

.signal-post { font-style: normal; display: grid; gap: 0.5rem; align-content: start; }
.signal-label {
  font-family: var(--annot); font-size: 0.62rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: rgba(232, 228, 216, 0.4); margin-top: 1.4rem;
}
.signal-post p { color: var(--parchment-dim); line-height: 1.8; }
.signal-post a { text-decoration-color: rgba(127, 180, 216, 0.4); transition: color 0.3s; }
.signal-post a:hover { color: var(--glacier); }
.signal-elsewhere { display: flex; flex-wrap: wrap; gap: 1.6rem; }

/* ── Colophon ───────────────────────────────────────────────── */

.colophon {
  border-top: 1px solid var(--hairline);
  padding: 3rem clamp(1.5rem, 7vw, 7rem) 3.4rem calc(var(--rail-w) + clamp(1.5rem, 7vw, 7rem));
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 3rem;
  font-family: var(--annot); font-size: 0.7rem; letter-spacing: 0.1em;
  color: var(--parchment-dim);
}
.colophon-mark {
  font-family: var(--display); font-weight: 600; font-size: 1.6rem;
  color: var(--amber);
}
.colophon-line { flex: 1; }
.colophon-nav { display: flex; gap: 2rem; }
.colophon-nav a { text-decoration: none; transition: color 0.3s; }
.colophon-nav a:hover { color: var(--amber); }

/* ── Legal pages ────────────────────────────────────────────── */

.codex {
  max-width: 46rem;
  padding: 22vh clamp(1.5rem, 6vw, 4rem) 14vh;
  margin-inline: auto;
}
.codex-kind {
  font-family: var(--annot); font-size: 0.68rem; letter-spacing: 0.35em;
  text-transform: uppercase; color: var(--glacier);
}
.codex h1 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 1rem 0 0.6rem;
}
.codex-dated { font-family: var(--annot); font-size: 0.72rem; color: var(--parchment-dim); letter-spacing: 0.1em; }
.codex h2 {
  font-family: var(--display); font-weight: 500; font-size: 1.35rem;
  margin: 3rem 0 1rem; padding-top: 2rem; border-top: 1px solid var(--hairline);
}
.codex p { color: var(--parchment-dim); }
.codex p + p { margin-top: 1rem; }
.codex ul { margin: 1rem 0 1rem 1.3rem; color: var(--parchment-dim); }
.codex li + li { margin-top: 0.5rem; }
.codex a { color: var(--amber); text-decoration-color: rgba(200, 147, 90, 0.4); }
.codex-return {
  display: inline-block; margin-top: 4rem;
  font-family: var(--annot); font-size: 0.72rem; letter-spacing: 0.25em;
  text-transform: uppercase; text-decoration: none; color: var(--glacier);
}
.codex-return:hover { color: var(--amber); }

/* ── Reveal choreography ────────────────────────────────────── */

.wipe-reveal { clip-path: inset(0 100% 0 0); transition: clip-path 1s cubic-bezier(0.65, 0, 0.15, 1); }
.wipe-reveal.is-seen { clip-path: inset(0 0 0 0); }
.rise-reveal span, .rise-reveal { --rise-ready: 1; }
.manifesto-title span > * , .manifesto-title span { display: block; }
.manifesto-title.is-forged .line-a,
.manifesto-title.is-forged .line-b,
.manifesto-title.is-forged .line-c { animation: line-rise 0.9s cubic-bezier(0.5, 0, 0.15, 1) both; }
.manifesto-title.is-forged .line-b { animation-delay: 0.12s; }
.manifesto-title.is-forged .line-c { animation-delay: 0.24s; }
html.js .manifesto-title:not(.is-forged) .line-a,
html.js .manifesto-title:not(.is-forged) .line-b,
html.js .manifesto-title:not(.is-forged) .line-c { transform: translateY(110%); }
@keyframes line-rise { from { transform: translateY(110%); } to { transform: translateY(0); } }

/* ── Custom cursor ──────────────────────────────────────────── */

.aether-cursor { position: fixed; top: 0; left: 0; z-index: 250; pointer-events: none; }
.cursor-core {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: var(--amber); transform: translate(-50%, -50%);
}
.cursor-halo {
  position: absolute; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(200, 147, 90, 0.5); transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease;
}
body.cursor-drawn .aether-cursor { display: block; }
body.cursor-drawn.cursor-kindled .cursor-halo {
  width: 56px; height: 56px; border-color: var(--glacier);
}
@media (pointer: fine) {
  body.cursor-drawn, body.cursor-drawn a, body.cursor-drawn button { cursor: none; }
}
@media (pointer: coarse) { .aether-cursor { display: none; } }

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .journal-shelf { grid-template-columns: 1fr; }
  .journal-leaf:nth-child(even) { transform: none; }
  .journal-leaf:nth-child(even):hover { transform: translateY(-4px); }
  .capture { grid-template-columns: 1fr; }
  .backstage-split { grid-template-columns: 1fr; }
  .backstage-floor { position: static; }
}

@media (max-width: 880px) {
  :root { --rail-w: 0px; }
  .pipeline-rail { display: none; }
  main { padding-left: 0; }
  .masthead-nav { display: none; }
  .masthead-burger { display: block; }
  .philosophy { grid-template-columns: 1fr; grid-template-areas: "head" "body" "quote"; }
  .lab { grid-template-columns: 1fr; }
  .lab-intro { position: static; }
  .almanac { grid-template-columns: 1fr; }
  .almanac-title { position: static; }
  .signal { grid-template-columns: 1fr; }
  .signal-hail { position: static; }
  .slate-link { grid-template-columns: 1fr; gap: 0.4rem; padding: 1.4rem 0; }
  .slate-note { max-height: none; opacity: 1; padding-bottom: 1.4rem; }
  .slate-preview { display: none; }
  .worldcraft-plate { margin-top: -3rem; }
  .colophon { padding-left: clamp(1.5rem, 7vw, 7rem); }
  .manifesto-coord { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .manifesto { padding-top: 22vh; }
  .manifesto-oath { margin-left: 0; margin-top: 2.4rem; }
  .plates-caption { text-align: left; }
  .guild-toggle { grid-template-columns: 1fr auto; }
  .guild-terms { grid-column: 1 / -1; }
  .backstage-log li { padding-left: 4.4rem; }
}

/* ── Reduced motion ─────────────────────────────────────────── */

@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;
  }
  .manifesto-title .line-a, .manifesto-title .line-b, .manifesto-title .line-c { transform: none; }
  .wipe-reveal { clip-path: none; }
  .manifesto-embers, #skeletonCanvas { display: none; }
}
