/* EBA — Design Tokens
   Corporate trustworthy palette with brand pops.
   Brand lifted from logo: red, maroon, teal.
   Dark accent palette (--nx-*) is reserved for an unused dark surface.
*/

:root {
  /* Neutrals — warm off-whites & rich blacks */
  --bg: #FAFAF7;
  --bg-sub: #F3F2ED;
  --bg-card: #FFFFFF;
  --line: #E6E4DC;
  --line-strong: #D4D1C6;
  --ink: #0E0E0C;
  --ink-2: #2A2A27;
  --ink-3: #5B5A53;
  --ink-4: #8A8880;

  /* Brand — from logo */
  --brand-red: #D0312D;
  --brand-red-deep: #B1231F;
  --brand-maroon: #6B1F2F;
  --brand-maroon-deep: #4E1421;
  --brand-teal: #2AA3A8;
  --brand-teal-deep: #1F7F83;
  --brand-teal-soft: #E4F5F5;

  /* Dark accent palette (reserved) */
  --nx-bg: #05121A;
  --nx-bg-2: #0A1E29;
  --nx-panel: #0D2634;
  --nx-line: #123445;
  --nx-cyan: #2DE6F2;
  --nx-cyan-dim: #1A9DA6;
  --nx-cyan-glow: rgba(45, 230, 242, 0.35);
  --nx-amber: #FFB547;
  --nx-red: #FF5B5B;
  --nx-green: #5BFFB0;
  --nx-ink: #C9E8EE;
  --nx-ink-dim: #6A8995;

  /* Type */
  --font-display: "Fraunces", "Times New Roman", serif; /* editorial */
  --font-cockpit: "Orbitron", "Inter Tight", sans-serif; /* dashboard inset only */
  --font-sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Radii & shadow */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --shadow-1: 0 1px 2px rgba(14,14,12,0.04), 0 2px 8px rgba(14,14,12,0.04);
  --shadow-2: 0 8px 32px rgba(14,14,12,0.08);

  /* Layout */
  --max-w: 1360px;
  --gutter: clamp(20px, 3vw, 48px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ─── Utility ─── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow .dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--brand-teal); border-radius: 50%;
  margin-right: 10px; vertical-align: middle;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

.display-xl {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 140px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 400;
}
.display-l { font-size: clamp(44px, 6vw, 84px); line-height: 1; letter-spacing: -0.03em; }
.display-m { font-size: clamp(32px, 4vw, 56px); line-height: 1.05; letter-spacing: -0.025em; }
.display-s { font-size: clamp(24px, 2.4vw, 34px); line-height: 1.15; letter-spacing: -0.02em; }

p { margin: 0; }
.body-l { font-size: 19px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.body-m { font-size: 16px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.body-s { font-size: 14px; line-height: 1.5; color: var(--ink-3); }

.italic-accent {
  font-style: italic;
  color: var(--brand-maroon);
}
.teal-underline {
  background-image: linear-gradient(var(--brand-teal), var(--brand-teal));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 14%;
  padding: 0 2px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 6px;
  transition: all 0.25s var(--ease-out);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: #1F1F1C;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -14px rgba(14,14,12,0.4);
}
.btn-primary .arr { transition: transform .3s var(--ease-out); }
.btn-primary:hover .arr { transform: translate(3px, -3px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-accent {
  background: var(--brand-teal);
  color: #fff;
}
.btn-accent:hover { background: var(--brand-teal-deep); }

/* ─── Navigation ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  transition: background .3s var(--ease-out), border-color .3s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 500;
}
.nav-logo svg { width: 28px; height: 28px; }
.nav-links {
  display: flex; gap: 32px;
  font-size: 14px;
}
.nav-links a {
  position: relative;
  color: var(--ink-2);
  transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0; right: 0; height: 1px;
  background: var(--brand-teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta .btn { padding: 10px 18px; font-size: 13px; border-radius: 999px; }

@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* ─── Footer ─── */
.footer {
  background: var(--ink);
  color: #B5B3A9;
  padding: 100px var(--gutter) 48px;
  margin-top: 0;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid #2A2A27;
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #6A685F; font-weight: 500;
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  padding: 6px 0;
  color: #B5B3A9;
  font-size: 14px;
  transition: color .2s;
}
.footer-col a:hover { color: var(--brand-teal); }
.footer-brand p {
  color: #8A8880;
  font-size: 15px;
  max-width: 360px;
  margin-top: 16px;
}
.footer-bottom {
  display: flex; justify-content: space-between;
  align-items: center; padding-top: 32px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #6A685F;
}
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* ─── Page wrapper ─── */
main { padding-top: 80px; }
/* W1L.6d: home owns its own nav clearance via .hero padding-top — drop the
   double-stacked main padding so the eyebrow/H1 sits closer to the nav. */
body[data-hero] main { padding-top: 0; }

/* ─── Section ─── */
section { padding: clamp(80px, 12vw, 160px) 0; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  margin-bottom: 80px;
}
.section-head .eyebrow { padding-top: 14px; }
@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
}

/* ─── Reveal on scroll ─── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1 !important;
  transform: none !important;
}
/* Failsafe: if JS hasn't run by the time the page is interactive, show everything anyway */
html.no-js .reveal,
html.reveal-bypass .reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .ticker-track, .pill.pill-live .dot, .nx-feed, .nx-bar { animation: none !important; }
  * { scroll-behavior: auto !important; }
}

/* Tabular number helper */
.tabular { font-variant-numeric: tabular-nums; }

/* ─── Ticker / marquee ─── */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 28px 0;
  background: var(--bg-sub);
}
.ticker-track {
  display: flex; gap: 64px;
  animation: scroll 40s linear infinite;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
}
.ticker-track span { display: inline-flex; align-items: center; gap: 64px; }
/* Stray decorative dots removed — keep ticker a clean stream of text */
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ─── Pill tag ─── */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
  background: var(--bg-card);
}
.pill .dot { width: 6px; height: 6px; background: var(--brand-teal); border-radius: 50%; }
.pill.pill-live .dot { animation: pulse 1.4s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.4); }
}

/* ─── Arrow icon (reusable) ─── */
.arrow-up-right {
  width: 12px; height: 12px;
  display: inline-block;
}

/* ─── Page title block (interior pages) ─── */
.page-hero {
  padding: 140px 0 80px;
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { margin-bottom: 32px; }
.page-hero h1 { margin-bottom: 24px; }
.page-hero p { max-width: 640px; font-size: 19px; color: var(--ink-2); line-height: 1.5; }

@media (max-width: 720px) {
  .page-hero { padding: 88px 0 48px; }
  .page-hero .eyebrow { margin-bottom: 20px; }
  .page-hero h1 { margin-bottom: 16px; }
}
