/* ============================================================
   Next Move — public site prototype
   Navy + one mint accent, flat surfaces, hairlines. The HUD texture is
   allowed here (Tier B) but stays quiet: no gradients, no glow on content,
   no glassmorphism, no bento grid.

   Load order matters: the finished homepage is the DEFAULT state. The intro
   overlay only becomes visible when JavaScript adds .intro-armed to <html>,
   so with JS off — or with reduced motion — this file already renders the
   correct, complete page.
   ============================================================ */

:root {
  --navy: #1a1a2e;
  --navy-2: #16213e;
  --mint: #00c896;
  --text: #e8eef2;
  --muted: #8a94a6;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --mint-tint: rgba(0, 200, 150, 0.08);
  --mint-line: rgba(0, 200, 150, 0.28);

  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;

  --measure: 62ch;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--mint); }

/* The plexus canvas sits behind everything, all the way down the page. */
#plexus {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#page {
  position: relative;
  z-index: 1;
}

/* ---------- nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
#nav-logo {
  display: block;
  width: 190px;
  color: var(--mint);
}
#nav-logo svg { display: block; width: 100%; height: auto; }
.nav-links {
  display: flex;
  gap: 22px;
  font-size: 0.875rem;
  color: var(--muted);
}
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--text); }

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
  border-bottom: 1px solid var(--line);
}

/* ---------- hero ---------- */
.hero {
  padding: 120px 0 104px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint);
  margin: 0 0 20px;
}
h1 {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 4rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 20ch;
  text-wrap: balance;
}
.hero-sub {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--muted);
  margin: 24px 0 0;
  max-width: var(--measure);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--mint);
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms var(--ease);
}
.btn:active { transform: scale(0.985); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

/* ---------- statement band ---------- */
.statement p {
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem);
  line-height: 1.3;
  font-weight: 600;
  margin: 0;
  max-width: 26ch;
  text-wrap: balance;
}
.statement .kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint);
  margin: 0 0 18px;
  font-weight: 400;
}

/* ---------- domains ---------- */
.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 28px;
}
.domains {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.domain {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.9375rem;
  color: var(--text);
}
.domain::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  flex: none;
}
.domains-note {
  color: var(--muted);
  max-width: var(--measure);
  margin: 0;
}

/* ---------- CTA ---------- */
.cta-panel {
  border: 1px solid var(--mint-line);
  background: var(--mint-tint);
  border-radius: 16px;
  padding: 44px 40px;
}
.cta-panel p {
  font-size: 1.125rem;
  margin: 0 0 28px;
  max-width: 52ch;
}

/* ---------- footer ---------- */
.foot {
  padding: 40px 0 72px;
  color: var(--muted);
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* ============================================================
   INTRO OVERLAY — hidden unless JS arms it
   ============================================================ */
#intro { display: none; }

html.intro-armed #intro {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 50;
  /* Transparent on purpose: the plexus canvas sits at z-index 0 and has to be
     visible THROUGH the overlay during the intro — it is the effect. The body
     is already navy, so the screen still starts as a solid navy field. */
  background: transparent;
}
/* While the intro is armed the page underneath starts hidden. GSAP fades it
   in during the takeover beat. */
html.intro-armed #page { opacity: 0; }

.intro-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

#intro-logo {
  width: min(64vw, 720px);
  color: var(--mint);
  will-change: transform;
}
/* Held back until the timeline has applied the pre-draw state and reveals it,
   so the finished mark is never painted for a frame before it draws itself. */
html.intro-armed #intro-logo { visibility: hidden; }
#intro-logo svg { display: block; width: 100%; height: auto; }

/* ---------- HUD ---------- */
#hud {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--mint);
}
/* Faint grid: a CSS background, so it costs nothing per frame. */
#hud::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 200, 150, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 200, 150, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
}
.hud-corner {
  position: absolute;
  display: flex;
  gap: 14px;
  opacity: 0.85;
}
.hud-tl { top: 22px; left: 24px; }
.hud-tr { top: 22px; right: 24px; }
.hud-bl { bottom: 22px; left: 24px; }
.hud-br { bottom: 22px; right: 24px; flex-direction: column; align-items: flex-end; }
.hud-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 78vmin;
  height: 78vmin;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 200, 150, 0.16);
}
.hud-crosshair::before,
.hud-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(0, 200, 150, 0.16);
}
.hud-crosshair::before { left: 0; right: 0; top: 50%; height: 1px; }
.hud-crosshair::after { top: 0; bottom: 0; left: 50%; width: 1px; }

#terminal {
  position: absolute;
  bottom: 22px;
  left: 24px;
  white-space: pre;
  line-height: 1.6;
  opacity: 0.9;
}
#terminal::after {
  content: '_';
  animation: nm-blink 1s steps(1) infinite;
}
@keyframes nm-blink { 50% { opacity: 0; } }

#skip {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 2;
  pointer-events: auto;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
#skip:hover { color: var(--text); }
html:not(.intro-armed) #skip { display: none; }

/* ---------- the glitch burst ---------- */
/* Slice bands + an RGB split, driven entirely by CSS transforms and
   clip-path. Short on purpose (about a third of a second) and never a
   full-screen strobe. */
.is-glitching { animation: nm-glitch 0.35s steps(2) 1; }
.is-glitching::before,
.is-glitching::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
@keyframes nm-glitch {
  0%   { transform: translate(0, 0); filter: none; clip-path: inset(0 0 0 0); }
  15%  { transform: translate(-6px, 0); filter: drop-shadow(3px 0 0 #ff3b6b) drop-shadow(-3px 0 0 #29d8ff); clip-path: inset(12% 0 58% 0); }
  30%  { transform: translate(5px, 0); filter: drop-shadow(-4px 0 0 #ff3b6b) drop-shadow(4px 0 0 #29d8ff); clip-path: inset(62% 0 14% 0); }
  45%  { transform: translate(-3px, 1px); filter: drop-shadow(2px 0 0 #29d8ff); clip-path: inset(38% 0 40% 0); }
  60%  { transform: translate(4px, -1px); filter: drop-shadow(-2px 0 0 #ff3b6b); clip-path: inset(0 0 76% 0); }
  75%  { transform: translate(-2px, 0); filter: none; clip-path: inset(70% 0 6% 0); }
  100% { transform: translate(0, 0); filter: none; clip-path: inset(0 0 0 0); }
}

/* ============================================================
   ACCESSIBILITY FLOOR — reduced motion means a still page.
   No intro, no canvas, no transitions. This is not negotiable.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html.intro-armed #intro { display: none !important; }
  html.intro-armed #page { opacity: 1 !important; }
  #plexus { display: none !important; }
  #nav-logo { opacity: 1 !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .hero { padding: 72px 0 64px; }
  .section { padding: 64px 0; }
  .nav-links { display: none; }
  #nav-logo { width: 150px; }
  #intro-logo { width: 84vw; }
  .cta-panel { padding: 32px 24px; }
  .hud-corner { font-size: 0.625rem; }
  .hud-tr { display: none; }
}
