/* ═══════════════════════════════════════════════════════════════════
   HERO V9.1 — AUDIT-REFINED Editorial Planets — AstroKamya 2026
   Self-contained. All selectors scoped under #hero-v9.
   Applied: All 22 design audit fixes.
   ═══════════════════════════════════════════════════════════════════ */

/* Global background match — deeper cosmic void */
html, body { background-color: #020111 !important; overflow-x: hidden !important; }

/* ── CSS Variables ───────────────────────────────────────────────── */
#hero-v9 {
  --h9-bg-0: #050215;
  --h9-ink: #f0e8d4;
  --h9-ink-soft: rgba(240,232,212,.72);
  --h9-ink-dim: rgba(240,232,212,.42);
  --h9-ink-faint: rgba(240,232,212,.2);
  --h9-gold: #f2cc78;
  --h9-gold-dim: #c89a3a;
  /* FIX #8: Secondary accent for supporting data — cool teal */
  --h9-teal: #7dd3c0;
  --h9-teal-dim: rgba(125,211,192,.55);
  --h9-violet: #a78bfa;
}

/* ── Cosmos Background — deep cosmic void ─────────────────── */
.h9-cosmos {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-color: #020111;
}
.h9-cosmos .h9-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 14% 22%, rgba(255,240,200,.95), transparent 100%),
    radial-gradient(1px 1px at 28% 75%, rgba(255,255,255,.75), transparent 100%),
    radial-gradient(2px 2px at 42% 32%, rgba(255,220,160,.95), transparent 100%),
    radial-gradient(1px 1px at 55% 64%, rgba(255,255,255,.65), transparent 100%),
    radial-gradient(1.5px 1.5px at 68% 12%, rgba(255,230,180,.90), transparent 100%),
    radial-gradient(1px 1px at 77% 85%, rgba(255,255,255,.60), transparent 100%),
    radial-gradient(2px 2px at 88% 47%, rgba(255,210,140,.95), transparent 100%),
    radial-gradient(1px 1px at 93% 22%, rgba(255,255,255,.55), transparent 100%),
    radial-gradient(1.2px 1.2px at 6% 90%, rgba(255,255,255,.75), transparent 100%),
    radial-gradient(1px 1px at 37% 93%, rgba(255,230,200,.65), transparent 100%),
    radial-gradient(1px 1px at 8% 45%, rgba(255,255,255,.50), transparent 100%),
    radial-gradient(1.5px 1.5px at 20% 58%, rgba(255,200,180,.70), transparent 100%),
    radial-gradient(1px 1px at 33% 15%, rgba(200,220,255,.65), transparent 100%),
    radial-gradient(1.2px 1.2px at 48% 82%, rgba(255,255,255,.55), transparent 100%),
    radial-gradient(1px 1px at 62% 38%, rgba(255,240,220,.60), transparent 100%),
    radial-gradient(1.5px 1.5px at 72% 70%, rgba(255,255,255,.50), transparent 100%),
    radial-gradient(1px 1px at 85% 8%, rgba(220,230,255,.65), transparent 100%);
  animation: h9-twinkle 11s ease-in-out infinite alternate;
}
@keyframes h9-twinkle { 0% { opacity: .45; } 100% { opacity: 1; } }

.h9-cosmos .h9-nebula {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 900px 600px at 18% 32%, rgba(110,50,200,.22), transparent 65%),
    radial-gradient(ellipse 700px 550px at 80% 62%, rgba(60,30,150,.20), transparent 65%),
    radial-gradient(ellipse 500px 400px at 50% 80%, rgba(80,20,120,.12), transparent 70%),
    radial-gradient(ellipse 300px 250px at 75% 22%, rgba(200,100,50,.06), transparent 55%);
  mix-blend-mode: screen;
}
.h9-cosmos canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen;
}

/* ── Hero Section ───────────────────────────────────────────────────── */
#hero-v9 {
  position: relative; z-index: 5;
  max-width: 1480px; margin: 0 auto;
  padding: clamp(20px,2.5vh,40px) clamp(20px,3vw,40px) 0 clamp(48px,5vw,80px);
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(48px,5vw,80px);
  /* align-items center ensures left text and right planets share the same vertical midpoint */
  align-items: center;
  min-height: calc(100svh - 72px);
  color: var(--h9-ink);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
#hero-v9::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 25% 40%, rgba(255,155,107,.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 80% 60%, rgba(120,60,180,.06) 0%, transparent 65%);
  animation: h9-auroraDrift 18s ease-in-out infinite alternate;
}
@keyframes h9-auroraDrift {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(-20px,10px) scale(1.05); }
}

/* ── Hero Left Column ────────────────────────────────────────────── */
.h9-hero-left {
  display: flex; flex-direction: column;
  gap: clamp(16px,2.2vh,26px);
  position: relative; z-index: 6;
  padding-right: clamp(16px,3vw,40px);
  align-self: center;
}
/* Gradient veil — fully feathered, no hard edge.
   KEY FIX: right extended far right, multiple gradient layers
   so there is ZERO sharp line behind the text */
.h9-hero-left::before {
  content: ''; position: absolute;
  top: -280px; bottom: -280px; left: -320px; right: -120px;
  z-index: -1; pointer-events: none;
  background:
    /* Primary veil: wide ellipse centered on text block */
    radial-gradient(ellipse 150% 140% at 25% 50%,
      #020111 0%,
      rgba(2,1,17,.97) 12%,
      rgba(2,1,17,.88) 22%,
      rgba(2,1,17,.72) 34%,
      rgba(2,1,17,.50) 46%,
      rgba(2,1,17,.28) 58%,
      rgba(2,1,17,.10) 70%,
      rgba(2,1,17,.03) 82%,
      transparent 92%
    );
}

/* ── Reveal choreography ─────────────────────────────────────────── */
.h9-reveal {
  opacity: 0; transform: translateY(14px); filter: blur(6px);
  transition: opacity 1.1s cubic-bezier(.2,.7,.2,1),
              transform 1.1s cubic-bezier(.2,.7,.2,1),
              filter 1.1s ease;
}
.h9-reveal.h9-in {
  opacity: 1; transform: none; filter: none;
}

/* ── Eyebrow ─────────────────────────────────────────────────────── */
.h9-eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: .22em;
  color: var(--h9-ink-dim); text-transform: uppercase;
  padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.06);
  width: fit-content;
}
.h9-eyebrow .h9-eye-mark { color: var(--h9-gold); font-size: 13px; }
.h9-eyebrow .h9-eye-sep { opacity: .3; }
/* FIX #8: Supporting data in teal */
.h9-eyebrow .h9-eye-text { color: var(--h9-teal-dim); }
.h9-eyebrow .h9-eye-live {
  display: inline-flex; align-items: center; gap: 6px; color: #9de39a;
}
.h9-eyebrow .h9-pulse-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: h9-pulse 1.6s ease-in-out infinite;
}
@keyframes h9-pulse { 0%,100% { opacity: .6; } 50% { opacity: 1; } }

/* ── Title composition — brand serif hierarchy ───────── */
.h9-hero-title {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif !important;
  font-weight: 700 !important;
  font-size: clamp(46px, min(5.6vw, 8.6vh), 96px) !important;
  line-height: .96 !important; letter-spacing: -.02em !important;
  color: #f0e8d4 !important;
  display: flex; flex-direction: column; gap: 2px;
  position: relative;
  transform: none; text-align: left;
  background: none !important; -webkit-text-fill-color: unset !important;
  -webkit-background-clip: unset !important; background-clip: unset !important;
  transition: transform .4s ease;
}
.h9-hero-title em::after { display: none; }
.h9-hero-title .h9-line {
  display: flex; align-items: baseline; gap: .28em; flex-wrap: wrap;
}
.h9-hero-title .h9-line-2 { margin-left: .14em; }
.h9-hero-title .h9-line-3 { margin-left: -.02em; }
.h9-hero-title .h9-line-4 { margin-top: 8px; align-items: center; }
.h9-hero-title .h9-word { display: inline-block; }
.h9-hero-title .h9-italic-chip {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500;
  font-size: .78em; color: var(--h9-gold); letter-spacing: -.01em;
  transform: translateY(-.08em);
}

/* FIX #4 + #8: Signature "written" — warm gold only, NO pink */
.h9-signature-wrap { position: relative; display: inline-block; }
.h9-em-written {
  font-style: italic; font-family: 'Cormorant Garamond', serif; font-weight: 500;
  font-size: 1.35em; letter-spacing: -.02em; line-height: .9;
  background: linear-gradient(120deg, #ffd180 0%, #ffb060 45%, #f2a040 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(255,176,96,.30));
}
/* FIX #12: Scribble underline made more visible — thicker stroke + glow */
.h9-scribble {
  position: absolute; left: -4%; right: -4%; bottom: -12px; width: 108%; height: 26px;
  opacity: 0; animation: h9-scribbleDraw 1.6s .9s cubic-bezier(.2,.7,.2,1) forwards;
  filter: drop-shadow(0 0 8px rgba(255,176,96,.5));
}
.h9-scribble path {
  stroke-dasharray: 800; stroke-dashoffset: 800;
  animation: h9-scribbleStroke 1.6s .9s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes h9-scribbleDraw { to { opacity: 1; } }
@keyframes h9-scribbleStroke { to { stroke-dashoffset: 0; } }

/* "Let's reveal it." — lighter whisper, brand font */
.h9-reveal-word {
  font-family: 'Inter', sans-serif; font-weight: 500; font-size: .52em;
  letter-spacing: -.01em;
  color: var(--h9-ink-soft);
}
/* FIX #9: Asterism — much slower rotation, more subtle */
.h9-asterism {
  color: var(--h9-teal); opacity: .35; margin-left: 6px;
  display: inline-flex; transition: transform .3s ease;
}
.h9-asterism svg { animation: h9-spin 300s linear infinite; }
@keyframes h9-spin { to { transform: rotate(360deg); } }

/* ── Insight card — FIX #10: docked as floating tooltip ──────────── */
.h9-insight-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 14px 18px 12px; border-radius: 4px; max-width: 480px; width: fit-content;
  background: linear-gradient(180deg, rgba(20,12,42,.75) 0%, rgba(14,6,32,.6) 100%);
  border: 1px solid rgba(125,211,192,.18); /* FIX #8: teal accent instead of gold */
  box-shadow: 0 10px 40px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(18px);
}
.h9-insight-card::before {
  content: ''; position: absolute; left: -1px; top: 12%; bottom: 12%; width: 2px;
  background: linear-gradient(180deg, var(--h9-teal), #40dfbe);
}
.h9-insight-rail {
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: .2em; color: var(--h9-ink-dim); text-transform: uppercase;
}
.h9-insight-rail .h9-i-cap { color: var(--h9-teal); }
.h9-insight-rail .h9-i-meter { display: inline-flex; gap: 3px; }
.h9-insight-rail .h9-i-meter i {
  width: 8px; height: 3px; background: rgba(125,211,192,.22); border-radius: 1px;
}
.h9-insight-rail .h9-i-meter i:nth-child(-n+4) {
  background: var(--h9-teal); box-shadow: 0 0 6px rgba(125,211,192,.6);
}
.h9-insight-body {
  font-family: 'Cormorant Garamond', serif; font-size: 17px;
  color: var(--h9-ink); line-height: 1.4;
}
.h9-insight-body .h9-i-spark { color: var(--h9-gold); margin-right: 6px; }
.h9-insight-meta {
  display: flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: .15em; color: var(--h9-teal-dim);
}
.h9-insight-meta .h9-i-dot { opacity: .4; }

/* ── FIX #2: Pull-quote REMOVED — redundant with headline ────────── */
/* (Section deleted from HTML) */

/* ── CTA cluster ─────────────────────────────────────────────────── */
.h9-cta-cluster { display: flex; flex-direction: column; gap: 18px; }
.h9-cta-row { display: flex; gap: 16px; flex-wrap: wrap; }

.h9-btn-primary {
  position: relative; overflow: hidden; display: inline-flex;
  align-items: center; gap: 12px;
  padding: 18px 32px; border-radius: 14px; border: none;
  background: linear-gradient(135deg, #ffd180 0%, #f2cc78 50%, #ffb060 100%);
  color: #1a0a2a;
  font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(242,204,120,.3), inset 0 1px 0 rgba(255,255,255,.45);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease;
  text-decoration: none;
}
.h9-btn-primary .h9-btn-arrow {
  display: inline-flex; transition: transform .3s ease;
}
.h9-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(255,176,96,.6), inset 0 1px 0 rgba(255,255,255,.55);
}
.h9-btn-primary:hover .h9-btn-arrow { transform: translateX(4px); }
.h9-btn-primary:active { transform: scale(0.98); }

.h9-btn-glow {
  position: absolute; inset: -2px; border-radius: 14px; pointer-events: none;
  background: conic-gradient(from 0deg, transparent, rgba(255,209,128,.6), transparent 30%);
  opacity: 0; animation: h9-btnGlow 3s linear infinite; mix-blend-mode: screen;
}
.h9-btn-primary:hover .h9-btn-glow { opacity: .6; }
@keyframes h9-btnGlow { to { transform: rotate(360deg); } }

.h9-btn-primary::after {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  transform: skewX(-20deg);
  animation: h9-btnSweep 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes h9-btnSweep { 0% { left: -100%; } 50%, 100% { left: 150%; } }

/* FIX #15: Ghost button — replaced red dot with play icon */
.h9-btn-secondary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 30px; border-radius: 14px;
  background: rgba(15,8,32,.55); border: 1px solid rgba(255,255,255,.14);
  color: var(--h9-ink);
  font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 500;
  cursor: pointer; backdrop-filter: blur(18px);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
  text-decoration: none;
}
.h9-btn-secondary:hover {
  border-color: rgba(255,217,107,.4); background: rgba(25,15,48,.7);
  transform: translateY(-2px);
}

/* ── Trust row — FIX #8: teal for supporting data ────────────────── */
.h9-trust-row {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px; letter-spacing: .15em;
  color: var(--h9-teal-dim); text-transform: uppercase;
  padding: 14px 0; border-top: 1px solid rgba(255,255,255,.06);
  margin-top: 4px;
}
.h9-trust-item { display: inline-flex; align-items: center; gap: 6px; }
.h9-trust-item .h9-trust-n {
  color: var(--h9-gold); font-weight: 700; font-size: 14px; margin-right: 2px;
}
.h9-trust-item .h9-trust-star { color: var(--h9-gold); }
.h9-trust-sep {
  width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.2);
}

/* ── Hero Right (Planets) — canvas rendering container ─────── */
.h9-hero-right {
  position: relative;
  align-self: stretch;
  min-height: clamp(400px, 58vh, 640px);
  display: flex; flex-direction: column; justify-content: center;
  /* Allow canvas and stage to bleed out into the text column and screen edge */
  overflow: visible;
  margin-left: -15vw;
  margin-right: calc(-1 * clamp(20px, 3vw, 40px));
}

/* Stage */
.h9-stage {
  position: relative; height: clamp(380px, 54vh, 580px); overflow: visible;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  /* Ultra-soft fade mask — using rgba(0,0,0,0) instead of transparent to prevent banding/grey shadows */
  -webkit-mask-image:
    linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.15) 20%, rgba(0,0,0,1) 45%, rgba(0,0,0,1) 65%, rgba(0,0,0,.2) 90%, rgba(0,0,0,0) 100%);
  mask-image:
    linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.15) 20%, rgba(0,0,0,1) 45%, rgba(0,0,0,1) 65%, rgba(0,0,0,.2) 90%, rgba(0,0,0,0) 100%);
}
.h9-stage:active { cursor: default; }
.h9-track {
  position: absolute; top: 50%; left: 0; display: flex; gap: 50px;
  transform: translateY(-50%); will-change: transform;
}

/* FIX1: Carousel navigation arrows REMOVED — user feedback */
.h9-carousel-nav { display: none !important; }

/* ── Single planet unit — smaller, cleaner ────────────────────────── */
.h9-unit {
  position: relative; flex: 0 0 auto;
  width: 340px; height: 460px;
  display: flex; flex-direction: column; align-items: center;
  padding: 0;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), filter .4s ease;
}
.h9-unit:hover {
  transform: scale(1.03);
  filter: brightness(1.08);
}
.h9-unit .h9-slot {
  position: relative; width: 340px; height: 320px; z-index: 2;
}

/* FIX #1: Corner brackets — hidden by default, show on hover only */
.h9-unit .h9-brackets { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
.h9-unit:hover .h9-brackets { opacity: 1; }
.h9-unit .h9-brackets span {
  position: absolute; width: 22px; height: 22px;
  border: 1px solid rgba(255,217,107,.12);
}
.h9-unit .h9-brackets .h9-tl { top: 6px; left: 30px; border-right: 0; border-bottom: 0; }
.h9-unit .h9-brackets .h9-tr { top: 6px; right: 30px; border-left: 0; border-bottom: 0; }
.h9-unit .h9-brackets .h9-bl { bottom: 6px; left: 30px; border-right: 0; border-top: 0; }
.h9-unit .h9-brackets .h9-br { bottom: 6px; right: 30px; border-left: 0; border-top: 0; }

/* FIX #1: Infographic SVG overlay — hidden by default, hover reveals */
.h9-unit .h9-infograph {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 3; overflow: visible;
  opacity: 0; transition: opacity .5s ease;
}
.h9-unit:hover .h9-infograph { opacity: 1; }
.h9-unit .h9-infograph .h9-path {
  fill: none; stroke: rgba(125,211,192,.6); stroke-width: 1.25;
  stroke-dasharray: 180; stroke-dashoffset: 180;
  transition: stroke-dashoffset 1s ease;
}
.h9-unit .h9-infograph .h9-anchor {
  fill: rgba(125,211,192,.9); r: 3; opacity: 0;
  transition: opacity .3s ease .2s;
}
.h9-unit:hover .h9-infograph .h9-path {
  stroke-dashoffset: 0; stroke: rgba(125,211,192,1); stroke-width: 1.5;
}
.h9-unit:hover .h9-infograph .h9-anchor { opacity: 1; fill: #7dd3c0; box-shadow: 0 0 8px #7dd3c0; }

/* FIX #1: Callout labels — hover only, teal color */
.h9-unit .h9-labels { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.h9-unit .h9-labels .h9-cl {
  position: absolute;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  opacity: 0; transition: opacity .5s ease, transform .5s ease;
  transform: translateY(4px);
}
.h9-unit:hover .h9-labels .h9-cl { opacity: .85; transform: none; }
.h9-unit:hover .h9-labels .h9-cl:nth-child(1) { transition-delay: .1s; }
.h9-unit:hover .h9-labels .h9-cl:nth-child(2) { transition-delay: .2s; }
.h9-unit:hover .h9-labels .h9-cl:nth-child(3) { transition-delay: .3s; }
.h9-unit:hover .h9-labels .h9-cl:nth-child(4) { transition-delay: .4s; }
.h9-unit .h9-labels .h9-cl .h9-k {
  font-size: 9px; letter-spacing: .34em; color: var(--h9-teal-dim);
  text-transform: uppercase; margin-bottom: 4px;
}
.h9-unit .h9-labels .h9-cl .h9-v {
  font-family: 'Cormorant Garamond', serif; font-size: 15px; font-weight: 500;
  color: var(--h9-ink); letter-spacing: -.005em; white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0,0,0,.8);
}
.h9-unit .h9-labels .h9-cl.h9-rashi    { top: 10%; left: 16px; text-align: left; }
.h9-unit .h9-labels .h9-cl.h9-nakshatra { top: 10%; right: 16px; text-align: right; }
.h9-unit .h9-labels .h9-cl.h9-pada     { bottom: 10%; left: 16px; text-align: left; }
.h9-unit .h9-labels .h9-cl.h9-avastha  { bottom: 10%; right: 16px; text-align: right; }

/* Central name block */
.h9-unit .h9-name {
  margin-top: 10px; text-align: center; position: relative; z-index: 4;
}
.h9-unit .h9-name .h9-sa {
  font-family: 'Noto Serif Devanagari', serif; font-size: 28px;
  letter-spacing: .02em;
  background: linear-gradient(180deg, #f0e0a8 0%, #d4a54a 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  opacity: .92;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.6));
}
.h9-unit .h9-name .h9-en {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .48em; color: var(--h9-ink-dim);
  text-transform: uppercase; margin-top: 6px;
}
.h9-unit .h9-name .h9-en::before,
.h9-unit .h9-name .h9-en::after {
  content: ''; display: inline-block; width: 18px; height: 1px;
  background: var(--h9-ink-faint); vertical-align: middle; margin: 0 12px;
}

/* FIX #5: Replace signal meter with actual transit data */
.h9-unit .h9-transit-info {
  margin-top: 10px; text-align: center;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .10em; color: var(--h9-ink-dim);
}

/* ══════════════════════════════════════════════════════════════════
   SCANNER BEAM + PARTICLE DECODE SYSTEM
   ══════════════════════════════════════════════════════════════════ */

/* ── Scanner Beam — REMOVED by design ──────────────────────────── */
.h9-scan-beam,
.h9-scan-beam::before,
.h9-scan-beam::after,
.h9-scan-beam.h9-beam-active,
.h9-scan-beam.h9-beam-active::before {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ── Particle decode canvas — overlays the stage ─────────────────── */
.h9-particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 14;
  pointer-events: none;
}

/* ── SCANNED STATE — beam reveals the planet's own HUD ───────────── */
/* Subtle reveal — brackets faint, labels visible, no hard box edges */
.h9-unit.h9-scanned .h9-brackets { opacity: .35; }
.h9-unit.h9-scanned .h9-infograph { opacity: .5; }
.h9-unit.h9-scanned .h9-infograph .h9-path {
  stroke-dashoffset: 0; stroke: rgba(125,211,192,.35);
}
.h9-unit.h9-scanned .h9-infograph .h9-anchor { opacity: .6; }
.h9-unit.h9-scanned .h9-labels .h9-cl { opacity: .85; transform: none; }
.h9-unit.h9-scanned .h9-labels .h9-cl:nth-child(1) { transition-delay: .08s; }
.h9-unit.h9-scanned .h9-labels .h9-cl:nth-child(2) { transition-delay: .16s; }
.h9-unit.h9-scanned .h9-labels .h9-cl:nth-child(3) { transition-delay: .24s; }
.h9-unit.h9-scanned .h9-labels .h9-cl:nth-child(4) { transition-delay: .32s; }

/* Scan glow — subtle filter only */
.h9-unit.h9-scanned {
  filter: brightness(1.08);
}

/* ── Interaction hint ────────────────────────────────────────────── */
.h9-scanner-hud {
  position: absolute; bottom: -36px; left: 0; right: 0;
  z-index: 6; display: flex; align-items: center; justify-content: center;
  gap: 12px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--h9-ink-dim);
  padding-top: 14px;
}
.h9-scanner-hud svg { opacity: .5; }

/* ── Zodiac ring — FIX #13: simplified, text removed ─────────────── */
.h9-zodiac-ring {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; z-index: 0; opacity: .4;
}
.h9-zodiac-ring svg {
  width: min(720px, 105%); height: auto;
  animation: h9-zodiacSpin 120s linear infinite;
}
@keyframes h9-zodiacSpin { to { transform: rotate(360deg); } }

/* ── Film grain — FIX #17: PNG-based, higher opacity ─────────────── */
.h9-grain {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  opacity: .12; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/></svg>");
  background-size: 200px;
}

/* ── WebGL canvas — ABSOLUTE inside sticky .h9-hero-right ──────── */
/* Enterprise scroll fix: canvas shares the same scroll/sticky context
   as the planet slots, so getBoundingClientRect is always in sync.
   No more 1-frame lag on scroll. */
#h9-planets-gl {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 3;
  /* Ultra-soft WebGL mask to match the stage mask — uses rgba(0,0,0,0) to stop banding */
  -webkit-mask-image:
    linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.15) 20%, rgba(0,0,0,1) 45%, rgba(0,0,0,1) 65%, rgba(0,0,0,.2) 90%, rgba(0,0,0,0) 100%);
  mask-image:
    linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.15) 20%, rgba(0,0,0,1) 45%, rgba(0,0,0,1) 65%, rgba(0,0,0,.2) 90%, rgba(0,0,0,0) 100%);
}

/* ── FIX #14: Full-width ephemeris bar — visual separator ────────── */
.h9-ephemeris-bar {
  position: relative; z-index: 6;
  display: flex; align-items: center; gap: 16px;
  padding: 14px clamp(20px,3vw,40px);
  max-width: 1480px; margin: 0 auto;
  background: linear-gradient(90deg, rgba(20,12,42,.5) 0%, rgba(14,6,32,.3) 50%, rgba(20,12,42,.5) 100%);
  border-top: 1px solid rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: .10em;
  color: var(--h9-teal-dim); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}
.h9-eph-label {
  color: var(--h9-teal); font-weight: 600; white-space: nowrap; flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
}
.h9-eph-label::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 6px #4ade80;
  animation: h9-pulse 1.2s ease-in-out infinite;
}
.h9-eph-track {
  display: flex; gap: 28px;
  white-space: nowrap; flex: 1;
  animation: h9-ephScroll 55s linear infinite;
}
.h9-eph-track .h9-eph-item {
  display: inline-flex; gap: 6px; align-items: baseline;
}
.h9-eph-track .h9-eph-glyph { color: var(--h9-gold); font-size: 13px; }
.h9-eph-track .h9-eph-deg { color: var(--h9-teal); }
@keyframes h9-ephScroll { to { transform: translateX(-50%); } }

/* ── FIX #21: Scroll-down affordance ─────────────────────────────── */
.h9-scroll-hint {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 8; display: flex; flex-direction: column; align-items: center;
  gap: 6px; color: var(--h9-ink-dim);
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  letter-spacing: .2em; text-transform: uppercase;
  animation: h9-scrollBounce 2s ease-in-out infinite;
}
.h9-scroll-hint svg { opacity: .5; }
@keyframes h9-scrollBounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ── Mobile Astrology Animation ───────────────────────────────────── */
.h9-mobile-anim {
  display: none;
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 280px; height: 280px;
  align-items: center; justify-content: center;
  z-index: 5;
}
.ma-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(255,217,107,0.15);
}
.ma-ring-1 {
  width: 100%; height: 100%;
  border-top-color: rgba(125,211,192,0.4);
  animation: maSpin 20s linear infinite;
}
.ma-ring-2 {
  width: 75%; height: 75%;
  border-right-color: rgba(167,139,250,0.4);
  animation: maSpinRev 15s linear infinite;
}
.ma-ring-3 {
  width: 50%; height: 50%;
  border-bottom-color: rgba(255,184,0,0.5);
  animation: maSpin 10s linear infinite;
}
.ma-moon {
  position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: #FFB800;
  box-shadow: 0 0 10px #FFB800;
}
.ma-center-star {
  color: #f2cc78; font-size: 24px;
  animation: maPulse 2s ease-in-out infinite alternate;
}
@keyframes maSpin { 100% { transform: rotate(360deg); } }
@keyframes maSpinRev { 100% { transform: rotate(-360deg); } }
@keyframes maPulse { 100% { opacity: 0.5; transform: scale(0.8); } }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 1280px) {
  #hero-v9 {
    padding: clamp(16px,2vh,28px) 28px 0;
    gap: 40px;
    align-items: center;
  }
  .h9-hero-left { gap: clamp(12px,1.6vh,20px); }
  .h9-hero-title { font-size: clamp(40px, min(5vw,8vh), 80px) !important; }
  .h9-hero-right {
    top: clamp(60px, 8vh, 100px);
    min-height: clamp(380px,54vh,540px);
  }
  .h9-stage { height: clamp(360px,52vh,520px); }
  .h9-unit { width: 320px; height: 440px; }
  .h9-unit .h9-slot { width: 320px; height: 310px; }
  .h9-insight-card { padding: 12px 16px; }
  .h9-insight-body { font-size: 15px; }
  .h9-btn-primary, .h9-btn-secondary { padding: 14px 24px; font-size: 17px; }
  .h9-eyebrow { font-size: 10px; letter-spacing: .18em; gap: 10px; padding-bottom: 10px; }
}

@media (max-width: 1024px) {
  #hero-v9 {
    display: block;
    padding: 28px 24px 0; min-height: 0 !important; height: auto !important;
    position: relative;
  }
  .h9-hero-left {
    gap: 18px; max-width: 680px; margin: 0 auto; text-align: left;
    position: relative; z-index: 2; pointer-events: auto;
  }
  .h9-hero-right {
    position: absolute; top: 0; right: 0; left: 0; bottom: 0;
    min-height: 0; overflow: hidden;
    padding: 0; margin: 0;
    z-index: 0; pointer-events: none;
  }
  /* Hide heavy 3D elements on mobile/tablet */
  .h9-orbit-rings, #h9-planets-gl, .h9-zodiac-ring, .h9-stage, .h9-scanner-hud, .h9-particle-canvas {
    display: none !important;
  }
  /* Show minimal mobile animation */
  .h9-mobile-anim {
    display: flex;
    top: 35%; left: 85%; transform: translate(-50%, -50%);
    opacity: 0.35; mix-blend-mode: screen;
  }
  .h9-hero-title { font-size: clamp(44px,7vw,68px) !important; }
  .h9-carousel-nav { width: 38px; height: 38px; }
}

@media (max-width: 640px) {
  #hero-v9 { padding: 20px 18px 0; gap: 24px; }
  .h9-hero-left { gap: 14px; }
  .h9-hero-title {
    font-size: clamp(36px,11vw,56px) !important; gap: 0px !important;
  }
  .h9-hero-title .h9-line { gap: .2em; }
  .h9-asterism svg { width: 32px; height: 32px; }
  .h9-eyebrow {
    font-size: 9px; letter-spacing: .14em; gap: 8px;
    padding-bottom: 8px; flex-wrap: wrap;
  }
  .h9-eyebrow .h9-eye-sep { display: none; }
  .h9-insight-card { padding: 12px 14px; max-width: none; }
  .h9-insight-body { font-size: 15px; }
  .h9-cta-row { gap: 10px; flex-direction: column; align-items: stretch; }
  .h9-btn-primary, .h9-btn-secondary {
    justify-content: center; padding: 14px 20px; font-size: 17px; width: 100%;
  }
  .h9-trust-row { gap: 10px; font-size: 10px; letter-spacing: .12em; }
  .h9-trust-sep { display: none; }
  .h9-hero-right { min-height: 0; margin-top: 0; }
  .h9-stage { height: 340px; }
  .h9-unit { width: 260px; height: 360px; }
  .h9-unit .h9-slot { width: 260px; height: 260px; }
  .h9-unit .h9-name .h9-sa { font-size: 24px; }
  .h9-zodiac-ring { opacity: .2; }
  .h9-grain { opacity: .05; }
  .h9-carousel-nav { width: 34px; height: 34px; }
  .h9-scroll-hint { display: none; }
  .h9-ephemeris-bar { padding: 10px 18px; font-size: 9px; }
  .h9-signature-wrap .h9-em-written { font-size: 1.2em; }
}

@media (max-height: 820px) and (min-width: 1024px) {
  #hero-v9 { padding-top: 16px; gap: 36px; align-items: center; }
  .h9-hero-left { gap: 14px; }
  .h9-hero-title { font-size: clamp(40px, min(4.6vw,7.2vh), 72px) !important; }
  .h9-hero-right {
    top: clamp(60px, 8vh, 96px);
    min-height: clamp(360px,50vh,480px);
    padding-top: clamp(8px, 1.5vh, 20px);
  }
  .h9-stage { height: clamp(360px,50vh,480px); }
  .h9-unit { width: 300px; height: 400px; }
  .h9-unit .h9-slot { width: 300px; height: 280px; }
  .h9-insight-body { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .h9-cosmos .h9-stars,
  .h9-asterism svg,
  .h9-zodiac-ring svg,
  .h9-eph-track,
  .h9-btn-primary::after,
  .h9-btn-glow,
  .h9-scroll-hint {
    animation: none !important;
  }
  .h9-reveal {
    opacity: 1 !important; transform: none !important; filter: none !important;
    transition: none !important;
  }
}
