:root {
  --bg: #0a0a0a;
  --bg-2: #101010;
  --fg: #f2f2f2;
  --muted: #8f8f8f;
  --dim: #5a5a5a;
  --line: #262626;
  --line-2: #333333;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  position: relative;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* fine print grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.05;
  background-image: radial-gradient(#fff 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* --- reveal-on-scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-group .reveal:nth-child(1) { transition-delay: 0.02s; }
.reveal-group .reveal:nth-child(2) { transition-delay: 0.10s; }
.reveal-group .reveal:nth-child(3) { transition-delay: 0.18s; }
.reveal-group .reveal:nth-child(4) { transition-delay: 0.26s; }
.reveal-group .reveal:nth-child(5) { transition-delay: 0.34s; }
.reveal-group .reveal:nth-child(6) { transition-delay: 0.42s; }
.reveal-group .reveal:nth-child(7) { transition-delay: 0.50s; }

/* mark */
.mark9 {
  width: 20px; height: 20px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; flex-shrink: 0;
}
.mark9.sm { width: 15px; height: 15px; font-size: 9px; border-width: 1px; }
.mark9.lg { width: 30px; height: 30px; font-size: 16px; border-width: 2px; }

/* header */
header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10,10,10,0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header .bar { display: flex; align-items: center; justify-content: space-between; padding: 15px 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; letter-spacing: 0.5px; }
nav.main-nav { display: flex; align-items: center; gap: 24px; font-size: 12.5px; color: var(--muted); }
nav.main-nav a { transition: color 0.2s; }
nav.main-nav a:hover { color: var(--fg); }

/* function-call buttons: (9)name(N) */
.fn-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  padding: 9px 16px; border-radius: 3px;
  border: 1px solid var(--fg); cursor: pointer;
  background: transparent; color: var(--fg);
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}
.fn-btn.primary { background: var(--fg); color: var(--bg); }
.fn-btn.primary .mark9 { color: var(--bg); }
.fn-btn .section { opacity: 0.55; }
.fn-btn:hover { opacity: 0.8; }
.fn-btn.sm { padding: 7px 13px; font-size: 11.5px; }

/* marquee */
.marquee {
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  background: var(--bg-2);
}
.marquee-track {
  display: inline-flex;
  animation: marquee 26s linear infinite;
  padding: 10px 0;
}
.marquee-track span {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
  padding: 0 22px;
  border-right: 1px solid var(--line-2);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* hero */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('img/reactor.png') center 30%/cover no-repeat;
  opacity: 0.16;
  filter: grayscale(1);
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.4), var(--bg) 92%);
}
.hero-inner {
  position: relative;
  display: flex; align-items: center; gap: 48px;
  padding: 84px 28px 70px;
  flex-wrap: wrap;
}
.hero .copy { flex: 1 1 340px; min-width: 280px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px; color: var(--muted); letter-spacing: 2px;
  text-transform: uppercase; margin: 0 0 20px;
  border: 1px solid var(--line-2); border-radius: 20px;
  padding: 5px 12px 5px 8px;
}
.headline {
  font-size: 36px; font-weight: 500; line-height: 1.32;
  letter-spacing: 0.3px; text-transform: uppercase; margin: 0 0 18px;
}
.headline .pipe { color: var(--muted); font-weight: 400; margin: 0 10px; }
.sub { font-size: 15px; color: var(--muted); line-height: 1.75; max-width: 460px; margin: 0 0 28px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* hero badge (sticker) */
.badge {
  flex-shrink: 0; width: 220px; height: 220px;
  border: 1.5px solid var(--line-2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.badge svg { width: 100%; height: 100%; }

/* gauges */
.panel { border-bottom: 1px solid var(--line); padding: 46px 28px; }
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  max-width: 900px; margin: 0 auto 26px;
}
.panel-head .section-title { margin: 0; text-align: left; }
.panel-head .note { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.gauges { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 40px; }
.gauge-label { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; margin-bottom: 8px; }
.gauge-label .val { color: var(--muted); }
.gauge-track { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.gauge-fill { height: 100%; width: 0; background: var(--fg); transition: width 1.4s cubic-bezier(.2,.7,.2,1); }

/* section shell */
section { border-bottom: 1px solid var(--line); padding: 64px 28px; }
.section-title {
  font-family: var(--mono);
  font-size: 12px; color: var(--muted); letter-spacing: 2px;
  text-transform: uppercase; text-align: center; margin: 0 0 32px;
}

/* manifesto split */
.manifesto-split {
  max-width: 1060px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.manifesto-lines { display: flex; flex-direction: column; gap: 24px; }
.manifesto-lines p {
  font-family: var(--serif); font-size: 20px; line-height: 1.6; margin: 0;
}
.manifesto-lines p::before { content: "— "; color: var(--dim); }
.manifesto-art { position: relative; border-radius: 4px; overflow: hidden; aspect-ratio: 7/5; }
.manifesto-art img { width: 100%; height: 100%; object-fit: cover; }
.manifesto-art .tag {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px;
  background: rgba(0,0,0,0.55); padding: 5px 10px; border-radius: 3px;
}

/* archive / gallery */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 150px;
  gap: 12px;
}
.archive-card {
  position: relative; border-radius: 4px; overflow: hidden;
  background: var(--bg-2);
}
.archive-card img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: contrast(1.05);
  transition: transform 0.6s ease;
}
.archive-card:hover img { transform: scale(1.06); }
.archive-card .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 9px 11px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  font-family: var(--mono); font-size: 11.5px;
}
.archive-card.big { grid-column: span 2; grid-row: span 2; }
.archive-card.tall { grid-row: span 2; }

/* documentation */
.doc-shell {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 160px 1fr; gap: 32px;
}
.doc-cats { display: flex; flex-direction: column; gap: 4px; }
.doc-cats span {
  font-family: var(--mono); font-size: 11.5px; color: var(--dim);
  text-transform: uppercase; letter-spacing: 1px;
  padding: 8px 0; border-top: 1px solid var(--line);
}
.doc-cats span:first-child { border-top: none; }
.doc-list { border: 1px solid var(--line-2); border-radius: 4px; font-family: var(--mono); font-size: 12.5px; overflow: hidden; }
.doc-group-label {
  padding: 9px 16px; font-size: 10.5px; letter-spacing: 1.5px;
  color: var(--dim); text-transform: uppercase; background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.doc-row { display: flex; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: none; }
.doc-row .name { width: 150px; flex-shrink: 0; }
.doc-row .desc { color: var(--muted); }

/* transmissions / quotes */
.quotes { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 34px; }
.quote { display: flex; gap: 16px; align-items: flex-start; }
.quote:nth-child(even) { flex-direction: row-reverse; text-align: right; }
.quote p {
  font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.6; margin: 0; color: #ddd;
}
.quote .mark9 { margin-top: 4px; }

/* cta band */
.cta-band { text-align: center; }
.cta-band h2 { font-size: 24px; font-weight: 500; margin: 0 0 22px; text-transform: uppercase; letter-spacing: 0.4px; }

/* footer */
footer { position: relative; overflow: hidden; }
.footer-grid { position: relative; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 20px; padding: 44px 28px 26px; }
.footer-grid .brand { margin-bottom: 10px; }
.footer-grid .desc { font-size: 12px; color: var(--muted); max-width: 220px; line-height: 1.6; margin: 0; }
.footer-col p.head { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.footer-col a { display: block; font-size: 12.5px; margin: 0 0 8px; color: var(--fg); }
.footer-col a:last-child { margin-bottom: 0; }
.footer-bottom { position: relative; padding: 16px 28px; border-top: 1px solid var(--line); font-size: 11px; color: var(--dim); font-family: var(--mono); }

@media (max-width: 860px) {
  .manifesto-split { grid-template-columns: 1fr; }
  .gauges { grid-template-columns: 1fr; }
  .doc-shell { grid-template-columns: 1fr; }
  .doc-cats { display: none; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .archive-card.big { grid-column: span 2; grid-row: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .hero-inner { padding: 56px 20px 44px; flex-direction: column; align-items: flex-start; }
  .badge { width: 150px; height: 150px; }
  .headline { font-size: 25px; }
  .archive-grid { grid-template-columns: 1fr 1fr; }
  section, .panel { padding: 44px 20px; }
}
