/* ---------- Hero: camera, iris, HUD, dive through the lens ---------- */
.hero { position: relative; z-index: 2; background: var(--ink-950); }
/* Once the lens dive has ended, the 3D section (pulled up underneath) takes over */
.hero-passed .hero { z-index: 0; }

.hero__stage {
  position: relative;
  height: 100svh;
  min-height: 34rem;
  overflow: hidden;
  isolation: isolate;
}

.hero__scene { position: absolute; inset: 0; }
/* Black iris plate over the photo; js/hero.js cuts a hexagonal hole into it.
   An overlay (not a clip on the photo) lets the photo paint at once for a fast LCP. */
.hero__iris {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  background: var(--ink-950);
  pointer-events: none;
}
.intro-pending .hero__iris,
.hero__iris.is-active { display: block; }

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 66% 38%, var(--petrol-700) 0%, var(--petrol-800) 34%, var(--ink-900) 68%, var(--ink-950) 100%);
}

/* The photo keeps its native aspect ratio so lens/eye coordinates stay exact */
.hero__shot {
  --shot-h: 100svh;
  position: absolute;
  right: -6vw;
  bottom: 0;
  height: var(--shot-h);
  width: calc(var(--shot-h) * 1.1702);
}
/* Feathered edges live on the scaled layer so the dive is never clipped */
.hero__photo {
  display: block;
  position: absolute;
  inset: 0;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 16%),
    linear-gradient(to top, transparent 0%, #000 10%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 16%),
    linear-gradient(to top, transparent 0%, #000 10%);
  mask-composite: intersect;
}
.hero__parallax, .hero__lens { position: absolute; inset: 0; }
/* No will-change here: with the feathering mask, a promoted layer zoomed 10× makes Chrome
   re-raster the hero for seconds when scrolling back up. */
.hero__lens { transform-origin: var(--lens-x) var(--lens-y); }
.hero__lens img { width: 100%; height: 100%; object-fit: cover; }

/* Lens glint: specular core + anamorphic streak */
.hero__glint {
  position: absolute;
  left: var(--lens-x);
  top: var(--lens-y);
  width: 0;
  height: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.hero__glint-core,
.hero__glint-streak,
.hero__glint-ghost {
  position: absolute;
  left: 0;
  top: 0;
  translate: -50% -50%;
  border-radius: 50%;
}
.hero__glint-core {
  width: 9vmin;
  height: 9vmin;
  background: radial-gradient(circle, rgb(170 230 255 / 0.55) 0%, rgb(80 170 220 / 0.18) 35%, transparent 70%);
  animation: glint-breathe 5s ease-in-out infinite;
}
.hero__glint-streak {
  width: 44vmin;
  height: 2px;
  border-radius: 0;
  background: linear-gradient(90deg, transparent 0%, rgb(90 180 255 / 0.12) 25%, rgb(200 240 255 / 0.75) 50%, rgb(90 180 255 / 0.12) 75%, transparent 100%);
  filter: blur(0.6px);
  transform: translateX(var(--glint-shift, 0px)) scaleX(var(--glint-scale, 1));
  animation: streak-breathe 5s ease-in-out infinite;
}
.hero__glint-ghost {
  width: 2.2vmin;
  height: 2.2vmin;
  border: 1px solid rgb(160 220 255 / 0.35);
  background: radial-gradient(circle, rgb(120 200 255 / 0.18), transparent 70%);
  transform: translate(calc(var(--glint-shift, 0px) * -2.4), calc(var(--glint-shift, 0px) * 0.35));
}
@keyframes glint-breathe { 50% { opacity: 0.55; scale: 0.85; } }
@keyframes streak-breathe { 50% { opacity: 0.45; } }

/* Eye-AF box sits on the photo so it travels with it */
.hero__focus {
  position: absolute;
  left: var(--eye-x);
  top: var(--eye-y);
  width: 13%;
  aspect-ratio: 1;
  translate: -50% -50%;
  color: var(--af);
  --c: 14px;
  background:
    linear-gradient(currentColor, currentColor) top left / var(--c) 1.5px,
    linear-gradient(currentColor, currentColor) top left / 1.5px var(--c),
    linear-gradient(currentColor, currentColor) top right / var(--c) 1.5px,
    linear-gradient(currentColor, currentColor) top right / 1.5px var(--c),
    linear-gradient(currentColor, currentColor) bottom left / var(--c) 1.5px,
    linear-gradient(currentColor, currentColor) bottom left / 1.5px var(--c),
    linear-gradient(currentColor, currentColor) bottom right / var(--c) 1.5px,
    linear-gradient(currentColor, currentColor) bottom right / 1.5px var(--c);
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 6px rgb(143 227 138 / 0.5));
}
.hero__focus span {
  position: absolute;
  left: 0;
  top: calc(100% + 0.4rem);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

/* ---------- HUD ---------- */
.hud {
  position: absolute;
  inset: 5.25rem var(--gutter) 1.5rem;
  z-index: 3;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: rgb(239 232 221 / 0.78);
  text-transform: uppercase;
}
.hud__corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 0 solid rgb(239 232 221 / 0.55);
}
.hud__corner--tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.hud__corner--tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.hud__corner--bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.hud__corner--br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }

.hud__row {
  position: absolute;
  left: 2.25rem;
  right: 2.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.hud__row--top { top: 0.35rem; }
.hud__row--bottom { bottom: 0.35rem; }
.hud__group { display: flex; align-items: center; gap: 1.4rem; }
.hud__rec { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--paper); }
.hud__tc { font-variant-numeric: tabular-nums; color: var(--paper); }
.hud__battery {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.hud__battery i {
  position: relative;
  width: 20px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
}
.hud__battery i::after {
  content: "";
  position: absolute;
  inset: 1px;
  right: 22%;
  background: currentColor;
}

.hud__meters { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.hud__meters b {
  width: 4px;
  height: 100%;
  background: linear-gradient(to top, var(--af) 0 60%, var(--brass) 60% 85%, var(--rec) 85%);
  transform-origin: bottom;
  animation: meter 1.1s ease-in-out infinite alternate;
}
.hud__meters b:nth-child(2) { animation-duration: 0.8s; animation-delay: -0.3s; }
.hud__meters b:nth-child(3) { animation-duration: 1.3s; animation-delay: -0.6s; }
.hud__meters b:nth-child(4) { animation-duration: 0.9s; animation-delay: -0.2s; }
@keyframes meter {
  0% { transform: scaleY(0.25); }
  60% { transform: scaleY(0.7); }
  100% { transform: scaleY(0.45); }
}

.hud__scroll {
  position: absolute;
  left: 50%;
  bottom: 0;
  translate: -50% 0;
  display: grid;
  justify-items: center;
  gap: 0.6rem;
}
.hud__scroll i {
  width: 1px;
  height: 2.75rem;
  background: rgb(239 232 221 / 0.25);
  position: relative;
  overflow: hidden;
}
.hud__scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: translateY(-100%);
  animation: scroll-cue 2.2s var(--ease-in-out) infinite;
}
@keyframes scroll-cue {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* ---------- Copy ---------- */
.hero__copy {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(5.5rem, 14svh, 9.5rem);
  z-index: 4;
  width: min(44rem, 52vw);
}
.hero__title {
  margin: 0 0 1.5rem;
  font-size: var(--text-hero);
  text-shadow: 0 2px 40px rgb(1 11 14 / 0.5);
}
.hero__eyebrow { display: flex; margin-bottom: clamp(1rem, 2vw, 1.5rem); line-height: 1.4; text-shadow: none; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero__title .line > span { display: block; }
.hero__title .line:last-child { padding-left: 0.6em; }
.hero__lead {
  max-width: 30rem;
  color: var(--sand-300);
  font-size: var(--text-lg);
  line-height: 1.45;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* ---------- Overlays ---------- */
.hero__bars::before,
.hero__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  height: max(3rem, calc((100svh - 100vw / 2.39) / 2));
  background: var(--ink-950);
  transform: scaleY(var(--bars));
  will-change: transform;
}
.hero__bars { --bars: 0; position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.hero__bars::before { top: 0; transform-origin: top; }
.hero__bars::after { bottom: 0; transform-origin: bottom; }

.hero__flash,
.hero__through {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
}
.hero__flash { background: #fff; }
.hero__through {
  background: radial-gradient(circle at 50% 50%, var(--ink-900), var(--ink-950) 70%);
}

.hero__slate {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 0.75rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sand-300);
  pointer-events: none;
  opacity: 0;
}
.intro-pending .hero__slate { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hud__hide-md { display: none; }
}

@media (max-aspect-ratio: 1/1), (max-width: 760px) {
  .hero__shot {
    --shot-h: min(62svh, 120vw);
    top: 3.5rem;
    right: auto;
    bottom: auto;
    left: 50%;
    margin-left: calc(var(--shot-h) * 1.1702 * -0.58);
  }
  .hero__photo {
    -webkit-mask-image:
      linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, #000 10%, #000 62%, transparent 98%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, #000 10%, #000 62%, transparent 98%);
    mask-composite: intersect;
  }
  .hero__title { font-size: clamp(3.5rem, 2rem + 9vw, 7.5rem); }
  /* A true 2.39:1 window would hide the lens on tall screens — keep bars slim */
  .hero__bars::before, .hero__bars::after { height: 11svh; }
  .hero__copy {
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
    bottom: 4.5rem;
  }
  .hero__title { margin: 0 0 0.75rem; }
  .hero__eyebrow { margin-bottom: 0.6rem; }
  .hero__lead { font-size: var(--text-base); }
  .hero__actions { margin-top: 1.25rem; }
  .hud { inset: 4.75rem 0.75rem 0.75rem; }
  .hud__row { left: 1.75rem; right: 1.75rem; }
  .hud__row--bottom, .hud__scroll { display: none; }
  .hud__hide-sm { display: none; }
}

@media (max-width: 420px) {
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
}
