/* ============================================================
   HARNESS — styles.css
   AI-native autonomous logistics. Near-black canvas, signature
   cyan→blue→violet gradient, electric-lime action, hairline cards.
   See DESIGN.md for the full token system.
   ============================================================ */

:root {
  --canvas: #06070a;
  --canvas-soft: #0a0c12;
  --surface: #0c0e14;
  --surface-soft: #12151d;
  --surface-strong: #161a23;
  --ink: #f4f6fb;
  --body: #9aa3b2;
  --body-strong: #cdd3de;
  --mute: #5c6573;
  --mute-soft: #3a414f;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);

  --cyan: #2de2ff;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --gradient: linear-gradient(120deg, #2de2ff 0%, #3b82f6 50%, #8b5cf6 100%);

  --action: #c6ff3a;
  --action-active: #a8e62f;
  --on-action: #06070a;
  --signal: #ff5a1f;

  --gutter: clamp(24px, 6vw, 80px);
  --section-y: clamp(96px, 14vw, 192px);
  --r: 18px;

  --font-display: 'Geist Mono', 'Geist', ui-monospace, monospace;
  --font-body: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: var(--font-body);
  background: var(--canvas);
  color: var(--body);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--action); color: var(--on-action); }

main { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }

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

/* ---------- type primitives ---------- */
.eyebrow, .mono-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.mono-eyebrow { color: var(--mute); }
.mono-data { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em; color: var(--mute); }

.display-lg {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.display-xl {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4.4vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.lede { font-size: 20px; line-height: 1.55; color: var(--body); max-width: 68ch; margin-top: 20px; }

.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .2s cubic-bezier(.16,1,.3,1), background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn--lg { padding: 15px 28px; font-size: 16px; }
.btn--action { background: var(--action); color: var(--on-action); }
.btn--action:hover { background: var(--action-active); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--hairline-strong); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.btn--neolix {
  background: var(--gradient);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 10px 28px rgba(59, 130, 246, 0.38),
    0 2px 0 rgba(8, 10, 16, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  text-shadow: 0 1px 2px rgba(8, 10, 16, 0.35);
}
.btn--neolix:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 36px rgba(59, 130, 246, 0.5),
    0 3px 0 rgba(8, 10, 16, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 var(--gutter);
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(6, 7, 10, 0.7);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--hairline);
}
.nav__brand { display: inline-flex; align-items: center; gap: 10px; }
.wordmark { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.02em; color: var(--ink); }
.brandmark {
  width: 22px; height: 22px; border-radius: 6px;
  filter: drop-shadow(0 0 10px rgba(255, 138, 61, 0.35));
  object-fit: contain;
}
.nav__links { display: flex; gap: 28px; }
.nav__links a { font-size: 14px; color: var(--body); transition: color .2s; }
.nav__links a:hover { color: var(--ink); }
.nav__cta { display: flex; gap: 10px; align-items: center; }
.nav__cta .btn--ghost { padding: 9px 16px; font-size: 14px; }
.nav__cta .btn--action { padding: 9px 16px; font-size: 14px; }
.nav__cta .btn--neolix { padding: 11px 22px; font-size: 15px; font-weight: 600; }

/* ---------- hero ---------- */
.hero { position: relative; flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 68px 0 24px; overflow: hidden; }
.hero__glow {
  position: absolute; top: -20vh; left: 50%; transform: translateX(-50%);
  width: 120vw; height: 90vh; max-width: 1680px;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.22), rgba(139, 92, 246, 0.12) 40%, transparent 65%);
  filter: blur(20px); z-index: -1; pointer-events: none;
  animation: breathe 18s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { opacity: .8; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.08); } }
.hero__inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(40px, 6.5vw, 104px); line-height: 1.02; letter-spacing: -0.05em;
  color: var(--ink); margin: 22px 0 28px;
}
.hero__sub { font-size: 20px; line-height: 1.55; color: var(--body); max-width: 66ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero__readout { display: inline-flex; align-items: center; gap: 10px; margin-top: 56px; padding: 9px 14px; border: 1px solid var(--hairline); border-radius: 999px; background: rgba(255,255,255,0.02); }
.hero__readout .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--action); box-shadow: 0 0 10px var(--action); animation: pulse 1.6s ease-in-out infinite; }
.hero__tokens { display: flex; flex-direction: column; align-items: center; text-align: center; }
#token-counter {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: min(14vw, 38vh, 320px);
  letter-spacing: -0.02em;
  line-height: 1.0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #b8e8ff;
  background: none;
  -webkit-text-fill-color: #b8e8ff;
  text-shadow: 0 0 70px rgba(45, 226, 255, 0.28), 0 0 140px rgba(59, 130, 246, 0.12);
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* route-flow canvas behind hero / whole page */
#route-flow { position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .55; }

/* ---------- live token counter ---------- */
.tokens__num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(48px, 7vw, 96px); line-height: 1; letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tokens__label {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px; font-family: var(--font-mono); font-size: 13px;
  color: var(--mute); letter-spacing: 0.02em;
}
.tokens__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--action); box-shadow: 0 0 10px var(--action); animation: pulse 1.6s ease-in-out infinite; }
.tokens__sub {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: 13px; color: var(--mute); letter-spacing: 0.02em;
}
.tokens__sub b { color: var(--body-strong); font-weight: 600; font-variant-numeric: tabular-nums; }
.tokens__sub .sep { color: var(--mute-soft); }
.metric__num { font-family: var(--font-display); font-weight: 600; font-size: clamp(36px, 4.5vw, 60px); letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.metric__label { font-size: 13px; color: var(--mute); margin-top: 10px; letter-spacing: 0.01em; }

/* ---------- sections ---------- */
.section { padding: var(--section-y) 0; position: relative; }
.section--accent { background: var(--surface); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.section--soft { background: var(--canvas-soft); }
.section__head { max-width: 880px; margin-bottom: 72px; }
.section__head .display-lg { margin-top: 18px; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--surface-soft); border: 1px solid var(--hairline);
  border-radius: var(--r); padding: 36px 32px; transition: border-color .25s, transform .25s, background .25s;
}
.card:hover { border-color: var(--hairline-strong); transform: translateY(-4px); background: var(--surface-strong); }
.card__icon { font-family: var(--font-display); font-size: 26px; color: var(--cyan); margin-bottom: 18px; line-height: 1; }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 21px; color: var(--ink); letter-spacing: -0.015em; margin-bottom: 10px; }
.card p { font-size: 15px; color: var(--body); line-height: 1.55; }
.card__tag { display: inline-block; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--hairline); width: 100%; }

/* ---------- AI section ---------- */
.ai { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(48px, 7vw, 110px); align-items: center; }
.ai__list { list-style: none; margin-top: 36px; display: grid; gap: 18px; }
.ai__list li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: baseline; color: var(--body-strong); font-size: 16px; }
.ai__list li .mono-data { color: var(--cyan); }
.ai__viz { position: relative; aspect-ratio: 1; max-width: 520px; margin: 0 auto; display: grid; place-items: center; }
.viz-core { width: 90px; height: 90px; border-radius: 50%; background: var(--gradient); filter: blur(2px); box-shadow: 0 0 60px rgba(59,130,246,.5); animation: breathe 6s ease-in-out infinite; }
.viz-ring { position: absolute; border: 1px solid var(--hairline-strong); border-radius: 50%; }
.viz-ring--1 { width: 60%; height: 60%; animation: spin 22s linear infinite; border-top-color: var(--cyan); }
.viz-ring--2 { width: 80%; height: 80%; animation: spin 34s linear infinite reverse; border-right-color: var(--blue); }
.viz-ring--3 { width: 100%; height: 100%; animation: spin 48s linear infinite; border-left-color: var(--violet); }
@keyframes spin { to { transform: rotate(360deg); } }
.viz-label { position: absolute; bottom: -8px; }

/* ---------- pipeline ---------- */
.pipeline { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: pipe; }
.pipe { background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: var(--r); padding: 36px 30px; position: relative; }
.pipe::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--gradient); opacity: .5; border-radius: var(--r) var(--r) 0 0; }
.pipe__step { color: var(--cyan); display: block; margin-bottom: 18px; }
.pipe h3 { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 19px; letter-spacing: -0.015em; margin-bottom: 8px; }
.pipe p { font-size: 14px; color: var(--body); line-height: 1.55; }

/* ---------- impact ---------- */
.impact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.impact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.impact__stat { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r); padding: 28px; text-align: left; }
.impact__stat .metric__num { font-size: clamp(34px, 4vw, 48px); }
.impact__stat p { color: var(--mute); font-size: 14px; margin-top: 8px; }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; border-top: 1px solid var(--hairline); }
.cta__inner { position: relative; text-align: center; max-width: 920px; }
.cta__glow { position: absolute; top: -40%; left: 50%; transform: translateX(-50%); width: 120%; height: 120%; background: radial-gradient(ellipse at center, rgba(45,226,255,.16), rgba(139,92,246,.1) 45%, transparent 70%); z-index: -1; }
.cta .display-xl { margin: 18px 0 0; }
.cta .lede { margin-left: auto; margin-right: auto; }
.cta__form { display: flex; gap: 10px; max-width: 560px; margin: 36px auto 0; }
.cta__form input {
  flex: 1; background: var(--surface-soft); border: 1px solid var(--hairline-strong);
  border-radius: 999px; padding: 15px 22px; color: var(--ink); font-family: var(--font-body); font-size: 15px;
  outline: none; transition: border-color .2s;
}
.cta__form input:focus { border-color: var(--cyan); }
.cta__form input::placeholder { color: var(--mute); }
.cta__fine { margin-top: 18px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--hairline); padding: 64px 0 40px; background: var(--canvas); }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.footer__brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer__tag {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.5;
  color: var(--body-strong);
  max-width: 52ch;
}
.footer__tag .grad-text { font-weight: 600; }
.footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; justify-self: end; }
.footer__cols p { margin-bottom: 14px; }
.footer__cols a { display: block; color: var(--body); font-size: 14px; padding: 4px 0; transition: color .2s; }
.footer__cols a:hover { color: var(--ink); }
.footer__legal { grid-column: 1 / -1; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--hairline); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .cards { grid-template-columns: 1fr; }
  .ai { grid-template-columns: 1fr; }
  .ai__viz { order: -1; max-width: 300px; }
  .pipeline { grid-template-columns: 1fr; }
  .impact { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__cols { justify-self: start; }
  .cta__form { flex-direction: column; }
  .nav__cta .btn--ghost { display: none; }
}
@media (max-width: 520px) {
  .impact__grid { grid-template-columns: 1fr; }
  .nav__cta .btn--action { padding: 8px 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
