/* ============================================================
   HOMEPAGE · HERO (v6) — brand-system tokenized, canvas-visible
   ------------------------------------------------------------
   Built on css/brand-system.css tokens. No raw hex values
   below (except for opacity variations of brand colors).
   ------------------------------------------------------------
   Order of elements:
     1. metaline   — brand/stack line (thin)
     2. eyebrow    — social proof pill (glass)
     3. brand-mark — mascot (subordinate)
     4. headline   — display + gradient accent
     5. sub        — precise promise
     6. action     — primary + ghost CTA, trust-micro
     7. proof      — 4-stat glass card
   ============================================================ */

/* ── 1 · Section shell ────────────────────────────────── */
.hero.hero--editorial {
  --hero-progress: 0;

  position: relative;
  min-height: clamp(720px, 94vh, 1020px);
  padding-block:
    clamp(var(--b-space-7), 2.5rem + 4vw, var(--b-space-9))
    clamp(var(--b-space-6), 2rem + 2vw, var(--b-space-8));
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  /* No solid background — let Galaxy Panda canvas show through fully */
  background: transparent;
}

/* Soft focal vignette only — NOT a darkening layer */
.hero.hero--editorial::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: var(--b-z-behind);
  background:
    radial-gradient(38% 45% at 50% 32%, rgba(232,160,32,0.10), transparent 72%),
    radial-gradient(55% 55% at 50% 90%, rgba(5,5,8,0.35), transparent 75%);
  pointer-events: none;
}

/* Hairline horizon under nav */
.hero.hero--editorial::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,160,32,0.4), transparent);
  z-index: var(--b-z-raised);
  opacity: 0.55;
}

/* Canvas — now the star. Opaque enough to see Galaxy Panda clearly */
.hero.hero--editorial .hero-canvas {
  opacity: 0.5 !important;
  mix-blend-mode: screen !important;
}

/* ── 2 · Grid container ───────────────────────────────── */
.hero-editorial {
  width: min(100% - var(--b-container-gutter), var(--b-container-wide));
  margin: 0 auto;
  display: grid;
  row-gap: clamp(var(--b-space-3), 0.5rem + 0.8vw, var(--b-space-5));
  text-align: center;
  position: relative;
  z-index: var(--b-z-base);
}

/* ── 3 · Metaline (Claude stack) ──────────────────────── */
.hero-metaline {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: var(--b-space-3);
  padding: var(--b-space-2) var(--b-space-4);
  border-radius: var(--b-radius-pill);
  background: rgba(10, 10, 18, 0.55);
  border: 1px solid var(--b-rule);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);

  font-family: var(--b-font-display);
  font-size: var(--b-text-xs);
  font-weight: var(--b-w-medium);
  letter-spacing: var(--b-track-wider);
  text-transform: uppercase;
  color: var(--b-cream-400);
  flex-wrap: wrap;
  justify-content: center;
  max-width: 920px;
}
.hero-metaline__label { color: var(--b-cream-400); white-space: nowrap; }
.hero-metaline__rule  { width: var(--b-space-4); height: 1px; background: var(--b-rule); }
.hero-metaline__brands {
  display: inline-flex;
  align-items: center;
  gap: var(--b-space-1);
  flex-wrap: wrap;
  justify-content: center;
  color: var(--b-cream-200);
}
.hero-metaline__brands > span { color: var(--b-cream-200); }
.hero-metaline__dot { color: var(--b-cream-500); font-weight: var(--b-w-regular); margin-inline: 2px; }

/* ── 4 · Eyebrow pill (live social proof) ─────────────── */
.hero-eyebrow {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: var(--b-space-2);
  padding: var(--b-space-2) var(--b-space-4);
  border-radius: var(--b-radius-pill);
  background: var(--b-glass-gold-bg);
  border: 1px solid var(--b-glass-gold-border);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);

  font-size: var(--b-text-sm);
  color: var(--b-cream-200);
  box-shadow: var(--b-shadow-3);
}
.hero-eyebrow strong { color: var(--b-gold-300); font-weight: var(--b-w-bold); }
.hero-eyebrow__star  { color: var(--b-gold-500); margin-inline-start: 2px; }
.hero-eyebrow__sep   { color: var(--b-cream-500); margin-inline: 2px; }
.hero-eyebrow__dot {
  width: 8px; height: 8px; border-radius: var(--b-radius-pill);
  background: var(--b-success);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
  animation: hero-pulse 2.4s var(--b-ease-in-out) infinite;
}
@keyframes hero-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(34,197,94,0.18); }
  50%      { box-shadow: 0 0 0 9px rgba(34,197,94,0.04); }
}

/* ── 5 · Brand-mark (mascot) ──────────────────────────── */
.hero-brand-mark {
  margin: 0;
  display: flex;
  justify-content: center;
}
.hero-brand-mark img {
  height: clamp(88px, 9vw, 118px);
  width: auto;
  filter:
    drop-shadow(0 14px 28px rgba(5,5,8,0.6))
    drop-shadow(0 0 24px rgba(232,160,32,0.18));
  transition: transform var(--b-dur-slower) var(--b-ease-out);
}
.hero.is-revealed .hero-brand-mark img {
  animation: hero-logo-float 7s var(--b-ease-in-out) infinite;
}
@keyframes hero-logo-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
.hero-founder-line {
  font-size: 0.78rem;
  color: rgba(240,240,255,0.45);
  margin-top: 0.25rem;
  text-align: center;
  font-weight: 400;
}
.hero-founder-line strong { color: rgba(240,240,255,0.7); font-weight: 600; }

/* ── 6 · Headline ─────────────────────────────────────── */
.hero-headline {
  font-family: var(--b-font-sans);
  font-weight: var(--b-w-black);
  font-size: var(--b-text-display);
  line-height: var(--b-lh-tight);
  letter-spacing: var(--b-track-display);
  margin: var(--b-space-2) auto 0;
  color: var(--b-cream-100);
  max-width: 18ch;
  text-wrap: balance;
}
.hero-headline__row { display: block; }
.hero-headline__row--muted {
  color: var(--b-cream-200);
  font-weight: var(--b-w-bold);
  font-size: 0.58em;
  letter-spacing: var(--b-track-tight);
  margin-top: 0.4em;
  line-height: var(--b-lh-snug);
}

.hero-headline__accent {
  display: block;
  font-family: var(--b-font-display);
  font-weight: var(--b-w-bold);
  letter-spacing: -0.03em;
  line-height: 1;
  background: var(--b-grad-hero);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 180% 100%;
  animation: hero-accent-shift 14s var(--b-ease-in-out) infinite alternate;
  position: relative;
}
@keyframes hero-accent-shift {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}
.hero-headline__accent::after {
  content: '';
  position: absolute;
  inset-inline: 12%;
  bottom: -0.06em;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--b-gold-500), var(--b-magenta-500), transparent);
  opacity: 0.55;
}

/* ── 7 · Sub ──────────────────────────────────────────── */
.hero-sub {
  max-width: 58ch;
  margin: var(--b-space-2) auto 0;
  font-size: var(--b-text-md);
  line-height: var(--b-lh-relaxed);
  color: var(--b-cream-200);
  text-wrap: pretty;
}
.hero-sub__hl {
  color: var(--b-cream-100);
  font-weight: var(--b-w-bold);
  border-bottom: 1px solid rgba(232,160,32,0.4);
  padding-bottom: 0.05em;
}
.hero-sub strong { color: var(--b-cream-100); font-weight: var(--b-w-bold); }

/* ── 8 · Action cluster ───────────────────────────────── */
.hero-action {
  display: grid;
  justify-items: center;
  row-gap: var(--b-space-3);
  margin-top: clamp(var(--b-space-3), 0.5rem + 0.8vw, var(--b-space-5));
}
.hero-cta-row {
  display: flex;
  gap: var(--b-space-3);
  flex-wrap: wrap;
  justify-content: center;
}

/* Primary — gold gradient, pulse on hover */
.hero-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--b-space-2);
  height: 56px;
  padding: 0 var(--b-space-5);
  border-radius: var(--b-radius-md);
  font-size: var(--b-text-base);
  font-weight: var(--b-w-bold);
  letter-spacing: 0.005em;
  text-decoration: none;
  color: var(--b-ink-950);
  background: var(--b-grad-cta);
  position: relative;
  overflow: hidden;
  transition:
    transform var(--b-dur-base) var(--b-ease-out),
    box-shadow var(--b-dur-base) var(--b-ease-out);
  box-shadow:
    var(--b-glow-gold),
    0 2px 0 rgba(255, 245, 220, 0.45) inset,
    0 -2px 0 rgba(90, 55, 5, 0.3) inset;
}
.hero-primary::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--b-gold-300), var(--b-magenta-500), var(--b-teal-400));
  z-index: var(--b-z-behind);
  opacity: 0;
  filter: blur(16px);
  transition: opacity var(--b-dur-slow);
}
.hero-primary:hover,
.hero-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    var(--b-glow-gold-lg),
    0 2px 0 rgba(255, 245, 220, 0.55) inset;
  animation: hero-cta-pulse 1.6s var(--b-ease-in-out) infinite;
  outline: none;
}
.hero-primary:focus-visible { outline: 2px solid var(--b-gold-300); outline-offset: 3px; }
.hero-primary:hover::before,
.hero-primary:focus-visible::before { opacity: 0.7; }

@keyframes hero-cta-pulse {
  0%, 100% { box-shadow: var(--b-glow-gold-lg), 0 2px 0 rgba(255,245,220,0.55) inset; }
  50%      { box-shadow: 0 28px 80px -6px rgba(232,160,32,1), 0 2px 0 rgba(255,245,220,0.6) inset; }
}

.hero-primary__arrow {
  font-weight: var(--b-w-black);
  transition: transform var(--b-dur-base) var(--b-ease-spring);
}
.hero-primary:hover .hero-primary__arrow { transform: translateX(-6px); }
[dir="ltr"] .hero-primary__arrow { transform: rotate(180deg); }
[dir="ltr"] .hero-primary:hover .hero-primary__arrow { transform: rotate(180deg) translateX(-6px); }

/* Ghost secondary */
.hero-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 var(--b-space-4);
  border-radius: var(--b-radius-md);
  font-size: var(--b-text-base);
  font-weight: var(--b-w-semi);
  color: var(--b-cream-200);
  background: rgba(245, 241, 230, 0.05);
  border: 1px solid var(--b-rule);
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    transform var(--b-dur-fast),
    background var(--b-dur-fast),
    border-color var(--b-dur-fast),
    color var(--b-dur-fast);
}
.hero-ghost:hover,
.hero-ghost:focus-visible {
  transform: translateY(-1px);
  background: rgba(245, 241, 230, 0.09);
  border-color: var(--b-glass-gold-border);
  color: var(--b-cream-50);
  outline: none;
}
.hero-ghost:focus-visible { outline: 2px solid var(--b-glass-gold-border); outline-offset: 3px; }

/* ── Promo badge — above the fold ─────────────────────── */
.hero-promo-badge {
  display: inline-block;
  margin-block: var(--b-space-2) var(--b-space-1);
  padding: 0.45rem 1.1rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 999px;
  color: #fca5a5;
  font-size: clamp(0.78rem, 2.2vw, 0.88rem);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background 150ms, border-color 150ms;
  animation: promo-pulse 2.5s ease-in-out infinite;
}
.hero-promo-badge:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.7);
}
.hero-promo-badge strong { color: #f87171; }

@keyframes promo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
  50%       { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.12); }
}

/* Micro-trust line */
.hero-trust-micro {
  margin: var(--b-space-1) 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--b-space-1) var(--b-space-5);
  font-size: var(--b-text-sm);
  color: var(--b-cream-400);
}
.hero-trust-micro li {
  display: inline-flex;
  align-items: center;
  gap: var(--b-space-1);
}
.hero-trust-micro li > span {
  color: var(--b-success);
  font-weight: var(--b-w-bold);
  font-size: 0.9em;
}

/* ── 9 · Proof strip (glass) ──────────────────────────── */
.hero-proof {
  margin: clamp(var(--b-space-4), 0.75rem + 1.5vw, var(--b-space-6)) auto 0;
  padding: var(--b-space-3) var(--b-space-4);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--b-space-2);
  max-width: 820px;
  border-radius: var(--b-radius-xl);
  background: var(--b-grad-surface);
  border: 1px solid var(--b-glass-border);
  backdrop-filter: var(--b-glass-blur);
  -webkit-backdrop-filter: var(--b-glass-blur);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.03) inset,
    var(--b-shadow-4);
}

.hero-proof__item {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: var(--b-space-1);
  margin: 0;
  min-width: 0;
  text-align: center;
}
.hero-proof__num {
  margin: 0;
  font-family: var(--b-font-display);
  font-size: var(--b-text-2xl);
  font-weight: var(--b-w-black);
  letter-spacing: var(--b-track-tight);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--b-grad-hero);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
}
.hero-proof__plus,
.hero-proof__unit {
  font-weight: var(--b-w-bold);
  font-size: 0.55em;
  margin-inline-start: 1px;
}
.hero-proof__cap {
  font-size: var(--b-text-xs);
  letter-spacing: var(--b-track-wide);
  text-transform: uppercase;
  color: var(--b-cream-400);
  font-weight: var(--b-w-semi);
  line-height: var(--b-lh-snug);
  text-align: center;
}

@media (max-width: 640px) {
  .hero-proof {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--b-space-4) var(--b-space-2);
    padding: var(--b-space-3) var(--b-space-4);
  }
}

/* ── 10 · Reveal choreography ─────────────────────────── */
.hero-editorial > [data-reveal-order] {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity var(--b-dur-reveal) var(--b-ease-out),
    transform var(--b-dur-reveal) var(--b-ease-out);
  transition-delay: calc(var(--ro, 0) * 90ms);
}
.hero-editorial > [data-reveal-order="0"] { --ro: 0; }
.hero-editorial > [data-reveal-order="1"] { --ro: 1; }
.hero-editorial > [data-reveal-order="2"] { --ro: 2.5; }
.hero-editorial > [data-reveal-order="3"] { --ro: 3.5; }
.hero-editorial > [data-reveal-order="4"] { --ro: 4.5; }
.hero-editorial > [data-reveal-order="5"] { --ro: 6; }
.hero-editorial > [data-reveal-order="6"] { --ro: 6.5; }

.hero.is-revealed .hero-editorial > [data-reveal-order] {
  opacity: 1;
  transform: translateY(0);
}

/* ── 11 · Mobile ──────────────────────────────────────── */
@media (max-width: 640px) {
  .hero.hero--editorial {
    min-height: auto;
    padding-block: clamp(32px, 7vh, 80px) clamp(28px, 5vh, 64px);
    padding-inline: clamp(14px, 4vw, 24px);
  }
  .hero-metaline {
    font-size: clamp(0.55rem, 2.6vw, 0.72rem);
    padding: 6px 12px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
  }
  .hero-metaline__rule { display: none; }

  /* Headline — fluid sizing overrides token */
  .hero-headline {
    font-size: clamp(1.85rem, 8.5vw, 3rem) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.01em;
    max-width: 100%;
    padding-inline: 4px;
    text-wrap: balance;
    overflow-wrap: break-word;
  }
  .hero-headline__accent {
    font-size: clamp(1.9rem, 9vw, 3.2rem);
    line-height: 1.1;
  }
  .hero-headline__row--muted {
    font-size: clamp(1.05rem, 4.5vw, 1.5rem);
    margin-top: 0.35em;
  }
  .hero-headline__accent::after { bottom: -0.04em; height: 2px; inset-inline: 6%; }

  /* Sub copy */
  .hero-sub {
    font-size: clamp(0.95rem, 3.4vw, 1.1rem);
    max-width: 100%;
    padding-inline: 6px;
    line-height: 1.55;
  }

  /* Brand mark (panda) — shrink */
  .hero-brand-mark { max-width: 180px; margin-inline: auto; }
  .hero-brand-mark img { max-width: 100%; height: auto; }

  /* CTA row */
  .hero-cta-row {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    gap: 10px;
    padding-inline: 4px;
  }
  .hero-primary, .hero-ghost {
    width: 100%;
    min-height: 52px;
    font-size: 1.02rem;
  }

  /* Eyebrow stats chip */
  .hero-eyebrow {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 10px;
    font-size: clamp(0.75rem, 3vw, 0.9rem);
    padding: 8px 14px;
  }

  /* Hero canvas — disable heavy particles to improve FCP */
  .hero-canvas { opacity: 0.35; }
}

/* Extra small phones */
@media (max-width: 380px) {
  .hero-headline { font-size: clamp(1.6rem, 9vw, 2.2rem) !important; }
  .hero-headline__row--muted { font-size: clamp(0.95rem, 5vw, 1.2rem); }
  .hero-brand-mark { max-width: 140px; }
}

/* ── 12 · Reduced motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-editorial > [data-reveal-order],
  .hero-brand-mark img {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .hero-eyebrow__dot { animation: none; }
  .hero-headline__accent { animation: none; background-position: 0% 50%; }
  .hero-primary:hover { animation: none; }
}
