:root {
  --bg: #e7e5df;
  --line: rgba(26, 26, 24, 0.09);
  --line-strong: rgba(26, 26, 24, 0.18);
  --ink: #1a1a18;
  --ink-dim: #5b5952;
  --ink-faint: #7a776e;
  --accent: #8c2323;
  --accent-dim: rgba(140, 35, 35, 0.1);
  --on-accent: #f5e9e9;
  --sans: "Manrope", -apple-system, "Helvetica Neue", sans-serif;
  /* Scoped to functional labels only (clock, eyebrows, spec-sheet
     labels, phase numbers, footer copy) — never headlines or body
     copy, which stay Manrope-only. */
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

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

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

::selection { background: var(--accent); color: var(--on-accent); }

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Subtle film-grain texture, no motif, just depth */
.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Utility bar */
.util-bar {
  position: relative;
  z-index: 21;
  background: var(--bg);
}
.util-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

/* Nav */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(231, 229, 223, 0.85);
  backdrop-filter: blur(10px);
}

nav.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.logo-mark {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

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

.nav-links a:not(.btn) {
  position: relative;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-dim);
  transition: color 0.2s ease;
  cursor: pointer;
}
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(.16,1,.3,1);
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 3px;
  transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn:active { transform: scale(0.98); }
.btn .arrow { transition: transform 0.2s ease; display: inline-block; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  background: #7a1e1e;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(140, 35, 35, 0.35);
}
.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 6px rgba(140, 35, 35, 0.25);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  padding: 12px 4px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.link-arrow:hover { color: var(--accent); }
.link-arrow .arrow { transition: transform 0.2s ease; display: inline-block; }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 30;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  padding: 32px;
  transform: translateY(-100%);
  transition: transform 0.35s ease;
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu a:not(.btn) {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
}
.mobile-menu a:not(.btn):hover { color: var(--accent); }

/* Section scaffolding */
section {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-transform: uppercase;
  display: block;
  margin-bottom: 24px;
}

.section-head { margin-bottom: 56px; }
.section-head h2, .contact h2 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 18ch;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  /* 112px = utility bar (36px) + sticky nav (76px) above it in flow —
     without subtracting this, an absolutely-positioned bottom-anchored
     child (the hero hint) renders below the fold on initial load. */
  min-height: calc(100vh - 112px);
  display: flex;
  align-items: center;
  /* Hero sits over a dark image — lighten the text tokens locally.
     color must be set explicitly here: custom-property overrides don't
     retroactively change an already-inherited `color` used value. */
  --ink: #f3eee8;
  --ink-dim: #c9c4ba;
  color: var(--ink);
  --accent: #d3524a;
}

/* Plain-CSS stand-ins for the two Tailwind utility classes baked into
   the RevealWaveImage component, so we don't have to ship Tailwind's
   CSS just for this one embedded bundle */
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

.hero-canvas-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Static poster shows instantly on load (and permanently on mobile,
     where the shader bundle never loads) — CSS filter approximates the
     dithered B&W look with zero JS. The React canvas, when it mounts,
     paints over this on desktop. */
  background: #07080a url("assets/hero-lightning.webp") center/cover no-repeat;
  filter: grayscale(1) contrast(1.15);
  will-change: opacity;
}
.hero-canvas-fill {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 6, 7, 0.88) 0%, rgba(6, 6, 7, 0.82) 50%, rgba(6, 6, 7, 0.45) 72%, rgba(6, 6, 7, 0.08) 100%);
  will-change: opacity;
}

.hero-hint {
  position: absolute;
  right: 32px;
  bottom: 40px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.hero-hint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: hero-hint-pulse 1.8s ease-in-out infinite;
}
@keyframes hero-hint-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.4); }
}
.hero-hint.is-dismissed { opacity: 0; }

.hero-wrap {
  position: relative;
  z-index: 2;
  padding-top: 80px;
  padding-bottom: 80px;
  /* Sits over the canvas for legibility, but shouldn't block the mouse
     hover the canvas needs for its reveal effect — only the buttons
     opt back in below. */
  pointer-events: none;
}
.hero-wrap a {
  pointer-events: auto;
}

.hero-copy { max-width: 800px; }

.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}
.hero h1 .gold { color: var(--accent); }

.hero p {
  font-size: 1.15rem;
  color: var(--ink-dim);
  max-width: 52ch;
  margin-bottom: 40px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Reveal: simple fade + rise, used for body copy, ctas, rows */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s cubic-bezier(.16,1,.3,1), transform 0.8s cubic-bezier(.16,1,.3,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reveal-mask: headline "unveiling" wipe, used on h1/h2 */
.reveal-mask {
  display: block;
  overflow: hidden;
}
.reveal-mask > span {
  display: block;
  transform: translateY(105%);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(.16,1,.3,1), opacity 0.6s ease;
}
.reveal-mask.is-visible > span {
  transform: translateY(0);
  opacity: 1;
}

/* Thesis */
.thesis { padding: 140px 0; }
.thesis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.thesis-grid p {
  color: var(--ink-dim);
  font-size: 1.05rem;
  max-width: 46ch;
}

/* Product */
.product { padding: 140px 0; }
.product-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 88px;
  align-items: start;
}

.spec-sheet {
  position: relative;
}
/* Halftone dot-fade in the corner — echoes the hero's scattered dot
   field so the spec sheet doesn't sit as pure typography, without
   adding an actual photograph. */
.spec-sheet::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -28px;
  right: -28px;
  width: 170px;
  height: 170px;
  background-image: radial-gradient(circle, var(--ink-faint) 1px, transparent 1.5px);
  background-size: 11px 11px;
  opacity: 0.4;
  mask-image: radial-gradient(circle, black, transparent 72%);
  -webkit-mask-image: radial-gradient(circle, black, transparent 72%);
  pointer-events: none;
}

.spec-sheet-title {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.spec-rows { margin-bottom: 40px; }
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  font-size: 15px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, padding-left 0.25s ease;
}
.spec-row:hover {
  border-bottom-color: var(--line);
  padding-left: 6px;
}
.spec-row span:first-child { font-family: var(--mono); font-size: 13.5px; color: var(--ink-faint); transition: color 0.25s ease; }
.spec-row:hover span:first-child { color: var(--ink-dim); }
.spec-row span:last-child { color: var(--ink); font-weight: 500; text-align: right; }

.spec-strip-label {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 24px;
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 24px;
}
.spec {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.spec-value {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.spec-value-emphasis { color: var(--accent); }
.spec-label {
  font-size: 12.5px;
  color: var(--ink-faint);
}

.product-body h2 {
  font-size: clamp(2.1rem, 3.6vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.product-body p {
  color: var(--ink-dim);
  font-size: 1.05rem;
  max-width: 54ch;
  margin-bottom: 28px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-dim);
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 1px var(--accent);
}

/* Frontline */
.frontline { padding: 140px 0; }
.frontline-lead {
  color: var(--ink-dim);
  font-size: 1.2rem;
  line-height: 1.55;
  max-width: 62ch;
  margin-bottom: 64px;
}
/* Abstract trajectory motif — echoes the hero's curved dashed-arrow
   visual language, gesturing at phased expansion without a literal map. */
.frontline-motif {
  display: block;
  width: 100%;
  height: 36px;
  margin-bottom: 40px;
}
.frontline-motif-path {
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 4 5;
  fill: none;
}
.frontline-motif-node { fill: var(--ink-faint); }
.frontline-motif-node-active { fill: var(--accent); }
.phase-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.phase {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 2px solid transparent;
  padding-left: 16px;
  margin-left: -18px;
  transition: border-color 0.25s ease, padding-left 0.25s ease;
}
.phase:hover {
  border-left-color: var(--accent);
  padding-left: 20px;
}
.phase-num {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
}
.phase-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.phase-desc {
  color: var(--ink-dim);
  font-size: 0.98rem;
  max-width: 32ch;
}

/* Mission */
.mission { padding: 140px 0; }
.mission p {
  color: var(--ink-dim);
  font-size: 1.08rem;
  max-width: 62ch;
  margin-bottom: 56px;
}
/* Hub-and-spoke motif — "one doctrine" branching to five domains,
   as a line rather than five separate icons. */
.mission-motif {
  display: block;
  width: 100%;
  height: 24px;
  margin-bottom: 32px;
}
.mission-motif-line { stroke: var(--line-strong); stroke-width: 1; }
.mission-motif-node { fill: var(--ink-faint); }
.mission-motif-node-active { fill: var(--accent); }
.domain-row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 56px;
}
.domain {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.25s cubic-bezier(.16,1,.3,1);
}
.domain:hover { transform: translateY(-3px); }
.domain-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink-faint);
  transition: color 0.25s ease;
}
.domain-status {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  transition: color 0.25s ease;
}
.domain:hover .domain-name { color: var(--ink); }
.domain:hover .domain-status { color: var(--ink-dim); }
.domain-active .domain-name { color: var(--accent); }
.domain-active .domain-status { color: var(--accent); }
.domain-active:hover .domain-name { color: var(--accent); }

/* Contact */
.contact { padding: 140px 0 110px; }
.contact h2 {
  font-size: clamp(2.6rem, 5.6vw, 4rem);
  margin-bottom: 20px;
}
.contact-lead {
  color: var(--ink-dim);
  font-size: 1.1rem;
  margin-bottom: 56px;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 48px 96px;
  margin-bottom: 56px;
}
.contact-label {
  font-size: 13px;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 10px;
}
.contact-value {
  font-size: 1.3rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
a.contact-value:hover { color: var(--accent); }

/* Footer */
footer {
  position: relative;
  z-index: 1;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.footer-logo .logo-mark {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}
.footer-links {
  display: flex;
  gap: 28px;
}
.footer-links a {
  font-size: 13.5px;
  color: var(--ink-faint);
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-faint);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-mask > span {
    transition: opacity 0.2s linear;
    transform: none;
  }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Responsive */
@media (max-width: 980px) {
  .product-wrap {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .thesis-grid { grid-template-columns: 1fr; gap: 28px; }
  .phase-row { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  .thesis, .product, .frontline, .mission { padding: 96px 0; }
  .util-bar-inner { font-size: 9.5px; }
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-wrap { flex-direction: column; align-items: flex-start; gap: 16px; }

  /* Smaller poster on mobile — this is the ONLY image mobile ever
     loads for the hero, since the shader bundle never mounts there. */
  .hero-canvas-layer { background-image: url("assets/hero-lightning-800.webp"); }

  /* Hero: a shorter, bottom-anchored composition instead of vertically
     centering a now-multi-line headline in a full screen — gives a
     visible peek of the Thesis section below as a scroll cue, and the
     cursor hint never applies since there's no persistent hover on touch. */
  .hero { min-height: 88vh; align-items: flex-end; }
  .hero-wrap { padding-top: 48px; padding-bottom: 56px; }
  .hero h1 { font-size: clamp(2.1rem, 8vw, 2.6rem); margin-bottom: 24px; }
  .hero-hint { display: none; }

  /* Stat grid: one column so the pre-marked emphasis stat (cost/strike)
     reads as the clear headline number, instead of four equal-weight
     figures competing in a cramped 2x2. */
  .spec-grid { grid-template-columns: 1fr; gap: 24px; }
  .spec-value-emphasis { font-size: 2.4rem; }

  /* Domain row: a deliberate vertical list (name left, status right,
     hairline divider) instead of an unpredictable flex-wrap of a
     5-item desktop row on a 375px screen. */
  .domain-row { display: grid; grid-template-columns: 1fr; gap: 0; }
  .domain {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }
  .domain:last-child { border-bottom: none; }
  .domain:hover { transform: none; }
}

@media (max-width: 480px) {
  .util-bar-inner span:last-child { display: none; }
  .wrap { padding: 0 20px; }
}
