/* ============================================================
   00c-spectacular.css — Theatrical visual layer
   Big Bear Marketing Website
   ============================================================
   Loaded AFTER 00b-design-system.css. Pushes the design into
   premium-SaaS territory: floating mesh orbs, 3D tilt cards,
   letter-by-letter reveal, mega-text, glowing accents,
   shimmer buttons, animated dashed borders, custom cursor.
   Everything respects prefers-reduced-motion at the bottom.
   ============================================================ */

/* ============================================================
   FLOATING MESH ORBS
   Drop these inside a .spotlight or dark section to add slow
   drifting colour blobs. Each orb is absolutely-positioned,
   blurred to ~80px, and animates on a unique offset path.
   HTML pattern:
     <div class="orb-field" aria-hidden="true">
       <span class="orb orb--yellow orb--lg"></span>
       <span class="orb orb--green orb--md"></span>
       <span class="orb orb--navy orb--sm"></span>
     </div>
   ============================================================ */

.orb-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.orb-field + * { position: relative; z-index: 1; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
  animation: orb-float 22s ease-in-out infinite;
}
.orb--lg { width: 520px; height: 520px; }
.orb--md { width: 380px; height: 380px; }
.orb--sm { width: 240px; height: 240px; }

.orb--yellow { background: radial-gradient(circle, rgba(255, 215, 0, 0.55) 0%, rgba(255, 215, 0, 0) 60%); }
.orb--green  { background: radial-gradient(circle, rgba(21, 97, 45, 0.65) 0%, rgba(21, 97, 45, 0) 60%); }
.orb--navy   { background: radial-gradient(circle, rgba(15, 59, 95, 0.85) 0%, rgba(15, 59, 95, 0) 60%); }
.orb--white  { background: radial-gradient(circle, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0) 60%); }

/* Position presets — drop these classes on .orb spans */
.orb--tl { top: -10%;  left: -8%; }
.orb--tr { top: -12%;  right: -10%; animation-delay: -7s; animation-duration: 28s; }
.orb--bl { bottom: -12%; left: 8%; animation-delay: -14s; animation-duration: 32s; }
.orb--br { bottom: -8%; right: 12%; animation-delay: -3s;  animation-duration: 24s; }
.orb--c  { top: 30%; left: 40%; animation-delay: -10s; animation-duration: 26s; }

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0)         scale(1);   }
  25%      { transform: translate(60px, -40px)  scale(1.08); }
  50%      { transform: translate(-40px, 60px)  scale(0.95); }
  75%      { transform: translate(40px, 30px)   scale(1.04); }
}

/* ============================================================
   3D TILT — cursor-tracked card lift
   Add .tilt-3d to any card. JS in animations.js reads cursor
   position and sets --tx / --ty / --rx / --ry custom properties.
   ============================================================ */

.tilt-3d {
  transform-style: preserve-3d;
  transform:
    perspective(900px)
    rotateX(var(--ry, 0deg))
    rotateY(var(--rx, 0deg))
    translate3d(0, 0, 0);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  will-change: transform;
}
.tilt-3d > * { transform: translateZ(0); }
.tilt-3d::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 215, 0, 0.10),
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}
.tilt-3d.is-tilting::after { opacity: 1; }
.tilt-3d.is-tilting {
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.25),
    0 12px 28px rgba(255, 215, 0, 0.10);
}

/* ============================================================
   GLOWS — for important elements (CTAs, stats, badges)
   ============================================================ */

.glow {
  filter: drop-shadow(0 0 24px rgba(255, 215, 0, 0.35));
}
.glow-yellow { box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.45), 0 12px 40px rgba(255, 215, 0, 0.28), 0 0 80px rgba(255, 215, 0, 0.18); }
.glow-green  { box-shadow: 0 0 0 1px rgba(21, 97, 45, 0.45),  0 12px 40px rgba(21, 97, 45, 0.30),  0 0 80px rgba(21, 97, 45, 0.18); }
.glow-navy   { box-shadow: 0 0 0 1px rgba(15, 59, 95, 0.45),  0 12px 40px rgba(15, 59, 95, 0.32),  0 0 80px rgba(15, 59, 95, 0.20); }

/* Pulsing glow — subtle, for the hero primary CTA */
.glow-pulse {
  position: relative;
  z-index: 1;
}
.glow-pulse::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--c-yellow), var(--c-yellow-dark), var(--c-yellow));
  filter: blur(14px);
  opacity: 0.55;
  z-index: -1;
  animation: glow-pulse 3.6s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.40; transform: scale(0.96); }
  50%      { opacity: 0.75; transform: scale(1.06); }
}

/* ============================================================
   SHIMMER — a slow diagonal light sweep across an element.
   Use on hero CTAs or featured pricing tiers.
   ============================================================ */

.shimmer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.30) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  animation: shimmer-sweep 3.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.shimmer > * { position: relative; z-index: 1; }
@keyframes shimmer-sweep {
  0%   { transform: translateX(-120%); }
  60%  { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

/* ============================================================
   ANIMATED DASHED BORDER
   Wrap a hero badge or featured card with .dash-border-anim.
   The dashed outline slowly rotates the dash pattern.
   ============================================================ */

.dash-border-anim {
  position: relative;
}
.dash-border-anim::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px dashed rgba(255, 215, 0, 0.50);
  border-radius: inherit;
  animation: dash-spin 14s linear infinite;
  pointer-events: none;
}
@keyframes dash-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   MEGA TEXT — display-scale headings for CTA blocks + heroes
   Use sparingly. One per page max.
   ============================================================ */

.mega-text {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 7.5vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.mega-text-xl {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(3.2rem, 10vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

/* ============================================================
   SPLIT-TEXT REVEAL
   JS wraps each character in a <span class="char">. CSS does
   the rest: each char slides up from below with a stagger.
   Hook: <h1 class="split-text">Words</h1>
   ============================================================ */

.split-text { overflow: hidden; }
.split-text .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%) rotate(8deg);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.split-text.is-revealed .char {
  opacity: 1;
  transform: translateY(0) rotate(0);
}
/* Per-character stagger — 30ms per char up to 30 chars */
.split-text .char:nth-child(1)  { transition-delay: 30ms;  }
.split-text .char:nth-child(2)  { transition-delay: 60ms;  }
.split-text .char:nth-child(3)  { transition-delay: 90ms;  }
.split-text .char:nth-child(4)  { transition-delay: 120ms; }
.split-text .char:nth-child(5)  { transition-delay: 150ms; }
.split-text .char:nth-child(6)  { transition-delay: 180ms; }
.split-text .char:nth-child(7)  { transition-delay: 210ms; }
.split-text .char:nth-child(8)  { transition-delay: 240ms; }
.split-text .char:nth-child(9)  { transition-delay: 270ms; }
.split-text .char:nth-child(10) { transition-delay: 300ms; }
.split-text .char:nth-child(11) { transition-delay: 330ms; }
.split-text .char:nth-child(12) { transition-delay: 360ms; }
.split-text .char:nth-child(13) { transition-delay: 390ms; }
.split-text .char:nth-child(14) { transition-delay: 420ms; }
.split-text .char:nth-child(15) { transition-delay: 450ms; }
.split-text .char:nth-child(16) { transition-delay: 480ms; }
.split-text .char:nth-child(17) { transition-delay: 510ms; }
.split-text .char:nth-child(18) { transition-delay: 540ms; }
.split-text .char:nth-child(19) { transition-delay: 570ms; }
.split-text .char:nth-child(20) { transition-delay: 600ms; }
.split-text .char:nth-child(n+21) { transition-delay: 640ms; }

/* ============================================================
   GRADIENT BORDER — animated rainbow-of-brand around a card
   Wrap card with .grad-border. Inner content sits in .grad-border-inner.
   ============================================================ */

.grad-border {
  position: relative;
  border-radius: var(--r-lg);
  padding: 2px;
  background: linear-gradient(
    120deg,
    var(--c-yellow) 0%,
    var(--c-green) 30%,
    var(--c-navy-light) 60%,
    var(--c-yellow) 100%
  );
  background-size: 240% 240%;
  animation: grad-border-shift 6s linear infinite;
}
.grad-border-inner {
  background: var(--c-navy);
  border-radius: calc(var(--r-lg) - 2px);
  padding: var(--s-6);
  height: 100%;
}
@keyframes grad-border-shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 240% 50%; }
}

/* ============================================================
   NOISE OVERLAY — film-grain texture on hero/CTA sections
   Adds tactile depth so big flat gradients don't look cheap.
   ============================================================ */

.noise {
  position: relative;
  isolation: isolate;
}
.noise::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.6;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}
.noise > * { position: relative; z-index: 1; }

/* ============================================================
   CTA SECTION upgrade — bigger headings, glassy button strip
   Apply alongside .cta-block when you want the FULL drama
   ============================================================ */

.cta-block.cta-block--mega {
  padding-top: var(--s-9);
  padding-bottom: var(--s-9);
  position: relative;
  overflow: hidden;
}
.cta-block.cta-block--mega h2 {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 7.5vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-wrap: balance;
  margin-bottom: var(--s-4);
}
.cta-block.cta-block--mega p {
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto var(--s-6);
}

/* ============================================================
   ICON-CONTAINER POP — service icons jump on card hover
   Compose with .service-teaser-icon by adding .icon-pop.
   ============================================================ */

.icon-pop {
  transition: transform 0.35s var(--ease-spring), background 0.35s var(--ease-out), color 0.35s var(--ease-out);
}
@media (hover: hover) {
  .service-teaser-card:hover .icon-pop,
  .service-card:hover .icon-pop,
  .crm-card:hover .icon-pop,
  .callout-block:hover .icon-pop {
    transform: rotate(-6deg) scale(1.12);
    background: var(--c-yellow);
    color: var(--c-navy);
  }
}

/* ============================================================
   HERO STAT TILES — turn the plain hero-stat row into glass tiles
   Apply .stat-tiles on the .hero-stats container.
   ============================================================ */

.hero-stats.stat-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
  border-top: 0;
  padding-top: 0;
  margin-top: var(--s-5);
}
.hero-stats.stat-tiles .hero-stat {
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 215, 0, 0.20);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-3);
  transition: transform 0.25s var(--ease-out), border-color 0.25s var(--ease-out), background 0.25s var(--ease-out);
}
@media (hover: hover) {
  .hero-stats.stat-tiles .hero-stat:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 215, 0, 0.55);
    background: rgba(255, 255, 255, 0.10);
  }
}
.hero-stats.stat-tiles .hero-stat strong {
  font-size: 1.95rem;
  text-shadow: 0 0 24px rgba(255, 215, 0, 0.35);
}
@media (max-width: 560px) {
  .hero-stats.stat-tiles { grid-template-columns: 1fr; }
}

/* ============================================================
   CTA BUTTONS — glow + shimmer on the primary yellow
   Composed via class names. Stack these onto the existing
   .btn .btn-yellow primary buttons in the hero.
   ============================================================ */

.btn-glow {
  position: relative;
  z-index: 1;
}
.btn-glow::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--c-yellow), var(--c-yellow-dark));
  filter: blur(10px);
  opacity: 0.40;
  z-index: -1;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
@media (hover: hover) {
  .btn-glow:hover::before {
    opacity: 0.75;
    transform: scale(1.05);
  }
}

/* ============================================================
   SECTION DIVIDERS — diagonal clip-path between sections
   Add to a section to slope its bottom edge into the next one.
   ============================================================ */

.divide-down {
  clip-path: polygon(0 0, 100% 0, 100% 96%, 0 100%);
  margin-bottom: -2px;
}
.divide-up {
  clip-path: polygon(0 4%, 100% 0, 100% 100%, 0 100%);
  margin-top: -2px;
}

/* ============================================================
   PARALLAX BG IMAGE — for case-study photos that scroll-translate
   ============================================================ */

[data-parallax-bg] {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}
@media (max-width: 960px) {
  /* Fixed backgrounds fight mobile scroll inertia — fall back to scroll */
  [data-parallax-bg] { background-attachment: scroll; }
}

/* ============================================================
   CARD GLOW ON HOVER — composes with .glass and .service-card
   Adds a subtle yellow halo that bleeds beyond the card edges.
   ============================================================ */

.hover-halo {
  position: relative;
}
.hover-halo::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.18) 0%, transparent 65%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
}
@media (hover: hover) {
  .hover-halo:hover::before { opacity: 1; }
}

/* ============================================================
   HERO ENHANCEMENT — keep content above orbs + noise
   The orb-field is z-index: 0 and the noise pseudo is also 0.
   Lift the .hero-grid container above both so copy stays crisp.
   ============================================================ */

#hero.spotlight .container.hero-grid {
  position: relative;
  z-index: 2;
}
#hero.spotlight .hero-badge-wrap {
  position: relative;
  z-index: 3;
}
/* Hero header drop-shadow so it pops against the orb glow */
#hero .hero-copy h1 {
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

/* CTA mega block — make sure content sits above orbs/noise */
.cta-block--mega .container { position: relative; z-index: 2; }

/* Reset z-stacking on the case studies so tilt + halo cooperate */
.tilt-3d {
  position: relative;
  z-index: 1;
}

/* ============================================================
   REDUCED MOTION — kill every kinetic element in this layer
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .orb,
  .shimmer::after,
  .dash-border-anim::before,
  .grad-border,
  .glow-pulse::before {
    animation: none !important;
  }
  .split-text .char {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .tilt-3d {
    transform: none !important;
  }
}
