:root {
  --bg: #040404;
  --ink: #e8e4da;
  --dim: rgba(232, 228, 218, 0.52);
  --faint: rgba(232, 228, 218, 0.28);
  --hairline: rgba(232, 228, 218, 0.16);
  --moss: #94a878;
  --ember: #e05a3a;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ---------- chrome ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  font-size: 10px;
  letter-spacing: 0.22em;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  letter-spacing: 0.34em;
}

.mark {
  width: 9px;
  height: 9px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(232, 228, 218, 0.5);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a { color: var(--dim); transition: color 0.25s; }
.nav-links a:hover { color: var(--ink); }

.pill {
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 9px 16px;
  color: var(--ink) !important;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}

.pill:hover { border-color: var(--ink); }

.pill.solid {
  background: var(--ink);
  color: #0a0a08 !important;
}

.pill.solid:hover { background: #fff; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  cursor: none;
}

#scene, #veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#scene { z-index: 1; }
#cards { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
#veil  { z-index: 3; pointer-events: none; }

.hero-copy {
  position: absolute;
  z-index: 4;
  top: 12vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 900px);
  text-align: center;
  pointer-events: none;
  animation: rise 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both 0.3s;
}

@keyframes rise {
  from { opacity: 0; transform: translate(-50%, 18px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.kicker {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--dim);
}

.hero-copy h1 {
  margin-top: 22px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6.2vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.hero-copy h1 span { display: block; }
.hero-copy h1 em { font-style: italic; color: #fdfbf4; }

.sub {
  margin-top: 26px;
  font-size: 9.5px;
  letter-spacing: 0.34em;
  color: var(--dim);
}

.hint {
  margin-top: 14px;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--faint);
  animation: pulse 2.4s ease-in-out infinite;
  transition: opacity 1.2s;
}

.hint.gone { opacity: 0; }

@keyframes pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}

.corner {
  position: absolute;
  z-index: 4;
  bottom: 26px;
  font-size: 8.5px;
  letter-spacing: 0.22em;
  line-height: 1.9;
  color: var(--faint);
}

.corner-bl { left: 28px; }
.corner-br { right: 28px; text-align: right; }

.scroll-cue {
  position: absolute;
  z-index: 4;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 8px;
  letter-spacing: 0.34em;
  color: var(--faint);
}

.scroll-cue .line {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--faint), transparent);
  animation: drip 2.6s ease-in-out infinite;
  transform-origin: top;
}

@keyframes drip {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- signal cards ---------- */

.sig-card {
  position: absolute;
  width: 178px;
  padding: 7px 8px 8px;
  border: 1px solid rgba(232, 228, 218, 0.2);
  background: rgba(4, 4, 4, 0.6);
  backdrop-filter: blur(2px);
  font-size: 8px;
  letter-spacing: 0.08em;
  line-height: 1.75;
  color: var(--dim);
  opacity: 0;
  will-change: opacity;
}

.sig-card .spec {
  display: block;
  width: 100%;
  height: 24px;
  margin-bottom: 6px;
  opacity: 0.9;
}

.sig-card .r1 { color: var(--ink); letter-spacing: 0.12em; }

.sig-card.anomaly { border-color: rgba(224, 90, 58, 0.55); }
.sig-card.anomaly .r1 { color: var(--ember); }

/* ---------- cursor light ---------- */

.cursor {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  pointer-events: none;
  will-change: transform;
}

.cursor i {
  position: absolute;
  top: -14px;
  left: -14px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(232, 228, 218, 0.4);
  border-radius: 50%;
}

.cursor::after {
  content: "";
  position: absolute;
  top: -1.5px;
  left: -1.5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 244, 214, 0.9);
}

/* ---------- sections ---------- */

.section {
  padding: 140px 28px 120px;
  max-width: 1060px;
  margin: 0 auto;
}

.section h2, .band h2 {
  margin-top: 26px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.6vw, 58px);
  line-height: 1.08;
}

.lede {
  margin-top: 26px;
  max-width: 560px;
  font-size: 13.5px;
  line-height: 2.1;
  color: var(--dim);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
  margin-top: 72px;
}

.cell {
  border-top: 1px solid var(--hairline);
  padding-top: 22px;
}

.cell .idx {
  font-size: 8.5px;
  letter-spacing: 0.28em;
  color: var(--faint);
}

.cell h3 {
  margin-top: 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
}

.cell p:last-child {
  margin-top: 14px;
  font-size: 12px;
  line-height: 2;
  color: var(--dim);
}

.band {
  padding: 150px 28px 160px;
  text-align: center;
  border-top: 1px solid var(--hairline);
}

.band h2 span { display: block; }
.band h2 em { font-style: italic; }

.cta-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 54px;
  font-size: 9.5px;
  letter-spacing: 0.24em;
}

/* ---------- footer ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 44px 28px 52px;
  border-top: 1px solid var(--hairline);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  line-height: 2.1;
}

.wordmark-sm { letter-spacing: 0.34em; font-weight: 500; font-size: 10px; }
.dim { color: var(--faint); }
.center { text-align: center; }
.right { text-align: right; }

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1s cubic-bezier(0.2, 0.7, 0.2, 1), transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in { opacity: 1; transform: none; }

/* ---------- grain ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  /* background-image set at runtime from a small canvas-generated noise tile */
  background-repeat: repeat;
}

/* ---------- hero additions ---------- */

.hero-lede {
  margin: 26px auto 0;
  max-width: 520px;
  font-size: 12.5px;
  line-height: 2;
  color: var(--dim);
  text-shadow: 0 0 14px #040404, 0 0 4px #040404;
}

.hero-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
  font-size: 9.5px;
  letter-spacing: 0.24em;
  pointer-events: auto;
}

.hero-cta a, .hero-cta a:hover { cursor: pointer; }

/* ---------- stats strip ---------- */

.proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 28px;
}

.proof-item {
  padding: 34px 20px 30px 0;
  border-top: 1px solid var(--hairline);
}

.proof-item + .proof-item {
  border-left: 1px solid var(--hairline);
  padding-left: 24px;
}

.idx {
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--faint);
}

.proof-val {
  font-family: var(--serif);
  font-size: clamp(38px, 4.4vw, 54px);
  line-height: 1;
  margin-bottom: 14px;
}

.proof-val span {
  font-size: 0.5em;
  font-style: italic;
  color: var(--dim);
}

.proof-src {
  grid-column: 1 / -1;
  padding-top: 6px;
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--faint);
}

/* ---------- layouts ---------- */

.section h2 em { font-style: italic; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.lede-col { padding-top: 40px; }
.lede-col .lede:first-child { margin-top: 0; }

.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 28px; }

.center-lede { margin-left: auto; margin-right: auto; }

/* ---------- field test ---------- */

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 64px;
  align-items: start;
}

.field-copy .lede:first-child { margin-top: 0; }

.log {
  border: 1px solid var(--hairline);
  padding: 22px 22px 18px;
  background: rgba(232, 228, 218, 0.02);
}

.log-head {
  font-size: 8.5px;
  letter-spacing: 0.28em;
  color: var(--faint);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 12px;
  margin-bottom: 6px;
}

.log-row {
  display: grid;
  grid-template-columns: 1fr 76px 64px;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(232, 228, 218, 0.07);
  font-size: 11px;
  color: var(--dim);
}

.log-row span:nth-child(n+2) { text-align: right; }
.log-row span:first-child { color: var(--ink); }

.log-cols, .log-cols span:first-child {
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--faint);
}

.log-hi span:first-child, .log-hi span:last-child { color: #fdfbf4; }
.log-hi span:last-child { color: var(--moss); }
.log-gap { margin-top: 18px; }
.log-end { border-bottom: 0; }
.log-sub span:first-child { grid-column: span 2; }

.log-more span:first-child { color: var(--faint); }
.log-bg span:last-child { color: var(--dim); font-size: 8.5px; letter-spacing: 0.18em; }
.log-flag { border-bottom: 0; }
.log-flag span:last-child { color: var(--moss); font-size: 8.5px; letter-spacing: 0.18em; }

.log-note {
  margin-top: 14px;
  font-size: 7.5px;
  letter-spacing: 0.16em;
  line-height: 2;
  color: var(--faint);
}

/* ---------- timeline ---------- */

.timeline {
  list-style: none;
  position: relative;
  padding-top: 40px;
}

.timeline li {
  position: relative;
  padding: 0 0 30px 34px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--faint);
  border-radius: 50%;
}

.timeline li::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 16px;
  bottom: 2px;
  width: 1px;
  background: var(--hairline);
}

.timeline li:last-child::after { display: none; }

.timeline li.done::before {
  background: var(--moss);
  border-color: var(--moss);
}

.timeline li.now::before {
  background: var(--ember);
  border-color: var(--ember);
  box-shadow: 0 0 10px rgba(224, 90, 58, 0.7);
}

.timeline li.done .idx { color: var(--moss); }
.timeline li.now .idx { color: var(--ember); }

.timeline h3 {
  margin-top: 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
}

.timeline li p:last-child {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--dim);
}

/* ---------- team ---------- */

.team { margin-top: 56px; }
.team .cell h3 { margin-top: 12px; }

/* ---------- contact ---------- */

.contact { border-top: 1px solid var(--hairline); }
.contact .kicker { margin-bottom: 4px; }

@media (max-width: 900px) {
  .split, .field-grid { grid-template-columns: 1fr; gap: 0; }
  .field-grid { gap: 48px; }
  .lede-col, .timeline { padding-top: 24px; }
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 0 28px; }
  .proof { grid-template-columns: 1fr 1fr; }
  .proof-item:nth-child(3) { border-left: 0; padding-left: 0; }
}

@media (max-width: 640px) {
  .section { padding: 96px 16px 80px; }
  .band { padding: 110px 16px 120px; }
  .proof { padding: 0 16px; }
  .grid-4 { grid-template-columns: 1fr; }
  .log { padding: 18px 14px 14px; }
  .log-row { grid-template-columns: 1fr 58px 50px; font-size: 10.5px; }
  .hero-copy { top: 9vh; }
  .hero-lede { font-size: 11.5px; }
  .footer { flex-direction: column; padding: 36px 16px 44px; }
  .footer .center, .footer .right { text-align: left; }
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .sig-card[data-slot="7"], .sig-card[data-slot="8"] { display: none; }
}

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; gap: 0; }
  .cell { padding: 26px 0; }
  .sig-card[data-slot="4"], .sig-card[data-slot="5"], .sig-card[data-slot="6"] { display: none; }
}

@media (max-width: 640px) {
  .nav { padding: 18px 16px; }
  .nav-links { gap: 14px; }
  .nav-links a:not(.pill) { display: none; }
  .corner-bl { left: 16px; }
  .corner-br { right: 16px; }
  .sig-card { width: 148px; }
  .sig-card[data-slot="1"], .sig-card[data-slot="3"] { display: none; }
  .hero { cursor: auto; }
  .cursor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy, .hint, .scroll-cue .line { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
