@font-face {
  font-family: "Michroma";
  src: url("fonts/michroma-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #05070d;
  --bg-raised: #0b111c;
  --ink: #e9eef7;
  --ink-strong: #ffffff;
  --muted: #9aa6ba;
  --line: rgba(160, 190, 255, 0.14);
  --line-strong: rgba(200, 220, 255, 0.26);
  --cyan: #22d3ff;
  --cyan-soft: rgba(34, 211, 255, 0.16);
  --ember: #ff7a3d;

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

  --gutter: clamp(1.25rem, 0.6rem + 2.8vw, 4rem);
  --header-h: 4.75rem;
  --radius-card: 1rem;
  --radius-pill: 999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--ink-strong);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus-visible {
  transform: none;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: var(--header-h);
  padding: env(safe-area-inset-top) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-strong);
  text-decoration: none;
  min-height: 44px;
}
.brand__mark {
  width: 1.75rem;
  height: 1.75rem;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}
.nav-links a,
.link-quiet {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-links a:hover,
.link-quiet:hover {
  color: var(--ink-strong);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle {
  display: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 44px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, transform 0.25s var(--ease-out);
}

.btn--outline {
  padding: 0 1.15rem;
  border: 1px solid var(--line-strong);
  color: var(--ink-strong);
  font-size: 0.9375rem;
}
.btn--outline:hover {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.btn--primary {
  min-height: 3.25rem;
  padding: 0 1.6rem 0 1.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(9, 13, 22, 0.82);
  color: var(--ink-strong);
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(34, 211, 255, 0.06), 0 18px 40px -18px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn--primary:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(34, 211, 255, 0.4), 0 0 32px -4px rgba(34, 211, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.btn--primary:active {
  transform: translateY(1px);
}
.btn--primary .icon {
  transition: transform 0.3s var(--ease-out);
}
.btn--primary:hover .icon {
  transform: translate(2px, -2px);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: max(100svh, 46rem);
  overflow: hidden;
  background:
    radial-gradient(ellipse 46% 52% at 50% 58%, rgba(34, 140, 255, 0.13), transparent 70%),
    radial-gradient(ellipse 30% 26% at 50% 96%, rgba(255, 106, 43, 0.08), transparent 70%),
    var(--bg);
}

/* blueprint grid, faded toward the edges */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(120, 170, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 30%, transparent 85%);
}

/* bottom fade into the next section */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 18%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg) 92%);
}

.hero__stage {
  position: absolute;
  inset: 0;
}

.wordmark {
  position: absolute;
  inset: calc(var(--header-h) + 1.5vh) 0 auto;
  z-index: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 0.5rem + 10.4vw, 12.5rem);
  line-height: 0.98;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  pointer-events: none;
  user-select: none;
}
.wordmark__line {
  display: block;
  padding-left: 0.06em; /* optically re-centre the trailing letter-spacing */
  color: #cfd6e2;
  background: linear-gradient(180deg, #ffffff 0%, #dfe5ee 30%, #7d8698 50%, #c3cad6 62%, #4a5162 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 24px rgba(120, 170, 255, 0.12));
}

.robot {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.robot__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.robot__fallback {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 86%;
  width: auto;
  max-width: none;
  transform: translateX(-50%);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 50% 55% at 50% 50%, #000 60%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 55% at 50% 50%, #000 60%, transparent 100%);
}
.no-webgl .robot__fallback {
  display: block;
}

.hero__cta {
  position: absolute;
  left: 50%;
  bottom: clamp(2rem, 6vh, 4rem);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transform: translateX(-50%);
  width: max-content;
}
.hero__cta::before {
  content: "";
  position: absolute;
  inset: -2rem -4rem -2.25rem;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(5, 7, 13, 0.9), rgba(5, 7, 13, 0.72) 60%, transparent);
  pointer-events: none;
}
.hero__cta-note {
  margin: 0;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

.hero__copy {
  position: absolute;
  z-index: 4;
  left: max(var(--gutter), env(safe-area-inset-left));
  top: 52%;
  width: min(21rem, 28vw);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.lead {
  margin: 0 0 1.25rem;
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.coverage {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.coverage li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.coverage li::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--cyan);
  flex: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  color: var(--ink-strong);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s ease, gap 0.3s var(--ease-out);
}
.link-arrow:hover {
  border-color: var(--cyan);
  gap: 0.7rem;
}

/* ---------- Console card ---------- */

.console {
  position: absolute;
  z-index: 4;
  right: max(var(--gutter), env(safe-area-inset-right));
  top: 46%;
  width: min(20.5rem, 27vw);
  padding: 1.25rem 1.25rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(16, 23, 37, 0.78), rgba(8, 12, 20, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.console__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}
.console__title {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0.55rem;
  border: 1px solid rgba(34, 211, 255, 0.35);
  border-radius: var(--radius-pill);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: blink 2.4s ease-in-out infinite;
}

.console__metric {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.console__caption {
  margin: 0.2rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.spark {
  display: block;
  width: 100%;
  height: 3.5rem;
  margin-bottom: 0.9rem;
  overflow: visible;
}
.spark__line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw 2.2s 0.6s var(--ease-out) forwards;
}

.events {
  display: grid;
  border-top: 1px solid var(--line);
}
.event {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}
.event__name {
  color: var(--ink);
}
.event__state {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  white-space: nowrap;
  align-self: center;
}
.event__state--hot {
  color: #ff9a66;
}
.console__note {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ---------- Motion toggle ---------- */

.motion-toggle {
  position: absolute;
  z-index: 6;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: clamp(1.25rem, 4vh, 2.5rem);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(8, 12, 20, 0.7);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.motion-toggle:hover {
  color: var(--ink-strong);
  border-color: var(--line-strong);
}
.motion-toggle .icon--play,
.motion-toggle[aria-pressed="true"] .icon--pause {
  display: none;
}
.motion-toggle[aria-pressed="true"] .icon--play {
  display: block;
}

/* ---------- Entrance choreography (CSS only, content visible without JS) ---------- */

.wordmark__line,
.hero__copy,
.console,
.hero__cta,
.site-header {
  animation: rise 1.2s var(--ease-out) both;
}
.wordmark__line:nth-child(2) {
  animation-delay: 0.12s;
}
.hero__copy {
  animation-delay: 0.9s;
}
.console {
  animation-delay: 1.05s;
}
.hero__cta {
  animation-name: rise-centered;
  animation-delay: 1.3s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
@keyframes rise-centered {
  from {
    opacity: 0;
    transform: translate(-50%, 18px);
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

.motion-paused .status__dot,
.motion-paused .spark__line {
  animation-play-state: paused;
}

/* ---------- Tablet / mobile: stacked composition ---------- */

@media (max-width: 1080px) {
  .hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 5.5rem;
  }
  .hero::after {
    display: none;
  }
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 2.5rem;
    align-items: start;
    padding-inline: var(--gutter);
  }
  .hero__stage {
    position: relative;
    inset: auto;
    grid-column: 1 / -1;
    margin-inline: calc(var(--gutter) * -1);
    height: clamp(32rem, 150vw, 56rem);
  }
  /* the figure owns the stage; the CTA sits on its own band beneath it */
  .robot {
    inset: 0 0 5.75rem;
  }
  .robot__canvas {
    -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  }
  .hero__cta::before {
    display: none;
  }
  .wordmark {
    font-size: clamp(2.25rem, 0.2rem + 11.2vw, 7.5rem);
  }
  .hero__cta {
    bottom: 1.25rem;
  }
  .hero__copy,
  .console {
    position: relative;
    inset: auto;
    width: auto;
    margin-top: 2.5rem;
  }
  .motion-toggle {
    bottom: 1.25rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    padding: 0 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: rgba(8, 12, 20, 0.6);
    color: var(--ink-strong);
    font: 500 0.875rem/1 var(--font-body);
    cursor: pointer;
  }
  .nav-toggle__bars,
  .nav-toggle__bars::before {
    display: block;
    width: 16px;
    height: 1.5px;
    background: currentColor;
    position: relative;
    transition: transform 0.25s var(--ease-out);
  }
  .nav-toggle__bars {
    transform: translateY(-3px);
  }
  .nav-toggle__bars::before {
    content: "";
    position: absolute;
    top: 6px;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars {
    transform: translateY(0) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
    top: 0;
    transform: rotate(-90deg);
  }

  .nav-panel {
    position: absolute;
    top: calc(var(--header-h) - 0.25rem);
    right: var(--gutter);
    left: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: rgba(9, 13, 22, 0.96);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
  .nav-panel:not(.is-open) {
    display: none;
  }
  .nav-links {
    flex-direction: column;
  }
  .nav-links a {
    font-size: 1rem;
    color: var(--ink);
  }
  .nav-actions {
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 700px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .console {
    margin-top: 2rem;
  }
}

@media (max-width: 480px) {
  .hero__stage {
    height: clamp(32rem, 168vw, 44rem);
  }
  .btn--primary {
    min-height: 3rem;
    padding: 0 1.25rem 0 1.4rem;
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .spark__line {
    stroke-dashoffset: 0;
  }
}
