/* ═══════════════════════════════════════════════════
   HERO — Local Answers
   Cinematic full-bleed treatment. Video fills the right
   side as an absolute background layer. Left text sits
   above a dark-to-transparent gradient overlay.

   Z-INDEX STACK:
     0  → .hero-video-bg  (video, absolute, right side)
     1  → .hero-video-overlay  (gradient, full cover)
     2  → .glowy-hero-content  (text, above everything)
     3  → .glowy-hero-left  (text column)
   ═══════════════════════════════════════════════════ */

/* ── Section shell ─────────────────────────────── */
.glowy-hero {
  position: relative;
  overflow: hidden;
  min-height: 760px;
  padding: 120px 48px 96px;
  background: #05050f;
  display: flex;
  align-items: center;
}

/* ── Video background layer ──────────────────────
   Starts at left: 24% so the video physically sits
   behind the text column. The mask-image feathers
   the left edge of the video itself before the
   overlay gradient even applies — two-layer fade
   so no hard vertical seam is possible.
   ─────────────────────────────────────────────── */
.hero-video-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 24%;           /* bleeds well behind the text column */
  width: auto;         /* driven by left/right, not a fixed % width */
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;

  /* Layer 1: mask the video's own left edge to a soft feather */
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent            0%,
    rgba(0,0,0,0.08)       6%,
    rgba(0,0,0,0.28)      16%,
    rgba(0,0,0,0.60)      28%,
    rgba(0,0,0,0.88)      42%,
    #000                  56%,
    #000                 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent            0%,
    rgba(0,0,0,0.08)       6%,
    rgba(0,0,0,0.28)      16%,
    rgba(0,0,0,0.60)      28%,
    rgba(0,0,0,0.88)      42%,
    #000                  56%,
    #000                 100%
  );
}

/* ── Soft blur bridge over the feather seam ──────
   Sits inside .hero-video-bg (z:2 within its own
   stacking context) and smooths any residual edge
   with a blurred dark-to-transparent strip.
   ─────────────────────────────────────────────── */
.hero-video-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: -140px;
  width: 280px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    #05050f                    0%,
    rgba(5,5,15,0.90)          32%,
    rgba(5,5,15,0.42)          68%,
    transparent               100%
  );
  filter: blur(20px);
}

.hero-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  display: block;
  opacity: 0.92;
}

/* ── Full-hero gradient overlay ─────────────────
   Covers the entire hero inset:0. The horizontal
   gradient uses smooth, well-spaced stops — no
   abrupt jump — so the dark left side dissolves
   gradually into the visible video on the right.
   ─────────────────────────────────────────────── */
.hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      #05050f                   0%,
      rgba(5,5,15,0.98)        18%,
      rgba(5,5,15,0.92)        30%,
      rgba(5,5,15,0.74)        42%,
      rgba(5,5,15,0.46)        54%,
      rgba(5,5,15,0.20)        68%,
      rgba(5,5,15,0.08)        82%,
      rgba(5,5,15,0.28)       100%
    ),
    linear-gradient(
      180deg,
      rgba(5,5,15,0.80)         0%,
      rgba(5,5,15,0.10)        35%,
      rgba(5,5,15,0.10)        72%,
      rgba(5,5,15,0.72)       100%
    );
}

/* ── Content grid ───────────────────────────────── */
.glowy-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  display: grid;
  /* Left column fixed at 46%, right is empty space (video shows through) */
  grid-template-columns: minmax(420px, 46%) 1fr;
  align-items: center;
}

/* ── Left text column ───────────────────────────── */
.glowy-hero-left {
  position: relative;
  z-index: 3;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Headline ─────────────────────────────────── */
.glowy-hero-headline {
  font-size: clamp(40px, 4.4vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 8px 40px rgba(0,0,0,.35);
  animation: ghFadeUp .7s ease-out .05s both;
}

.glowy-hero-headline-gradient {
  background: linear-gradient(135deg, #7c5cfc 0%, #a78bfa 55%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Subheadline ──────────────────────────────── */
.glowy-hero-subheading {
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.75;
  color: rgba(226,232,240,.76);
  margin: 0;
  max-width: 540px;
  animation: ghFadeUp .7s ease-out .15s both;
}

/* ── CTA row ──────────────────────────────────── */
.glowy-hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  animation: ghFadeUp .7s ease-out .25s both;
}

/* Primary button */
.glowy-hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  background: linear-gradient(135deg, #5b6ef5 0%, #7c5cfc 100%);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
  box-shadow: 0 8px 28px rgba(124,92,252,.38);
}
.glowy-hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(124,92,252,.52);
}
.glowy-hero-btn-primary:active { transform: translateY(0); }

/* Secondary / ghost button */
.glowy-hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.88);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: background .22s ease, border-color .22s ease, transform .22s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.glowy-hero-btn-secondary:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.32);
  transform: translateY(-2px);
}
.glowy-hero-btn-secondary:active { transform: translateY(0); }

/* ── Entrance animation ───────────────────────── */
@keyframes ghFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Reduced-motion ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .glowy-hero-headline,
  .glowy-hero-subheading,
  .glowy-hero-cta-row {
    animation: none;
  }
  .hero-bg-video {
    /* Pause would require JS; at minimum freeze layout shift */
    animation: none;
  }
}

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

/* Tablet — 901px to 1100px */
@media (max-width: 1100px) {
  .glowy-hero {
    padding: 110px 32px 80px;
    min-height: 680px;
  }
  .hero-video-bg {
    /* Shift left edge further back so the feather has more room */
    left: 16%;
    width: auto;
  }
  .glowy-hero-content {
    grid-template-columns: minmax(360px, 52%) 1fr;
  }
}

/* Mobile — ≤ 900px */
@media (max-width: 900px) {
  .glowy-hero {
    min-height: auto;
    padding: 120px 24px 72px;
  }

  /* Static image covers full section on mobile — full opacity, no mask */
  .hero-video-bg {
    left: 0;
    width: auto;
    opacity: 1;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hero-video-bg::before {
    display: none;
  }

  /* Overlay: dark enough for text legibility, light enough to show the image */
  .hero-video-overlay {
    background:
      linear-gradient(
        180deg,
        rgba(5,5,15,.72)  0%,
        rgba(5,5,15,.52) 45%,
        rgba(5,5,15,.78) 100%
      ),
      linear-gradient(
        90deg,
        rgba(5,5,15,.80)  0%,
        rgba(5,5,15,.40) 100%
      );
  }

  /* Single column */
  .glowy-hero-content {
    grid-template-columns: 1fr;
  }

  .glowy-hero-left {
    max-width: 100%;
    text-align: center;
    align-items: center;
  }

  .glowy-hero-subheading {
    max-width: 100%;
  }

  .glowy-hero-cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
  }

  .glowy-hero-btn-primary,
  .glowy-hero-btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .glowy-hero {
    padding: 96px 16px 60px;
  }
  .glowy-hero-headline {
    font-size: 34px;
  }
}
