/* ============================================================
   BLASTBEAT — Magic Hero (full-bleed photo + glass overlay)
   Used on the home page and the main marketing pages.
   Each page sets its background image via inline style on
   .bb-magic-hero-bg, and adds a <link rel="preload"> for that
   image in <head> so it loads instantly.
   ============================================================ */

.bb-magic-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0A0E1A;
  margin-top: calc(var(--nav-height, 80px) * -1);
  padding-top: var(--nav-height, 80px);
}
.bb-magic-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.04);
  animation: bb-hero-kenburns 22s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes bb-hero-kenburns {
  0%   { transform: scale(1.04) translate(0, 0); }
  100% { transform: scale(1.12) translate(-1.5%, -1.5%); }
}
@media (prefers-reduced-motion: reduce) {
  .bb-magic-hero-bg { animation: none; transform: scale(1); }
}

.bb-magic-hero-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 60%, rgba(99,102,241,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 90%, rgba(255,45,120,0.16) 0%, transparent 55%),
    radial-gradient(ellipse at 30% 10%, rgba(0,245,255,0.10) 0%, transparent 60%),
    linear-gradient(180deg, rgba(10,14,26,0.45) 0%, rgba(10,14,26,0.65) 55%, rgba(10,14,26,0.92) 100%),
    linear-gradient(90deg, rgba(10,14,26,0.80) 0%, rgba(10,14,26,0.35) 45%, rgba(10,14,26,0.25) 100%);
}
.bb-magic-hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bb-magic-hero-inner {
  position: relative;
  z-index: 5;
  width: 100%;
  padding: 6rem 0 5rem;
}

/* Eyebrow chip */
.bb-magic-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: 'IBM Plex Mono', 'Space Grotesk', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.94);
  font-weight: 600;
  margin-bottom: 1.75rem;
}
.bb-magic-eyebrow .bb-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-lime, #B8FF00);
  box-shadow: 0 0 12px var(--neon-lime, #B8FF00);
  animation: pulse 2s ease-in-out infinite;
}

/* Headline + colour accents */
.bb-magic-hero h1 {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: clamp(2rem, 5.5vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: #fff;
  font-weight: 800;
  margin: 0 0 1.5rem;
  max-width: 19ch;
  text-shadow: 0 6px 40px rgba(0,0,0,0.4);
}
.bb-magic-hero h1 .accent-vivid {
  background: linear-gradient(135deg, #6366F1 0%, #A855F7 35%, #FF2D78 70%, #FF6B35 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(99,102,241,0.25));
}
.bb-magic-hero h1 .accent-action { color: #B8FF00; text-shadow: 0 0 28px rgba(184,255,0,0.4); }
.bb-magic-hero h1 .accent-cyan { color: #00F5FF; text-shadow: 0 0 24px rgba(0,245,255,0.35); }
.bb-magic-hero h1 .accent-green { color: #34D399; text-shadow: 0 0 24px rgba(52,211,153,0.35); }
.bb-magic-hero h1 .accent-coral { color: #FF6B35; text-shadow: 0 0 24px rgba(255,107,53,0.35); }

.bb-magic-hero .bb-magic-deck {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255,255,255,0.9);
  max-width: 56ch;
  margin: 0 0 1rem;
}
.bb-magic-hero .bb-magic-supporting {
  font-size: clamp(0.92rem, 1.1vw, 1rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  max-width: 62ch;
  margin: 0 0 2.25rem;
}

/* CTAs */
.bb-magic-cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.bb-magic-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1.05rem 2rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.98rem;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #6366F1, #A855F7, #FF2D78);
  background-size: 220% 220%;
  box-shadow:
    0 18px 50px -10px rgba(168,85,247,0.55),
    0 0 0 1px rgba(255,255,255,0.12) inset;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-position 0.6s ease;
  animation: bb-cta-shift 8s ease-in-out infinite;
}
@keyframes bb-cta-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.bb-magic-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 24px 60px -10px rgba(168,85,247,0.7),
    0 0 0 1px rgba(255,255,255,0.18) inset;
}
.bb-magic-cta-primary.cta-green { background: linear-gradient(135deg, #059669, #10B981, #84CC16); }
.bb-magic-cta-primary.cta-orange { background: linear-gradient(135deg, #FF6B35, #FF2D78, #A855F7); }
.bb-magic-cta-primary.cta-cyan { background: linear-gradient(135deg, #0EA5E9, #00F5FF, #6366F1); }

.bb-magic-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.93rem;
  color: #fff;
  text-decoration: none;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}
.bb-magic-cta-ghost:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.85);
  transform: translateY(-2px);
}

/* Stat shelf */
.bb-magic-stat-shelf {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  background: linear-gradient(180deg, transparent, rgba(10,14,26,0.92));
  padding: 2rem 0 1.5rem;
}
.bb-magic-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.bb-magic-stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(255,255,255,0.2);
}
.bb-magic-stat-num {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: clamp(1.3rem, 2.2vw, 1.85rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}
.bb-magic-stat-num .stat-unit {
  font-size: 0.6em;
  color: rgba(255,255,255,0.7);
  font-weight: 700;
  margin-left: 0.2rem;
}
.bb-magic-stat-label {
  font-family: 'IBM Plex Mono', 'Space Grotesk', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
}

/* Vertical scroll cue */
.bb-magic-scroll-cue {
  position: absolute;
  bottom: 7.5rem;
  right: 2rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.7);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.bb-magic-scroll-line {
  width: 1.5px;
  height: 50px;
  background: linear-gradient(to top, transparent, rgba(255,255,255,0.6));
  animation: bb-scroll-line 2.4s ease-in-out infinite;
}
@keyframes bb-scroll-line {
  0% { transform: translateY(0); opacity: 0.3; }
  50% { opacity: 1; }
  100% { transform: translateY(20px); opacity: 0.3; }
}

/* ---- Mobile tuning ---- */
@media (max-width: 900px) {
  .bb-magic-hero-bg { background-position: center center; }
  .bb-magic-stats { grid-template-columns: repeat(2, 1fr); gap: 1.25rem 1.5rem; }
  .bb-magic-scroll-cue { display: none; }
}
@media (max-width: 640px) {
  .bb-magic-hero { min-height: 88dvh; }
  .bb-magic-hero-inner { padding: 4rem 0 8.5rem; }
  .bb-magic-hero h1 { font-size: clamp(1.85rem, 8.5vw, 2.9rem); letter-spacing: -0.02em; max-width: 22ch; }
  .bb-magic-hero .bb-magic-deck { font-size: 0.95rem; }
  .bb-magic-hero .bb-magic-supporting { display: none; }
  .bb-magic-eyebrow { font-size: 0.6rem; padding: 0.4rem 0.85rem; margin-bottom: 1.1rem; }
  .bb-magic-cta-primary { padding: 0.92rem 1.5rem; font-size: 0.92rem; flex: 1 1 100%; justify-content: center; }
  .bb-magic-cta-ghost { padding: 0.85rem 1.4rem; font-size: 0.88rem; flex: 1 1 100%; justify-content: center; }
  .bb-magic-stat-shelf { padding: 1.1rem 0 0.9rem; }
  .bb-magic-stat { padding-left: 0.7rem; }
}
@media (max-width: 380px) {
  .bb-magic-stats { grid-template-columns: 1fr 1fr; gap: 0.9rem; }
  .bb-magic-stat-num { font-size: 1.15rem; }
  .bb-magic-stat-num .stat-unit { font-size: 0.55em; }
}
