/* =========================================================
   RONIC — Interactive hero layer (pairs with js/ronic-hero.js)
   Safe to remove: delete this <link> and the script tag.
   ========================================================= */

.hxfx {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hxfx-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
}
html[data-theme="light"] .hxfx-net {
  mix-blend-mode: multiply;
  opacity: 0.7;
}

/* keep real content above the effect layer on every hero type */
.ind-hero-inner,
.hero-content,
.service-hero-content {
  position: relative;
  z-index: 3;
}

/* ---------- scan beam (once, on load) ---------- */
.hxfx-beam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 22%;
  background: linear-gradient(90deg, transparent, rgba(85, 217, 255, 0.015) 40%, rgba(85, 217, 255, 0.07));
  border-right: 1px solid rgba(190, 242, 255, 0.4);
  box-shadow: 2px 0 0.875rem 0 rgba(85, 217, 255, 0.25);
  opacity: 0;
  transform: translateX(-110%);
  animation: hxfxBeam 2.1s cubic-bezier(0.6, 0, 0.25, 1) 0.5s 1 forwards;
}
@keyframes hxfxBeam {
  0% { transform: translateX(-110%); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(560%); opacity: 0; }
}

/* ---------- HUD corners + readout ---------- */
.hxfx-corner {
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border: 0 solid rgba(95, 214, 255, 0.6);
  opacity: 0;
  animation: hxfxIn 0.9s ease-out 1.1s forwards;
}
.hxfx-corner--tl { top: 6rem; left: 1.375rem; border-top-width: 1.5px; border-left-width: 1.5px; }
.hxfx-corner--tr { top: 6rem; right: 1.375rem; border-top-width: 1.5px; border-right-width: 1.5px; }
.hxfx-corner--bl { bottom: 1.375rem; left: 1.375rem; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.hxfx-corner--br { bottom: 1.375rem; right: 1.375rem; border-bottom-width: 1.5px; border-right-width: 1.5px; }
html[data-theme="light"] .hxfx-corner { border-color: rgba(0, 112, 214, 0.55); }
@keyframes hxfxIn { to { opacity: 1; } }

.hxfx-hud {
  position: absolute;
  top: 6.25rem;
  right: 3.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3125rem;
  font: 600 0.5938rem/1 "Inter", ui-monospace, monospace;
  letter-spacing: 0.2em;
  color: rgba(165, 225, 255, 0.85);
  text-transform: uppercase;
  opacity: 0;
  animation: hxfxIn 0.9s ease-out 1.4s forwards;
}
.hxfx-hud-net::before {
  content: "";
  display: inline-block;
  width: 0.375rem;
  height: 0.375rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: #55d9ff;
  box-shadow: 0 0 0.625rem #55d9ff;
  animation: hxfxBlink 1.6s ease-in-out infinite;
}
.hxfx-hud-hint {
  color: rgba(165, 225, 255, 0.55);
  transition: opacity 0.6s;
}
.hxfx-hud-hint.is-done { opacity: 0; }
html[data-theme="light"] .hxfx-hud { color: rgba(0, 70, 150, 0.85); }
html[data-theme="light"] .hxfx-hud-hint { color: rgba(0, 70, 150, 0.55); }
@keyframes hxfxBlink { 50% { opacity: 0.25; } }

/* ---------- cursor reticle ---------- */
.hxfx-rv,
.hxfx-rh {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.25s;
  will-change: transform;
}
.hxfx-rv {
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(95, 214, 255, 0.16) 20%, rgba(95, 214, 255, 0.16) 80%, transparent);
}
.hxfx-rh {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(95, 214, 255, 0.16) 20%, rgba(95, 214, 255, 0.16) 80%, transparent);
}
html[data-theme="light"] .hxfx-rv,
html[data-theme="light"] .hxfx-rh {
  filter: hue-rotate(-12deg) brightness(0.55);
}
.hxfx-coord {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(95, 214, 255, 0.4);
  border-radius: 0.25rem;
  background: rgba(4, 16, 30, 0.72);
  backdrop-filter: blur(0.375rem);
  font: 600 0.5938rem/1 "Inter", ui-monospace, monospace;
  letter-spacing: 0.14em;
  color: #bdeaff;
  white-space: pre;
  opacity: 0;
  transition: opacity 0.25s;
  will-change: transform;
}

/* ---------- flashlight lens ---------- */
.hxfx-lens {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-size: cover;
  background-position: center 48%;
  filter: brightness(1.3) saturate(1.3);
  -webkit-mask-image: radial-gradient(circle var(--hr, 0px) at var(--hx, 50%) var(--hy, 50%), #000 0%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
  mask-image: radial-gradient(circle var(--hr, 0px) at var(--hx, 50%) var(--hy, 50%), #000 0%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
}

/* ---------- headline words react to the cursor ---------- */
.hxfx-h1 .rm-wi {
  color: color-mix(in srgb, #7fe6ff calc(var(--k, 0) * 100%), #fff);
}
html[data-theme="light"] .co-hero .hxfx-h1 .rm-wi {
  color: color-mix(in srgb, #7fe6ff calc(var(--k, 0) * 100%), #fff);
}

/* ---------- tilting hero visual ---------- */
.ind-hero-visual,
.hero-tech-panel {
  will-change: transform;
  transform-style: preserve-3d;
}
.hxfx-glare {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ---------- small screens: keep it light ---------- */
@media (max-width: 900px) {
  .hxfx-corner--tl, .hxfx-corner--tr { top: 5.25rem; }
  .hxfx-hud { top: 5.5rem; right: 2.5rem; }
}
@media (max-width: 600px) {
  .hxfx-hud-hint { display: none; }
  .hxfx-hud { font-size: 0.5312rem; right: 2.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hxfx { display: none; }
}

/* homepage: sit above the hero video + overlay, below the copy */
.hero-section > .hxfx {
  z-index: 2;
}

/* ---------- legibility: dark scrim behind hero copy on every photo hero ----------
   services-pages.css hides .service-hero-shade globally, which left the service
   detail pages with a bare photo (very low contrast on phones). Bring it back. */
.service-hero:not(.co-hero) .service-hero-image ~ .service-hero-shade {
  display: block !important;
  background:
    linear-gradient(90deg, rgba(2, 12, 25, 0.94), rgba(2, 15, 29, 0.8) 52%, rgba(2, 15, 29, 0.4)),
    linear-gradient(0deg, rgba(2, 12, 25, 0.8), transparent 60%),
    linear-gradient(180deg, rgba(2, 12, 25, 0.65), transparent 28%);
}
@media (max-width: 900px) {
  .service-hero .service-hero-shade {
    background:
      linear-gradient(180deg, rgba(2, 12, 25, 0.82), rgba(2, 14, 28, 0.78) 55%, rgba(2, 12, 25, 0.9)) !important;
  }
}

/* Tablet and smaller (<= 1023px): all interactive hero effects are off. */
@media (max-width: 1023px) {
  .hxfx, .wow-canvas { display: none !important; }
  .hxfx-host :is(.hero-tech-panel, .ind-hero-visual) { transform: none !important; }
}

/* Home hero on tablet and smaller: still poster instead of video, no slide controls. */
@media (max-width: 1023px) {
  .hero-slide-controls { display: none !important; }
  .hero-slide:not(.is-active) { display: none !important; }
}
