/**
 * Holographic Blueprint layer — Bourne Builders
 * Split hero layout: dark navy left panel (blueprint) · clean photo right panel
 * This file is only loaded on the front page (is_front_page() check in enqueue.php)
 */

/* ── Override hero overlay: deep-navy left panel, photo-clear right ────────
   The original overlay fades evenly L→R at ~0.78–0.20. We make the left
   half near-solid (0.96) with a smooth feathered edge into the bright photo.  */

.section-hero .hero__overlay {
  background:
    linear-gradient(
      to right,
      rgba(10, 20, 32, 0.97)  0%,
      rgba(10, 20, 32, 0.97) 42%,
      rgba(10, 20, 32, 0.80) 48%,
      rgba(10, 20, 32, 0.28) 58%,
      rgba(10, 20, 32, 0.06) 100%
    ),
    linear-gradient(
      to top,
      rgba(10, 20, 32, 0.60) 0%,
      transparent 45%
    );
}

/* ── Panel divider line ──────────────────────────────────────────────────── */

.hero__panel-divider {
  position: absolute;
  left: 50%;
  top: 6%;
  bottom: calc(74px + 6%);   /* stop above the stats bar */
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent        0%,
    rgba(184, 150, 110, 0.30) 18%,
    rgba(184, 150, 110, 0.30) 82%,
    transparent       100%
  );
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 700ms var(--ease-out) 1300ms both;
}

/* Glowing dot at the top and bottom of the divider */
.hero__panel-divider::before,
.hero__panel-divider::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: 0 0 8px var(--color-gold), 0 0 16px rgba(184, 150, 110, 0.4);
  opacity: 0.55;
}
.hero__panel-divider::before { top: 0; }
.hero__panel-divider::after  { bottom: 0; }

/* ── Blueprint canvas — left panel only ──────────────────────────────────── */

.hero__blueprint-canvas {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;        /* use bottom:0 instead of height:100% so it works when
                       the parent has height:auto (mobile single-column hero) */
  right: 48%;       /* = left 52% of hero width */
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  animation: bpFadeIn 700ms ease-out 350ms both;
}

@keyframes bpFadeIn {
  to { opacity: 0.30; }   /* desktop: atmospheric texture */
}

@keyframes bpFadeInMobile {
  to { opacity: 0.18; }   /* mobile: even more subtle over the photo */
}

/* ── HUD label overlay — left panel only ─────────────────────────────────── */

.hero__blueprint-hud {
  position: absolute;
  left: 0;
  top: 0;
  width: 52%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;   /* JS controls fade-in */
  transition: opacity 600ms ease;
}

.bp-hud-text {
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(184, 150, 110, 0.55);
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(184, 150, 110, 0.25);
}

/* ── HUD corner brackets — left panel corners only ───────────────────────── */

.hero__hud {
  position: absolute;
  width: 24px;
  height: 24px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  animation: hudAppear 700ms var(--ease-out) forwards;
}

@keyframes hudAppear {
  to { opacity: 0.38; }
}

.hero__hud--tl {
  top: calc(var(--header-height) + var(--space-5));
  left: var(--container-pad);
  border-top: 1px solid var(--color-gold);
  border-left: 1px solid var(--color-gold);
  animation-delay: 800ms;
}

.hero__hud--tr {
  display: none;   /* photo panel — no bracket here */
}

.hero__hud--bl {
  bottom: calc(74px + var(--space-8));
  left: var(--container-pad);
  border-bottom: 1px solid var(--color-gold);
  border-left: 1px solid var(--color-gold);
  animation-delay: 900ms;
}

.hero__hud--br {
  display: none;   /* photo panel — no bracket here */
}

/* ── Data readout — anchored inside left panel, near divider ─────────────── */

.hero__data-readout {
  position: absolute;
  top: calc(var(--header-height) + var(--space-14));
  right: calc(50% + var(--space-6));   /* sits just left of the panel divider */
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  opacity: 0;
  animation: fadeIn 600ms var(--ease-out) 1600ms both;
}

.hero__data-line {
  display: block;
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 0.575rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(184, 150, 110, 0.38);
  line-height: 1.7;
}

.hero__data-line:first-child {
  color: rgba(184, 150, 110, 0.58);
  font-size: 0.6rem;
}

.hero__data-line:last-child::after {
  content: '_';
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Holographic shimmer on italic title text ────────────────────────────── */

@keyframes holoShimmer {
  0%   { background-position: -250% center; }
  100% { background-position: 250% center; }
}

.hero__title em {
  background: linear-gradient(
    90deg,
    var(--color-gold)       0%,
    var(--color-gold-light) 22%,
    #F0E0C0                 45%,
    #EDD9B5                 50%,
    #F0E0C0                 55%,
    var(--color-gold-light) 78%,
    var(--color-gold)       100%
  );
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: holoShimmer 6s linear infinite;
  animation-delay: 1.8s;
  font-style: italic;
}

/* ── Stats bar: animated top accent ─────────────────────────────────────── */

.hero__stats {
  position: relative;
}

.hero__stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(184, 150, 110, 0.45),
    rgba(212, 180, 138, 0.70) 50%,
    rgba(184, 150, 110, 0.45)
  );
  opacity: 0;
  animation: fadeIn 700ms var(--ease-out) 1400ms both;
}

/* ── Stats counter glow ──────────────────────────────────────────────────── */

.hero__stat-number {
  transition: text-shadow 400ms ease;
}

.hero__stats.is-counting .hero__stat-number {
  text-shadow:
    0 0 18px rgba(184, 150, 110, 0.5),
    0 0 36px rgba(184, 150, 110, 0.22);
}

/* ── Button light-sweep shimmer ──────────────────────────────────────────── */

/* .btn already carries position: relative; overflow: hidden */
.btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 255, 255, 0.13) 50%,
    transparent 80%
  );
  transform: skewX(-15deg);
  transition: left 550ms ease;
  pointer-events: none;
}

.btn--primary:hover::after {
  left: 160%;
}

/* ── Eyebrow gold rule pulse ─────────────────────────────────────────────── */

.hero__eyebrow::before {
  animation: goldPulse 4s ease-in-out infinite;
  animation-delay: 2.2s;
}

/* ── Mobile: single-column hero, simpler blueprint overlay ───────────────── */

@media (max-width: 900px) {

  /* Restore the standard mobile hero overlay (no panel split) */
  .section-hero .hero__overlay {
    background:
      linear-gradient(
        to bottom,
        rgba(13, 27, 42, 0.52) 0%,
        rgba(13, 27, 42, 0.46) 40%,
        rgba(13, 27, 42, 0.90) 100%
      ),
      linear-gradient(
        to right,
        rgba(13, 27, 42, 0.82) 0%,
        rgba(13, 27, 42, 0.55) 55%,
        rgba(13, 27, 42, 0.30) 100%
      );
  }

  /* Canvas: full-width, reduced opacity */
  .hero__blueprint-canvas {
    right: 0;   /* override the desktop right:48% — span full width on mobile */
    animation: bpFadeInMobile 800ms ease-out 400ms both;
  }

  /* Scan sweep: keep it, lose the glow shadow for performance */
  .hero__scan-sweep {
    display: block;
    box-shadow: none;
    opacity: 0;
    animation: scanSweep 10s ease-in-out infinite;
    animation-delay: 3s;
  }

  /* Hide panel elements that don't make sense on mobile */
  .hero__blueprint-hud,
  .hero__hud,
  .hero__panel-divider,
  .hero__data-readout {
    display: none;
  }

  /* Keep the holographic title shimmer — it works fine on mobile */
}

/* ── Respect prefers-reduced-motion ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .hero__blueprint-canvas {
    animation: none;
    opacity: 0.22;
  }

  .hero__panel-divider {
    animation: none;
    opacity: 0.28;
  }

  .hero__hud {
    animation: none;
    opacity: 0.35;
  }

  .hero__data-readout {
    animation: none;
    opacity: 0.38;
  }

  .hero__title em {
    animation: none;
    -webkit-text-fill-color: var(--color-gold-light);
    background: none;
  }

  .hero__eyebrow::before {
    animation: none;
  }

  .btn--primary::after {
    display: none;
  }
}
