/* ============================================
   ROOT — DARK (default)
   ============================================ */
:root {
  --bg:         #060606;
  --bg-alt:     #0a0a0a;
  --text:       #eceae4;
  --text-2:     #888880;
  --text-muted: #3a3a37;
  --border:     rgba(255, 255, 255, 0.06);
  --border-2:   rgba(255, 255, 255, 0.11);
  --nav-blur-bg: rgba(6, 6, 6, 0.88);
  --menu-bg:    rgba(6, 6, 6, 0.97);

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --nav-h:       72px;
  --pad-section: clamp(80px, 10vw, 140px);
  --pad-x:       clamp(24px, 5vw, 80px);
  --max-w:       1200px;
}

/* ============================================
   LIGHT MODE — Coinbase / Stripe inspired
   ============================================ */
html.light {
  --bg:         #faf8f5;
  --bg-alt:     #f2ede6;
  --text:       #1c1814;
  --text-2:     #56504a;
  --text-muted: #a09488;
  --border:     rgba(0, 0, 0, 0.07);
  --border-2:   rgba(0, 0, 0, 0.12);
  --nav-blur-bg: rgba(250, 248, 245, 0.93);
  --menu-bg:    rgba(250, 248, 245, 0.98);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ============================================
   UTILITIES
   ============================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ============================================
   FADE-UP
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.hero__headline.fade-up { transition-delay: 0.1s; }
.hero__sub.fade-up      { transition-delay: 0.22s; }
.hero__scroll.fade-up   { transition-delay: 0.34s; }

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}
.nav.scrolled {
  background: var(--nav-blur-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: var(--border);
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.3s ease;
}
.nav__links {
  list-style: none;
  display: flex;
  gap: 40px;
  align-items: center;
}
.nav__links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__cta {
  color: var(--text) !important;
  border: 1px solid var(--border-2) !important;
  padding: 8px 20px !important;
  border-radius: 2px;
  transition: background 0.2s ease, border-color 0.2s ease !important;
}
.nav__cta:hover { background: rgba(128,128,128,0.06) !important; }

/* NAV ACTIONS (theme toggle + hamburger) */
.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* THEME TOGGLE */
.nav__theme {
  background: none;
  border: 1px solid var(--border-2);
  border-radius: 2px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-2);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}
.nav__theme:hover {
  color: var(--text);
  background: rgba(128, 128, 128, 0.08);
}

/* Show sun in dark, moon in light */
.icon-moon { display: none; }
html.light .icon-sun  { display: none; }
html.light .icon-moon { display: block; }

/* HAMBURGER */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text-2);
  transition: transform 0.25s ease;
}
.nav__hamburger.open span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__hamburger.open span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 190;
  background: var(--menu-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 32px var(--pad-x) 40px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.mobile-menu.open { opacity: 1; transform: translateY(0); pointer-events: all; }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 28px; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s ease;
}
.mobile-menu a:hover { color: var(--text); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Dark hero ambient glow + grid */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transition: background 0.3s ease;
  background:
    radial-gradient(ellipse 70% 60% at 15% 55%, rgba(80, 80, 220, 0.04) 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 85% 25%, rgba(190, 240, 60, 0.02) 0%, transparent 65%);
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 50%, black 20%, transparent 100%);
  opacity: 0.35;
  transition: opacity 0.3s ease;
}

/* Light hero: Stripe-style colorful gradient */
html.light .hero__bg {
  background:
    radial-gradient(ellipse 80% 60% at 0% 50%,   rgba(99, 91, 255, 0.09) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 100% 20%,  rgba(0, 180, 216, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 100%,  rgba(16, 185, 129, 0.05) 0%, transparent 60%);
}
html.light .hero__bg::after {
  background-image:
    linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px);
  opacity: 0.5;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 40px) var(--pad-x) 120px;
  width: 100%;
}
.hero__label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text-2);
  text-transform: uppercase;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: color 0.3s ease;
}
.hero__label::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--text-muted);
  flex-shrink: 0;
}
.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7.5vw, 6.8rem);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.032em;
  color: var(--text);
  margin-bottom: 36px;
  max-width: 880px;
  transition: color 0.3s ease;
}
.hero__sub {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-weight: 300;
  color: var(--text-2);
  max-width: 580px;
  line-height: 1.8;
  margin-bottom: 64px;
  transition: color 0.3s ease;
}
.hero__scroll {
  display: flex;
  align-items: center;
  gap: 16px;
}
.hero__scroll span {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero__scroll-line {
  width: 44px;
  height: 1px;
  background: var(--text-muted);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--text-2);
  transform: translateX(-100%);
  animation: scanline 2.2s ease-in-out infinite;
}
@keyframes scanline {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* TICKER */
.hero__ticker {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  border-top: 1px solid var(--border);
  overflow: hidden;
  padding: 14px 0;
  transition: border-color 0.3s ease;
}
.hero__ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
}
.hero__ticker-track span {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #ffffff;
  padding: 0 22px;
  transition: color 0.3s ease;
}
html.light .hero__ticker-track span {
  color: var(--text-2);
}
.hero__ticker-track .sep { opacity: 0.25; padding: 0 2px; }
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.stats-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 36px 0;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 120px;
}
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
  transition: color 0.3s ease;
}
.stat__label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s ease;
}
.stat__divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 clamp(24px, 4vw, 60px);
  transition: background 0.3s ease;
}

/* Light mode: colorful stat values */
html.light .stat:nth-child(1) .stat__value { color: #1a56db; }
html.light .stat:nth-child(3) .stat__value { color: #0891b2; }
html.light .stat:nth-child(5) .stat__value { color: #7c3aed; }
html.light .stat:nth-child(7) .stat__value { color: #059669; }

/* ============================================
   DIVISION SECTIONS
   ============================================ */
.division {
  padding: var(--pad-section) 0;
  border-top: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.division--alt { background: var(--bg-alt); }

.division__inner {
  display: grid;
  grid-template-columns: 140px 1fr 320px;
  grid-template-areas: "meta content visual";
  gap: 48px;
  align-items: center;
}
.division__meta    { grid-area: meta; }
.division__content { grid-area: content; }
.division__visual  { grid-area: visual; }

.division__meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: start;
  padding-top: 6px;
  position: sticky;
  top: calc(var(--nav-h) + 32px);
}
.division__number {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color 0.3s ease;
}
.division__tag {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s ease;
}
.division__content { display: flex; flex-direction: column; align-self: center; }
.division__name {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 28px;
  transition: color 0.3s ease;
}
.division__headline {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.8vw, 2.6rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 28px;
  transition: color 0.3s ease;
}
.division__desc {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.85;
  transition: color 0.3s ease;
}

/* Light mode: per-section accent colors */
html.light #markets .division__number,
html.light #markets .division__tag { color: #16a34a; }

html.light #technologies .division__number,
html.light #technologies .division__tag { color: #0284c7; }

html.light #intelligence .division__number,
html.light #intelligence .division__tag { color: #d97706; }

/* Light mode: colored top border per section */
html.light #markets      { border-top-color: rgba(22, 163, 74, 0.25); }
html.light #technologies { border-top-color: rgba(2, 132, 199, 0.25); }
html.light #intelligence { border-top-color: rgba(217, 119, 6, 0.25); }

/* ============================================
   COMING SOON BADGE
   ============================================ */
.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 7px 16px;
  border: 1px solid var(--border-2);
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.coming-soon::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.3s ease;
}

/* ============================================
   SUB-PRODUCT BLOCK (Annotation)
   ============================================ */
.sub-product {
  margin-top: 36px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.3s ease, background 0.3s ease;
}
html.light .sub-product {
  background: rgba(0, 0, 0, 0.018);
}
.sub-product__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.sub-product__label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s ease;
}
.sub-product__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--border-2);
  border-radius: 20px;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sub-product__badge::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.sub-product__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 10px;
  transition: color 0.3s ease;
}
.sub-product__desc {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.75;
  transition: color 0.3s ease;
}

html.light #intelligence .sub-product { border-color: rgba(217, 119, 6, 0.15); }

/* ============================================
   VISUAL PANELS
   ============================================ */
.division__visual {
  border: 1px solid var(--border);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.012);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  aspect-ratio: 4 / 3;
  position: relative;
  align-self: center;
  transition: border-color 0.3s ease, background 0.3s ease;
}
html.light .division__visual { background: rgba(0, 0, 0, 0.02); }

/* Per-section border color in light mode */
html.light #markets      .division__visual { border-color: rgba(22, 163, 74, 0.25); }
html.light #technologies .division__visual { border-color: rgba(2, 132, 199, 0.25); }
html.light #intelligence .division__visual { border-color: rgba(217, 119, 6, 0.25); }

/* Shimmer */
.division__visual::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 35%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.018), transparent);
  pointer-events: none;
  z-index: 3;
  animation: shimmer 6s ease-in-out infinite;
}
html.light .division__visual::after {
  background: linear-gradient(to bottom, rgba(0,0,0,0.012), transparent);
}
@keyframes shimmer {
  0%   { transform: translateY(-100%); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(380%); opacity: 0; }
}

.visual__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 2;
  position: relative;
  transition: border-color 0.3s ease;
}
.visual__label {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s ease;
}
.visual__live {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(155, 235, 80, 0.65);
  animation: liveblink 2.5s ease-in-out infinite;
}
html.light .visual__live { color: rgba(22, 163, 74, 0.8); }
@keyframes liveblink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
.division__visual canvas {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: block;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 44px;
  transition: border-color 0.3s ease;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 64px;
  flex-wrap: wrap;
  gap: 40px;
}
.footer__logo {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text);
  margin-bottom: 10px;
  transition: color 0.3s ease;
}
.footer__tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}
.footer__email {
  font-size: 0.9rem;
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px solid var(--border-2);
  padding-bottom: 3px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer__email:hover { color: var(--text); border-color: var(--text-2); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.footer__bottom p { font-size: 0.76rem; color: var(--text-muted); }
.footer__nav { display: flex; gap: 24px; }
.footer__nav a {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer__nav a:hover { color: var(--text-2); }

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet landscape */
@media (max-width: 1000px) {
  .division__inner {
    grid-template-columns: 100px 1fr;
    grid-template-areas: "meta content" "visual visual";
    gap: 32px;
  }
  .division__visual { aspect-ratio: 16 / 6; align-self: auto; }
  .division__meta   { position: static; }
}

/* Tablet portrait / large phone */
@media (max-width: 768px) {
  :root {
    --pad-section: 64px;
    --nav-h: 64px;
  }

  /* Nav */
  .nav__links     { display: none; }
  .nav__hamburger { display: flex; }
  .nav__logo      { font-size: 1rem; letter-spacing: 0.14em; }

  /* Hero */
  .hero__content {
    padding-top: calc(var(--nav-h) + 32px);
    padding-bottom: 80px;
  }
  .hero__label   { margin-bottom: 24px; }
  .hero__headline {
    font-size: clamp(2.2rem, 9vw, 3.4rem);
    margin-bottom: 24px;
  }
  .hero__sub {
    font-size: 0.95rem;
    margin-bottom: 40px;
  }
  .hero__scroll  { display: none; }

  /* Ticker */
  .hero__ticker-track span { font-size: 0.72rem; padding: 0 16px; }

  /* Stats */
  .stats-bar__inner { padding: 28px 0; gap: 0; }
  .stat             { flex: 0 0 50%; padding: 16px 0; }
  .stat__value      { font-size: 1.8rem; }
  .stat__divider    { display: none; }

  /* Divisions */
  .division__inner {
    grid-template-columns: 1fr;
    grid-template-areas: "meta" "content" "visual";
    gap: 24px;
  }
  .division__meta {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .division__headline { font-size: 1.7rem; }
  .division__desc     { font-size: 0.95rem; }
  .division__visual   { aspect-ratio: 16 / 9; }

  /* Coming soon + sub-product */
  .coming-soon        { margin-top: 20px; }
  .sub-product        { padding: 18px 20px; margin-top: 24px; }

  /* Footer */
  .footer__inner  { flex-direction: column; gap: 28px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Small phones */
@media (max-width: 480px) {
  :root { --pad-section: 52px; }

  .nav__logo { font-size: 0.9rem; }

  .hero__headline { font-size: 2rem; }
  .hero__sub      { font-size: 0.9rem; }

  .stat           { flex: 0 0 50%; }
  .stat__value    { font-size: 1.5rem; }
  .stat__label    { font-size: 0.62rem; }

  .division__headline  { font-size: 1.5rem; }
  .division__visual    { aspect-ratio: 4 / 3; }

  .sub-product__desc  { font-size: 0.85rem; }
}

/* Very small phones (iPhone SE etc.) */
@media (max-width: 375px) {
  .hero__headline { font-size: 1.8rem; }
  .stat           { flex: 0 0 100%; }
}
