/* =========================================================
   Jaxon Doolittle, Technical Consulting
   Aurora glass design system
   ========================================================= */

:root {
  /* Color tokens (spec 2.2) */
  --bg-0: #05070f;
  --bg-1: #0a1024;
  --aurora-teal: #3ddcd0;
  --aurora-violet: #9500dc;
  --aurora-magenta: #ce00ff;
  --aurora-pink: #de239e;
  --aurora-plum: #ab1a79;
  --aurora-crimson: #d12e53;
  --text-hi: #f1f5ff;
  --text-mid: #b6c0da;
  --text-lo: #7c86a3;
  --glass-fill: rgba(255, 255, 255, 0.06);
  --glass-fill-hover: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.22);

  /* Tint under the glass: keeps body text at AA even over the brightest aurora */
  --glass-tint: rgba(8, 11, 26, 0.62);

  /* Signature gradient: dividers, borders, glows */
  --grad: linear-gradient(120deg, var(--aurora-teal) 0%, var(--aurora-violet) 55%, var(--aurora-pink) 100%);
  /* Legible variant for text fills and dark-text buttons (violet stop fails contrast, magenta passes) */
  --grad-legible: linear-gradient(120deg, var(--aurora-teal) 0%, var(--aurora-magenta) 62%, var(--aurora-pink) 100%);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1140px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Scroll progress 0..1, updated in main.js. Drives the aurora's cool-to-warm shift. */
  --p: 0;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-1) 0%, var(--bg-0) 60%) fixed, var(--bg-0);
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-mid);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol { list-style: none; padding: 0; }
a { color: var(--aurora-teal); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
em { font-style: italic; }
strong { color: var(--text-hi); font-weight: 600; }
::selection { background: rgba(61, 220, 208, 0.3); color: var(--text-hi); }

:focus-visible {
  outline: 2px solid var(--aurora-teal);
  outline-offset: 3px;
  border-radius: 6px;
}

.mono { font-family: var(--font-mono); }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--aurora-teal);
  color: var(--bg-0);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- Typography ---------- */
h1, h2, h3 { color: var(--text-hi); font-family: var(--font-sans); }
h1 {
  font-size: clamp(2.6rem, 6vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.5;
  color: var(--aurora-teal);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 28px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--aurora-teal));
}

.text-grad {
  background: var(--grad-legible);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.prose p + p { margin-top: 1.1em; }
.note { color: var(--text-lo); font-size: 0.95rem; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  position: relative;
  padding-block: clamp(80px, 12vw, 140px);
}
.section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--center { text-align: center; max-width: 760px; margin-inline: auto; }
.section-head--center .eyebrow::after {
  content: "";
  flex: none;
  width: 28px; height: 1px;
  background: linear-gradient(90deg, var(--aurora-teal), transparent);
}
.section-intro { margin-top: 18px; color: var(--text-mid); }

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px clamp(32px, 6vw, 80px);
  margin-bottom: clamp(40px, 6vw, 64px);
}
.split .section-head { margin-bottom: 0; }
@media (min-width: 900px) {
  .split { grid-template-columns: 0.95fr 1.05fr; align-items: end; }
  .split .prose { padding-bottom: 6px; }
}

.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* Gradient divider, fading at both ends */
.divider {
  height: 1px;
  width: min(var(--maxw), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  background: var(--grad);
  -webkit-mask: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
  mask: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
  opacity: 0.7;
}
.divider--flush { width: 100%; }

/* ---------- Background: sky, aurora, grain ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.stars {
  position: absolute;
  inset: -10%;
  opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 72%, #cfe 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 41% 33%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 58%, #dff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 79% 27%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 81%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 7% 91%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 95%, #eef 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 94% 6%, #fff 50%, transparent 51%);
  background-size: 520px 520px;
}
.stars::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.6;
  background-image:
    radial-gradient(1px 1px at 20% 40%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 80%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 50% 60%, #bff 50%, transparent 51%),
    radial-gradient(1px 1px at 85% 15%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 5% 65%, #fff 50%, transparent 51%);
  background-size: 310px 310px;
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.25; } to { opacity: 0.75; } }

.aurora { position: absolute; inset: 0; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
  animation: drift 55s ease-in-out infinite alternate;
}
/* Cool colors fade and warm colors rise as you scroll down the page */
.blob--teal {
  width: 56vw; height: 46vw;
  top: -16vw; left: -14vw;
  background: radial-gradient(closest-side, var(--aurora-teal), rgba(61, 220, 208, 0) 100%);
  opacity: calc(0.5 - var(--p) * 0.22);
  animation-duration: 48s;
}
.blob--violet {
  width: 54vw; height: 48vw;
  top: -18vw; right: -16vw;
  background: radial-gradient(closest-side, var(--aurora-violet), rgba(149, 0, 220, 0) 100%);
  opacity: calc(0.46 - var(--p) * 0.1);
  animation-name: drift-b;
  animation-duration: 62s;
}
.blob--magenta {
  width: 44vw; height: 34vw;
  top: 34%; left: 30%;
  background: radial-gradient(closest-side, var(--aurora-magenta), rgba(206, 0, 255, 0) 100%);
  opacity: calc(0.16 + var(--p) * 0.08);
  animation-name: drift-c;
  animation-duration: 70s;
}
.blob--pink {
  width: 46vw; height: 40vw;
  bottom: -18vw; right: -12vw;
  background: radial-gradient(closest-side, var(--aurora-pink), rgba(222, 35, 158, 0) 100%);
  opacity: calc(0.1 + var(--p) * 0.2);
  animation-name: drift-b;
  animation-duration: 58s;
}
.blob--plum {
  width: 58vw; height: 44vw;
  bottom: -20vw; left: -16vw;
  background: radial-gradient(closest-side, var(--aurora-plum), rgba(171, 26, 121, 0) 100%);
  opacity: calc(0.18 + var(--p) * 0.22);
  animation-name: drift-c;
  animation-duration: 66s;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  50%  { transform: translate3d(8vw, 5vw, 0) scale(1.12) rotate(12deg); }
  100% { transform: translate3d(-4vw, 9vw, 0) scale(0.94) rotate(-8deg); }
}
@keyframes drift-b {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-9vw, 6vw, 0) scale(1.1); }
  100% { transform: translate3d(-3vw, -4vw, 0) scale(0.92); }
}
@keyframes drift-c {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(7vw, -6vw, 0) scale(0.9); }
  100% { transform: translate3d(-8vw, 3vw, 0) scale(1.14); }
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Glass panel recipe (spec 2.4) ---------- */
.glass {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.035) 100%),
    var(--glass-tint);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 20px 50px -20px rgba(0, 0, 0, 0.6);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(16, 22, 44, 0.92); }
}

/* Interactive card: lift, cursor spotlight, gradient border glow */
.card {
  --mx: 50%;
  --my: 50%;
  padding: clamp(24px, 3vw, 32px);
  isolation: isolate;
  transition:
    transform 250ms ease-out,
    background-color 250ms ease-out,
    border-color 250ms ease-out,
    box-shadow 250ms ease-out;
}
.card::before,
.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 250ms ease-out;
}
/* Spotlight */
.card::before {
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(61, 220, 208, 0.12), rgba(206, 0, 255, 0.06) 45%, transparent 70%);
}
/* 1px gradient border via mask */
.card::after {
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
@media (hover: hover) {
  .card:hover,
  .js .card.reveal.in.settled:hover {
    transform: translateY(-4px);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%),
      var(--glass-tint);
    border-color: transparent;
    box-shadow:
      inset 0 1px 0 var(--glass-highlight),
      0 30px 60px -24px rgba(0, 0, 0, 0.7),
      0 0 40px -12px rgba(206, 0, 255, 0.35);
  }
  .js .card.reveal.in:not(.settled):hover { transform: none; }
  .card:hover::before,
  .card:hover::after { opacity: 1; }
}
.card h3 { margin-bottom: 10px; }

/* HUD corner ticks */
.corner {
  position: absolute;
  width: 12px; height: 12px;
  border: 0 solid rgba(61, 220, 208, 0.7);
  pointer-events: none;
}
.corner--tl { top: 10px; left: 10px; border-top-width: 1px; border-left-width: 1px; }
.corner--tr { top: 10px; right: 10px; border-top-width: 1px; border-right-width: 1px; }
.corner--bl { bottom: 10px; left: 10px; border-bottom-width: 1px; border-left-width: 1px; }
.corner--br { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--h);
  padding: 0 26px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
  transition: transform 200ms var(--ease), box-shadow 250ms ease-out, background-color 250ms ease-out, border-color 250ms ease-out, background-position 600ms var(--ease);
}
.btn--sm { --h: 40px; padding: 0 18px; font-size: 0.9rem; }
.btn--block { width: 100%; }
.btn__icon {
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 250ms var(--ease);
}
.btn--primary {
  color: #05070f;
  background: var(--grad-legible);
  background-size: 160% 100%;
  background-position: 0% 50%;
  box-shadow: 0 8px 24px -10px rgba(61, 220, 208, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn--primary:hover {
  background-position: 100% 50%;
  box-shadow: 0 0 30px rgba(61, 220, 208, 0.4), 0 0 60px rgba(222, 35, 158, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}
.btn--primary:hover .btn__icon:not(.btn__icon--lead) { transform: translateX(3px); }
.btn--glass {
  color: var(--text-hi);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}
.btn--glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}
.btn--glass:hover .btn__icon--lead { transform: translateY(2px); }
.btn:active { transform: translateY(0) scale(0.98); }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding-top: 12px;
  pointer-events: none;
}
.nav-wrap {
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
  padding: 0 12px 0 20px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)), rgba(8, 11, 26, 0.28);
  transition: background-color 300ms ease-out, box-shadow 300ms ease-out, border-color 300ms ease-out;
}
.site-header.scrolled .nav {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)), rgba(8, 11, 26, 0.72);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}
.nav__progress {
  position: absolute;
  left: 0; bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--grad);
  transform-origin: left center;
  transform: scaleX(var(--p));
  opacity: 0.9;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--text-hi);
  white-space: nowrap;
}
.wordmark__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(61, 220, 208, 0.7), 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.nav__links {
  display: none;
  margin-left: auto;
  gap: 4px;
}
.nav__links a {
  position: relative;
  display: block;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: color 200ms ease-out, background-color 200ms ease-out;
}
.nav__links a:hover { color: var(--text-hi); background: rgba(255, 255, 255, 0.05); }
.nav__links a.active { color: var(--text-hi); }
.nav__links a.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 3px;
  height: 1px;
  background: var(--aurora-teal);
  box-shadow: 0 0 8px var(--aurora-teal);
}
.nav__cta { display: none; }
.nav__toggle {
  margin-left: auto;
  width: 44px; height: 44px;
  display: grid;
  place-content: center;
  gap: 5px;
  border-radius: 12px;
}
.nav__toggle span {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--text-hi);
  border-radius: 2px;
  transition: transform 250ms var(--ease), opacity 200ms;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  pointer-events: auto;
  margin-top: 8px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)), rgba(8, 11, 26, 0.86);
  animation: sheet-in 300ms var(--ease);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { margin-bottom: 12px; }
.mobile-menu a:not(.btn) {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 12px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-hi);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-menu li:last-child a:not(.btn) { border-bottom: 0; }
.mobile-menu a:not(.btn):hover { background: rgba(255, 255, 255, 0.05); }
.mobile-menu .mono { font-size: 0.75rem; color: var(--aurora-teal); }
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

@media (min-width: 920px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__toggle, .mobile-menu { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(100vh, 980px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(120px, 16vh, 168px) 0 clamp(80px, 10vh, 120px);
  overflow: hidden;
}
.hero__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask: radial-gradient(80% 70% at 60% 40%, #000 0%, transparent 75%);
  mask: radial-gradient(80% 70% at 60% 40%, #000 0%, transparent 75%);
}
.hero::after {
  /* horizon glow */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
  mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
  opacity: 0.5;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(48px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 1000px) {
  .hero__inner { grid-template-columns: minmax(0, 1.42fr) minmax(0, 0.78fr); }
}
.hero__title { margin-bottom: 26px; text-wrap: balance; }
.hero__title .text-grad { display: inline-block; padding-bottom: 0.06em; }
.hero__sub {
  max-width: 36em;
  font-size: clamp(1.0625rem, 1.4vw, 1.2rem);
  line-height: 1.7;
  color: var(--text-mid);
  margin-bottom: 36px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: var(--text-mid);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)), rgba(8, 11, 26, 0.4);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.chip::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--aurora-teal);
  box-shadow: 0 0 8px var(--aurora-teal);
}

/* Hero visual: magnetic field lines + pipeline log */
.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}
.field {
  position: absolute;
  width: min(1040px, 230%);
  max-width: none;
  aspect-ratio: 1;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.9;
  pointer-events: none;
}
.field__lines path {
  stroke-width: 1.25;
  stroke-dasharray: 2 6;
  vector-effect: non-scaling-stroke;
  animation: flow 14s linear infinite;
}
.field__lines path:nth-child(odd) { animation-direction: reverse; }
.field__lines path:nth-child(n+7) { opacity: 0.7; }
@keyframes flow { to { stroke-dashoffset: -200; } }

.terminal {
  position: relative;
  width: 100%;
  max-width: 440px;
  border-radius: 18px;
  overflow: hidden;
  animation: float 9s ease-in-out infinite;
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 40px 80px -30px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(61, 220, 208, 0.06),
    0 0 60px -20px rgba(61, 220, 208, 0.35);
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.terminal__lights { display: inline-flex; gap: 6px; }
.terminal__lights i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.terminal__name { font-size: 0.78rem; color: var(--text-lo); }
.terminal__live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--aurora-teal);
}
.terminal__live i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--aurora-teal);
  box-shadow: 0 0 8px var(--aurora-teal);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.3; } }
.terminal__body {
  padding: 20px 22px 24px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-mid);
}
.t-line {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.t-line:last-child { border-bottom: 0; }
.t-cmd { display: block; color: var(--text-hi); padding-bottom: 12px; }
.t-cmd:last-child { padding: 12px 0 0; }
.t-prompt { color: var(--aurora-teal); margin-right: 8px; }
.t-ok { color: var(--aurora-teal); }
.t-bad { color: var(--aurora-crimson); font-weight: 500; }
.t-alert { color: var(--aurora-teal); font-size: 0.72rem; }
.t-key { color: var(--text-mid); }
.t-val { color: var(--text-hi); text-align: right; }
.t-line--bad {
  margin: 4px -10px;
  padding: 9px 10px;
  border-radius: 10px;
  border-bottom-color: transparent;
  background: linear-gradient(90deg, rgba(209, 46, 83, 0.18), rgba(209, 46, 83, 0.04));
  box-shadow: inset 2px 0 0 var(--aurora-crimson);
}
.t-pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  background: rgba(209, 46, 83, 0.28);
  border: 1px solid rgba(209, 46, 83, 0.6);
}
.t-cursor {
  display: inline-block;
  width: 8px; height: 1.05em;
  vertical-align: text-bottom;
  background: var(--aurora-teal);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* JS-driven sequential reveal of terminal lines */
.js .terminal .t-line { opacity: 0; transform: translateX(-6px); }
.js .terminal .t-line.on {
  opacity: 1;
  transform: none;
  transition: opacity 400ms ease-out, transform 400ms var(--ease);
}
.js .terminal .t-line--bad.on { animation: alarm 1.6s ease-out 1; }
@keyframes alarm {
  0% { background-color: rgba(209, 46, 83, 0.45); }
  100% { background-color: transparent; }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 1;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--text-lo);
}
.scroll-cue__line {
  width: 1px; height: 40px;
  background: linear-gradient(var(--aurora-teal), transparent);
  animation: cue 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}
@media (min-width: 1000px) and (min-height: 760px) { .scroll-cue { display: flex; } }

/* ---------- Problem cards ---------- */
.icon {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 22px;
  border-radius: 14px;
  color: var(--aurora-teal);
  background: rgba(61, 220, 208, 0.08);
  border: 1px solid rgba(61, 220, 208, 0.22);
  box-shadow: 0 0 24px -6px rgba(61, 220, 208, 0.35);
}
.icon svg {
  width: 24px; height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--crimson {
  color: var(--aurora-crimson);
  background: rgba(209, 46, 83, 0.1);
  border-color: rgba(209, 46, 83, 0.3);
  box-shadow: 0 0 24px -6px rgba(209, 46, 83, 0.45);
}

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 680px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .service--featured { grid-column: span 2; }
}
@media (min-width: 1040px) {
  .services { grid-template-columns: repeat(3, 1fr); }
  .service--featured { grid-column: span 2; }
}
.service {
  display: flex;
  flex-direction: column;
}
.service p { font-size: 1rem; }
.service > p:not(:last-child) { margin-bottom: 24px; }
.service__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}
.service__idx {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--text-mid);
}
.service__idx::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 36px; height: 1px;
  margin-left: 10px;
  background: linear-gradient(90deg, rgba(61, 220, 208, 0.6), transparent);
}
.service__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}
.service__meta > div { display: flex; flex-direction: column; gap: 4px; }
.service__meta dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-mid);
}
.service__meta dd { color: var(--text-hi); }
.service__meta .fee { color: var(--aurora-teal); font-weight: 500; }

.service--featured {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(149, 0, 220, 0.16), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(61, 220, 208, 0.1), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)),
    var(--glass-tint);
  border-color: transparent;
}
.service--featured::after { opacity: 1; }
.service--featured h3 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); letter-spacing: -0.02em; }
.service--featured p { max-width: 40em; font-size: 1.0625rem; }
.service--featured .service__meta { font-size: 0.95rem; }
.service--featured .fee { font-size: 1.1rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-hi);
  background: rgba(222, 35, 158, 0.18);
  border: 1px solid rgba(222, 35, 158, 0.55);
  box-shadow: 0 0 20px -6px rgba(222, 35, 158, 0.6);
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--aurora-pink);
  box-shadow: 0 0 8px var(--aurora-pink);
}

.scope-note {
  margin-top: 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.scope-note summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-sm);
}
.scope-note summary::-webkit-details-marker { display: none; }
.scope-note summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--aurora-teal);
  border: 1px solid rgba(61, 220, 208, 0.4);
  transition: transform 250ms var(--ease);
}
.scope-note[open] summary::before { content: "\2212"; }
.scope-note summary:hover { color: var(--text-hi); }
.scope-note p {
  padding: 0 14px 14px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-mid);
}

/* ---------- Results ---------- */
.metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (min-width: 560px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .metrics { grid-template-columns: repeat(4, 1fr); } }
.metric {
  padding: clamp(28px, 3vw, 36px) clamp(24px, 2.4vw, 30px);
  overflow: hidden;
}
.metric::before {
  content: "";
  position: absolute;
  top: -40%; right: -30%;
  width: 70%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(61, 220, 208, 0.16), transparent);
  pointer-events: none;
}
.metric__num {
  position: relative;
  font-size: clamp(2.6rem, 4.6vw, 3.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  background: var(--grad-legible);
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(61, 220, 208, 0.25));
}
.metric__unit {
  font-size: 0.6em;
  letter-spacing: 0;
  margin-left: 0.12em;
}
.metric__cap {
  position: relative;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-mid);
}
.metric .corner { width: 10px; height: 10px; }

.narrative {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: clamp(28px, 4vw, 44px);
}
@media (min-width: 880px) {
  .narrative { grid-template-columns: 1.35fr auto 1fr; gap: 40px; }
}
.narrative__rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
}
@media (min-width: 880px) {
  .narrative__rule { width: 1px; height: auto; background: linear-gradient(transparent, rgba(255, 255, 255, 0.16), transparent); }
}
.narrative__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mid);
}
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot--teal { background: var(--aurora-teal); box-shadow: 0 0 10px var(--aurora-teal); }
.dot--pink { background: var(--aurora-pink); box-shadow: 0 0 10px var(--aurora-pink); }

/* ---------- SBIR ---------- */
.sbir {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 960px) { .sbir { grid-template-columns: 1.15fr 0.85fr; } }
.sbir .prose { margin-bottom: 32px; }
.sbir .note {
  margin-top: 24px;
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left: 2px solid rgba(61, 220, 208, 0.55);
  background: linear-gradient(90deg, rgba(61, 220, 208, 0.05), transparent 80%), rgba(5, 7, 15, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dossier {
  padding: 28px;
  overflow: hidden;
}
.dossier::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 60% at 100% 0%, rgba(149, 0, 220, 0.18), transparent 60%);
  pointer-events: none;
}
.dossier__head {
  position: relative;
  display: flex;
  gap: 10px;
  padding-bottom: 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--text-lo);
}
.dossier__sep { color: var(--aurora-teal); }
.dossier__list { position: relative; }
.dossier__list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-hi);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}
.dossier__check {
  flex: none;
  position: relative;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: rgba(61, 220, 208, 0.1);
  border: 1px solid rgba(61, 220, 208, 0.45);
  box-shadow: 0 0 16px -4px rgba(61, 220, 208, 0.5);
}
.dossier__check::after {
  content: "";
  position: absolute;
  left: 8px; top: 4px;
  width: 7px; height: 12px;
  border: solid var(--aurora-teal);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.dossier__foot {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-lo);
}
.dossier__bar {
  display: block;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.dossier__bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--grad);
  transform-origin: left;
}
.js .dossier:not(.in) .dossier__bar i { transform: scaleX(0); }
.js .dossier.in .dossier__bar i { transform: scaleX(1); transition: transform 1.6s var(--ease) 0.4s; }

/* ---------- Process timeline ---------- */
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  counter-reset: step;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 28px; bottom: 28px;
  width: 1px;
  background: linear-gradient(var(--aurora-teal), var(--aurora-violet) 55%, var(--aurora-pink));
  opacity: 0.8;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: start;
}
.step__node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--aurora-teal);
  background: rgba(8, 11, 26, 0.85);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 0 0 6px rgba(5, 7, 15, 0.6), 0 0 28px -4px rgba(61, 220, 208, 0.5);
}
.step__card { height: 100%; }
.step__card p { font-size: 1rem; }
@media (min-width: 860px) {
  .timeline { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .timeline::before {
    left: calc(100% / 6); right: calc(100% / 6);
    top: 28px; bottom: auto;
    width: auto; height: 1px;
    background: var(--grad);
  }
  .step { grid-template-columns: 1fr; grid-template-rows: auto 1fr; justify-items: center; gap: 24px; text-align: center; }
  .step__card { width: 100%; }
}
.timeline__note {
  max-width: 720px;
  margin: clamp(36px, 5vw, 52px) auto 0;
  text-align: center;
  color: var(--text-mid);
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
}
.about::before {
  content: "";
  position: absolute;
  right: -10%; top: -30%;
  width: 60%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(149, 0, 220, 0.18), transparent);
  pointer-events: none;
}
@media (min-width: 900px) {
  .about { grid-template-columns: 1.5fr 1fr; align-items: center; gap: 56px; }
}
.about__copy { position: relative; }
.about h2 { margin-bottom: 24px; }
.creds {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 10px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-mid);
}
.creds li {
  position: relative;
  padding-left: 22px;
}
.creds li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 10px; height: 1px;
  background: var(--aurora-teal);
  box-shadow: 0 0 6px var(--aurora-teal);
}
.about__portrait {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  order: -1;
}
@media (min-width: 900px) { .about__portrait { order: 0; } }
.avatar {
  position: relative;
  width: clamp(180px, 26vw, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.avatar__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 200deg, var(--aurora-teal), var(--aurora-violet), var(--aurora-pink), var(--aurora-teal));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin 24s linear infinite;
  filter: drop-shadow(0 0 18px rgba(61, 220, 208, 0.35));
}
.avatar::before {
  /* outer orbit */
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.12);
}
.avatar__initials,
.avatar img {
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  border-radius: 50%;
  object-fit: cover;
}
.avatar__initials {
  display: grid;
  place-items: center;
  background:
    radial-gradient(80% 80% at 30% 20%, rgba(61, 220, 208, 0.16), transparent 60%),
    radial-gradient(80% 80% at 80% 90%, rgba(222, 35, 158, 0.14), transparent 60%),
    rgba(8, 11, 26, 0.7);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  font-size: clamp(3.4rem, 7vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}
.avatar__initials .text-grad {
  padding: 0 0.04em;
  background-image: linear-gradient(135deg, var(--text-hi) 20%, var(--aurora-teal) 100%);
}
.avatar__caption {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--text-lo);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Contact ---------- */
.contact {
  max-width: 880px;
  margin-inline: auto;
  padding: clamp(40px, 7vw, 80px) clamp(20px, 5vw, 64px);
  text-align: center;
  overflow: hidden;
}
.contact::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0.55;
  pointer-events: none;
}
.contact__glow {
  position: absolute;
  left: 50%; top: 0;
  width: 70%; height: 60%;
  transform: translate(-50%, -55%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(61, 220, 208, 0.22), rgba(149, 0, 220, 0.1) 55%, transparent);
  pointer-events: none;
}
.contact > *:not(.corner):not(.contact__glow) { position: relative; }
.contact h2 { max-width: 18em; margin-inline: auto; text-wrap: balance; }
.contact__sub { margin-top: 14px; }
/* Contact form */
.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px 20px;
  max-width: 680px;
  margin: 36px auto 32px;
  text-align: left;
}
@media (min-width: 640px) {
  .contact-form { grid-template-columns: 1fr 1fr; }
  .form-field--full { grid-column: 1 / -1; }
}
.form-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.form-field label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
}
.form-field__opt { text-transform: none; letter-spacing: 0.02em; color: var(--text-lo); margin-left: 6px; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-hi);
  background: rgba(5, 7, 15, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: border-color 200ms ease-out, box-shadow 200ms ease-out, background-color 200ms ease-out;
  -webkit-appearance: none;
  appearance: none;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field select {
  padding-right: 42px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%233ddcd0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}
.form-field select option { color: var(--text-hi); background: var(--bg-1); }
.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover { border-color: rgba(255, 255, 255, 0.24); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--aurora-teal);
  background-color: rgba(5, 7, 15, 0.75);
  box-shadow: 0 0 0 3px rgba(61, 220, 208, 0.18), 0 0 24px -6px rgba(61, 220, 208, 0.45);
}
.was-validated .form-field :invalid,
.form-field :user-invalid {
  border-color: var(--aurora-crimson);
  box-shadow: 0 0 0 3px rgba(209, 46, 83, 0.16);
}
.form-field--trap {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}
.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}
.contact-form__actions .btn[disabled] { opacity: 0.7; cursor: progress; transform: none; }
.form-status {
  min-height: 1.5em;
  font-size: 0.92rem;
  color: var(--text-mid);
}
.form-status:empty { display: none; }
.form-status--error { color: var(--text-hi); padding-left: 12px; border-left: 2px solid var(--aurora-crimson); }
.form-status a { color: var(--aurora-teal); text-decoration: underline; text-underline-offset: 3px; }

.form-sent {
  max-width: 520px;
  margin: 40px auto 36px;
  padding: 32px 24px;
  border-radius: var(--radius);
  background: rgba(61, 220, 208, 0.06);
  border: 1px solid rgba(61, 220, 208, 0.3);
  box-shadow: 0 0 40px -12px rgba(61, 220, 208, 0.4);
}
.form-sent:focus { outline: none; }
.form-sent__icon {
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 16px;
  border-radius: 50%;
  color: var(--aurora-teal);
  border: 1px solid rgba(61, 220, 208, 0.5);
  background: rgba(61, 220, 208, 0.1);
}
.form-sent__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.form-sent__title { font-size: 1.35rem; font-weight: 600; color: var(--text-hi); margin-bottom: 6px; }
.contact__loc {
  font-size: 0.82rem;
  color: var(--text-lo);
  letter-spacing: 0.02em;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  padding: 56px 0 40px;
  background: linear-gradient(180deg, transparent, rgba(5, 7, 15, 0.75) 45%);
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 0.92rem;
}
.footer__links a { color: var(--text-mid); transition: color 200ms; }
.footer__links a:hover { color: var(--aurora-teal); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
  padding-top: 28px;
}
.footer__disclaimer {
  max-width: 720px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-lo);
}
.footer__copy { font-size: 0.78rem; color: var(--text-lo); white-space: nowrap; }

/* ---------- Scroll reveals ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
  transition:
    opacity 800ms var(--ease) var(--d, 0ms),
    transform 800ms var(--ease) var(--d, 0ms);
}
/* After revealing, cards hand transform back to their hover transition */
.js .card.reveal.in.settled {
  transition:
    transform 250ms ease-out,
    background-color 250ms ease-out,
    border-color 250ms ease-out,
    box-shadow 250ms ease-out;
}

/* Hero entrance: runs on load (not on scroll) so the headline paints immediately */
.rise {
  animation: rise 900ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}
@keyframes rise {
  from { opacity: 0.01; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Lite mode (html.lite, set by main.js on slow devices) ----------
   Static aurora, no card blur, lighter canvas. Same colors, borders and highlights. */
.lite {
  --glass-tint: rgba(12, 16, 34, 0.86);
}
/* Aurora: drop the blur and the drift. A softer, wider gradient stands in for the
   blur's spread. will-change stays so the scroll-driven opacity shift is composited. */
.lite .blob {
  filter: none;
  animation: none;
  transform: scale(1.3);
}
.lite .blob--teal    { background: radial-gradient(closest-side, var(--aurora-teal), rgba(61, 220, 208, 0.45) 40%, rgba(61, 220, 208, 0) 100%); }
.lite .blob--violet  { background: radial-gradient(closest-side, var(--aurora-violet), rgba(149, 0, 220, 0.45) 40%, rgba(149, 0, 220, 0) 100%); }
.lite .blob--magenta { background: radial-gradient(closest-side, var(--aurora-magenta), rgba(206, 0, 255, 0.45) 40%, rgba(206, 0, 255, 0) 100%); }
.lite .blob--pink    { background: radial-gradient(closest-side, var(--aurora-pink), rgba(222, 35, 158, 0.45) 40%, rgba(222, 35, 158, 0) 100%); }
.lite .blob--plum    { background: radial-gradient(closest-side, var(--aurora-plum), rgba(171, 26, 121, 0.45) 40%, rgba(171, 26, 121, 0) 100%); }

/* Backdrop blur only on the nav and the contact panel, at 8px */
.lite .glass,
.lite .btn--glass,
.lite .chip,
.lite .sbir .note {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.lite .nav.glass,
.lite .contact.glass {
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
}
.lite .contact.glass { --glass-tint: rgba(8, 11, 26, 0.62); }
.lite .btn--glass { background: rgba(22, 28, 52, 0.78); }
.lite .btn--glass:hover { background: rgba(30, 37, 64, 0.85); }
.lite .chip { background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)), rgba(12, 16, 34, 0.86); }
/* The dashed field lines repaint the SVG every frame; hold them still */
.lite .field__lines path { animation: none; }
/* The star twinkle fades a full-screen layer every frame; profiling showed it was
   the largest remaining scroll cost on slow machines. Hold it at mid brightness. */
.lite .stars::after { animation: none; opacity: 0.5; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
  .blob, .stars::after, .terminal, .field__lines path, .avatar__ring, .scroll-cue__line { animation: none !important; }
  .t-cursor { animation: none !important; }
  .hero__particles { display: none; }
  .js .reveal,
  .rise,
  .js .terminal .t-line { opacity: 1 !important; transform: none !important; animation: none !important; }
  .js .dossier .dossier__bar i { transform: none !important; }
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .hero__actions .btn { flex: 1 1 100%; }
  .contact-form__actions .btn { flex: 1 1 100%; }
  .hero__visual { min-height: 0; padding-block: 24px; }
  .field { width: 150%; opacity: 0.4; }
  .terminal__body { font-size: 0.8rem; padding: 16px 16px 20px; }
  .t-line { grid-template-columns: 18px 1fr auto; }
  .chip { font-size: 0.72rem; padding: 6px 12px; }
}
