/* ==========================================================================
   TradeFleet Landing — "Mission Control"
   Standalone stylesheet (does not load style.css). Orbit DNA: phosphor
   cyan + amber on warm black, JetBrains Mono display, hairline grid.
   ========================================================================== */

:root {
  --void:        #050607;
  --hull:        #0b0d10;
  --deck:        #11141a;
  --line:        rgba(178, 180, 191, 0.10);
  --line-dim:    rgba(178, 180, 191, 0.06);
  --line-hot:    rgba(178, 180, 191, 0.22);
  --grid:        rgba(178, 180, 191, 0.045);

  --pale:        #e9ebf1;
  --ash:         #a7aab6;
  --dim:         #62656f;
  --faint:       #41434c;

  --cyan:        #5cf6ff;
  --cyan-soft:   rgba(92, 246, 255, 0.14);
  --cyan-ghost:  rgba(92, 246, 255, 0.05);
  --amber:       #ffb800;
  --green:       #6bff8e;
  --red:         #ff6b6b;

  --font-mono:   "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  --font-body:   "Manrope", -apple-system, system-ui, sans-serif;

  --pad-x:       clamp(20px, 5vw, 72px);
  --max:         1280px;
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--void);
  color: var(--pale);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--cyan); color: var(--void); }

/* Thin phosphor scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: #1c1f26; border: 2px solid var(--void); }
::-webkit-scrollbar-thumb:hover { background: rgba(92, 246, 255, 0.35); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--cyan); color: var(--void);
  font-family: var(--font-mono); font-size: 12px;
  padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Atmosphere: hairline grid + scanlines, fixed behind everything
   -------------------------------------------------------------------------- */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 88px 88px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 88px 88px;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, black 30%, transparent 90%);
}
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.012) 0 1px,
    transparent 1px 3px
  );
}

/* --------------------------------------------------------------------------
   Three.js scene (fixed hero backdrop)
   -------------------------------------------------------------------------- */
.scene {
  position: fixed; inset: 0;
  z-index: 0;
  overflow: hidden;
}
#fleet-canvas { width: 100%; height: 100%; display: block; }
.scene-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, transparent 35%, var(--void) 95%),
    linear-gradient(180deg, rgba(5, 6, 7, 0.35) 0%, transparent 28%, transparent 70%, var(--void) 100%);
}
/* Reduced-motion / no-WebGL fallback: static phosphor glow */
.no-webgl .scene, .reduced-motion .scene {
  background:
    radial-gradient(ellipse 55% 45% at 68% 42%, rgba(92, 246, 255, 0.10), transparent 65%),
    radial-gradient(ellipse 40% 35% at 30% 70%, rgba(255, 184, 0, 0.05), transparent 70%);
}
.no-webgl #fleet-canvas, .reduced-motion #fleet-canvas { display: none; }

/* --------------------------------------------------------------------------
   HUD frame (decorative corners + readouts)
   -------------------------------------------------------------------------- */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 6; }
.hud-corner {
  position: fixed; width: 22px; height: 22px;
  border: 1px solid rgba(92, 246, 255, 0.35);
}
.hud-tl { top: 14px; left: 14px;  border-right: 0; border-bottom: 0; }
.hud-tr { top: 14px; right: 14px; border-left: 0;  border-bottom: 0; }
.hud-bl { bottom: 14px; left: 14px;  border-right: 0; border-top: 0; }
.hud-br { bottom: 14px; right: 14px; border-left: 0;  border-top: 0; }
.hud-read {
  position: fixed; bottom: 18px;
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.18em;
  color: var(--faint);
}
.hud-read-l { left: 48px; }
.hud-read-r { right: 48px; }
@media (max-width: 860px) {
  .hud-read { display: none; }
  .hud-corner { width: 14px; height: 14px; }
}

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad-x);
  background: linear-gradient(180deg, rgba(5, 6, 7, 0.82), rgba(5, 6, 7, 0));
}
.nav-brand {
  display: inline-flex; align-items: baseline; gap: 10px;
  text-decoration: none; color: var(--pale);
  font-family: var(--font-mono);
}
.nav-mark {
  width: 11px; height: 11px;
  border: 1px solid var(--cyan);
  display: inline-block; position: relative;
  align-self: center;
}
.nav-mark span {
  position: absolute; inset: 2px;
  background: var(--cyan);
  animation: mark-pulse 2.4s ease-in-out infinite;
}
@keyframes mark-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.nav-name { font-weight: 700; font-size: 15px; letter-spacing: 0.04em; }
.nav-tag { font-size: 10px; letter-spacing: 0.22em; color: var(--dim); }
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-status {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.18em; color: var(--dim);
  display: inline-flex; align-items: center; gap: 7px;
}
.nav-status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: mark-pulse 2s ease-in-out infinite;
}
@media (max-width: 640px) { .nav-status { display: none; } }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none;
  padding: 13px 26px;
  border: 1px solid transparent;
  transition: all 0.22s var(--ease-out);
  white-space: nowrap;
}
.btn-arrow { transition: transform 0.22s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(4px); }

.btn-solid {
  background: var(--cyan); color: var(--void);
  border-color: var(--cyan);
  box-shadow: 0 0 0 rgba(92, 246, 255, 0);
}
.btn-solid:hover {
  background: #9af8ff; border-color: #9af8ff;
  box-shadow: 0 0 34px rgba(92, 246, 255, 0.35);
}
.btn-line {
  color: var(--pale);
  border-color: var(--line-hot);
  background: rgba(11, 13, 16, 0.4);
}
.btn-line:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-ghost {
  color: var(--pale);
  border-color: var(--line-hot);
  padding: 9px 18px;
  font-size: 11px;
  background: rgba(5, 6, 7, 0.5);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-xl { padding: 18px 40px; font-size: 14px; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative; z-index: 4;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad-x) 80px;
}
.hero-inner { max-width: var(--max); margin: 0 auto; width: 100%; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.2vw, 12px);
  letter-spacing: 0.3em;
  color: var(--cyan);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: clamp(18px, 3vh, 30px);
}
.eyebrow-tick {
  width: 34px; height: 1px; background: var(--cyan);
  display: inline-block;
}

.hero-title {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(34px, 9.5vw, 128px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin-bottom: clamp(22px, 3.5vh, 38px);
}
.line-mask { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.line { display: inline-block; will-change: transform; }
.line-accent {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--cyan);
  text-shadow: 0 0 60px rgba(92, 246, 255, 0.35);
}
.caret {
  display: inline-block;
  width: 0.55em; height: 0.82em;
  margin-left: 0.12em;
  background: var(--cyan);
  vertical-align: baseline;
  transform: translateY(0.08em);
  animation: caret-blink 1.1s steps(1) infinite;
  box-shadow: 0 0 24px rgba(92, 246, 255, 0.6);
}
@keyframes caret-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

.hero-sub {
  max-width: 560px;
  font-size: clamp(15px, 1.6vw, 17.5px);
  font-weight: 400;
  color: var(--ash);
  margin-bottom: clamp(28px, 4.5vh, 44px);
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-scroll-label {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.34em;
  color: var(--dim);
}
.hero-scroll-line {
  width: 1px; height: 44px;
  background: linear-gradient(180deg, var(--cyan), transparent);
  animation: scroll-pulse 2s var(--ease-out) infinite;
  transform-origin: top;
}
@keyframes scroll-pulse {
  0% { transform: scaleY(0); opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(18px); opacity: 0; }
}

/* --------------------------------------------------------------------------
   Ticker
   -------------------------------------------------------------------------- */
.ticker {
  position: relative; z-index: 4;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 16, 0.72);
  backdrop-filter: blur(8px);
  overflow: hidden;
  padding: 15px 0;
}
.ticker-track { display: flex; width: max-content; animation: ticker-roll 36s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-set {
  display: flex; align-items: center; gap: 34px;
  padding-right: 34px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.26em;
  color: var(--ash);
  white-space: nowrap;
}
.tick-sep { color: var(--cyan); font-size: 7px; }
@keyframes ticker-roll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Sections (shared)
   -------------------------------------------------------------------------- */
.section {
  position: relative; z-index: 4;
  padding: clamp(90px, 13vh, 150px) var(--pad-x);
  max-width: calc(var(--max) + 2 * 72px);
  margin: 0 auto;
}
/* solid backing so the fixed canvas doesn't bleed through content sections */
main > .section, .footer { background: var(--void); }
#how { background: linear-gradient(180deg, transparent, var(--void) 140px); }

.section-head { margin-bottom: clamp(44px, 7vh, 72px); max-width: 880px; }
.section-label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.3em;
  color: var(--cyan);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.label-rule { width: 34px; height: 1px; background: var(--cyan); display: inline-block; }
.section-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(26px, 4.4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}
.section-title-xl { font-size: clamp(34px, 6.5vw, 84px); }
.section-desc {
  margin-top: 22px;
  max-width: 600px;
  color: var(--ash);
  font-size: clamp(15px, 1.5vw, 17px);
}

/* --------------------------------------------------------------------------
   Steps
   -------------------------------------------------------------------------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.step {
  position: relative;
  background: var(--hull);
  padding: clamp(28px, 3.4vw, 44px);
  overflow: hidden;
  transition: background 0.3s var(--ease-out);
}
.step:hover { background: var(--deck); }
.step-num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(64px, 7.5vw, 110px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(92, 246, 255, 0.28);
  display: block;
  margin-bottom: 26px;
  transition: -webkit-text-stroke-color 0.3s;
}
.step:hover .step-num { -webkit-text-stroke-color: rgba(92, 246, 255, 0.7); }
.step-body h3 {
  font-family: var(--font-mono);
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--pale);
  margin-bottom: 12px;
}
.step-body p { color: var(--ash); font-size: 14.5px; }
.step-wire {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}
.step:hover .step-wire { transform: scaleX(1); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Capabilities grid
   -------------------------------------------------------------------------- */
.caps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.cap {
  position: relative;
  background: var(--hull);
  padding: clamp(26px, 3vw, 38px);
  min-height: 218px;
  transition: background 0.3s var(--ease-out);
}
.cap::before, .cap::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out);
  pointer-events: none;
}
.cap::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.cap::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.cap:hover { background: var(--deck); }
.cap:hover::before, .cap:hover::after { border-color: var(--cyan); }
.cap-idx {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.2em;
  color: var(--faint);
  display: block; margin-bottom: 22px;
  transition: color 0.3s;
}
.cap:hover .cap-idx { color: var(--cyan); }
.cap h3 {
  font-family: var(--font-mono);
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 12px;
}
.cap p { color: var(--ash); font-size: 14px; }
@media (max-width: 1020px) { .caps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .caps-grid { grid-template-columns: 1fr; } .cap { min-height: 0; } }

/* --------------------------------------------------------------------------
   Security
   -------------------------------------------------------------------------- */
.section-security {
  border-top: 1px solid var(--line-dim);
  border-bottom: 1px solid var(--line-dim);
}
.section-security .section-title-xl {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--pale);
}
.section-security .section-title-xl::selection { -webkit-text-stroke-color: var(--void); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 56px;
}
.stat {
  background: var(--hull);
  padding: clamp(22px, 2.6vw, 34px);
  display: flex; flex-direction: column; gap: 8px;
}
.stat-num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1;
  color: var(--cyan);
  text-shadow: 0 0 30px rgba(92, 246, 255, 0.3);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.invariants {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 40px;
  max-width: 980px;
}
.invariants li {
  display: flex; gap: 14px; align-items: baseline;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ash);
  padding: 14px 0;
  border-bottom: 1px solid var(--line-dim);
}
.inv-mark { color: var(--green); flex: none; }
@media (max-width: 760px) { .invariants { grid-template-columns: 1fr; gap: 0; } }

/* --------------------------------------------------------------------------
   Terminal
   -------------------------------------------------------------------------- */
.term {
  border: 1px solid var(--line-hot);
  background: rgba(8, 9, 11, 0.92);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(92, 246, 255, 0.05);
  max-width: 960px;
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--hull);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-dot-r { background: #3a3d45; }
.term-dot-y { background: #3a3d45; }
.term-dot-g { background: var(--green); box-shadow: 0 0 8px rgba(107, 255, 142, 0.6); }
.term-name {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em;
  color: var(--dim);
}
.term-screen {
  font-family: var(--font-mono);
  font-size: clamp(10.5px, 1.4vw, 13px);
  line-height: 1.75;
  padding: clamp(16px, 2.4vw, 28px);
  min-height: 330px;
  white-space: pre;
  overflow-x: auto;
  color: var(--ash);
}
.term-screen .t-cmd { color: var(--pale); font-weight: 600; }
.term-screen .t-prompt { color: var(--cyan); }
.term-screen .t-head { color: var(--dim); }
.term-screen .t-green { color: var(--green); }
.term-screen .t-cyan { color: var(--cyan); }
.term-screen .t-amber { color: var(--amber); }
.term-cursor {
  display: inline-block;
  width: 7px; height: 14px;
  background: var(--cyan);
  vertical-align: -2px;
  animation: caret-blink 1s steps(1) infinite;
}

/* --------------------------------------------------------------------------
   CTA
   -------------------------------------------------------------------------- */
.section-cta {
  text-align: center;
  padding-top: clamp(110px, 16vh, 180px);
  padding-bottom: clamp(110px, 16vh, 180px);
}
.cta-title {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(40px, 8vw, 104px);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: clamp(30px, 5vh, 48px);
  background: linear-gradient(120deg, var(--pale) 30%, var(--cyan) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cta-note {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.1em;
  color: var(--dim);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  position: relative; z-index: 4;
  border-top: 1px solid var(--line);
  padding: 26px var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.footer-left { display: flex; align-items: baseline; gap: 14px; }
.footer-brand {
  font-family: var(--font-mono);
  font-weight: 700; font-size: 13px; letter-spacing: 0.05em;
}
.footer-line {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--dim); letter-spacing: 0.06em;
}
.lang-switcher { display: flex; gap: 4px; }
.lang-switcher a {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.1em;
  color: var(--dim);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.lang-switcher a:hover { color: var(--pale); }
.lang-switcher a.active { color: var(--cyan); border-color: var(--line-hot); }

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ticker-track { animation: none; transform: none; }
}
