@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --navy: #14306b;
  --deep-sky: #081633;
  --horizon: #e8edf5;
  --white: #fcfdff;
  --aluminium: #8f9bb0;
  --ink: #0d1b38;
  --ink-soft: #4a5672;
  --nav-red: #ff453a;
  --nav-green: #30d158;

  --gutter: clamp(20px, 5vw, 64px);
  --measure: 34rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Archivo", system-ui, -apple-system, sans-serif;
  font-stretch: 100%;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2 {
  font-stretch: 125%;
  font-weight: 640;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--nav-green);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px var(--gutter);
  color: var(--white);
  transition: background-color 240ms ease, color 240ms ease;
}

.site-nav.is-light {
  color: var(--ink);
  background: rgba(252, 253, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 rgba(13, 27, 56, 0.06);
}

.wordmark {
  font-stretch: 125%;
  font-weight: 620;
  letter-spacing: -0.01em;
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-link {
  font-size: 0.9rem;
  text-decoration: none;
  opacity: 0.85;
}
.nav-link:hover { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  color: var(--white);
  background:
    radial-gradient(90% 60% at 50% 40%, #234a97 0%, transparent 62%),
    linear-gradient(180deg, var(--deep-sky) 0%, var(--navy) 70%, #1c3c7c 100%);
  overflow: hidden;
}

.hero-stage {
  position: relative;
  min-height: 58svh;
}

.stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-copy {
  text-align: center;
  padding: 0 var(--gutter) clamp(48px, 9svh, 104px);
}

.hero h1 {
  font-size: clamp(2.6rem, 9vw, 7.5rem);
}

.lede {
  margin: 0.9em auto 0;
  max-width: var(--measure);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: rgba(252, 253, 255, 0.78);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 2.2rem;
  font-size: 0.95rem;
  color: rgba(252, 253, 255, 0.9);
}

.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nav-green);
  box-shadow: 0 0 10px 2px rgba(48, 209, 88, 0.55);
  animation: blink 2.4s steps(1, end) infinite;
}

@keyframes blink {
  0%, 88% { opacity: 1; }
  89%, 100% { opacity: 0.15; }
}

/* ---------- Bench (robot arm) ---------- */
.bench {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  padding: clamp(64px, 9vw, 128px) var(--gutter) clamp(32px, 5vw, 72px);
  background: linear-gradient(180deg, var(--horizon) 0%, var(--white) 100%);
}

.bench-stage {
  position: relative;
  aspect-ratio: 6 / 5;
  max-height: 78svh;
  width: 100%;
}

.bench-copy {
  max-width: var(--measure);
}

.bench h2,
.contact h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin-bottom: 0.55em;
}

.bench p + p { margin-top: 1em; }
.bench p,
.contact p { color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact {
  padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(56px, 8vw, 96px);
  max-width: calc(var(--measure) + 2 * var(--gutter) + 12rem);
}

.button {
  display: inline-block;
  margin-top: 1.8rem;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  font-weight: 560;
  transition: background-color 160ms ease;
}
.button:hover { background: var(--deep-sky); }

address {
  margin-top: 2.4rem;
  font-style: normal;
  color: var(--aluminium);
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--horizon);
  color: var(--aluminium);
  font-size: 0.85rem;
}

/* ---------- Fallback when WebGL is unavailable ---------- */
.no-webgl .hero-stage { min-height: 18svh; }
.no-webgl .bench { grid-template-columns: 1fr; }
.no-webgl .bench-stage { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .bench {
    grid-template-columns: 1fr;
  }
  .bench-stage {
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .led { animation: none; }
  .button,
  .site-nav { transition: none; }
}
