/* Unicons Engineering — Apple-style design tokens */
:root {
  --bg:          #fbfbfd;          /* Apple light bg */
  --bg-2:        #f5f5f7;          /* Apple section bg */
  --ink:         #1d1d1f;          /* Apple primary text */
  --ink-2:       #424245;          /* Apple secondary text */
  --ink-3:       #86868b;          /* Apple tertiary text */
  --line:        #d2d2d7;          /* Apple separator */
  --line-soft:   #e8e8ed;
  --paper:       #ffffff;

  /* signature red accent — kept against the Apple-light background */
  --red:         #cf2e2e;
  --red-soft:    #e6a8a8;
  --red-tint:    rgba(207,46,46,0.08);
  --amber:       #d99c2b;

  --grad-accent: linear-gradient(90deg, var(--red) 0%, var(--amber) 100%);

  /* Apple uses SF Pro on its own platforms; system stack falls back gracefully */
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Inter", system-ui, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Inter", system-ui, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;

  --shadow-card: 0 1px 0 rgba(0,0,0,0.04), 0 22px 50px -28px rgba(0,0,0,0.18);

  --r-pill: 999px;
  --r-card: 18px;

  --pad-x: clamp(20px, 5vw, 88px);
  --section-pad: clamp(80px, 9vw, 140px);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(207,46,46,0.04) 0, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(207,46,46,0.03) 0, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* page-wide circuit flow: 2 thin vertical conduits with a slow red pulse
   travelling down each — gives visual continuity from hero through the page */
.page-flow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.page-flow-line {
  position: absolute;
  width: 1px;
  height: 100vh;
  top: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(40,30,20,0.045) 8%,
    rgba(40,30,20,0.045) 92%,
    transparent 100%
  );
}
.page-flow-line-1 { left: 7%; }
.page-flow-line-2 { right: 11%; }
.page-flow-pulse {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px rgba(207,46,46,0.55), 0 0 22px rgba(207,46,46,0.25);
  animation: pageFlowDown 18s linear infinite;
  opacity: 0;
}
.page-flow-pulse-1 { left: calc(7%  - 2px); animation-delay: 0s; }
.page-flow-pulse-2 { right: calc(11% - 3px); animation-delay: 9s; animation-duration: 22s; }
@keyframes pageFlowDown {
  0%   { top: -10px;  opacity: 0; }
  6%   { opacity: 1; }
  94%  { opacity: 1; }
  100% { top: 100vh;  opacity: 0; }
}

/* Particle canvas + reticle + scroll rail + hud coords */
#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.reticle {
  position: fixed;
  top: 0; left: 0;
  width: 28px; height: 28px;
  pointer-events: none;
  z-index: 100;
  transform: translate(-14px, -14px);
  will-change: transform;
}
.reticle-ring {
  position: absolute; inset: 0;
  border: 1.4px solid var(--red);
  border-radius: 50%;
  opacity: 0.9;
  transition: transform 0.18s cubic-bezier(.2,.8,.2,1), opacity 0.18s ease, border-color 0.18s ease;
}
.reticle-dot { display: none; }
.reticle.is-hover .reticle-ring { transform: scale(1.55); opacity: 0.7; }
.reticle.is-press .reticle-ring { transform: scale(0.85); }
@media (pointer: coarse) { .reticle { display: none; } }

.scroll-rail {
  position: fixed;
  top: 0; right: 0;
  width: 2px;
  height: 100vh;
  background: rgba(20,16,10,0.04);
  z-index: 50;
}
#scrollFill {
  display: block;
  width: 100%;
  height: 0;
  background: var(--red);
  transition: height 0.05s linear;
}

.hud-coords {
  position: fixed;
  right: 22px; bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  z-index: 40;
  text-align: right;
  line-height: 1.5;
  pointer-events: none;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.hud-coords.is-hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.hud-bracket {
  display: block;
  width: 24px; height: 16px;
  border-top: 1px solid var(--ink-2);
  border-right: 1px solid var(--ink-2);
  margin-left: auto;
  margin-bottom: 4px;
}

/* Buttons / chips / eyebrows */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }

.btn-pill-dark {
  background: var(--ink);
  color: var(--paper);
}
.btn-pill-dark:hover { background: #000; }

.btn-pill-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink-2);
}
.btn-pill-outline:hover { background: rgba(20,16,10,0.04); }

.btn-block { width: 100%; justify-content: center; padding: 18px; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.chip-red {
  color: var(--red);
  background: rgba(207,46,46,0.08);
  border: 1px solid rgba(207,46,46,0.22);
}
.chip-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 3px rgba(207,46,46,0.18);
  animation: chipDotPulse 1.6s ease-in-out infinite;
}
@keyframes chipDotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(207,46,46,0.18); transform: scale(1); }
  50%      { box-shadow: 0 0 0 7px rgba(207,46,46,0.04); transform: scale(1.15); }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--ink-2);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.eyebrow-rule {
  display: inline-block;
  width: 32px; height: 1px;
  background: var(--red);
}

/* Headlines */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.0;
  font-size: clamp(40px, 5.4vw, 78px);
  color: var(--ink);
  margin: 0 0 28px;
}

/* NAV */
.nav {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
  padding: 22px var(--pad-x);
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink);
}
.brand-mark { display: block; height: 68px; width: auto; object-fit: contain; margin: -16px 0; }
.brand-mark-sm { height: 36px; margin: -8px 0; }
.brand-word {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.22em;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
}
.nav-links {
  justify-self: center;
  display: flex; gap: 44px;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-2);
  text-transform: uppercase;
  position: relative;
  transition: color 0.18s ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px;
  height: 1px; background: var(--red); transform: scaleX(0);
  transform-origin: left; transition: transform 0.25s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta { padding: 12px 22px; font-size: 10.5px; }

/* hamburger button — hidden on desktop, shown ≤900px */
.nav-burger {
  display: none;
  position: relative;
  width: 42px; height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
  z-index: 60;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.nav-burger:hover { background: var(--bg); }
.nav-burger span {
  position: absolute;
  left: 11px; right: 11px;
  height: 1.6px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1),
              opacity 0.2s ease,
              top 0.3s cubic-bezier(.2,.8,.2,1),
              background 0.2s ease;
}
.nav-burger span:nth-child(1) { top: 13px; }
.nav-burger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-burger span:nth-child(3) { top: 27px; }
body.menu-open .nav-burger span:nth-child(1) {
  top: 50%; transform: translateY(-50%) rotate(45deg);
}
body.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav-burger span:nth-child(3) {
  top: 50%; transform: translateY(-50%) rotate(-45deg);
}

/* slide-in drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(251,251,253,0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 96px var(--pad-x) 32px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.32s cubic-bezier(.2,.8,.2,1),
              transform 0.32s cubic-bezier(.2,.8,.2,1),
              visibility 0s linear 0.32s;
}
body.menu-open .nav-drawer {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}
.nav-drawer-links {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 18px;
}
.nav-drawer-links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 8vw, 44px);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.2,.8,.2,1), color 0.2s ease;
}
.nav-drawer-links a:hover { color: var(--red); }
.nav-drawer-links a::after {
  content: ""; position: absolute;
  left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--grad-accent);
  transition: width 0.3s cubic-bezier(.2,.8,.2,1);
}
.nav-drawer-links a:hover::after { width: 100%; }
body.menu-open .nav-drawer-links a { opacity: 1; transform: translateY(0); }
body.menu-open .nav-drawer-links a:nth-child(1) { transition-delay: 0.08s; }
body.menu-open .nav-drawer-links a:nth-child(2) { transition-delay: 0.14s; }
body.menu-open .nav-drawer-links a:nth-child(3) { transition-delay: 0.20s; }
body.menu-open .nav-drawer-links a:nth-child(4) { transition-delay: 0.26s; }
body.menu-open .nav-drawer-links a:nth-child(5) { transition-delay: 0.34s; }

.nav-drawer-cta {
  margin-top: 14px;
  font-size: 11px !important;
  font-family: var(--font-mono) !important;
  letter-spacing: 0.16em !important;
  font-weight: 500 !important;
}

.nav-drawer-foot {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.nav-drawer-foot .dot { color: var(--red); }
.nav-drawer-foot a { color: inherit; }
.nav-drawer-foot a:hover { color: var(--red); }

/* lock body scroll while drawer is open */
body.menu-open { overflow: hidden; }

/* HERO */
.hero {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  gap: 36px;
  padding: 36px var(--pad-x) 80px;
  min-height: clamp(620px, 86vh, 880px);
  isolation: isolate;
  overflow: hidden;
}
.hero-circuit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.42;
}
.hero-corner {
  position: absolute;
  top: 8px; left: calc(var(--pad-x) - 24px);
  width: 28px; height: 28px;
  border-top: 1px solid var(--ink-2);
  border-left: 1px solid var(--ink-2);
}

.hero-copy {
  position: relative;
  padding-top: 0;
  margin-top: -8px;
  max-width: 640px;
  z-index: 4;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(54px, 6.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 26px 0 28px;
  display: flex;
  flex-direction: column;
}
.hero-title span { display: block; }
.t-black { color: var(--ink); }
.t-red {
  color: var(--red);
  position: relative;
  width: max-content;
  animation: redBreathe 4.5s ease-in-out infinite 1.6s;
}
@keyframes redBreathe {
  0%, 100% { color: var(--red); text-shadow: 0 0 0 rgba(207,46,46,0); }
  50%      { color: #d94646; text-shadow: 0 0 32px rgba(207,46,46,0.18); }
}
.t-underline {
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 4px;
  background: var(--grad-accent);
  border-radius: 2px;
  transform-origin: left;
  animation: underlineIn 1.1s 0.4s cubic-bezier(.2,.8,.2,1) both;
  overflow: hidden;
}
.t-underline::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  transform: translateX(-100%);
  animation: underlineSweep 4s ease-in-out infinite 2s;
}
@keyframes underlineIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes underlineSweep {
  0%, 60% { transform: translateX(-100%); }
  100%    { transform: translateX(100%); }
}
.t-mute { color: var(--ink-3); font-weight: 600; }

.hero-lede {
  max-width: 460px;
  font-size: 15.5px;
  color: var(--ink-2);
  margin: 0 0 36px;
  line-height: 1.65;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  left: 50%; bottom: 28px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  z-index: 6;
  pointer-events: none;
}
.hero-scroll-line {
  display: block;
  width: 1px; height: 38px;
  background: var(--ink-3);
  position: relative;
}
.hero-scroll-line::after {
  content: ""; position: absolute; left: -2.5px; top: 0;
  width: 6px; height: 6px;
  background: var(--ink-2);
  border-radius: 50%;
  animation: scrollHint 1.8s ease-in-out infinite;
}
@keyframes scrollHint {
  0%, 100% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(34px); opacity: 0; }
}

/* hero visual */
.hero-visual { position: relative; min-height: 520px; }
#constellation { position: absolute; inset: 0; width: 100%; height: 100%; }

.hud {
  position: absolute;
  background: rgba(255,253,249,0.78);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 130px;
  box-shadow: var(--shadow-card);
  z-index: 2;
}
.hud-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.hud-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
}
.hud-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2dab63;
  box-shadow: 0 0 0 3px rgba(45,171,99,0.2);
}
.hud-status      { top: 8%;  right: 1%; }
.hud-cap         { top: 56%; left: 14%; }
.hud-freq        { bottom: 14%; right: 0%; }

.hud-spark canvas {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 6px;
}
.hud-foot {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.hud-foot-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.hud-cells {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  margin-top: 8px;
}
.hud-cells span {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 2px;
  background: rgba(45,171,99,0.18);
  border: 1px solid rgba(45,171,99,0.35);
  transition: background 0.4s ease, border-color 0.4s ease;
}
.hud-cells span.is-on   { background: #2dab63; border-color: #2dab63; box-shadow: 0 0 8px rgba(45,171,99,0.45); }
.hud-cells span.is-warn { background: var(--amber); border-color: var(--amber); }
.hud-cells span.is-off  { background: rgba(207,46,46,0.18); border-color: rgba(207,46,46,0.5); }

/* MARQUEE */
.marquee {
  position: relative;
  z-index: 5;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}
.marquee-track {
  display: flex; gap: 36px;
  white-space: nowrap;
  padding: 18px 0;
  animation: scrollMarquee 38s linear infinite;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.marquee-track span {
  display: inline-flex; align-items: center; gap: 36px;
  color: var(--ink-2);
}
.marquee-track span::after {
  content: "•";
  color: var(--red);
  font-size: 9px;
}
.marquee-track span.alt { color: var(--red); }
@keyframes scrollMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* STATS */
.stats {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}
.stat {
  position: relative;
  padding: 36px var(--pad-x);
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat-num span { color: var(--red); font-weight: 600; }
.stat-label {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.stat-bar {
  position: absolute; left: var(--pad-x); right: var(--pad-x); bottom: 0;
  height: 2px;
  background: var(--grad-accent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.9s cubic-bezier(.2,.8,.2,1);
}
.stat.in-view .stat-bar { transform: scaleX(1); }

/* ABOUT + VALUES */
.about {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  padding: var(--section-pad) var(--pad-x) 1px;
}
/* scroll-driven construction animation in right column */
.build {
  margin: 36px 0 0;
  padding: 18px 22px 14px;
  border-top: 1px solid var(--line-soft);
}
.build-cap {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.build-cap em {
  font-style: normal;
  color: var(--red);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.build-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(207,46,46,0.18);
  animation: chipDotPulse 1.6s ease-in-out infinite;
}
.build-svg {
  width: 100%;
  height: auto;
  max-height: 240px;
  display: block;
}
.build { position: relative; }
.build-labels {
  position: absolute;
  inset: 36px 22px 14px 22px;
  pointer-events: none;
}
.b-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--red);
  background: var(--paper);
  border: 1px solid rgba(207,46,46,0.25);
  padding: 1px 6px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  white-space: nowrap;
}
.b-label.is-on { opacity: 1; }
.b-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
  stroke-linecap: square;
  stroke-linejoin: miter;
  /* the dash setup; --len populated by JS using getTotalLength */
  stroke-dasharray: var(--len, 1000);
  stroke-dashoffset: var(--off, 1000);
  transition: stroke-dashoffset 0.18s cubic-bezier(.2,.8,.2,1);
}
.b-thick { stroke-width: 2.2; }
.b-fill {
  fill: var(--ink);
  fill-opacity: var(--fillop, 0);
  stroke-width: 1;
  transition: stroke-dashoffset 0.18s cubic-bezier(.2,.8,.2,1), fill-opacity 0.25s ease;
}

.about-left p {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 18px;
  max-width: 520px;
}
.about-left strong { color: var(--ink); font-weight: 600; }

.values { list-style: none; padding: 0; margin: 0; }
.values li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}
.values li::before {
  content: "";
  position: absolute; left: -16px; top: 22px;
  width: 2px; height: calc(100% - 44px);
  background: var(--grad-accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.values li:first-child { padding-top: 0; }
.values li:first-child::before { top: 0; height: calc(100% - 22px); }
.values li:last-child { border-bottom: 0; }

/* hover focus: hovered item is sharp, sibling items dim */
.values:hover li { opacity: 0.45; transform: translateX(-4px); }
.values li:hover { opacity: 1; transform: translateX(0); }
.values li:hover::before { transform: scaleY(1); }
.values li:hover .val-num { color: #fff; background: var(--red); }
.values li:hover h3 { color: var(--red); }

.val-num {
  font-family: var(--font-mono);
  color: var(--red);
  font-size: 12px;
  letter-spacing: 0.14em;
  padding: 4px 8px 2px;
  border-radius: 4px;
  width: max-content;
  height: max-content;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.values h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  transition: color 0.25s ease;
}
.values p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.65;
}

/* values stagger reveal — applied via JS .reveal-stagger on .values */
.values.reveal-stagger > li { opacity: 0; transform: translateY(18px); transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1); }
.values.reveal-stagger.is-in > li:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.values.reveal-stagger.is-in > li:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.22s; }
.values.reveal-stagger.is-in > li:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.34s; }

/* SERVICES */
.services {
  position: relative;
  z-index: 5;
  background: var(--bg-2);
  padding: var(--section-pad) var(--pad-x);
  border-top: 1px solid var(--line);
}
.services-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 40px;
  margin-bottom: 56px;
}
.services-hint {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  text-align: right;
  letter-spacing: 0.04em;
  margin: 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 4px;
}
.svc {
  position: relative;
  padding: 36px 30px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease, opacity 0.25s ease;
  overflow: hidden;
  min-height: 280px;
  display: flex; flex-direction: column;
}
.svc:nth-child(3n) { border-right: 0; }
.svc:nth-child(n+4) { border-bottom: 0; }

.svc::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: 2px; background: var(--grad-accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.svc::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(207,46,46,0.08), transparent 60%);
  opacity: 0; transition: opacity 0.3s ease;
  pointer-events: none;
}
.svc header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 36px;
}
.svc-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--red);
  letter-spacing: 0.14em;
  margin-top: 4px;
}
.svc h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.svc p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.65;
  transition: color 0.25s ease;
  flex: 1;
}
.svc-tags {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; gap: 6px;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.svc-tags span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  color: var(--red);
  background: rgba(207,46,46,0.08);
  border: 1px solid rgba(207,46,46,0.18);
}
.svc-arrow {
  position: absolute;
  right: 22px; bottom: 22px;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  background: var(--bg);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.services-grid:hover .svc { opacity: 0.82; }
.services-grid .svc:hover {
  opacity: 1;
  background: linear-gradient(180deg, rgba(207,46,46,0.06), rgba(207,46,46,0.015));
}
.services-grid .svc:hover::before { transform: scaleX(1); }
.services-grid .svc:hover::after  { opacity: 1; }
.services-grid .svc:hover .svc-tags { opacity: 1; transform: translateY(0); }
.services-grid .svc:hover .svc-arrow {
  background: var(--red);
  color: var(--paper);
  border-color: var(--red);
  transform: scale(1.05);
}

/* TECH / METHODOLOGY */
.tech {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 80px;
  padding: var(--section-pad) var(--pad-x);
}
.steps { list-style: none; padding: 0; margin: 0; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.25s ease;
}
.step:not(.is-active) { opacity: 0.45; }
.step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--red);
  letter-spacing: 0.1em;
}
.step h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16.5px;
  color: var(--ink);
}
.step p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.65;
  max-width: 480px;
}

.topology {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--paper);
  padding: 18px;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-card);
}
.topo-svg { width: 100%; height: 100%; }
.topo-svg text {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  fill: var(--ink-2);
  /* keep label readable when traveling pulse passes by */
  paint-order: stroke fill;
  stroke: var(--paper);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.topo-foot {
  position: absolute;
  right: 18px; bottom: 14px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}
.topo-svg g[stroke] path { animation: dashShift 6s linear infinite; }
@keyframes dashShift { to { stroke-dashoffset: -120; } }

.tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}
.tool {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--paper);
  padding: 18px 22px 24px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tool:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.tool h4 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
}
.tool span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.tool-bar {
  position: absolute;
  left: 22px; right: 22px; bottom: 12px;
  height: 2px;
  background: var(--grad-accent);
  display: block;
}

/* CONTACT */
.contact {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  padding: var(--section-pad) var(--pad-x);
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.contact-info {
  margin: 36px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
.contact-info dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.contact-info dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.5;
}
.contact-info a:hover { color: var(--red); }

.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--paper);
  padding: 28px 32px 32px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: var(--shadow-card);
}
.contact-form-head {
  margin: 0 0 4px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.contact-form-head h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.contact-form-head p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
}
.contact-form span em {
  font-style: normal;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 10px;
  color: var(--ink-3);
  margin-left: 4px;
  opacity: 0.7;
}
.contact-form label { display: flex; flex-direction: column; gap: 8px; }
.contact-form span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease;
  font-family: var(--font-body);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--ink-3); }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--red);
  background: #fff;
}
.contact-form textarea { resize: vertical; min-height: 100px; }

.contact-form-status {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 6px;
  display: none;
}
.contact-form-status.is-success {
  display: block;
  background: #f0faf3;
  color: #1a7a3c;
  border: 1px solid #a8dbb8;
}
.contact-form-status.is-error {
  display: block;
  background: #fff4f4;
  color: #c0392b;
  border: 1px solid #f1b0a8;
}

/* FOOTER */
.foot {
  position: relative;
  z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px;
  padding: 22px var(--pad-x);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}
.foot-left { display: flex; align-items: center; gap: 12px; }
.foot-right { display: flex; align-items: center; gap: 12px; }
.foot-right .dot { color: var(--red); }

/* ============== RESPONSIVE ============== */

/* Large laptop / small desktop (1280–1100) */
@media (max-width: 1280px) {
  .hero {
    min-height: clamp(560px, 78vh, 760px);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 28px;
  }
  .hero-title { font-size: clamp(48px, 5.6vw, 84px); }
  .brand-mark { height: 60px; }
  .brand-word { font-size: 13px; letter-spacing: 0.18em; }
  .nav-links { gap: 30px; }
  .nav-links a { font-size: 10.5px; letter-spacing: 0.18em; }
}

/* Tablet landscape & narrow desktop (1100–900) */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-visual { min-height: 420px; }
  .hero-title { font-size: clamp(48px, 8vw, 80px); }
  .hero-copy { max-width: 100%; }

  .about, .tech, .contact { grid-template-columns: 1fr; gap: 48px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .svc:nth-child(3n) { border-right: 1px solid var(--line); }
  .svc:nth-child(2n) { border-right: 0; }
  .svc:nth-child(n+4) { border-bottom: 1px solid var(--line); }
  .svc:nth-child(n+5) { border-bottom: 0; }

  .topology { aspect-ratio: 5/3; }
  .page-flow { display: none; }    /* free up the side gutters */
}

/* Tablet (900–700) — collapse nav links into hamburger drawer */
@media (max-width: 900px) {
  .nav {
    grid-template-columns: 1fr auto;   /* brand → burger */
    padding: 16px var(--pad-x);
    gap: 16px;
  }
  .nav-links { display: none; }
  .nav-cta   { display: none; }
  .nav-burger { display: block; }
  .brand-mark { height: 52px; }
  .brand-word { font-size: 12.5px; }

  .hud { min-width: 110px; padding: 10px 12px; }
  .hud-label { font-size: 9px; letter-spacing: 0.16em; }
  .hud-value { font-size: 13px; }

  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  .services-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .services-hint { text-align: left; }
}

/* Mobile (≤700) */
@media (max-width: 700px) {
  :root { --section-pad: clamp(56px, 12vw, 96px); }

  .hero {
    padding-top: 16px;
    padding-bottom: 56px;
    min-height: auto;
  }
  .hero-corner { display: none; }
  .hero-copy { margin-top: 0; }
  .hero-title {
    font-size: clamp(40px, 11vw, 64px);
    line-height: 1.0;
    margin: 18px 0 22px;
  }
  .hero-lede { font-size: 14.5px; max-width: 100%; padding-right: 8px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hud { max-width: calc(100vw - 32px); }
  .hero-ctas .btn { justify-content: center; }
  .hero-visual { min-height: 320px; }

  /* Re-anchor the floating HUDs so they actually fit on a phone */
  .hud-status { top: 4%; right: 2%; }
  .hud-cap    { top: 50%; left: 2%; }
  .hud-freq   { bottom: 2%; right: 2%; }

  /* Hide the global floating coords HUD on phone — too crowded */
  .hud-coords { display: none; }

  /* Hide custom reticle on touch — already done via media (pointer: coarse) */

  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 24px var(--pad-x); }
  .stat-num { font-size: clamp(34px, 9vw, 48px); }

  .display { font-size: clamp(34px, 9vw, 56px); }

  .services-grid { grid-template-columns: 1fr; }
  .svc {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    min-height: auto;
    padding: 28px 22px;
  }
  .svc:last-child { border-bottom: 0 !important; }
  .svc header { margin-bottom: 22px; }

  .step { grid-template-columns: 40px 1fr; gap: 10px; }
  .topology { aspect-ratio: auto; min-height: 260px; }

  .contact { padding-top: 64px; padding-bottom: 64px; }
  .contact-info { grid-template-columns: 1fr; gap: 18px; }
  .contact-form { padding: 20px 18px 22px; }

  .tools { grid-template-columns: 1fr; }
  .tool { padding: 16px 18px 22px; }

  .foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px var(--pad-x);
    font-size: 9.5px;
    letter-spacing: 0.12em;
  }
  .foot-right { flex-wrap: wrap; }

  /* Build animation on phone — keep it visible without overflow */
  .build {
    margin-top: 24px;
    padding: 14px 12px 8px;
  }
  .build-svg { max-height: 180px; }
  .b-label { font-size: 8px; padding: 1px 5px; }
}

/* Small phone (≤420) */
@media (max-width: 420px) {
  :root { --pad-x: 16px; }
  .nav { padding: 14px var(--pad-x); gap: 8px; }
  .brand-mark { height: 44px; }
  .brand-word { display: none; }   /* logo only on the smallest screens */
  .nav-cta { padding: 9px 14px; font-size: 10px; letter-spacing: 0.14em; }

  .chip { font-size: 9.5px; padding: 6px 12px; letter-spacing: 0.14em; }
  .hero-title { font-size: clamp(36px, 12vw, 56px); }
  .hero-lede { font-size: 13.5px; }

  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }

  .display { font-size: clamp(30px, 10vw, 44px); }

  .hud-cap { top: 50%; left: 4%; min-width: 90px; }
  .hud-status { min-width: 100px; }
  .hud-freq { min-width: 110px; }

  .build-labels { display: none; }   /* labels too small to read on tiny screens */
}

/* Landscape mobile — keep hero compact when keyboard area collapses */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: auto; padding-bottom: 32px; }
  .hero-title { font-size: clamp(36px, 6vw, 56px); }
  .hero-visual { min-height: 240px; }
}

/* ---------------- Entrance animations ---------------- */

/* hero stagger (each child has delay; auto-fires on load) */
.hero-copy > * {
  opacity: 0;
  transform: translateY(14px);
  animation: heroIn 0.85s cubic-bezier(.2,.8,.2,1) forwards;
}
.hero-copy > .chip            { animation-delay: 0.05s; }
.hero-copy > .hero-title      { animation-delay: 0.15s; }
.hero-copy > .hero-lede       { animation-delay: 0.55s; }
.hero-copy > .hero-ctas       { animation-delay: 0.7s;  }
.hero > .hero-scroll {
  opacity: 0;
  transform: translateX(-50%) translateY(14px);
  animation: heroScrollIn 0.85s 1.0s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes heroScrollIn {
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

/* hero title lines stagger inside the column */
.hero-title span {
  display: block;
  opacity: 0;
  transform: translateY(18px);
  animation: titleLineIn 0.8s cubic-bezier(.2,.8,.2,1) forwards;
}
.hero-title span:nth-child(1) { animation-delay: 0.25s; }
.hero-title span:nth-child(2) { animation-delay: 0.35s; }
.hero-title span:nth-child(3) { animation-delay: 0.45s; }
.hero-title span:nth-child(4) { animation-delay: 0.55s; }
@keyframes titleLineIn {
  to { opacity: 1; transform: translateY(0); }
}

/* hero HUD bob (no entrance fade — already revealed for screenshots/SSR friendliness) */
.hud-status      { animation: hudFloat 6s ease-in-out infinite; }
.hud-cap         { animation: hudFloat 6s ease-in-out infinite 1.6s; }
.hud-freq        { animation: hudFloat 6s ease-in-out infinite 2.8s; }
@keyframes hudFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* HUD frequency value flash on update (toggled via JS class) */
.hud-value.is-flash { color: var(--red); transition: color 0.4s ease; }

/* reveal-on-scroll: applied via JS */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(.2,.8,.2,1), transform 0.8s cubic-bezier(.2,.8,.2,1);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1);
}
.reveal-stagger.is-in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-in > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.is-in > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.is-in > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.is-in > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.is-in > *:nth-child(6) { transition-delay: 0.40s; }

/* topology pulse: a single traveling dot per path; small, gracefully fades */
.topo-pulse {
  fill: var(--red);
  opacity: 0;
  animation: topoPulseFade 3s ease-in-out infinite;
}
@keyframes topoPulseFade {
  0%       { opacity: 0; }
  20%, 80% { opacity: 0.85; }
  100%     { opacity: 0; }
}

/* topology nodes pulse (status indicators) */
.topo-svg .topo-node rect[fill="#0071e3"] {
  animation: nodeBlink 2.4s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes nodeBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* steps active state — set by JS hover */
.step { cursor: pointer; }

/* services hint pulses */
.services-hint { animation: hintPulse 3s ease-in-out infinite; }
@keyframes hintPulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* svg constellation node hover effect */
.constellation-near { transform: scale(1.1); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-copy > *, .hero-title span, .hud { opacity: 1; transform: none; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
}
