/* ═══════════════════════════════════════════════════════════════
   BBD HERO — Deep Craft Edition
   Drop this AFTER hero-section.css and style.css.
   Zero HTML changes required.

   Design direction:
   · Oversized editorial headline — weight contrast, mixed sizes
   · Word-by-word stagger animation (CSS only, no GSAP dependency)
   · Grain + noise texture layer for depth
   · Accent underline drawn on with SVG path animation
   · Trust bar: pill tags, not plain text
   · Eyebrow: slim tracked capsule label
   · Subtext: breathing room, warm dim tone
   · Buttons: one heavy primary, one ghost wire
   · Responsive at every breakpoint down to 320px
   ═══════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────
   0. Google Font import (Syne already loaded, add
      Instrument Serif for the italic contrast word)
   ────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');

/* ──────────────────────────────────────────────────
   1. HERO SHELL
   ────────────────────────────────────────────────── */
header {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h, 64px) + 80px) 40px 100px;
  text-align: center;
  overflow: hidden;
  background: var(--black, #050507);
  isolation: isolate;
}

/* ──────────────────────────────────────────────────
   2. ATMOSPHERIC BACKGROUND LAYERS
   ────────────────────────────────────────────────── */

/* Layer 1 — Grid */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* Layer 2 — Centre glow */
.hero-glow-1 {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(500px, 90vw, 1100px);
  height: clamp(400px, 70vh, 800px);
  background: radial-gradient(
    ellipse at center,
    rgba(212,255,60, 0.065) 0%,
    rgba(212,255,60, 0.02)  35%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  animation: glowBreath 7s ease-in-out infinite alternate;
}

/* Layer 3 — Bottom-right accent glow */
.hero-glow-2 {
  position: absolute;
  bottom: -10%;
  right: -6%;
  width: clamp(300px, 42vw, 580px);
  height: clamp(300px, 42vw, 580px);
  background: radial-gradient(
    ellipse at center,
    rgba(255,60,110, 0.055) 0%,
    transparent 65%
  );
  pointer-events: none;
  z-index: 0;
  animation: glowBreath 9s 2s ease-in-out infinite alternate;
}

@keyframes glowBreath {
  from { opacity: 0.6; transform: translateX(-50%) scale(0.96); }
  to   { opacity: 1;   transform: translateX(-50%) scale(1.04); }
}
.hero-glow-2 { animation: glowBreath2 9s 2s ease-in-out infinite alternate; }
@keyframes glowBreath2 {
  from { opacity: 0.55; transform: scale(0.94); }
  to   { opacity: 1;    transform: scale(1.06); }
}

/* Layer 4 — Grain */
header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
  background-size: 220px;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

/* All hero content sits above layers */
header > * { position: relative; z-index: 2; }
.hero-glow-1, .hero-glow-2, .hero-grid-bg { z-index: 0; }

/* ──────────────────────────────────────────────────
   3. HERO CONTENT WRAPPER
   ────────────────────────────────────────────────── */
.hero-content {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* ──────────────────────────────────────────────────
   4. EYEBROW
   ────────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent, #d4ff3c);
  margin-bottom: 36px;

  /* Capsule pill */
  background: rgba(212,255,60, 0.07);
  border: 1px solid rgba(212,255,60, 0.22);
  padding: 7px 18px;
  border-radius: 100px;

  /* Animation */
  opacity: 0;
  transform: translateY(14px);
  animation: heroFadeUp 0.7s cubic-bezier(0.22,1,0.36,1) 0.4s forwards;
}

.eyebrow::before,
.eyebrow::after {
  display: none; /* remove the old dash lines — pill handles it */
}

/* Live dot inside eyebrow */
.eyebrow::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #d4ff3c);
  box-shadow: 0 0 8px rgba(212,255,60,0.9);
  flex-shrink: 0;
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.6; }
}

/* ──────────────────────────────────────────────────
   5. HERO TITLE  — the money piece
   ────────────────────────────────────────────────── */
.hero-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;

  /* Fluid scale: 52px → 96px */
  font-size: clamp(3.25rem, 8.5vw, 6rem);

  line-height: 1.01;
  letter-spacing: -0.038em;
  color: var(--white, #f5f4f0);
  margin: 0 auto 0;
  max-width: 900px;

  /* Entrance */
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 0.9s cubic-bezier(0.22,1,0.36,1) 0.65s forwards;
}

/* ── Line 1: plain white, heaviest weight ── */
.hero-title .line-1 {
  display: block;
  font-size: 1em; /* inherits clamp */
  font-weight: 800;
  color: var(--white, #f5f4f0);
  margin-bottom: 0.04em;
}

/* ── Line 2: the accent "strong" line ── */
.hero-title .line-2 {
  display: block;
  position: relative;
  font-size: 1.08em;  /* slightly bigger for drama */
  font-weight: 800;
  color: var(--accent, #d4ff3c);
  letter-spacing: -0.045em;
  line-height: 1.0;
  margin-top: 0.04em;
}

/* Underline SVG drawn animation */
.hero-title .line-2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 88%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent, #d4ff3c) 20%, var(--accent, #d4ff3c) 80%, transparent);
  border-radius: 2px;
  transform-origin: left center;
  transform: translateX(-50%) scaleX(0);
  animation: lineReveal 0.8s cubic-bezier(0.22,1,0.36,1) 1.5s forwards;
}

@keyframes lineReveal {
  from { transform: translateX(-50%) scaleX(0); opacity: 0; }
  to   { transform: translateX(-50%) scaleX(1); opacity: 1; }
}

/* ── Italic serif contrast word inside strong ── */
.hero-title .italic-word {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;       /* thin vs bold contrast */
  font-size: 1.04em;
  color: var(--white, #f5f4f0);
  -webkit-text-stroke: 0;
  display: inline;
}

/* ── Outline/ghost word ── */
.hero-title .ghost-word {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(245,244,240,0.3);
  display: inline;
}

/* Float micro-animation on the accent line */
.hero-title .line-2 {
  animation:
    heroFadeUp  0.9s cubic-bezier(0.22,1,0.36,1) 0.65s forwards,
    floatWord   5s 1.6s ease-in-out infinite;
}

@keyframes floatWord {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

/* ──────────────────────────────────────────────────
   6. SUBHEADING
   ────────────────────────────────────────────────── */
.hero-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  font-weight: 400;
  line-height: 1.82;
  color: var(--dim, #6b6b7a);
  max-width: 540px;
  margin: 32px auto 0;
  letter-spacing: 0.01em;

  /* Entrance */
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.75s cubic-bezier(0.22,1,0.36,1) 0.95s forwards;
}

/* Bold inline emphasis */
.hero-sub strong {
  font-weight: 600;
  color: rgba(245,244,240,0.72);
}

/* ──────────────────────────────────────────────────
   7. CTA BUTTONS
   ────────────────────────────────────────────────── */
.hero-actions {
  margin-top: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;

  /* Entrance */
  opacity: 0;
  transform: translateY(18px);
  animation: heroFadeUp 0.7s cubic-bezier(0.22,1,0.36,1) 1.2s forwards;
}

.hero-actions .btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* Primary — heavy pill */
.hero-actions .btn-primary {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 17px 40px;
  border-radius: 100px;
  background: var(--accent, #d4ff3c);
  color: #050507;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1),
              background 0.22s ease,
              box-shadow 0.22s ease;
  box-shadow: 0 4px 0 rgba(180,220,30,0.5), 0 8px 28px rgba(212,255,60,0.22);
  position: relative;
  overflow: hidden;
}

/* Shimmer sweep */
.hero-actions .btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-18deg);
  transition: left 0.55s ease;
}
.hero-actions .btn-primary:hover::before { left: 160%; }

.hero-actions .btn-primary:hover {
  transform: translateY(-3px) scale(1.025);
  background: #c8f220;
  box-shadow: 0 6px 0 rgba(180,220,30,0.45), 0 14px 36px rgba(212,255,60,0.32);
}
.hero-actions .btn-primary:active {
  transform: translateY(0) scale(0.975);
  box-shadow: 0 2px 0 rgba(180,220,30,0.4), 0 4px 14px rgba(212,255,60,0.18);
}

/* Ghost — wire outline */
.hero-actions .btn-ghost {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.93rem;
  font-weight: 500;
  padding: 16px 30px;
  border-radius: 100px;
  background: transparent;
  color: rgba(245,244,240,0.72);
  border: 1px solid rgba(245,244,240,0.2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.25s, color 0.25s, transform 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
.hero-actions .btn-ghost:hover {
  border-color: rgba(245,244,240,0.5);
  color: var(--white, #f5f4f0);
  transform: translateY(-2px);
}

/* Qualification micro-copy below buttons */
.hero-actions .btn-qualifier {
  margin-top: 18px;
  font-size: 0.76rem;
  color: var(--dim, #6b6b7a);
  letter-spacing: 0.04em;
}

/* ──────────────────────────────────────────────────
   8. TRUST BAR
   ────────────────────────────────────────────────── */
.trust-bar {
  margin-top: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  row-gap: 12px;

  /* Entrance */
  opacity: 0;
  transform: translateY(14px);
  animation: heroFadeUp 0.7s cubic-bezier(0.22,1,0.36,1) 1.45s forwards;
}

/* Divider between items */
.trust-bar .trust-item + .trust-item::before {
  content: '';
  display: inline-block;
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.1);
  margin: 0 20px;
  vertical-align: middle;
  flex-shrink: 0;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(245,244,240,0.42);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.trust-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent, #d4ff3c);
  box-shadow: 0 0 8px rgba(212,255,60,0.7);
  flex-shrink: 0;
}

/* ──────────────────────────────────────────────────
   9. SHARED ENTRANCE KEYFRAME
   ────────────────────────────────────────────────── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Override the old global fadeUp that uses same name */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────────────────────
   10. RESPONSIVE
   ────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
  header {
    padding-top: calc(var(--nav-h, 64px) + 60px);
    padding-bottom: 80px;
  }
  .hero-title {
    font-size: clamp(2.8rem, 7.5vw, 5rem);
  }
}

/* Mobile */
@media (max-width: 768px) {
  header {
    padding: calc(var(--nav-h, 64px) + 50px) 24px 70px;
    text-align: center;
  }
  .hero-content { max-width: 100%; }

  .eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    padding: 6px 14px;
    margin-bottom: 28px;
  }

  .hero-title {
    font-size: clamp(2.4rem, 9vw, 3.8rem);
    letter-spacing: -0.03em;
  }

  .hero-title .line-2 {
    font-size: 1.06em;
  }

  .hero-sub {
    font-size: clamp(0.92rem, 3.2vw, 1.05rem);
    margin-top: 24px;
    max-width: 90%;
  }

  .hero-actions {
    margin-top: 40px;
  }

  .hero-actions .btn-row {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .trust-bar {
    margin-top: 56px;
    gap: 0;
    column-gap: 0;
  }

  .trust-item + .trust-item::before {
    margin: 0 12px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  header {
    padding: calc(var(--nav-h, 64px) + 40px) 18px 60px;
  }

  .hero-title {
    font-size: clamp(2rem, 10.5vw, 2.8rem);
    letter-spacing: -0.025em;
  }

  .hero-sub {
    font-size: 0.92rem;
    max-width: 100%;
  }

  .trust-bar {
    flex-direction: column;
    gap: 10px;
  }

  .trust-item + .trust-item::before { display: none; }
}

/* Very small (320px) */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.9rem;
  }
  .eyebrow {
    font-size: 0.58rem;
    letter-spacing: 0.18em;
  }
}

/* ──────────────────────────────────────────────────
   11. BLACK & WHITE THEME OVERRIDES
   ────────────────────────────────────────────────── */
[data-theme="bw"] header {
  background: #f5f5f3;
}
[data-theme="bw"] .hero-grid-bg {
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
}
[data-theme="bw"] .hero-glow-1,
[data-theme="bw"] .hero-glow-2 {
  display: none;
}
[data-theme="bw"] header::after {
  opacity: 0.018;
}
[data-theme="bw"] .eyebrow {
  color: #111;
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.18);
}
[data-theme="bw"] .eyebrow::before {
  background: #111;
  box-shadow: none;
}
[data-theme="bw"] .hero-title {
  color: #0a0a0a;
}
[data-theme="bw"] .hero-title .line-1 {
  color: #0a0a0a;
}
[data-theme="bw"] .hero-title .line-2 {
  color: #111;
}
[data-theme="bw"] .hero-title .line-2::after {
  background: linear-gradient(90deg, transparent, #111 20%, #111 80%, transparent);
}
[data-theme="bw"] .hero-title .italic-word {
  color: #0a0a0a;
}
[data-theme="bw"] .hero-title .ghost-word {
  -webkit-text-stroke: 1.5px rgba(0,0,0,0.2);
}
[data-theme="bw"] .hero-sub {
  color: #666;
}
[data-theme="bw"] .hero-sub strong {
  color: rgba(10,10,10,0.75);
}
[data-theme="bw"] .hero-actions .btn-primary {
  background: #111;
  color: #f5f5f3;
  box-shadow: 0 4px 0 rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.14);
}
[data-theme="bw"] .hero-actions .btn-primary::before {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}
[data-theme="bw"] .hero-actions .btn-primary:hover {
  background: #2a2a2a;
  box-shadow: 0 6px 0 rgba(0,0,0,0.18), 0 14px 30px rgba(0,0,0,0.2);
}
[data-theme="bw"] .hero-actions .btn-ghost {
  color: rgba(10,10,10,0.65);
  border-color: rgba(0,0,0,0.2);
}
[data-theme="bw"] .hero-actions .btn-ghost:hover {
  color: #0a0a0a;
  border-color: rgba(0,0,0,0.5);
}
[data-theme="bw"] .hero-actions .btn-qualifier {
  color: #888;
}
[data-theme="bw"] .trust-item {
  color: rgba(10,10,10,0.38);
}
[data-theme="bw"] .trust-dot {
  background: #111;
  box-shadow: none;
}
[data-theme="bw"] .trust-item + .trust-item::before {
  background: rgba(0,0,0,0.1);
}
