/* ============================================================
   BlackGrid Labs — site system v2 "surveyed"
   Warm black / parchment / amber. Archivo + JetBrains Mono.
   Content lives inside a surveyed frame: hairlines + node
   markers are structure, not decoration — the grid is the brand.
   (/observatory is frozen and never touches this file.)
   ============================================================ */

/* ---------- fonts ---------- */
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/Archivo-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-Variable.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --bg: #0a0a0b;
  --bg-raise: #0e0e10;
  --bg-deep: #070708;
  --ink: #f4f3ee;
  --ink-soft: #bcb8af;
  --ink-body: #c0bdb6;
  --ink-mute: #83807a;
  --amber: #d4a155;
  --amber-dim: rgba(212, 161, 85, 0.55);
  --live: #4ade80;
  --line: rgba(244, 243, 238, 0.09);
  --line-soft: rgba(244, 243, 238, 0.05);
  --line-strong: rgba(244, 243, 238, 0.17);

  --sans: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(20px, 3.4vw, 52px);
  --frame-max: 1560px;
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink-body);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }

h1, h2, h3 { color: var(--ink); font-weight: 640; letter-spacing: -0.028em; text-wrap: balance; }

.mono { font-family: var(--mono); }

/* micro label — the brand's surveyor annotation. Deliberate, not on every section. */
.label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.label--amber { color: var(--amber); }
.label--live { color: var(--live); }

/* ---------- surveyed frame ---------- */
.frame-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.frame-lines span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-soft);
}
.frame-lines span:nth-child(1) { left: 25%; }
.frame-lines span:nth-child(2) { left: 50%; }
.frame-lines span:nth-child(3) { left: 75%; }
@media (max-width: 860px) {
  .frame-lines span:nth-child(1), .frame-lines span:nth-child(3) { display: none; }
}

/* film grain — static, barely there */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* node marker (+) at panel intersections */
.node {
  position: absolute;
  width: 9px;
  height: 9px;
  z-index: 4;
  color: rgba(244, 243, 238, 0.28);
}
.node::before, .node::after {
  content: '';
  position: absolute;
  background: currentColor;
}
.node::before { left: 4px; top: 0; width: 1px; height: 9px; }
.node::after { left: 0; top: 4px; width: 9px; height: 1px; }
.node--tl { top: -5px; left: calc(25% - 4px); }
.node--tc { top: -5px; left: calc(50% - 4px); }
.node--tr { top: -5px; left: calc(75% - 4px); }
@media (max-width: 860px) {
  .node--tl, .node--tr { display: none; }
}

/* panels: every scene sits between hairlines */
.panel {
  position: relative;
  border-top: 1px solid var(--line);
  z-index: 2;
}
.panel-inner {
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

/* ---------- nav: detached glass pill ---------- */
.nav {
  position: fixed;
  top: 18px;
  left: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.nav-pill {
  pointer-events: auto;
  width: min(1240px, 100%);
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 22px;
  border-radius: 14px;
  background: rgba(10, 10, 11, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  position: relative;
  transition: background 320ms ease, border-color 320ms ease;
}
/* over the parchment scene the pill flips light */
.nav.on-light .nav-pill {
  background: rgba(244, 243, 238, 0.62);
  border-color: rgba(10, 10, 11, 0.14);
  box-shadow: 0 14px 40px rgba(10, 10, 11, 0.1);
}
.nav.on-light .nav-mark-name { color: #0a0a0b; }
.nav.on-light .nav-mark-name span { color: rgba(10, 10, 11, 0.45); }
.nav.on-light .nav-link { color: rgba(10, 10, 11, 0.62); }
.nav.on-light .nav-link:hover,
.nav.on-light .nav-link--active { color: #0a0a0b; }
.nav.on-light .nav-burger span { background: #0a0a0b; }
.nav-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-mark-square {
  width: 9px;
  height: 9px;
  background: var(--amber);
  transition: transform 240ms var(--ease-out);
}
.nav-mark:hover .nav-mark-square { transform: rotate(90deg); }
.nav-mark-name {
  font-weight: 680;
  font-stretch: 112%;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.nav-mark-name span { color: var(--ink-mute); font-weight: 480; }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
}
.nav-link {
  position: relative;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 6px 0;
  transition: color 200ms ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease-out);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after, .nav-link--active::after { transform: scaleX(1); }
.nav-link--active { color: var(--ink); }

/* filled CTA inside the pill */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0a0a0b;
  background: var(--amber);
  border-radius: 9px;
  padding: 11px 18px;
  transition: transform 180ms var(--ease-out), background 200ms ease;
}
.nav-cta .arr { transition: transform 200ms var(--ease-out); }
.nav-cta:hover { background: #e0b269; }
.nav-cta:hover .arr { transform: translateX(3px); }
.nav-cta:active { transform: scale(0.97); }

.nav-burger { display: none; }

@media (max-width: 720px) {
  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
  }
  .nav-burger span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--ink);
    transition: transform 240ms var(--ease-out), opacity 200ms ease;
  }
  .nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  /* dropdown extends from the pill itself */
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 10, 11, 0.94);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    /* GPU-safe open/close: clip instead of max-height (layout prop) */
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 280ms var(--ease-out), visibility 0s 280ms;
  }
  .nav-links.open {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition: clip-path 320ms var(--ease-out), visibility 0s;
  }
  .nav.on-light .nav-links { background: rgba(244, 243, 238, 0.96); border-color: rgba(10, 10, 11, 0.14); }
  .nav-link { padding: 18px 22px; width: 100%; border-top: 1px solid var(--line-soft); }
  .nav-link::after { display: none; }
  .nav-cta { margin: 14px 22px 18px; justify-content: center; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  z-index: 2;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-media video,
.hero-media canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* the rendered loop is mastered dark — lift it so the grid floor reads */
  filter: brightness(1.5) contrast(1.06);
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(10, 10, 11, 0.32) 0%, rgba(10, 10, 11, 0) 38%, rgba(10, 10, 11, 0.55) 100%),
    radial-gradient(110% 80% at 16% 90%, rgba(10, 10, 11, 0.6) 0%, rgba(10, 10, 11, 0) 60%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(48px, 7.5vh, 88px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(18px, 2.6vh, 30px);
}
.hero-eyebrow .rule {
  width: 44px;
  height: 1px;
  background: var(--amber);
  transform-origin: left;
}
.hero-headline {
  font-size: clamp(50px, 8vw, 122px);
  font-weight: 640;
  font-stretch: 106%;
  letter-spacing: -0.03em;
  line-height: 0.98;
}
.hero-line { display: block; overflow: hidden; }
.hero-line > span { display: block; }
.hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 22px;
  text-align: right;
  padding-bottom: 8px;
  flex-shrink: 0;
}
.hero-sub {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
  max-width: 30ch;
}
.hero-coords {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  line-height: 2;
  text-transform: uppercase;
}
.hero-coords .amber { color: var(--amber-dim); }
@media (max-width: 900px) {
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 26px; }
  .hero-side { align-items: flex-start; text-align: left; }
}

/* ---------- section headers ---------- */
.sect-head {
  padding: clamp(72px, 11vh, 128px) 0 clamp(36px, 5vh, 64px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: end;
}
.sect-title {
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.02;
}
.sect-side {
  color: var(--ink-soft);
  font-size: 15.5px;
  max-width: 44ch;
  justify-self: end;
  align-self: end;
}
@media (max-width: 860px) {
  .sect-head { grid-template-columns: 1fr; }
  .sect-side { justify-self: start; }
}

/* ---------- products: split panel ---------- */
.products-split {
  display: grid;
  /* 50/50 so the internal divider lands exactly on the centre frame line */
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.product-cell {
  position: relative;
  padding: clamp(36px, 5vw, 72px) var(--gutter) clamp(44px, 6vw, 84px);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  transition: background 500ms var(--ease-out);
}
.product-cell + .product-cell { border-left: 1px solid var(--line); }
.product-cell:hover { background: var(--bg-raise); }
.product-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(40px, 7vh, 92px);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-mute);
  flex-shrink: 0;
}
.dot--live {
  background: var(--live);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.55);
}
.product-name {
  font-size: clamp(36px, 4.2vw, 58px);
  font-weight: 660;
  font-stretch: 108%;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
}
.product-role {
  font-size: 16px;
  color: var(--ink-soft);
  margin-top: 10px;
}
.product-body {
  margin-top: 22px;
  max-width: 46ch;
}
.product-metric {
  margin-top: auto;
  padding-top: 36px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.product-metric-val {
  font-family: var(--mono);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  color: var(--amber);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.product-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  width: fit-content;
  padding-bottom: 4px;
}
.product-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--amber);
  transform-origin: left;
  transition: transform 240ms var(--ease-out);
}
.product-link:hover::after { transform: scaleX(0.55); }
.product-link .arr { transition: transform 240ms var(--ease-out); }
.product-link:hover .arr { transform: translateX(4px); }
@media (max-width: 860px) {
  .products-split { grid-template-columns: 1fr; }
  .product-cell + .product-cell { border-left: 0; border-top: 1px solid var(--line); }
  .product-cell { min-height: 0; }
  .product-status { margin-bottom: 36px; }
}

/* ---------- observatory band ---------- */
.obs {
  background: var(--bg-deep);
  overflow: hidden;
}
.obs-inner {
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: clamp(56px, 8vh, 96px) var(--gutter) 0;
}
.obs-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: clamp(36px, 6vh, 64px);
}
.obs-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.obs-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}
.obs-metric-val {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(44px, 6.5vw, 92px);
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.obs-metric-val .unit { font-size: 0.42em; color: var(--ink-mute); letter-spacing: 0; }
.obs-metric--delta .obs-metric-val { color: var(--amber); }
.obs-metric-key { display: block; margin-top: 14px; }
.obs-foot {
  margin-top: clamp(40px, 6vh, 72px);
  border-top: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.ticker {
  display: flex;
  white-space: nowrap;
  padding: 14px 0;
  width: max-content;
}
.ticker-seq {
  display: flex;
  gap: 56px;
  padding-right: 56px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  animation: ticker-scroll 46s linear infinite;
}
.ticker-seq .amber { color: var(--amber-dim); }
.ticker-seq a { color: var(--ink-soft); }
.ticker-seq a:hover { color: var(--ink); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
@media (max-width: 720px) {
  .obs-metrics { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- initiatives (pinned scene) ---------- */
.init-stage {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--gutter);
  align-items: center;
  height: 100svh;
  min-height: 620px;
  padding: 64px 0;
}
.init-left { align-self: center; }
.init-count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
  margin-bottom: 26px;
  display: block;
}
.init-count .amber { color: var(--amber); }
.init-names { display: flex; flex-direction: column; gap: 10px; }
.init-name {
  font-size: clamp(30px, 3.4vw, 50px);
  font-weight: 640;
  font-stretch: 106%;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: rgba(244, 243, 238, 0.22);
  transition: color 400ms var(--ease-out), transform 500ms var(--ease-out);
  transform-origin: left center;
}
.init-name.active { color: var(--ink); transform: translateX(12px); }
.init-name-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--amber);
  margin-right: 16px;
  opacity: 0;
  transition: opacity 300ms ease;
  vertical-align: middle;
}
.init-name.active .init-name-dot { opacity: 1; }
.init-panels { position: relative; min-height: 380px; }
.init-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3vw, 46px);
  border: 1px solid var(--line);
  background: var(--bg-raise);
  opacity: 0;
  visibility: hidden;
}
.init-panel.active { opacity: 1; visibility: visible; }
.init-panel-glyph {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--amber);
  margin-bottom: 26px;
}
.init-panel-sub {
  color: var(--ink);
  font-weight: 560;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.init-panel-body { max-width: 52ch; }
.init-panel-tag {
  margin-top: auto;
  padding-top: 26px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
@media (max-width: 860px) {
  .init-stage { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .init-names { display: none; }
  .init-panels { min-height: 0; display: flex; flex-direction: column; gap: 20px; }
  .init-panel { position: relative; opacity: 1; visibility: visible; }
}

/* ---------- research index ---------- */
.page-head {
  padding: clamp(140px, 22vh, 220px) 0 clamp(48px, 7vh, 84px);
}
.page-head .hero-eyebrow { margin-bottom: 22px; }
.page-title {
  font-size: clamp(44px, 6.4vw, 96px);
  font-weight: 640;
  font-stretch: 106%;
  letter-spacing: -0.03em;
  line-height: 1;
}
.page-sub {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 46ch;
}

.res-rows { border-top: 1px solid var(--line); margin-bottom: clamp(80px, 12vh, 140px); }
.res-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(70px, 1fr) 4fr 5fr 2fr;
  gap: clamp(16px, 2.4vw, 40px);
  padding: clamp(30px, 4.5vh, 52px) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  transition: background 400ms var(--ease-out);
}
.res-row:hover { background: var(--bg-raise); }
.res-idx {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  padding-top: 8px;
}
.res-name {
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.024em;
  line-height: 1.05;
}
.res-badge {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}
.res-badge--public { color: #9ec5e8; border-color: rgba(158, 197, 232, 0.35); }
.res-badge--restricted { color: var(--amber); border-color: rgba(212, 161, 85, 0.4); }
.res-badge--classified { color: var(--ink-mute); }
.res-desc { max-width: 52ch; }
.res-desc .quiet { color: var(--ink-mute); display: block; margin-top: 10px; font-size: 14px; }
.res-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  justify-self: end;
}
.res-link {
  position: relative;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 4px;
  white-space: nowrap;
}
.res-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease-out);
}
.res-link:hover::after { transform: scaleX(1); }
.res-link--dim { color: var(--ink-mute); }
.res-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

.res-row--classified .res-blur {
  filter: blur(8px);
  transition: filter 500ms var(--ease-out);
  user-select: none;
  pointer-events: none;
}
.res-row--classified:hover .res-blur { filter: blur(4px); }
.res-progress {
  margin-top: 18px;
  width: min(240px, 100%);
  height: 2px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.res-progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--p, 0%);
  background: var(--amber-dim);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease-out-expo);
}
.res-progress.on .res-progress-fill { transform: scaleX(1); }
.res-progress-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.14em;
  margin-top: 8px;
  display: block;
}
@media (max-width: 960px) {
  .res-row { grid-template-columns: 1fr; gap: 16px; }
  .res-idx { padding-top: 0; }
  .res-actions { justify-self: start; flex-direction: row; flex-wrap: wrap; gap: 20px; }
}

/* ---------- helios editorial page ---------- */
.doc-head {
  padding: clamp(140px, 20vh, 200px) 0 clamp(40px, 6vh, 72px);
  max-width: 940px;
}
.doc-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.doc-title {
  font-size: clamp(42px, 5.8vw, 84px);
  font-weight: 640;
  font-stretch: 106%;
  letter-spacing: -0.03em;
  line-height: 1;
}
.doc-stand {
  margin-top: 24px;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 62ch;
}
.doc-actions { display: flex; gap: 28px; margin-top: 34px; flex-wrap: wrap; }

.doc-body {
  max-width: 760px;
  padding-bottom: clamp(60px, 9vh, 110px);
}
.doc-section { margin-bottom: clamp(48px, 8vh, 88px); }
.doc-section h2 {
  font-size: clamp(26px, 2.8vw, 38px);
  letter-spacing: -0.022em;
  margin-bottom: 22px;
  line-height: 1.12;
}
.doc-section h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin: 30px 0 12px;
}
.doc-section p { margin-bottom: 16px; max-width: 68ch; text-wrap: pretty; }
.doc-section ul { margin: 0 0 16px 18px; max-width: 66ch; }
.doc-section li { margin-bottom: 8px; }
.doc-section strong { color: var(--ink); font-weight: 600; }
.doc-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--amber);
  display: block;
  margin-bottom: 12px;
}
.doc-sources { border-top: 1px solid var(--line); padding-top: 28px; }
.doc-sources h2 { font-size: 15px; letter-spacing: 0.02em; margin-bottom: 18px; }
.doc-sources ol {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--ink-mute);
  margin-left: 22px;
}
.doc-sources a { color: var(--ink-soft); }
.doc-sources a:hover { color: var(--ink); }

/* ---------- portal ---------- */
.portal-wrap {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px var(--gutter) 60px;
  position: relative;
  z-index: 2;
}
.portal-box {
  width: min(460px, 100%);
  border: 1px solid var(--line-strong);
  padding: clamp(30px, 4vw, 46px);
  background: var(--bg-raise);
  position: relative;
}
.portal-box .node--a { top: -5px; left: -5px; }
.portal-box .node--b { bottom: -5px; right: -5px; }
.portal-title {
  font-size: 21px;
  font-weight: 620;
  letter-spacing: -0.015em;
  margin: 18px 0 6px;
}
.portal-sub { color: var(--ink-mute); font-size: 13.5px; margin-bottom: 28px; }
.portal-field {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  padding: 13px 14px;
  outline: none;
  transition: border-color 200ms ease;
}
.portal-field:focus { border-color: var(--amber); }
.portal-btn {
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: transform 160ms var(--ease-out), background 200ms ease;
}
.portal-btn:hover { background: var(--amber); }
.portal-btn:active { transform: scale(0.98); }
.portal-error { margin-top: 14px; color: #e8927c; font-size: 13px; }
.portal-doc {
  border: 1px solid var(--line-strong);
  padding: 22px;
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  transition: border-color 240ms ease, background 300ms ease;
}
.portal-doc:hover { border-color: var(--amber-dim); background: var(--bg); }
.portal-doc-name { color: var(--ink); font-weight: 560; font-size: 15px; }
.portal-doc-class { margin-top: 6px; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 2;
  background: var(--bg-deep);
}
.footer-inner {
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: clamp(44px, 6vh, 72px) var(--gutter) 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 34px;
  align-items: start;
}
.footer-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-line { color: var(--ink-mute); font-size: 13px; max-width: 46ch; }
.footer-links { display: flex; gap: 34px; }
.footer-links a {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 4px;
}
.footer-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease-out);
}
.footer-links a:hover { color: var(--ink); }
.footer-links a:hover::after { transform: scaleX(1); }
.footer-base {
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: 0 var(--gutter) 30px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ---------- center-stage statement scene ---------- */
.statement {
  position: relative;
  /* compact by default (no-JS / reduced-motion); site.js adds .on to open the scrub runway */
  height: 100svh;
  z-index: 2;
}
.statement.on { height: 170svh; }
.statement-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--gutter);
}
.statement-text {
  font-size: clamp(40px, 7.2vw, 108px);
  font-weight: 640;
  font-stretch: 106%;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-align: center;
  max-width: 15ch;
  will-change: transform;
}
.st-w { display: inline-block; }

/* ---------- cinematic interlude (inset → full-bleed on scrub) ---------- */
.interlude {
  position: relative;
  /* compact by default (no-JS / reduced-motion); site.js adds .on to open the scrub runway */
  height: 100svh;
  z-index: 2;
  background: var(--bg-deep);
}
.interlude.on { height: 240svh; }
.interlude-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.interlude-frame {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  border-radius: 10px;
  will-change: transform;
  /* fallback if neither video nor poster resolves */
  background:
    radial-gradient(120% 90% at 50% 100%, rgba(212, 161, 85, 0.08) 0%, rgba(10, 10, 11, 0) 55%),
    linear-gradient(180deg, #070708 0%, #0c0c0e 100%);
}
.interlude-frame video,
.interlude-frame canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* the loop is mastered very dark — lift hard so the tower field reads on every panel */
  filter: brightness(1.75) contrast(1.1);
}
.interlude-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 11, 0.26) 0%, rgba(10, 10, 11, 0) 45%, rgba(10, 10, 11, 0.45) 100%);
}
.interlude-chip {
  position: absolute;
  top: clamp(84px, 12vh, 120px);
  left: clamp(20px, 4vw, 56px);
  padding: 7px 12px;
  border: 1px solid rgba(244, 243, 238, 0.22);
  border-radius: 999px;
  background: rgba(10, 10, 11, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink-soft);
}
.interlude-statement {
  position: absolute;
  left: clamp(20px, 4vw, 56px);
  right: clamp(20px, 4vw, 56px);
  bottom: clamp(40px, 8vh, 84px);
  color: var(--ink);
  font-size: clamp(24px, 3.2vw, 44px);
  font-weight: 620;
  font-stretch: 106%;
  letter-spacing: -0.024em;
  line-height: 1.1;
  max-width: 18ch;
  text-wrap: balance;
}

/* ---------- light parchment scene ---------- */
.panel--light {
  --ink: #0a0a0b;
  --ink-soft: #4a4841;
  --ink-body: #55534b;
  --ink-mute: #8a867c;
  --line: rgba(10, 10, 11, 0.12);
  --line-soft: rgba(10, 10, 11, 0.07);
  --line-strong: rgba(10, 10, 11, 0.22);
  background: #f2f0e9;
  color: var(--ink-body);
}
.panel--light .node { color: rgba(10, 10, 11, 0.32); }
.light-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.light-lines span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(10, 10, 11, 0.07);
}
.light-lines span:nth-child(1) { left: 25%; }
.light-lines span:nth-child(2) { left: 50%; }
.light-lines span:nth-child(3) { left: 75%; }
@media (max-width: 860px) {
  .light-lines span:nth-child(1), .light-lines span:nth-child(3) { display: none; }
}
.research-band .band-inner {
  position: relative;
  z-index: 1;
  padding: clamp(96px, 16vh, 190px) 0;
}
.band-title {
  font-size: clamp(44px, 6.8vw, 104px);
  font-weight: 640;
  font-stretch: 106%;
  letter-spacing: -0.032em;
  line-height: 0.98;
  max-width: 12ch;
}
.band-sub {
  margin-top: 20px;
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--ink-soft);
}
.band-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(34px, 5vh, 54px);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 6px;
  position: relative;
}
.band-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--amber);
  transform-origin: left;
  transition: transform 300ms var(--ease-out);
}
.band-link .arr {
  font-family: var(--sans);
  font-size: 20px;
  transition: transform 240ms var(--ease-out);
}
.band-link:hover::after { transform: scaleX(0.4); }
.band-link:hover .arr { transform: translateX(6px); }

/* ---------- hover choreography (150ms in / 110ms out) ---------- */
.init-panel {
  transition: transform 110ms var(--ease-out), border-color 110ms ease;
}
.init-panel:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  transition: transform 150ms var(--ease-out), border-color 150ms ease;
}
.product-cell .product-name {
  transition: transform 110ms var(--ease-out);
}
.product-cell:hover .product-name { transform: translateX(5px); transition-duration: 150ms; }
.product-cell::after {
  content: '\2192';
  position: absolute;
  top: clamp(34px, 5vw, 68px);
  right: var(--gutter);
  color: var(--amber);
  font-size: 20px;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 110ms ease, transform 110ms var(--ease-out);
}
.product-cell:hover::after { opacity: 1; transform: translateX(0); transition-duration: 150ms; }
.obs-foot:hover .ticker-seq { animation-play-state: paused; }
.res-row .res-name {
  position: relative;
  width: fit-content;
}
.res-row .res-name::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease-out);
}
.res-row:hover .res-name::after { transform: scaleX(1); }

/* ---------- reduced motion ----------
   Content is fully visible without JS: site.js sets animation
   initial states at runtime, never CSS — headless/no-JS renders
   must never ship blank sections. */
@media (prefers-reduced-motion: reduce) {
  .ticker-seq { animation: none; }
  .res-progress-fill { transition: none; transform: scaleX(1); }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
