/* ===== base.css — shared across all pages ===== */
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-var.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #0a0a0a;
  --ink: #111418;
  --navy: #0d2b4e;
  --navy-deep: #081d36;
  --amber: #ffb000;
  --amber-dim: #8a5f00;
  --paper: #fafaf7;
  --paper-2: #f2f1ec;
  --line: #e4e2da;
  --gray: #6b6f76;
  --gray-dark: #3a3f46;
  --up: #00b377;
  --dn: #e5484d;
  --mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
  --sans: 'Inter', -apple-system, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.mono { font-family: var(--mono); }
.amber { color: var(--amber); }
.amber-dark { color: var(--amber-dim); }
.r { text-align: right; }
/* ---------- State-of-the-art pass ---------- */
/* 1. cross-document view transitions */
@view-transition {
  navigation: auto;
}
.nav { view-transition-name: site-nav; }
.footer { view-transition-name: site-footer; }

/* 2. scroll progress */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--amber);
  z-index: 60;
  pointer-events: none;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 100;
  background: var(--amber);
  color: var(--black);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 3px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 2px;
}
section[id] { scroll-margin-top: 76px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #232323;
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 36px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--amber);
  color: var(--black);
  font-size: 14px;
  line-height: 1;
  border-radius: 3px;
}
.brand-name {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 14px;
}
.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav-links a {
  color: #b9bdc5;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--amber); }
.nav-links a.active { color: var(--amber); }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: 1px solid #3a3f46;
  border-radius: 3px;
  cursor: pointer;
  padding: 0 9px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #e8eaee;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
  font-family: var(--sans);
}
.btn:active { transform: translateY(1px); }
.btn-amber { background: var(--amber); color: var(--black); }
.btn-amber:hover { background: #ffc233; }
.btn-ghost {
  background: transparent;
  color: #e8eaee;
  border-color: #3a3f46;
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn-sm { padding: 9px 18px; font-size: 12px; }
.btn-block { width: 100%; }
.key-hint { font-family: var(--mono); font-size: 11px; opacity: 0.7; }

/* ---------- Glass panels ---------- */
.panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  overflow: hidden;
  font-family: var(--mono);
}
@media (min-width: 621px) {
  .panel { backdrop-filter: blur(14px); }
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.panel-title {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  color: #e8eaee;
  letter-spacing: 0.01em;
}
.panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--up);
  border: 1px solid rgba(0,179,119,0.35);
  background: rgba(0,179,119,0.08);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.panel-badge.amber {
  color: var(--amber);
  border-color: rgba(255,176,0,0.35);
  background: rgba(255,176,0,0.08);
}
.bdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up);
}
.panel-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #8a8f98;
}
.net-pill { color: var(--up); font-weight: 700; }

/* ---------- Sections ---------- */
.section { padding: 96px 24px; }
.section.light { background: var(--paper); }
.section.dark {
  background: var(--black);
  color: #fff;
  border-top: 1px solid #1d1f24;
}
.section-head {
  max-width: 1240px;
  margin: 0 auto 56px;
}
.section-head h2,
.risk-copy h2,
.contact-inner h2 {
  font-size: clamp(32px, 3.8vw, 50px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin-bottom: 20px;
}
.section-sub {
  font-size: 16px;
  line-height: 1.65;
  color: var(--gray);
  max-width: 62ch;
}
.section.dark .section-sub { color: #a8adb6; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-inner { max-width: 860px; margin: 0 auto; }
.cta-band h2 {
  font-size: clamp(36px, 4.6vw, 60px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 34px;
}
.cta-band .hero-ctas { justify-content: center; margin-bottom: 30px; }
.cta-note {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #8a909a;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--black);
  border-top: 3px solid var(--amber);
  padding: 56px 24px 40px;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-tag { color: #8a8f98; font-size: 14px; }
.footer-mystery {
  color: var(--amber);
  font-size: 10px;
  letter-spacing: 0.22em;
}
.footer-author {
  color: #8a909a;
  font-size: 9.5px;
  letter-spacing: 0.18em;
}
.footer-legal {
  color: #8a909a;
  font-size: 10px;
  letter-spacing: 0.14em;
}
.footer-links {
  font-size: 10px;
  letter-spacing: 0.18em;
}
.footer-links a {
  color: #9ba1aa;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--amber); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse-dot, .status-ok.blink, .diff-cursor, .term-row.flash, .clara-thinking { animation: none; }
  .stress-anim { transition: none; }
  .hero-title .w { animation: none; }
  .scroll-progress { transition: none; }
  .brow { transition: none; clip-path: none; opacity: 1; }
  .vignette img, .btn, .pnode, .nav-toggle span { transition: none; }
  .vignette:hover img { transform: none; }
}
/* navy CTA band */
.cta-band { background: var(--navy); border-top: 1px solid #16283d; }
.cta-band h2 { color: #fff; }
.cta-band .cta-note { color: #9fb0c4; }

/* editorial eyebrow on light sections */
.eyebrow.dark { border-color: transparent; padding-left: 0; }

/* pipeline anchors */
a.pnode { text-decoration: none; }
section[id], article[id] { scroll-margin-top: 90px; }

/* App-style light panels (match the real product UI) */
.panel-app {
  background: #f7f6f2;
  border: 1px solid #e4e2da;
  border-radius: 12px;
  box-shadow: 0 30px 70px rgba(8, 12, 22, 0.35);
}
.panel-meta {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #8a909a;
  border: 1px solid #e2e0d8;
  background: #efeee8;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.panel-app .panel-head { border-bottom-color: #e4e2da; }
.panel-app .panel-title { color: #14213a; }
.panel-app .net-pill { color: #0a7d52; }
.panel-app .term-head { color: #979ca6; }
.panel-app .term-row { color: #252c38; border-bottom-color: #eceae2; }
.panel-app .term-row.flash { animation-name: rowflashlight; }
@keyframes rowflashlight {
  0%, 92%, 100% { background: transparent; }
  95% { background: rgba(233, 150, 0, 0.10); }
}
.panel-app .bar { background: #e6e4db; }
.panel-app .bar i { background: #e9960a; }
.panel-app .up { color: #0a7d52; }
.panel-app .dn { color: #c93a3a; }
.panel-app .panel-foot { border-top-color: #e4e2da; color: #7b8089; }
.panel-app .mock-note { color: #9aa0a8; }
.panel.panel-app .risk-row { color: #232a35; border-bottom-color: #e2e0d6; }
.panel.panel-app .risk-row .warn { color: #9a6200; }
.panel.panel-app .risk-row .ok { color: #0a7d52; }
.panel-app .stress-box { background: #fff; border-color: #e7e5dc; }
.panel-app .stress-head { color: #979ca6; }
.panel-app .stress-foot { color: #979ca6; }
.panel-app .stress-anim { stroke: #c77800; }
.panel-app .stress-ghost { stroke: #b9b6aa; }
.terminal-body { padding: 14px; }
.term-row {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr 1fr 0.9fr 1.1fr 1fr;
  gap: 8px;
  padding: 9px 10px;
  font-size: 12px;
  color: #c9cdd4;
  border-bottom: 1px solid #1a1d22;
  align-items: center;
}
.term-row.flash { animation: rowflash 4s ease-in-out infinite; }
.term-row.flash:nth-child(3) { animation-delay: 0.8s; }
.term-row.flash:nth-child(4) { animation-delay: 1.6s; }
.term-row.flash:nth-child(5) { animation-delay: 2.4s; }
.term-row.flash:nth-child(6) { animation-delay: 3.2s; }
@keyframes rowflash {
  0%, 92%, 100% { background: transparent; }
  95% { background: rgba(255,176,0,0.07); }
}
.term-head {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: #8a909a;
  padding-bottom: 7px;
}
.up { color: var(--up); }
.dn { color: var(--dn); }
.bar {
  display: inline-block;
  width: 52px; height: 5px;
  background: #22262c;
  border-radius: 2px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 7px;
}
.bar i {
  display: block; height: 100%;
  background: var(--amber);
  border-radius: 2px;
}
.term-status {
  display: flex;
  justify-content: space-between;
  padding: 12px 10px 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #8a8f98;
  border-top: 1px solid #26292f;
  margin-top: 4px;
}
.status-ok { color: var(--up); }
.status-ok.blink { animation: blink 1.6s steps(2) infinite; }
.mock-note {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: #8a909a;
  text-align: right;
  margin-top: 10px;
  padding-right: 4px;
}
@keyframes blink { 50% { opacity: 0.35; } }

