/* ============================================================
   BrijCode — Reusable Service Hero (Section 1)
   Scoped under .service-hero — safe for all service pages
   ============================================================ */

.service-page {
  background: #f7f8fa;
  color: #071a33;
  overflow-x: clip;
}

/* Allow Section 2 phones to breathe at edges without page scrollbar */
.service-page--field-sales {
  overflow-x: clip;
}

.service-page--field-sales .service-reality {
  overflow: visible;
}

.service-hero {
  --hero-navy: #071a33;
  --hero-navy-mid: #0b1f3a;
  --hero-marigold: #f2a11b;
  --hero-white: #ffffff;
  --hero-soft: #f7f8fa;
  --hero-muted: #cbd5e1;

  /* Default card anchors (overridable via inline CSS vars) */
  --hero-card-location-top: 16%;
  --hero-card-location-right: 7%;
  --hero-card-visits-bottom: 8%;
  --hero-card-visits-right: 37%;
  --hero-card-verification-bottom: 20%;
  --hero-card-verification-right: 5%;

  position: relative;
  isolation: isolate;
  min-height: 700px;
  height: clamp(680px, 78vh, 760px);
  overflow: hidden;
  color: var(--hero-white);
  background: var(--hero-navy);
}

/* ---- Video ---- */

.service-hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.service-hero__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
}

/* ---- Cinematic overlay: strong left → clear right ---- */

.service-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    92deg,
    rgba(7, 26, 51, 0.94) 0%,
    rgba(7, 26, 51, 0.88) 18%,
    rgba(11, 31, 58, 0.72) 34%,
    rgba(11, 31, 58, 0.42) 48%,
    rgba(7, 26, 51, 0.18) 64%,
    rgba(7, 26, 51, 0.08) 78%,
    rgba(7, 26, 51, 0.12) 100%
  );
}

.service-hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 28%;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(7, 26, 51, 0.72) 0%,
    rgba(7, 26, 51, 0.28) 45%,
    transparent 100%
  );
}

/* ---- Content (bottom-left) ---- */

.service-hero__inner {
  position: relative;
  z-index: 4;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-top: 110px;
  padding-bottom: clamp(36px, 5vh, 56px);
}

.service-hero__content {
  max-width: 750px;
  width: 100%;
  opacity: 0;
  transform: translateY(22px);
}

.service-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-display, "Bricolage Grotesque", sans-serif);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(203, 213, 225, 0.88);
}

.service-hero__eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hero-marigold);
  box-shadow: 0 0 0 4px rgba(242, 161, 27, 0.18);
  flex-shrink: 0;
}

.service-hero__title {
  margin: 0 0 16px;
  font-family: var(--font-display, "Bricolage Grotesque", sans-serif);
  font-weight: 700;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--hero-white);
  text-wrap: balance;
}

.service-hero__description {
  margin: 0 0 26px;
  max-width: 46ch;
  font-size: clamp(1.02rem, 1.15vw, 1.15rem);
  line-height: 1.55;
  color: var(--hero-muted);
}

.service-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
}

.service-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
}

.service-hero__btn--primary {
  background: var(--hero-marigold);
  color: var(--hero-navy);
  box-shadow: 0 8px 22px rgba(242, 161, 27, 0.22);
}

.service-hero__btn--primary:hover,
.service-hero__btn--primary:focus-visible {
  background: #e09212;
  color: var(--hero-navy);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(242, 161, 27, 0.3);
  outline: none;
}

.service-hero__btn-arrow {
  display: inline-block;
  transition: transform 0.22s ease;
}

.service-hero__btn--primary:hover .service-hero__btn-arrow,
.service-hero__btn--primary:focus-visible .service-hero__btn-arrow {
  transform: translateX(3px);
}

.service-hero__btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--hero-white);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.service-hero__btn--secondary:hover,
.service-hero__btn--secondary:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--hero-white);
  transform: translateY(-2px);
  outline: none;
}

/* ---- Floating intelligence stage (right) ---- */

.service-hero__stage {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
}

.service-hero__connectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.service-hero__connector {
  stroke: rgba(242, 161, 27, 0.38);
  stroke-width: 0.18;
  stroke-dasharray: 1.2 1.1;
  vector-effect: non-scaling-stroke;
}

.service-hero__connector-dot {
  fill: var(--hero-marigold);
  opacity: 0.85;
}

.service-hero__cards {
  position: absolute;
  inset: 0;
}

.service-hero__card {
  position: absolute;
  width: min(230px, 28vw);
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 14px 32px rgba(7, 26, 51, 0.16),
    0 2px 6px rgba(7, 26, 51, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--hero-navy);
  opacity: 0;
  transform: translateY(14px);
  will-change: transform, opacity;
}

.service-hero__card--location {
  top: var(--hero-card-location-top);
  right: var(--hero-card-location-right);
}

.service-hero__card--visits {
  bottom: var(--hero-card-visits-bottom);
  right: var(--hero-card-visits-right);
}

.service-hero__card--verification {
  bottom: var(--hero-card-verification-bottom);
  right: var(--hero-card-verification-right);
}

.service-hero__card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.service-hero__card-label,
.service-hero__card-kicker {
  margin: 0;
  font-family: var(--font-display, "Bricolage Grotesque", sans-serif);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(7, 26, 51, 0.58);
}

.service-hero__card-kicker {
  margin-bottom: 6px;
}

.service-hero__card-place {
  margin: 0 0 10px;
  font-family: var(--font-display, "Bricolage Grotesque", sans-serif);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--hero-navy);
}

.service-hero__card-body {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: rgba(7, 26, 51, 0.65);
}

.service-hero__card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(7, 26, 51, 0.58);
}

.service-hero__card-meta strong {
  font-family: var(--font-display, "Bricolage Grotesque", sans-serif);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--hero-navy);
}

.service-hero__card-accent {
  color: var(--hero-marigold) !important;
}

.service-hero__card-stat {
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.service-hero__card-stat strong {
  font-family: var(--font-display, "Bricolage Grotesque", sans-serif);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--hero-navy);
  line-height: 1;
}

.service-hero__card-stat span {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(7, 26, 51, 0.55);
}

.service-hero__card-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(7, 26, 51, 0.08);
  font-size: 0.72rem;
  color: rgba(7, 26, 51, 0.55);
}

.service-hero__card-split b {
  display: block;
  font-family: var(--font-display, "Bricolage Grotesque", sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--hero-navy);
  margin-bottom: 2px;
}

/* GPS live indicator */

.service-hero__live {
  position: relative;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.service-hero__live-dot {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--hero-marigold);
}

.service-hero__live-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(242, 161, 27, 0.7);
  animation: serviceHeroPulse 2.2s ease-out infinite;
}

.service-hero__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(242, 161, 27, 0.16);
  color: var(--hero-marigold);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

/* ---- Entrance + float ---- */

.service-hero.is-ready .service-hero__content {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.75s ease,
    transform 0.75s ease;
}

.service-hero.is-ready .service-hero__stage {
  opacity: 1;
  transition: opacity 0.7s ease 0.2s;
}

.service-hero.is-ready .service-hero__card {
  opacity: 1;
  transform: translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.service-hero.is-ready .service-hero__card:nth-child(1) {
  transition-delay: 0.28s;
}
.service-hero.is-ready .service-hero__card:nth-child(2) {
  transition-delay: 0.42s;
}
.service-hero.is-ready .service-hero__card:nth-child(3) {
  transition-delay: 0.56s;
}
.service-hero.is-ready .service-hero__card:nth-child(4) {
  transition-delay: 0.68s;
}

.service-hero.is-ready .service-hero__card.is-floating {
  animation: serviceHeroFloat 5.8s ease-in-out 1s infinite;
}

.service-hero.is-ready .service-hero__card--visits.is-floating {
  animation-duration: 6.4s;
  animation-delay: 1.2s;
}

.service-hero.is-ready .service-hero__card--verification.is-floating {
  animation-duration: 5.5s;
  animation-delay: 1.4s;
}

@keyframes serviceHeroPulse {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.85);
    opacity: 0;
  }
  100% {
    transform: scale(1.85);
    opacity: 0;
  }
}

@keyframes serviceHeroFloat {
  0%,
  100% {
    transform: translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0);
  }
  50% {
    transform: translate3d(
      var(--parallax-x, 0px),
      calc(var(--parallax-y, 0px) - 4px),
      0
    );
  }
}

@keyframes serviceHeroDotA {
  0% {
    offset-distance: 0%;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

.service-hero.is-ready .service-hero__connector-dot--a {
  offset-path: path("M62 28 C58 42, 52 48, 46 62");
  animation: serviceHeroDotA 4.8s linear 0.8s infinite;
}

.service-hero.is-ready .service-hero__connector-dot--b {
  offset-path: path("M78 68 C68 60, 58 56, 50 52");
  animation: serviceHeroDotA 5.4s linear 1.4s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .service-hero__content,
  .service-hero__stage,
  .service-hero__card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }

  .service-hero__live-pulse,
  .service-hero__connector-dot {
    animation: none !important;
  }

  .service-hero__btn,
  .service-hero__btn-arrow {
    transition: none !important;
  }
}
