/* ==========================================================================
   THE MIDNIGHT COMMIT — visual system
   void #04050A · ink #0A0D16 · paper #ECEAE4 · moon #9AA6BF
   cobalt #4C6FFF · HEAD amber #FFB23F (reserved for HEAD + launch)
   ========================================================================== */
:root {
  --void: #04050a;
  --ink: #0a0d16;
  --paper: #eceae4;
  --moon: #9aa6bf;
  --dim: #5d6680;
  --cobalt: #4c6fff;
  --cobalt-soft: #8fa6ff;
  --amber: #ffb23f;
  --error: #ff8a7a;
  --line: rgba(201, 211, 230, 0.14);
  --line-strong: rgba(201, 211, 230, 0.3);

  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Geist", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --pad: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 0; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--void);
  color: var(--paper);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
.mono { font-family: var(--f-mono); }
::selection { background: var(--cobalt); color: #fff; }

:focus-visible { outline: 1.5px solid var(--cobalt-soft); outline-offset: 4px; border-radius: 2px; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--paper); color: var(--void); text-decoration: none; font-weight: 600;
}
.skip:focus { top: 16px; }

/* ------------------------------------------------------------ world layer */
#world {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh; height: 100lvh;
  z-index: 0; display: block;
  touch-action: pan-y;
}
.labels { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.label {
  position: absolute; left: 0; top: 0;
  translate: -50% -50%;
  opacity: 0;
  white-space: nowrap;
  font: 500 10.5px/1 var(--f-mono);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--moon);
  will-change: transform, opacity;
}
.label--hub { font: 500 12px/1 var(--f-body); letter-spacing: 0.04em; text-transform: none; color: var(--paper); }
.label--hub::before, .label--value::before { content: ""; display: inline-block; width: 14px; height: 1px; margin-right: 8px; vertical-align: middle; background: currentColor; opacity: 0.5; }
.label--value { color: var(--paper); }

/* ------------------------------------------------------------ boot */
.boot {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: var(--void);
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.boot.is-done { opacity: 0; visibility: hidden; }
.boot__line { font-size: 13px; color: var(--moon); letter-spacing: 0.02em; }
.boot__prompt { color: var(--dim); margin-right: 8px; }
.caret { display: inline-block; width: 7px; height: 14px; margin-left: 4px; vertical-align: -2px; background: var(--amber); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ------------------------------------------------------------ navigation */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: var(--nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--pad);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav::before { content: ""; position: absolute; inset: 0 0 -24px 0; z-index: -1; pointer-events: none; background: linear-gradient(rgba(4, 5, 10, 0.85), rgba(4, 5, 10, 0)); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; justify-self: start; }
.brand__mark { width: 28px; height: 28px; color: var(--paper); }
.brand__name { font: 600 12px/1 var(--f-display); font-stretch: 125%; letter-spacing: 0.12em; text-transform: uppercase; }
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  position: relative;
  padding: 8px 12px;
  font-size: 13px; color: var(--moon); text-decoration: none;
  transition: color 0.3s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1px;
  background: var(--paper); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--paper); }
.nav__links a.is-active::after { transform: scaleX(1); }
.nav__cta {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong); border-radius: 2px;
  font-size: 13px; text-decoration: none;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.nav__cta::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.nav__cta:hover { background: var(--paper); color: var(--void); border-color: var(--paper); }
.nav__toggle { display: none; }

/* mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 35;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 20px) var(--pad) 40px;
  background: rgba(4, 5, 10, 0.94);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease);
}
.menu.is-open { clip-path: inset(0 0 0 0); }
.menu__list a {
  display: flex; align-items: baseline; gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font: 300 clamp(2rem, 9vw, 3.4rem)/1.05 var(--f-display); font-stretch: 125%; text-transform: uppercase;
  text-decoration: none;
  transform: translateY(20px); opacity: 0;
  transition: transform 0.7s var(--ease), opacity 0.7s var(--ease);
}
.menu.is-open .menu__list a { transform: none; opacity: 1; }
.menu.is-open .menu__list li:nth-child(n) a { transition-delay: calc(var(--i, 0) * 45ms + 120ms); }
.menu__list a .mono { flex: 0 0 9ch; font-size: 11px; color: var(--dim); letter-spacing: 0.04em; text-transform: none; }
.menu__list a.is-active { color: var(--paper); }
.menu__list a.is-active .mono { color: var(--amber); }
.menu__foot { margin-top: 32px; font-size: 12px; color: var(--moon); }

/* ------------------------------------------------------------ git log indicator */
.log {
  position: fixed; right: calc(var(--pad) - 8px); top: 50%; z-index: 30;
  transform: translateY(-50%);
  display: flex; gap: 0;
}
.log__track { position: absolute; right: 3px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.log__fill { position: absolute; inset: 0 0 auto 0; height: 0; background: var(--paper); opacity: 0.6; }
.log__fill::after {
  content: ""; position: absolute; left: 50%; bottom: -4px; width: 9px; height: 9px; margin-left: -4.5px;
  border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px rgba(255, 178, 63, 0.7);
}
.log__list { display: flex; flex-direction: column; gap: 26px; }
.log__item a {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  text-decoration: none; font: 400 10px/1 var(--f-mono); letter-spacing: 0.06em; color: var(--dim);
}
.log__item .log__msg { opacity: 0; transform: translateX(6px); transition: opacity 0.4s, transform 0.4s var(--ease); color: var(--moon); }
.log__item .log__dot { width: 7px; height: 7px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--void); transition: border-color 0.3s, background 0.3s; }
.log__item.is-past .log__dot { border-color: var(--paper); background: var(--paper); }
.log__item.is-active .log__msg, .log:hover .log__msg { opacity: 1; transform: none; }
.log__item.is-active a { color: var(--paper); }
.log__item.is-active .log__hash { color: var(--amber); }

.checkout {
  position: fixed; left: 50%; bottom: 28px; z-index: 30;
  transform: translate(-50%, 8px);
  padding: 8px 14px;
  font-size: 11px; color: var(--moon); letter-spacing: 0.04em;
  border: 1px solid var(--line); background: rgba(4, 5, 10, 0.7);
  opacity: 0; transition: opacity 0.4s, transform 0.5s var(--ease);
  pointer-events: none;
}
.checkout.is-on { opacity: 1; transform: translate(-50%, 0); }
.checkout b { color: var(--paper); font-weight: 500; }

/* ------------------------------------------------------------ content layer */
main { position: relative; z-index: 2; pointer-events: none; }
.env {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--nav-h) + 6vh) var(--pad) 10vh;
  pointer-events: none;
}
.env a, .env button, .env input, .env select, .env textarea, .env label, .env p, .env h1, .env h2, .env h3, .env li, .env form { pointer-events: auto; }
.env ol, .env ul { pointer-events: none; }
.env ol > li, .env ul > li { pointer-events: auto; }

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--moon);
}
.hash { padding: 3px 6px; border: 1px solid var(--line-strong); letter-spacing: 0.06em; color: var(--paper); text-transform: none; }
.hash--head { border-color: var(--amber); color: var(--amber); }

h2, .hero__title {
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: -0.015em;
}
h2 { font-size: clamp(2rem, 4.2vw, 4.4rem); line-height: 0.98; max-width: 14ch; }
.lede { margin-top: 28px; max-width: 42ch; color: var(--moon); font-size: 17px; }
.lede .note { display: block; margin-top: 10px; font-size: 13px; color: var(--dim); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 22px;
  border-radius: 2px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.01em; text-decoration: none;
  transition: background 0.35s, color 0.35s, border-color 0.35s, transform 0.35s var(--ease);
}
.btn--primary { background: var(--paper); color: var(--void); }
.btn--primary:hover { background: #fff; transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--line-strong); }
.btn--ghost:hover { border-color: var(--paper); }

/* ------------------------------------------------------------ hero */
.env--hero {
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 9vh;
}
.hero__meta {
  position: absolute; top: calc(var(--nav-h) + 16px); left: var(--pad); right: var(--pad);
  display: flex; justify-content: space-between;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim);
}
.hero__meta b { color: var(--moon); font-weight: 400; }
.hero__eyebrow { margin-bottom: 22px; }
.hero__title {
  font-size: clamp(2.5rem, 7.6vw, 9rem);
  line-height: 0.9;
  max-width: 13ch;
  text-shadow: 0 0 40px rgba(4, 5, 10, 0.6);
}
.hero__title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1px var(--paper);
  text-shadow: none;
}
.hero__foot {
  display: grid; grid-template-columns: minmax(0, 44ch) auto; justify-content: space-between; align-items: end;
  gap: 32px; margin-top: 40px;
}
.hero__lede { color: var(--moon); font-size: 17px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim);
}
.scroll-cue::after { content: ""; display: block; width: 1px; height: 28px; margin: 10px auto 0; background: linear-gradient(var(--moon), transparent); animation: cue 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ------------------------------------------------------------ split sections (services, work, stack) */
.env--split { display: flex; align-items: center; min-height: 130vh; }
.env--split .col { position: relative; width: min(500px, 38vw); }
.env--split h2 { font-size: clamp(1.9rem, 3.3vw, 3.5rem); max-width: 16ch; }
.env--split .lede { margin-top: 22px; }
.env--split .col::before,
.env--about .about__grid::before,
.stage::before,
.contact__head::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: -12vh -8vw -12vh calc(-1 * var(--pad));
  background: radial-gradient(ellipse at 20% 50%, rgba(4, 5, 10, 0.78), rgba(4, 5, 10, 0) 70%);
}

.index { margin-top: 30px; border-bottom: 1px solid var(--line); }
.index__item {
  position: relative;
  display: grid; grid-template-columns: 7ch 1fr auto; align-items: baseline;
  width: 100%; padding: 11px 0;
  border-top: 1px solid var(--line);
  text-align: left; font-size: 15px; color: var(--moon);
  transition: color 0.3s, padding 0.5s var(--ease);
}
.index__item .mono { font-size: 10.5px; letter-spacing: 0.08em; color: var(--dim); text-transform: uppercase; }
.index__item::after { content: "→"; opacity: 0; transform: translateX(-8px); transition: opacity 0.3s, transform 0.5s var(--ease); }
.index__item:hover, .index__item:focus-visible, .index__item.is-active { color: var(--paper); padding-left: 8px; }
.index__item:hover::after, .index__item:focus-visible::after, .index__item.is-active::after { opacity: 1; transform: none; }
template { display: none; }

/* ------------------------------------------------------------ about */
.env--about { display: flex; align-items: center; min-height: 140vh; }
.about__grid { position: relative; width: min(640px, 46vw); }
.about__title { font-size: clamp(2.4rem, 5.4vw, 5.8rem); max-width: 11ch; }
.about__belief {
  margin-top: 36px; max-width: 28ch;
  font: 300 clamp(1.25rem, 1.9vw, 1.75rem)/1.35 var(--f-display); font-stretch: 100%;
  color: var(--moon);
}
.about__belief strong { font-weight: 400; color: var(--paper); }
.about__body { margin: 28px 0 0 18%; max-width: 36ch; color: var(--moon); }
.about__values { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 40px 0 0 18%; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.about__values li::before { content: "◇ "; color: var(--cobalt-soft); }

/* ------------------------------------------------------------ process */
.env--process { padding-bottom: 0; }
.process__intro { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.process__intro h2 { max-width: 16ch; }
.stage {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  width: min(440px, 34vw);
}
.stage__num { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cobalt-soft); }
.stage h3 { margin: 14px 0 20px; font: 300 clamp(2.4rem, 5vw, 5rem)/0.95 var(--f-display); font-stretch: 125%; text-transform: uppercase; }
.stage p:not([class]) { color: var(--moon); max-width: 36ch; }
.stage__out { margin-top: 22px; font-size: 11.5px; color: var(--paper); letter-spacing: 0.03em; }
.stage:last-child .stage__num { color: var(--amber); }

.process__hud {
  position: fixed; left: var(--pad); bottom: 30px; z-index: 25;
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; color: var(--moon);
  opacity: 0; transform: translateY(10px); transition: opacity 0.5s, transform 0.5s var(--ease);
}
.in-process .process__hud { opacity: 1; transform: none; }
#stage-num { color: var(--paper); }
.process__bar { position: relative; width: 120px; height: 1px; background: var(--line-strong); }
#stage-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--paper); }

/* ------------------------------------------------------------ stack groups */
.groups { margin-top: 36px; border-bottom: 1px solid var(--line); }
.group {
  display: flex; flex-direction: column; gap: 4px;
  width: 100%; padding: 14px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  transition: padding 0.5s var(--ease);
}
.group__name { font-size: 16px; color: var(--moon); transition: color 0.3s; }
.group__items { font-size: 11px; color: var(--dim); letter-spacing: 0.02em; }
.group:hover, .group[aria-pressed="true"] { padding-left: 8px; }
.group:hover .group__name, .group[aria-pressed="true"] .group__name { color: var(--paper); }
.group[aria-pressed="true"] .group__items { color: var(--cobalt-soft); }

/* ------------------------------------------------------------ contact */
.env--contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  grid-template-rows: 1fr auto;
  column-gap: 6vw; row-gap: 12vh;
  align-items: end;
  min-height: 100vh;
  padding-top: calc(var(--nav-h) + 12vh);
  padding-right: calc(var(--pad) + 64px);
}
.contact__head { position: relative; align-self: end; padding-bottom: 4vh; }
.contact__title { font-size: clamp(2.2rem, 4.6vw, 5rem); max-width: 12ch; }
.contact__direct { margin-top: 18px; font-size: 14px; color: var(--dim); }
.contact__direct a { color: var(--moon); }

.panel { perspective: 1400px; }
.panel__inner {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px;
  padding: 34px 34px 30px;
  background: rgba(7, 9, 15, 0.8);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease);
}
/* registration marks — the panel reads as a drafted, built object */
.panel__inner::before, .panel__inner::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--paper); opacity: 0.7;
}
.panel__inner::before { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.panel__inner::after { right: -1px; bottom: -1px; border-right-width: 1px; border-bottom-width: 1px; }
.panel__label { grid-column: 1 / -1; margin-bottom: 14px; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.panel__label span { color: var(--moon); }

.field { grid-column: 1 / -1; display: flex; flex-direction: column; }
.field--half { grid-column: span 1; }
.field label { font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--moon); }
.field .opt { color: var(--dim); text-transform: none; letter-spacing: 0.02em; }
.field input, .field select, .field textarea {
  width: 100%;
  margin-top: 6px; padding: 10px 0 9px;
  background: transparent; color: var(--paper);
  border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  font: 400 15px/1.4 var(--f-body);
  transition: border-color 0.3s;
}
.field textarea { resize: vertical; min-height: 92px; }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239aa6bf'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center;
}
.field select option { background: var(--ink); color: var(--paper); }
.field ::placeholder { color: var(--dim); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--cobalt-soft); }
.field [aria-invalid="true"] { border-bottom-color: var(--error); }
.field__error { min-height: 18px; padding-top: 4px; font-size: 12px; color: var(--error); }

.panel__foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 10px; }
.btn--launch { background: var(--amber); color: #120c02; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12.5px; padding: 16px 24px; }
.btn--launch:hover { background: #ffc466; transform: translateY(-2px); }
.btn--launch[disabled] { cursor: progress; opacity: 0.75; transform: none; }
.btn--launch.is-loading .btn__label::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 10px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.form__status { flex: 1 1 220px; font-size: 13px; color: var(--moon); }
.form__status.is-error { color: var(--error); }
.form__status a { color: var(--paper); }

.panel.is-sent .panel__inner { display: block; }
.sent h3 { font: 300 clamp(1.8rem, 3vw, 2.6rem)/1 var(--f-display); font-stretch: 125%; text-transform: uppercase; margin: 14px 0 16px; }
.sent p { color: var(--moon); max-width: 40ch; }
.sent .mono { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }

.foot {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 26px 0 0; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--moon);
}
.foot__brand { display: inline-flex; align-items: center; gap: 10px; font: 600 12px/1 var(--f-display); font-stretch: 125%; letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper); }
.foot__brand .brand__mark { width: 22px; height: 22px; }
.foot__tag { font-family: var(--f-display); font-style: italic; font-weight: 300; font-stretch: 125%; }
.foot__meta { font-size: 11px; color: var(--dim); }
.foot__meta a { color: var(--moon); }

/* ------------------------------------------------------------ detail sheet */
.sheet {
  position: fixed; inset: 0 0 0 auto; z-index: 50;
  width: min(480px, 100vw);
  display: flex;
  background: rgba(6, 8, 14, 0.9);
  border-left: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transform: translateX(100%);
  transition: transform 0.8s var(--ease);
}
.sheet.is-open { transform: none; }
.sheet__inner { display: flex; flex-direction: column; width: 100%; padding: 32px clamp(24px, 3vw, 44px); overflow-y: auto; }
.sheet__close { align-self: flex-start; display: inline-flex; gap: 10px; align-items: center; padding: 8px 0; font-size: 13px; color: var(--moon); }
.sheet__close .mono { padding: 3px 6px; border: 1px solid var(--line-strong); font-size: 10px; }
.sheet__close:hover { color: var(--paper); }
.sheet__kicker { margin-top: auto; padding-top: 40px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cobalt-soft); }
.sheet__body .tag { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin-top: 14px; }
.sheet__body h3 { margin: 14px 0 22px; font: 300 clamp(2rem, 3.2vw, 2.9rem)/0.98 var(--f-display); font-stretch: 125%; text-transform: uppercase; }
.sheet__body > p:not(.tag) { color: var(--moon); }
.sheet__body dl { margin: 30px 0 0; border-top: 1px solid var(--line); }
.sheet__body dt { padding-top: 16px; font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.sheet__body dd { margin: 8px 0 0; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.sheet__nav { display: flex; justify-content: space-between; margin-top: 30px; }
.sheet__step { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--moon); padding: 8px 0; }
.sheet__step:hover { color: var(--paper); }
.is-locked { overflow: hidden; }
main, .log, .labels { transition: opacity 0.6s var(--ease); }
.is-focused main, .is-focused .log, .is-focused .labels { opacity: 0; }

/* ------------------------------------------------------------ reveal states (only when GSAP is present) */
.has-gsap [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.has-gsap [data-split] .w > span { display: inline-block; transform: translateY(105%); }
.has-gsap .reveal, .has-gsap .eyebrow, .has-gsap .intro-fade { opacity: 0; }
.has-gsap .stage > *:not(h3) { opacity: 0; }

/* ------------------------------------------------------------ fallbacks */
.no-webgl body {
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(76, 111, 255, 0.18), transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 90%, rgba(255, 178, 63, 0.08), transparent 70%),
    var(--void);
  background-attachment: fixed;
}
.no-webgl #world, .no-webgl .labels { display: none; }
.noscript { position: fixed; inset: auto 0 0 0; padding: 16px; background: var(--paper); color: var(--void); text-align: center; z-index: 100; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
