/* Viroan Home — production landing styles */

:root {
  --font-display: "Michroma", "Aceh", "Manrope", sans-serif;
  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

html, body { margin: 0; padding: 0; background: var(--bg-0); }
body {
  font-family: var(--font-sans);
  color: var(--fg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

/* Page wrapper — fills full viewport width. Inner containers cap content
   width via their own maxWidth: 1280 (set inline in section JSX). */
.vh-page { width: 100%; margin: 0 auto; }

/* Header */
.vh-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 56px;
  border-bottom: 1px solid var(--line);
  /* Hard-pin to the viewport. Using `fixed` instead of `sticky` because the
     ancestor chain (.vh-page has overflow-x: clip) would otherwise let the
     header scroll away in some browser/viewport combinations. The banner
     sits at top:0; header sits below it and we offset .vh-page with the
     combined banner+header height (CSS variable --header-offset). */
  position: fixed;
  top: var(--banner-h, 34px);
  left: 0;
  right: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg-0) 86%, transparent);
  backdrop-filter: blur(10px);
}
/* Push the page content down so the first hero/section isn't hidden under
   the fixed banner+header. Banner ≈ 34px, header ≈ 78px → 112px total.
   These are conservative values; if banner wraps to two lines on very
   narrow viewports we just lose a little vertical space, no overlap. */
.vh-page { padding-top: 112px; }
.vh-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 14px; letter-spacing: 0.18em; color: var(--fg-0);
  text-transform: uppercase;
}
.vh-nav { display: flex; gap: 32px; font-size: 13px; color: var(--fg-1); font-weight: 500; }
.vh-nav a { color: inherit; text-decoration: none; transition: color .15s; }
.vh-nav a:hover { color: var(--fg-0); }
.vh-header-right { display: flex; align-items: center; gap: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: all .15s;
}
.btn-primary {
  background: var(--accent); color: var(--bg-0);
  box-shadow: 0 0 0 0 var(--accent-soft);
}
.btn-primary:hover { box-shadow: 0 0 24px 0 var(--accent-soft); }
.btn-ghost {
  background: transparent; color: var(--fg-0);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--fg-1); background: var(--bg-1); }
.btn-sm { padding: 8px 14px; font-size: 11px; }

/* Eyebrow */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}

/* Display heading */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-transform: none;
}
.display-mega {
  font-size: clamp(28px, 3.2vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* Inline-style overrides — Michroma is wide, scale section H2s down. */
.section h2.display,
.section-tight h2.display,
.hero h2.display { font-size: clamp(22px, 2.2vw, 30px) !important; line-height: 1.2; letter-spacing: -0.01em; }
.section h3.display { font-size: clamp(16px, 1.4vw, 20px) !important; letter-spacing: 0; }
/* Hero claim */
.hero h1.display,
.hero h1.display.display-mega { font-size: clamp(28px, 3vw, 40px) !important; line-height: 1.2; letter-spacing: -0.01em; }
/* Big metric numbers in HomeMetrics / HomeHow */
.section .metric-num,
.section .step-num { font-size: clamp(36px, 3.8vw, 52px) !important; letter-spacing: -0.02em; }
/* Footer wordmark — Michroma is too dense for super-large; tame it */
.vh-wordmark { font-size: clamp(56px, 9vw, 130px) !important; letter-spacing: 0.04em; }

/* Section */
.section { padding: 120px 56px; position: relative; }
.section-tight { padding: 80px 56px; }
.section + .section, .section + .section-tight, .section-tight + .section {
  border-top: 1px solid var(--line);
}

/* Hero */
.hero {
  position: relative;
  padding: 80px 56px 120px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 0%, transparent 75%);
  opacity: 0.6;
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 80% 20%, var(--accent-soft), transparent 70%),
    radial-gradient(ellipse 60% 50% at 20% 80%, var(--accent-soft), transparent 70%);
}

/* Terminal-style elements */
.term-frame {
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 1px 0 0 rgba(255,255,255,0.04) inset,
    0 30px 80px rgba(0,0,0,0.5);
}
[data-theme="light"] .term-frame {
  box-shadow:
    0 1px 0 0 rgba(255,255,255,0.6) inset,
    0 20px 50px rgba(20,30,25,0.10);
}
.term-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.term-bar-dots { display: flex; gap: 6px; }
.term-bar-dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg-3);
}
.term-title {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3); letter-spacing: 0.08em;
}
.term-status {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent);
  display: flex; align-items: center; gap: 6px;
}
.term-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Stat strip */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-1);
}
.stat-cell {
  padding: 22px 24px;
  border-right: 1px solid var(--line);
}
.stat-cell:last-child { border-right: 0; }
.stat-label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-3); margin-bottom: 8px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 32px; line-height: 1;
  color: var(--fg-0);
}
.stat-value.accent { color: var(--accent); }
.stat-note {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-2); margin-top: 6px;
}

/* Scrolling ticker */
.ticker {
  display: flex; gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  overflow: hidden;
  position: relative;
}
.ticker-track {
  display: flex; gap: 48px;
  padding: 14px 0;
  animation: scroll 60s linear infinite;
  white-space: nowrap;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--fg-2);
  display: inline-flex; align-items: center; gap: 12px;
}
.ticker-item .pos { color: var(--accent); }
.ticker-item .neg { color: var(--danger); }
.ticker-item .lbl { color: var(--fg-3); }

/* Cards */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}
.card-hover { transition: border-color .2s, transform .2s; }
.card-hover:hover { border-color: var(--line-strong); }

/* Lang/theme toggles */
.lang-pill {
  display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-mono); font-size: 10px;
}
.lang-pill button {
  appearance: none; background: transparent; color: var(--fg-3);
  border: 0; padding: 5px 10px; border-radius: 999px;
  cursor: pointer; letter-spacing: 0.08em;
}
.lang-pill button.active { background: var(--bg-2); color: var(--fg-0); }

/* Theme toggle */
.theme-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: transparent;
  color: var(--fg-1); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Footer */
.vh-footer {
  border-top: 1px solid var(--line);
  padding: 80px 56px 32px;
  background: var(--bg-1);
}
.vh-footer-grid {
  display: grid;
  /* Logo column on the left + 5 link columns. The link-col count went
     from 4 to 5 when we split developers/copytraders into separate
     pages. Tightened the gap from 48 → 32 to keep all six cells in
     one row on standard 1440px desktops without forcing Company to
     wrap. */
  grid-template-columns: 1.3fr repeat(5, minmax(0, 1fr));
  gap: 32px 28px;
  margin-bottom: 64px;
}
/* At ~1280px and below the six-cell row gets cramped — promote the
   logo column to its own full-width row at the top, then lay the 5
   link columns out in a 3-col grid below it (Product/Marketplace/
   Developers on row one, Copytraders/Company on row two). */
@media (max-width: 1280px) {
  .vh-footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px 32px;
  }
  .vh-footer-grid > :first-child {
    grid-column: 1 / -1;
    margin-bottom: 8px;
  }
}
@media (max-width: 1100px) {
  /* Override the legacy 1.6fr 1fr 1fr 1fr rule that targeted the
     5-cell layout — at this width we now use the 1280px logo-on-top
     3-col layout. Keep the row-gap bump from the legacy rule. */
  .vh-footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 40px;
  }
}
.vh-footer h5 {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-3); margin: 0 0 18px;
  font-weight: 500;
}
.vh-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.vh-footer ul li { font-size: 13px; color: var(--fg-1); }
.vh-footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 48px; flex-wrap: wrap;
  padding-top: 28px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
}
.vh-footer-bottom > :first-child { max-width: 760px; }
.vh-footer-bottom > :last-child  { flex-shrink: 0; }

/* Social icon row in the footer brand block. Inline SVGs inherit colour
   via currentColor and lift to --fg-0 on hover. */
.vh-footer-social {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  color: var(--fg-3);
}
.vh-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  transition: color 0.15s ease, transform 0.15s ease;
}
.vh-footer-social a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}
.vh-footer-social svg { display: block; }

/* Big logo wordmark in footer */
.vh-wordmark {
  font-family: var(--font-display);
  font-size: clamp(80px, 14vw, 200px);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  letter-spacing: 0.02em;
  margin: 0 0 32px;
  user-select: none;
}

/* ── Partners marquee ─────────────────────── */
.partners-marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  padding: 28px 0;
  mask-image: linear-gradient(to right, transparent 0, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 8%, black 92%, transparent 100%);
}
.partners-track {
  display: flex;
  gap: 80px;
  width: max-content;
  animation: partners-scroll 40s linear infinite;
  will-change: transform;
}
.partners-item {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.18em;
  color: var(--fg-2);
  white-space: nowrap;
  text-transform: uppercase;
  flex-shrink: 0;
}
.partners-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}
@keyframes partners-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 40px)); }
}

/* ── Type defaults ────────────────────────── */
/* Section bodies should default to sans, never mono. Mono is only for
   terminal frames, code, tables and small all-caps labels. */
.display, h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 400; }
section p, section li, section span:not([class]) { font-family: var(--font-sans); }


/* ─── Partners marquee ─── */
.partners-marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  padding: 28px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.partners-track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: partners-scroll 50s linear infinite;
}
.partners-item {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-display);
  font-size: 28px; letter-spacing: 0.2em;
  color: var(--fg-2);
  white-space: nowrap;
}
.partners-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: 0.6;
}
@keyframes partners-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 32px)); }
}
.partners-marquee:hover .partners-track { animation-play-state: paused; }

/* ─── Type system overrides for landing ─── */
/* Use display/sans on prose. Mono is reserved for terminals, code,
   tables, kickers and metric labels. Override base.css. */
.eyebrow {
  font-family: var(--font-mono);   /* eyebrow stays mono — that's the kicker */
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
/* Body prose uses sans by default (already on body), nothing to override.
   Just make sure paragraphs inside sections don't pick up mono accidentally. */
.section p, .hero p { font-family: var(--font-sans); }

/* ─────────────────────────────────────────────
   ADDED: brand wordmark, header logo, modal,
   reveal-on-scroll animations, spark-draw cycle.
   ───────────────────────────────────────────── */

/* Use Inter for the VIROAN wordmark (header + footer). Inter is loaded from
   Google Fonts in HTML head. Falls back to system sans. */
.vh-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
  cursor: pointer;
}
.vh-wordmark-inline {
  font-family: "Inter", "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.18em;
  color: var(--fg-0);
  line-height: 1;
}

/* Hero responsive grid — switch to single column at narrow widths so the
   chart panel doesn't overflow. */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: start;
}
/* By default grid children have min-width: auto, which means children
   like H1 with long unbreakable words push the column wider than 1fr. We
   want columns to be allowed to shrink below content width, with text
   wrapping inside. */
.hero-grid > * { min-width: 0; }
.hero-grid h1 { overflow-wrap: anywhere; word-break: break-word; }
.hero-grid h1 > span { overflow-wrap: anywhere; word-break: break-word; }
.hero-grid p { overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 64px; }
  .hero-chart-wrap { margin-top: 24px; }
}

/* Hero chart container & floating cards extracted as classes to allow
   responsive tweaks without touching JS. */
.hero-chart-wrap {
  position: relative;
}
.hero-cert-badge {
  position: absolute; top: -20px; right: -16px;
  transform: rotate(6deg); z-index: 4;
  background: var(--bg-0);
  border: 1px solid var(--accent-line);
  border-radius: 12px; padding: 12px 16px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--accent);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 24px var(--accent-soft);
  display: flex; align-items: center; gap: 10px;
  letter-spacing: 0.1em;
}
.hero-risk-card {
  position: absolute; bottom: -28px; left: -32px;
  transform: rotate(-2.5deg); z-index: 4;
  background: var(--bg-0);
  border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 16px 18px;
  font-family: var(--font-mono); font-size: 10px;
  line-height: 1.7;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  min-width: 280px;
  transition: border-color .3s, box-shadow .3s;
}
.hero-risk-card.is-reject {
  border-color: var(--danger);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 18px rgba(255, 80, 90, 0.18);
}

/* Footer wordmark — stacked on a row with logo. Inter, big but contained. */
.vh-wordmark-row {
  display: flex; align-items: center; gap: 24px;
  margin: 0 0 40px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.vh-wordmark {
  font-family: "Inter", "Manrope", ui-sans-serif, system-ui, sans-serif !important;
  font-weight: 700;
  /* Sized to never overflow the page; the original Michroma version was
     ~clamp(80px, 14vw, 200px) which broke at narrow widths. */
  font-size: clamp(48px, 9vw, 110px) !important;
  line-height: 0.95 !important;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--accent-line);
  letter-spacing: 0.06em !important;
  margin: 0 !important;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}
[data-theme="light"] .vh-wordmark {
  -webkit-text-stroke: 1.4px var(--accent-line);
}

/* ─── Reveal-on-scroll fade-up ───
   Sections start invisible and slightly translated, animate in when
   .reveal-visible is added by IntersectionObserver. */
.reveal-section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal-section.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-section { opacity: 1; transform: none; transition: none; }
}

/* ─── How-it-works staggered step reveal ─── */
.how-step {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.how-step-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .how-step { opacity: 1; transform: none; }
}

/* ─── Marketplace sparkline draw-on (one-shot) ───
   The cyclical version flickered the lines in and out forever, which was
   distracting while the user scrolled past the marketplace section. Now
   the line draws once and stays put. */
@keyframes spark-draw {
   0% { stroke-dashoffset: 220; opacity: 0; }
   8% { opacity: 1; }
 100% { stroke-dashoffset: 0;   opacity: 1; }
}
.spark-draw-active {
  animation: spark-draw 1.2s ease-out forwards;
}

/* ─── Early Access modal ─── */
.ea-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 8, 7, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  /* `safe center` falls back to `start` when the modal is taller
     than the viewport — without it, flex centers the child even when
     it overflows, which makes the top of the modal (and the close
     button!) unreachable. Combined with `overflow-y: auto` below the
     user can always scroll the overlay to see the whole modal. */
  align-items: safe center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: ea-fade-in 0.25s ease-out;
}
[data-theme="light"] .ea-overlay {
  background: rgba(20, 25, 22, 0.45);
}
@keyframes ea-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ea-modal {
  position: relative;
  width: 100%; max-width: 460px;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 36px 32px 32px;
  box-shadow:
    0 0 0 1px var(--accent-soft),
    0 30px 80px rgba(0,0,0,0.55),
    0 0 60px var(--accent-soft);
  animation: ea-pop 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes ea-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ea-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--line); background: transparent;
  color: var(--fg-2); cursor: pointer; font-size: 22px; line-height: 1;
  transition: border-color .15s, color .15s;
}
.ea-close:hover { border-color: var(--fg-1); color: var(--fg-0); }

.ea-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}

.ea-sub {
  margin: 0 0 24px;
  font-size: 14px; line-height: 1.55;
  color: var(--fg-2);
}

.ea-form {
  display: flex; flex-direction: column; gap: 14px;
}
.ea-field {
  display: flex; flex-direction: column; gap: 6px;
}
.ea-field label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.ea-field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-0);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--fg-0);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.ea-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.ea-field input::placeholder {
  color: var(--fg-3);
}

.ea-submit {
  margin-top: 6px;
  width: 100%;
  justify-content: center;
  padding: 14px 20px;
}
.ea-submit:disabled { opacity: 0.6; cursor: wait; }

.ea-fineprint {
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
  text-align: center;
}

.ea-success {
  padding: 8px 0 4px;
}

/* ════════════════════════════════════════════════════════════
   MOBILE & TABLET ADAPTATION (v2 — class-based, robust)
   Breakpoints:
     - 1100px : nav hidden, hero stacks vertically
     - 900px  : 2-col grids → 1 col, 4-col grids → 2 col
     - 700px  : font scales, footer 4→2, payout shrinks
     - 540px  : 2-col → 1 col, padding 16px, FAQ stacks
   ════════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
  .vh-nav { display: none; }
  .vh-header { padding-left: 24px !important; padding-right: 24px !important; }
  .lang-pill { display: none; }
  .hero {
    padding-left: 24px !important; padding-right: 24px !important;
    padding-top: 40px !important; padding-bottom: 80px !important;
  }
  .section, .section-tight { padding-left: 24px !important; padding-right: 24px !important; }
  .vh-footer { padding-left: 24px !important; padding-right: 24px !important; }
  .hero-risk-card {
    position: static !important;
    transform: none !important;
    margin-top: 24px;
    width: 100%;
    min-width: 0 !important;
  }
  .hero-cert-badge {
    top: -16px !important;
    right: 8px !important;
    transform: rotate(4deg) !important;
  }
}

@media (max-width: 900px) {
  /* Section H2 a bit smaller */
  .section h2.display, .section-tight h2.display {
    font-size: clamp(22px, 4.5vw, 30px) !important;
  }
  /* 2-col sections → 1 col */
  .two-col-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  /* FAQ aside (1fr 2fr) → 1 col */
  .aside-grid   { grid-template-columns: 1fr !important; gap: 28px !important; }
  /* 4-col grids → 2-col */
  .cert-steps-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .metrics-grid    { grid-template-columns: repeat(2, 1fr) !important; }
  .how-grid        { grid-template-columns: repeat(2, 1fr) !important; gap: 28px !important; }
  /* Cert pipeline pre — smaller font, allow scroll */
  .cert-pipeline-body pre { font-size: 10px !important; }
}

@media (max-width: 700px) {
  /* Hero claim font scales down */
  .hero h1.display.display-mega,
  .hero h1.display { font-size: clamp(26px, 8vw, 36px) !important; }
  .hero-equity-num { font-size: 32px !important; }
  /* Hide cert badge to declutter */
  .hero-cert-badge { display: none !important; }
  /* Big payout number in Creators */
  #creators .term-frame > div:nth-of-type(2) { font-size: 48px !important; }
  /* Footer 5-col → 2-col */
  .vh-footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
  /* Marketplace header: stack title + button */
  .market-head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }
  /* Tighten odometer cell width on small screens to keep numbers compact. */
  .hero-equity-num span span[style*="0.62em"] { width: 0.58em !important; }

  /* Problem table — same stacked layout on tablets/large phones (≤700) as
     the ≤540 rule below. Defined here so 600px-class screens also get it. */
  .problem-table-head { display: none !important; }
  .problem-table-row {
    display: grid !important;
    grid-template-columns: 36px 1fr auto !important;
    grid-template-areas:
      "num symptom severity"
      "num evidence evidence" !important;
    column-gap: 14px !important;
    row-gap: 6px !important;
    padding: 22px 16px !important;
    align-items: start !important;
  }
  .problem-table-row .cell-num      { grid-area: num; padding-top: 2px; }
  .problem-table-row .cell-symptom  { grid-area: symptom; font-size: 15px !important; line-height: 1.35 !important; }
  .problem-table-row .cell-evidence { grid-area: evidence; font-size: 13px !important; line-height: 1.5 !important; }
  .problem-table-row .cell-severity { grid-area: severity; align-self: start; white-space: nowrap; }
}

@media (max-width: 540px) {
  /* Header: shrink, drop Sign in (keep only Launch) */
  .vh-header { padding-left: 16px !important; padding-right: 16px !important; gap: 8px; }
  .vh-header-right { gap: 6px; }
  .vh-wordmark-inline { font-size: 14px !important; }
  /* Tighter section padding */
  .section, .section-tight {
    padding-top: 60px !important; padding-bottom: 60px !important;
    padding-left: 16px !important; padding-right: 16px !important;
  }
  .hero {
    padding-left: 16px !important; padding-right: 16px !important;
    padding-top: 32px !important; padding-bottom: 60px !important;
  }
  .vh-footer { padding-left: 16px !important; padding-right: 16px !important; padding-top: 60px !important; }
  .hero h1.display.display-mega { font-size: 24px !important; line-height: 1.25 !important; }
  .hero .btn { padding: 12px 16px !important; font-size: 11px !important; }
  .hero-equity-num { font-size: 28px !important; }
  .term-frame pre { font-size: 8px !important; line-height: 1.4 !important; }
  /* All 4-col grids: 1 col */
  .cert-steps-grid { grid-template-columns: 1fr !important; }
  .metrics-grid    { grid-template-columns: 1fr !important; }
  .how-grid        { grid-template-columns: 1fr !important; gap: 24px !important; }
  /* Footer wordmark — smaller, contained */
  .vh-wordmark { font-size: clamp(36px, 12vw, 64px) !important; }
  .vh-wordmark-row { gap: 14px; }
  .vh-wordmark-row svg { width: 28px !important; height: auto !important; }
  .vh-footer-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .vh-footer-bottom { flex-direction: column !important; gap: 12px; align-items: flex-start !important; }
  .ea-modal { padding: 28px 22px 24px; }
  /* Hide top eyebrow line in hero */
  .hero-eyebrow-line { display: none !important; }
  /* Trust line wraps */
  .hero-trust-line { flex-wrap: wrap !important; gap: 12px !important; }
  /* Final CTA padding */
  .final-cta-section { padding: 80px 16px !important; }
  /* CTA form: stack input + button */
  .final-cta-section form { flex-direction: column !important; }
  /* Risk strategies grid in section */
  .term-frame [style*="grid-template-columns: 120px"] {
    grid-template-columns: 80px 1fr 40px !important;
  }

  /* Problem table — drop the 4-column grid and become a stacked card.
     The grid columns crush text to 1–2 words per line at narrow widths,
     and the SYMPTOM / EVIDENCE headers also visually collide. */
  .problem-table-head { display: none !important; }
  .problem-table-row {
    display: grid !important;
    grid-template-columns: 36px 1fr auto !important;
    grid-template-areas:
      "num symptom severity"
      "num evidence evidence" !important;
    column-gap: 14px !important;
    row-gap: 6px !important;
    padding: 22px 16px !important;
    align-items: start !important;
  }
  .problem-table-row .cell-num      { grid-area: num; padding-top: 2px; }
  .problem-table-row .cell-symptom  {
    grid-area: symptom;
    font-size: 15px !important;
    line-height: 1.35 !important;
  }
  .problem-table-row .cell-evidence {
    grid-area: evidence;
    font-size: 13px !important;
    line-height: 1.5 !important;
  }
  .problem-table-row .cell-severity {
    grid-area: severity;
    align-self: start;
    white-space: nowrap;
  }
}

/* ════════════════════════════════════════════════════════════
   Mobile: horizontal-scroll containers for wide content that
   can't be stacked (data tables, ASCII pipeline diagrams).
   ════════════════════════════════════════════════════════════ */

/* Marketplace table — wraps the grid in a horizontal-scroll container.
   Hook class added in JSX: .market-table-wrap.
   The inner grid keeps a min-width so columns don't crush. */
.market-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.market-table-grid { min-width: 920px; }

/* On phones the 10-column grid does not fit even with horizontal scroll —
   horizontal scroll inside vertical scroll is a poor UX. Instead, drop the
   grid entirely and render each row as a card: name on top, then a 2-column
   grid of labelled metrics, then a status row. */
@media (max-width: 700px) {
  .market-table-wrap { overflow-x: visible; }
  .market-table-grid { min-width: 0; }
  .market-thead { display: none !important; }
  .market-row {
    display: block !important;
    padding: 18px 18px !important;
  }
  .market-row .mc-num {
    display: inline-block;
    color: var(--fg-3) !important;
    font-size: 10px !important;
    letter-spacing: 0.14em;
    margin-right: 8px;
    vertical-align: middle;
  }
  .market-row .mc-name {
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 10px;
  }
  .market-row .mc-author {
    display: block;
    margin: 4px 0 12px;
    font-size: 11px;
  }
  .market-row .mc-spark {
    display: block;
    margin: 0 0 14px;
    height: 24px;
  }
  /* Metrics grid: 2 × 2 below name */
  .market-row .mc-ret,
  .market-row .mc-sharpe,
  .market-row .mc-dd,
  .market-row .mc-aum,
  .market-row .mc-reg {
    display: inline-flex;
    flex-direction: column;
    width: calc(50% - 4px);
    margin: 0 4px 10px 0;
    padding: 0 !important;
    text-align: left !important;
    font-size: 13px !important;
    vertical-align: top;
  }
  .market-row .mc-ret::before,
  .market-row .mc-sharpe::before,
  .market-row .mc-dd::before,
  .market-row .mc-aum::before,
  .market-row .mc-reg::before {
    content: attr(data-label);
    display: block;
    font-size: 9px;
    letter-spacing: 0.14em;
    color: var(--fg-3);
    font-weight: 400;
    margin-bottom: 3px;
  }
  .market-row .mc-status {
    display: block !important;
    text-align: left !important;
    padding-top: 6px;
    border-top: 1px solid var(--line);
    margin-top: 4px;
  }
}

/* Cert pipeline — CSS-based boxes (replaces ASCII <pre>).
   Horizontal chain on desktop, vertical stack on mobile.
   Manifest panel sits to the right in a 1fr/auto grid on desktop,
   below the flow on mobile. */
.cert-pipeline-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: stretch;
  padding: 32px 24px;
}
@media (max-width: 900px) {
  .cert-pipeline-body { grid-template-columns: 1fr; gap: 24px; padding: 22px 18px; }
  .cert-pipeline-manifest { width: 100%; }
}

.cert-pipeline-flow {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}
.cert-pipeline-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
}
.cert-pipeline-step-box {
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: var(--bg-0);
  padding: 10px 8px 10px;
  text-align: center;
  display: flex; flex-direction: column; gap: 3px;
}
.cert-pipeline-step-n {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--fg-3);
}
.cert-pipeline-step-t {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--fg-0);
}
.cert-pipeline-step-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.cert-pipeline-step-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--fg-2);
  padding: 0 6px;
  text-align: center;
  display: flex; flex-direction: column; gap: 2px;
}
.cert-pipeline-arrow {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  opacity: 0.65;
  padding: 0 2px;
  margin-top: -16px; /* aligns with the step boxes vertically */
}
@media (max-width: 900px) {
  .cert-pipeline-flow {
    flex-direction: column;
    align-items: stretch;
  }
  .cert-pipeline-step { flex: none; }
  .cert-pipeline-step-box { padding: 12px 16px; }
  .cert-pipeline-step-meta { padding: 0 4px; }
  .cert-pipeline-arrow {
    transform: rotate(90deg);
    margin: 2px auto;
    font-size: 13px;
    opacity: 0.5;
  }
}
/* Narrow desktop / tablet — keep horizontal but tighten gap & font */
@media (min-width: 901px) and (max-width: 1100px) {
  .cert-pipeline-step-box { padding: 8px 6px; }
  .cert-pipeline-step-t { font-size: 11px; }
  .cert-pipeline-step-meta { font-size: 9.5px; }
  .cert-pipeline-arrow { font-size: 10px; padding: 0; }
}

/* All terminal-frame children: prevent overflow propagation */
.term-frame { max-width: 100%; }

/* Globally prevent horizontal page scroll on phones — last line of defence.
   IMPORTANT: do NOT put overflow-x on <html> or <body>. Both `hidden` AND
   `clip` on those root elements break (or in Safari/older FF, silently
   no-op) `position: sticky` on descendants. We instead put the clip on
   .vh-page, which is safe — it's a normal block container, not the
   scrolling viewport. Sticky elements inside .vh-page continue to anchor
   to the actual visual viewport. */
.vh-page { overflow-x: clip; }
@supports not (overflow-x: clip) {
  /* Older browsers fall back to hidden; sticky still works because the
     constraint is on .vh-page, not on body. */
  .vh-page { overflow-x: hidden; }
}

/* ════════════════════════════════════════════════════════════
   ABOUT PAGE — extras (map pulse, crew hover, mobile adapt)
   ════════════════════════════════════════════════════════════ */

/* Pulsing Warsaw rings */
@keyframes map-pulse {
  0%   { r: 6;  stroke-opacity: 0.7; }
  100% { r: 30; stroke-opacity: 0;   }
}
.map-pulse-ring {
  transform-origin: center;
  /* SVG attribute animation via @property fallback */
}
.map-pulse-ring-1 { animation: map-pulse 2.4s ease-out infinite; }
.map-pulse-ring-2 { animation: map-pulse 2.4s ease-out 1.2s infinite; }
@media (prefers-reduced-motion: reduce) {
  .map-pulse-ring-1, .map-pulse-ring-2 { animation: none; }
}

/* Crew card hover */
.crew-card { cursor: pointer; }
.crew-card:hover { transform: translateY(-3px); }
.crew-card:hover .crew-name { color: var(--accent); }
.crew-card.no-link { cursor: default; }
.crew-card.no-link:hover { transform: none; }
.crew-card.no-link:hover .crew-name { color: var(--fg-0); }
.crew-name { transition: color .2s; }

/* About-page mobile breakpoints */
@media (max-width: 1100px) {
  /* Backed grid: 5 → 3 cols */
  .backed-grid { grid-template-columns: repeat(3, 1fr) !important; }
  /* Crew: 5 → 3 cols */
  .crew-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 900px) {
  /* Where + Help: 1 col */
  .where-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .help-card  { grid-template-columns: 1fr !important; gap: 32px !important; padding: 44px 32px !important; }
  /* Backed cta wraps */
  .backed-cta { flex-direction: column; align-items: flex-start !important; }
  .backed-cta .btn { width: 100%; justify-content: center; }
}
@media (max-width: 700px) {
  .backed-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .crew-grid   { grid-template-columns: repeat(2, 1fr) !important; gap: 20px !important; }
}
@media (max-width: 540px) {
  .backed-grid { grid-template-columns: 1fr !important; }
  .crew-grid   { grid-template-columns: 1fr !important; }
  .help-card   { padding: 32px 20px !important; }
  /* Backed contact button — wrap email if too long */
  .backed-cta .btn { font-size: 11px !important; padding: 12px 14px !important; }
}

/* Hide the right-side video poster brand caption on phones — left+right
   captions overlap below ~480px */
@media (max-width: 540px) {
  .video-poster-meta { display: none !important; }
}

/* ════════════════════════════════════════════════════════════
   PRE-LAUNCH BANNER
   A persistent strip at the top of every page that makes the
   project's status unambiguous: not a regulated service, no live
   trading, demo content only. This addresses MiCA / KNF / MiFID
   risk that would otherwise arise from any "trust layer" or
   "certified" wording on the page.
   ════════════════════════════════════════════════════════════ */
.prelaunch-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  /* Fix the visible banner height so the header offset and content padding
     stay predictable across viewport widths. */
  min-height: 34px;
  box-sizing: border-box;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-strong);
  padding: 9px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.10em;
  line-height: 1.3;
  text-align: center;
  flex-wrap: wrap;
}
.prelaunch-banner .pl-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}
.prelaunch-banner strong {
  color: var(--fg-0); font-weight: 600;
}
.prelaunch-banner .pl-sep {
  color: var(--fg-3); opacity: 0.7;
}
@media (max-width: 540px) {
  .prelaunch-banner {
    font-size: 10px; padding: 8px 14px; gap: 8px;
    letter-spacing: 0.06em;
  }
  /* On phones we hide the secondary clauses to keep the banner one line */
  .prelaunch-banner .pl-secondary { display: none; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE BURGER MENU
   On phones (≤ 700px) the header collapses to logo + theme +
   burger. Launch / Sign in / language pill / nav links move
   inside the burger overlay so nothing is unreachable.
   ════════════════════════════════════════════════════════════ */

.vh-burger {
  display: none;        /* shown only on narrow widths via @media below */
  appearance: none;
  width: 36px; height: 36px;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  position: relative;
  flex-shrink: 0;
}
.vh-burger span {
  position: absolute; left: 9px; right: 9px; height: 1.5px;
  background: var(--fg-0);
  border-radius: 2px;
  transition: transform .2s, opacity .2s, top .2s;
}
.vh-burger span:nth-child(1) { top: 12px; }
.vh-burger span:nth-child(2) { top: 17px; }
.vh-burger span:nth-child(3) { top: 22px; }
.vh-burger.is-open span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.vh-burger.is-open span:nth-child(2) { opacity: 0; }
.vh-burger.is-open span:nth-child(3) { top: 17px; transform: rotate(-45deg); }

.vh-mobile-menu {
  position: fixed;
  /* Header height varies a bit by viewport; we use a conservative offset
     that lands just under the visible header line. */
  top: calc(var(--banner-h, 34px) + 64px);
  left: 0;
  right: 0;
  /* Explicit height (not just bottom:0) so the overlay actually has size
     even when its containing block is the header (which is itself fixed). */
  height: calc(100vh - var(--banner-h, 34px) - 64px);
  /* svh (small viewport height) accounts for mobile browser chrome that
     collapses on scroll; falls back gracefully on browsers without svh. */
  height: calc(100svh - var(--banner-h, 34px) - 64px);
  background: var(--bg-0);
  /* Layered translucent gradient for a slight depth feel — but the base
     is fully opaque so content underneath never bleeds through. */
  background-image: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 60%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 49;
  animation: vh-menu-fade-in .2s ease-out;
  overflow-y: auto;
}
@keyframes vh-menu-fade-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vh-mobile-menu-inner {
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 24px 20px 32px;
  max-width: 480px; margin: 0 auto;
}
.vh-mobile-menu-inner a {
  display: block;
  padding: 14px 4px;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--fg-0);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.vh-mobile-menu-inner a:active { color: var(--accent); }
.vh-mobile-menu-sep {
  height: 1px; background: var(--line-strong);
  margin: 18px 0 12px;
}
.vh-mobile-menu-inner .btn-primary {
  margin-top: 14px;
  justify-content: center;
  padding: 16px 20px;
  font-size: 13px;
}
.vh-mobile-menu-langs {
  display: flex; gap: 8px;
  margin-top: 20px;
}
.vh-mobile-menu-langs button {
  flex: 1;
  appearance: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--fg-2);
  border-radius: 8px;
  padding: 10px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.vh-mobile-menu-langs button.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 700px) {
  /* Collapse header chrome: hide sign-in, launch (we keep launch — primary
     CTA — at most viewports, but on phones it's also in the burger). */
  .vh-burger { display: block; }
  .vh-header-right .vh-signin { display: none !important; }
  .vh-header-right .btn-primary { display: none !important; }
  /* Lang pill is hidden already at ≤1100px in the existing rule; keep it. */
}

/* ════════════════════════════════════════════════════════════
   BENEFITS GRID — responsive override
   The component sets `grid-template-columns: repeat(3, 1fr)` inline,
   so we need !important to override it. 3 → 2 → 1 columns.
   Also center-align the audience switcher row when columns stack.
   ════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .benefits-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .benefits-tabs-wrap { justify-self: start !important; }
}
@media (max-width: 540px) {
  .benefits-grid { grid-template-columns: 1fr !important; }
  /* Lower min-height on phones so the tile doesn't waste vertical space. */
  .benefits-grid > div { min-height: 0 !important; padding: 24px 20px !important; }
}

/* ════════════════════════════════════════════════════════════
   HERO active-strategies row — phone layout
   The desktop 5-column grid (110px + 1fr + 80px + 70px + 60px) sums to
   ~390px and crushes the strategy name to 1 word per line at narrow
   viewports. Drop ID + cert badge on phones to keep things readable.
   ════════════════════════════════════════════════════════════ */
@media (max-width: 540px) {
  .hero-strat-row {
    grid-template-columns: 1fr 70px 60px !important;
    gap: 8px !important;
  }
  .hero-strat-row .hs-id { display: none !important; }
  .hero-strat-row .hs-cert { display: none !important; }
  .hero-strat-row .hs-name {
    font-size: 12px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ── Landing-page overrides ────────────────────────────────────────
   The landing has a taller header (banner + nav strip), so any
   anchor-link target needs a larger scroll-margin-top than the 80px
   default in page.css. */
.vh-page section[id] { scroll-margin-top: 128px; }
.hero { padding: 60px 56px 120px; }

