/* ==========================================================================
   NextGen Code — styles
   ========================================================================== */

:root {
  --bg: #020403;
  --bg-alt: #050a07;
  --surface: rgba(10, 22, 14, 0.55);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-green: rgba(45, 252, 112, 0.25);

  --green: #2dfc70;
  --green-rgb: 45, 252, 112;
  --green-soft: rgba(45, 252, 112, 0.1);
  --green-glow: 0 0 22px rgba(45, 252, 112, 0.5);

  --text: #e6f2ea;
  --muted: #86978c;
  --dim: #4f6056;

  --font-display: "Michroma", "Eurostile", "Arial Black", sans-serif;
  --font-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius: 6px;
  --chamfer: 12px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--green); color: #000; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--green);
  color: #000;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

.accent {
  color: var(--green);
  text-shadow: 0 0 28px rgba(var(--green-rgb), 0.4);
}

.pulse {
  display: inline-block;
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: var(--green-glow);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

/* ---------- CRT scanlines (whole page) ---------- */
.fx-scanlines {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.16) 2px 3px);
  mix-blend-mode: multiply;
}
.fx-scanlines::after {
  /* slow refresh band */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 22vh;
  top: -22vh;
  background: linear-gradient(to bottom, transparent, rgba(var(--green-rgb), 0.025), transparent);
  animation: refresh 9s linear infinite;
  mix-blend-mode: screen;
}
@keyframes refresh { to { transform: translateY(130vh); } }

/* ---------- Boot sequence ---------- */
.boot { display: none; }
.booting .boot {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  animation: bootFailsafe 0.3s 5s forwards; /* never block the page if JS breaks */
}
.boot-done .boot {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
@keyframes bootFailsafe { to { opacity: 0; visibility: hidden; } }

.boot__inner { width: min(420px, 100%); }
.boot__inner img {
  width: 64px;
  margin-bottom: 28px;
  filter: drop-shadow(0 0 18px rgba(var(--green-rgb), 0.5));
  animation: pulse 1.4s infinite;
}
.boot__log {
  margin: 0 0 20px;
  min-height: 9.5em;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  white-space: pre-wrap;
}
.boot__log b { color: var(--green); font-weight: 500; }
.boot__bar { height: 2px; background: var(--line); overflow: hidden; }
.boot__bar i {
  display: block;
  height: 100%;
  background: var(--green);
  box-shadow: var(--green-glow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.23s linear;
}
.boot__pct {
  margin-top: 10px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
}

/* ---------- Buttons (chamfered like the logo) ---------- */
.btn {
  --pad-y: 15px;
  --pad-x: 26px;
  --cut: 10px;
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--pad-y) var(--pad-x);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 0;
  cursor: pointer;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, filter 0.25s;
}
.btn span { transition: transform 0.25s var(--ease); }
.btn:hover span { transform: translateX(4px); }

.btn--primary { background: var(--green); color: #011207; }
.btn--primary:hover { transform: translateY(-2px); filter: brightness(1.12); }

.btn--ghost { background: var(--line-strong); color: var(--text); }
.btn--ghost::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: var(--bg);
  clip-path: inherit;
}
.btn--ghost:hover { background: var(--green); color: var(--green); }

.btn--sm { --pad-y: 10px; --pad-x: 18px; --cut: 8px; font-size: 13px; }
.btn--block { width: 100%; }

/* ---------- HUD corner brackets ---------- */
.hud { position: relative; }
.hud::after {
  --c: rgba(var(--green-rgb), 0.7);
  --s: 14px;
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(var(--c) 0 0) top left / var(--s) 2px,
    linear-gradient(var(--c) 0 0) top left / 2px var(--s),
    linear-gradient(var(--c) 0 0) top right / var(--s) 2px,
    linear-gradient(var(--c) 0 0) top right / 2px var(--s),
    linear-gradient(var(--c) 0 0) bottom left / var(--s) 2px,
    linear-gradient(var(--c) 0 0) bottom left / 2px var(--s),
    linear-gradient(var(--c) 0 0) bottom right / var(--s) 2px,
    linear-gradient(var(--c) 0 0) bottom right / 2px var(--s);
  background-repeat: no-repeat;
  transition: inset 0.35s var(--ease);
}
.hud:hover::after { inset: -6px; --c: var(--green); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 18px 0;
  transition: padding 0.3s var(--ease), background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding: 10px 0;
  background: rgba(2, 4, 3, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
/* backdrop-filter would trap the fixed mobile menu inside the nav bar */
.nav.menu-open {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

.nav__progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
}
.nav__progress i {
  display: block;
  height: 100%;
  background: var(--green);
  box-shadow: var(--green-glow);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__brand img {
  width: 40px;
  filter: drop-shadow(0 0 10px rgba(var(--green-rgb), 0.4));
  transition: transform 0.4s var(--ease);
}
.nav__brand:hover img { transform: skewX(-8deg) scale(1.06); }

.nav__wordmark {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.nav__wordmark b { color: var(--green); font-weight: 400; }
.nav__wordmark small {
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--muted);
  margin-left: 4px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.nav__links a:not(.btn) {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  transition: color 0.2s;
}
.nav__links a:not(.btn) em {
  font-style: normal;
  font-size: 10px;
  color: var(--green);
  opacity: 0.7;
}
.nav__links a:not(.btn)::before,
.nav__links a:not(.btn)::after {
  color: var(--green);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s var(--ease);
}
.nav__links a:not(.btn)::before { content: "["; transform: translateX(4px); }
.nav__links a:not(.btn)::after { content: "]"; transform: translateX(-4px); }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__links a:not(.btn):hover::before,
.nav__links a:not(.btn):hover::after { opacity: 1; transform: none; }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--green);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; left: 18px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 21px; left: 12px; transform: rotate(-45deg); }

/* ---------- Matrix rain canvases ---------- */
.rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 130px 0 40px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  /* keeps the copy readable over the rain + fades into the next section */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(to bottom, rgba(2, 4, 3, 0.4) 0%, transparent 25%, transparent 65%, var(--bg) 100%),
    linear-gradient(90deg, rgba(2, 4, 3, 0.92) 0%, rgba(2, 4, 3, 0.7) 45%, rgba(2, 4, 3, 0.15) 85%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 900px;
  height: 900px;
  right: -300px;
  top: -250px;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(var(--green-rgb), 0.12), transparent);
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 55% at 30% 45%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 30% 45%, #000 10%, transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 64px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line-green);
  background: rgba(var(--green-rgb), 0.05);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 28px;
}
.eyebrow b {
  color: var(--green);
  font-weight: 500;
  padding-right: 10px;
  border-right: 1px solid var(--line-green);
}
.eyebrow i { color: var(--green); font-style: normal; }

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 74px);
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin-bottom: 28px;
}

.hero__lead {
  max-width: 540px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--muted);
  margin-bottom: 40px;
}

.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* glitch on "next." */
.glitch { position: relative; display: inline-block; white-space: nowrap; animation: glitchSkew 6s infinite; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
}
.glitch::before { color: #c8ffd9; animation: glitchA 6s infinite; }
.glitch::after { color: #0f9a44; animation: glitchB 6s infinite; }
@keyframes glitchA {
  0%, 89%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
  90% { opacity: 1; transform: translate(-5px, -2px); clip-path: inset(8% 0 62% 0); }
  92% { opacity: 1; transform: translate(4px, 1px); clip-path: inset(52% 0 22% 0); }
  94% { opacity: 1; transform: translate(-3px, 0); clip-path: inset(30% 0 48% 0); }
  96% { opacity: 0; }
}
@keyframes glitchB {
  0%, 90%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
  91% { opacity: 1; transform: translate(5px, 2px); clip-path: inset(62% 0 10% 0); }
  93% { opacity: 1; transform: translate(-4px, -1px); clip-path: inset(18% 0 58% 0); }
  95% { opacity: 0; }
}
@keyframes glitchSkew {
  0%, 89.5%, 94.5%, 100% { transform: none; }
  90% { transform: skewX(-10deg); }
  92.5% { transform: skewX(6deg); }
}

/* HUD status bar */
.hud-bar {
  margin-top: clamp(56px, 8vw, 96px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
  background: rgba(2, 4, 3, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hud-bar > div {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
}
.hud-bar > div + div { border-left: 1px solid var(--line); }
.hud-bar span {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.hud-bar b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
#clock { color: var(--green); }

/* ---------- Terminal ---------- */
.terminal {
  border: 1px solid var(--line-green);
  border-radius: var(--radius);
  background: rgba(3, 9, 5, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.9),
    0 0 70px -20px rgba(var(--green-rgb), 0.35);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}
.terminal__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1e2a22;
}
.terminal__bar span:first-child { background: var(--green); box-shadow: 0 0 8px var(--green); }
.terminal__bar p {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
}

.terminal__body {
  margin: 0;
  padding: 22px 22px 26px;
  height: 320px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal__body .t-prompt { color: var(--green); }
.terminal__body .t-ok { color: var(--green); }
.terminal__body .t-dim { color: var(--dim); }
.terminal__body .t-hl { color: var(--green); font-weight: 700; text-shadow: var(--green-glow); }

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Ticker ---------- */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
  overflow: hidden;
  padding: 20px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 45s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee ul { display: flex; flex-shrink: 0; }
.marquee li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  padding: 0 30px;
}
.marquee li::before { content: "▸"; color: var(--green); font-size: 11px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: clamp(88px, 12vw, 150px) 0;
  isolation: isolate;
}
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section--grid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(48px, 7vw, 80px);
}
.section__head--left { text-align: left; margin-left: 0; margin-bottom: 28px; }

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--green);
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin-bottom: 18px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.2vw, 50px);
  letter-spacing: -0.01em;
}

.section__lead {
  margin-top: 22px;
  font-size: 18px;
  color: var(--muted);
}

/* ---------- Cards (with cursor spotlight) ---------- */
.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s, transform 0.4s var(--ease), background 0.3s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(400px circle at var(--mx) var(--my), rgba(var(--green-rgb), 0.11), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover { border-color: var(--line-green); }

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service {
  padding: 34px 30px 26px;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.service:hover { transform: translateY(-6px); }

.scan {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.scan::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 35%;
  top: -35%;
  background: linear-gradient(to bottom, transparent, rgba(var(--green-rgb), 0.08) 85%, rgba(var(--green-rgb), 0.5) 100%);
  opacity: 0;
}
.service:hover .scan::before { animation: scan 1.6s var(--ease) infinite; }
@keyframes scan {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(400%); opacity: 1; }
}

.service__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 44px;
}
.service__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--green);
}
.service__icon {
  width: 52px;
  height: 52px;
  padding: 11px;
  border: 1px solid var(--line-green);
  background: var(--green-soft);
  fill: none;
  stroke: var(--green);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background 0.3s, transform 0.4s var(--ease);
}
.service:hover .service__icon { background: rgba(var(--green-rgb), 0.2); transform: scale(1.06); }

.service h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 14px;
}
.service > p:not(.service__meta) { color: var(--muted); margin-bottom: 26px; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.tags li {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  transition: border-color 0.3s, color 0.3s;
}
.service:hover .tags li { border-color: var(--line-green); color: var(--text); }

.service__meta {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

/* ---------- Process ---------- */
.process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.process__line {
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
}
.process__line i {
  position: absolute;
  inset: 0;
  background: var(--green);
  box-shadow: var(--green-glow);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}

.step { position: relative; padding-top: 44px; }
.step__dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  background: var(--bg-alt);
  border: 2px solid var(--dim);
  transform: rotate(45deg);
  box-shadow: 0 0 0 6px var(--bg-alt);
  transition: border-color 0.4s, background 0.4s, box-shadow 0.4s;
}
.step.is-active .step__dot {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 0 6px var(--bg-alt), var(--green-glow);
}
.step__cmd {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--green);
  margin-bottom: 10px;
}
.step h3 {
  font-family: var(--font-display);
  font-size: 17px;
  margin-bottom: 12px;
}
.step p:last-child { color: var(--muted); font-size: 16px; }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.about__copy > p { color: var(--muted); font-size: 18px; }

.values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 32px;
  margin-top: 44px;
}
.value {
  padding-left: 16px;
  border-left: 1px solid var(--line-green);
}
.value h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 6px;
}
.value h3 span { color: var(--green); margin-right: 4px; }
.value p { color: var(--muted); font-size: 15px; }

.code-card {
  background: rgba(3, 9, 5, 0.92);
  border-color: var(--line-green);
  box-shadow: 0 0 90px -30px rgba(var(--green-rgb), 0.4);
}
.code-card__bar {
  display: flex;
  justify-content: space-between;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
}
.code-card__bar span::before { content: "●"; color: var(--green); margin-right: 10px; }
.code-card__bar em { font-style: normal; color: #7cc4ff; }
.code-card pre {
  margin: 0;
  padding: 26px 24px 30px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.85;
}
.code-card .c { color: var(--dim); font-style: italic; }
.code-card .k { color: #b685ff; }
.code-card .v { color: #fff; }
.code-card .p { color: #7cc4ff; }
.code-card .s { color: var(--green); }
.code-card .f { color: #ffd479; }

/* ---------- Contact ---------- */
.contact { overflow: hidden; }
.contact__rain { opacity: 0.8; }
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(to bottom, var(--bg) 0%, transparent 25%, transparent 75%, var(--bg) 100%),
    linear-gradient(90deg, rgba(2, 4, 3, 0.85), rgba(2, 4, 3, 0.2));
  pointer-events: none;
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.contact__email {
  display: inline-block;
  margin-top: 36px;
  font-family: var(--font-mono);
  font-size: clamp(16px, 2vw, 20px);
  color: var(--green);
  border-bottom: 1px solid var(--line-green);
  padding-bottom: 4px;
  transition: border-color 0.3s, text-shadow 0.3s;
}
.contact__email::before { content: "> "; color: var(--dim); }
.contact__email:hover { border-color: var(--green); text-shadow: var(--green-glow); }

.form {
  padding: clamp(22px, 4vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: rgba(3, 9, 5, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.form__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.form label > span,
.form legend {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--green);
  margin-bottom: 8px;
}

.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  caret-color: var(--green);
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(var(--green-rgb), 0.12), inset 0 0 20px rgba(var(--green-rgb), 0.05);
}
.form .is-invalid { border-color: #ff5f5f !important; }

.form__chips {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.form__chips legend { width: 100%; }
.form__chips label { position: relative; cursor: pointer; }
.form__chips input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.form__chips label span {
  display: block;
  margin: 0;
  padding: 8px 14px;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  transition: all 0.2s;
}
.form__chips label:hover span { border-color: var(--line-green); color: var(--text); }
.form__chips input:checked + span {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}
.form__chips input:checked + span::before { content: "✓ "; }
.form__chips input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }

.form__status {
  min-height: 1.4em;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--green);
  text-align: center;
}
.form__status.is-error { color: #ff5f5f; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 40px;
  background: var(--bg-alt);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}
.footer__logo img { width: 220px; }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.footer__links a { color: var(--muted); transition: color 0.2s; }
.footer__links a:hover { color: var(--green); }
.footer__copy { font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.footer__copy i { color: var(--green); font-style: normal; }

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* headings wipe in left → right */
.js .wipe {
  clip-path: inset(-10% 100% -10% 0);
  transition: clip-path 1.1s var(--ease) 0.15s;
}
.js .is-visible .wipe { clip-path: inset(-10% -5% -10% 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .terminal { max-width: 620px; }
  .services { grid-template-columns: 1fr 1fr; }
  .services .service:last-child { grid-column: 1 / -1; }
  .about, .contact__inner { grid-template-columns: 1fr; }
  .hero::before {
    background:
      linear-gradient(to bottom, rgba(2, 4, 3, 0.5) 0%, transparent 20%, transparent 70%, var(--bg) 100%),
      rgba(2, 4, 3, 0.62);
  }
}

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    padding: 96px var(--gutter) 40px;
    font-size: 22px;
    background: rgba(2, 4, 3, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; }
  .nav__links a:not(.btn) {
    padding: 22px 4px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    gap: 14px;
  }
  .nav__links a:not(.btn) em { font-size: 13px; }
  .nav__links a:not(.btn)::before,
  .nav__links a:not(.btn)::after { display: none; }
  .nav__links .btn { margin-top: 32px; font-size: 15px; --pad-y: 16px; }

  .process { grid-template-columns: 1fr; gap: 40px; padding-left: 44px; }
  .process__line { top: 0; bottom: 0; left: 7px; right: auto; width: 2px; height: auto; }
  .process__line i { transform: scaleY(var(--progress, 0)); transform-origin: top; }
  .step { padding-top: 0; }
  .step__dot { left: -44px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 108px 0 32px; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .eyebrow { font-size: 11px; gap: 8px; padding: 7px 12px; }
  .eyebrow b { padding-right: 8px; }
  .terminal__body { font-size: 12px; height: 270px; padding: 18px; }
  .hud-bar { grid-template-columns: 1fr 1fr; }
  .hud-bar > div:nth-child(2) { display: none; }
  .hud-bar > div { padding: 14px 12px; }
  .services { grid-template-columns: 1fr; }
  .services .service:last-child { grid-column: auto; }
  .service { padding: 28px 22px 22px; }
  .service__top { margin-bottom: 32px; }
  .values { grid-template-columns: 1fr; gap: 22px; }
  .form__row { grid-template-columns: 1fr; }
  .code-card pre { font-size: 11.5px; padding: 20px 16px 24px; }
  .nav__wordmark small { display: none; }
  .hud:hover::after { inset: -1px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee__track, .fx-scanlines::after, .glitch, .glitch::before, .glitch::after { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
  .js .wipe { clip-path: none; }
}
