/* ============================================================
   HERO — Cinematic hero with røntgen scan-line reveal
   ============================================================ */

.hero {
  position:relative; min-height:92vh;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden; padding:calc(var(--nav-clear) + var(--sp-6)) var(--gutter) var(--section-y); background:var(--ink-1000);
}

/* Layer 1: Normal photo (always visible) */
.hero-img {
  position:absolute; inset:0;
  background:url('/img/hero-normal.png?v=8ab21f3f19') center/cover; /* fallback */
  background:image-set(url('/img/hero-normal.webp?v=3e70453403') type('image/webp'),
                       url('/img/hero-normal.png?v=8ab21f3f19') type('image/png')) center/cover;
  filter:var(--photo-hero);
  animation:heroZoom 40s ease-in-out infinite alternate;
}

/* Layer 2: X-ray photo (revealed by scan line) */
.hero-img-xray {
  position:absolute; inset:0; z-index:0;
  background:url('/img/hero-xray.png?v=5a78272e9c') center/cover; /* fallback */
  background:image-set(url('/img/hero-xray.webp?v=b815792197') type('image/webp'),
                       url('/img/hero-xray.png?v=5a78272e9c') type('image/png')) center/cover;
  filter:var(--photo-xray);
  /* The reveal runs once and holds (forwards): the x-ray stays uncovered. */
  animation:heroZoom 40s ease-in-out infinite alternate, xrayReveal 10s linear 1 forwards;
  clip-path:inset(0 0 100% 0);
  will-change:clip-path;
}

@keyframes heroZoom { 0%{transform:scale(1)} 100%{transform:scale(1.15)} }

/* X-ray reveal: synced with scan line */
@keyframes xrayReveal {
  0%       { clip-path:inset(0 0 100% 0); }   /* hidden */
  80%      { clip-path:inset(0 0 0% 0); }     /* fully revealed at bottom */
  100%     { clip-path:inset(0 0 0% 0); }     /* stays revealed */
}

/* Scanning line animation — synced with x-ray reveal */
.hero-scan {
  position:absolute; inset:0; pointer-events:none; z-index:2;
  /* Zoom in lockstep with .hero-img-xray so the scan line stays on the
     reveal edge across every cycle (the reveal boundary lives on a
     heroZoom-scaled layer; an unscaled line only aligns at scale=1). */
  animation:heroZoom 40s ease-in-out infinite alternate;
}
.hero-scan::before {
  content:''; position:absolute; left:0; width:100%; height:2px;
  background:linear-gradient(90deg,transparent 5%,var(--mark-on-dark) 20%,var(--decor-on-dark) 50%,var(--mark-on-dark) 80%,transparent 95%);
  box-shadow:0 0 20px color-mix(in srgb,var(--glow) 40%,transparent), 0 0 60px color-mix(in srgb,var(--glow) 15%,transparent);
  animation:scanMove 10s linear 1 forwards;   /* one sweep, then gone */
}
@keyframes scanMove {
  0%       { top:0%; opacity:1; }          /* share xrayReveal's 0→80% range */
  80%      { top:100%; opacity:1; }        /* reach bottom, aligned with reveal edge */
  100%     { top:100%; opacity:0; }        /* fade out at bottom */
}

/* Blueprint grid overlay */
.hero-grid {
  position:absolute; inset:0; pointer-events:none; z-index:1;
  background-image:
    linear-gradient(var(--grid-on-dark) 1px,transparent 1px),
    linear-gradient(90deg,var(--grid-on-dark) 1px,transparent 1px);
  background-size:80px 80px;
  mask-image:radial-gradient(ellipse at center,black 30%,transparent 75%);
}

.hero-overlay {
  position:absolute; inset:0; z-index:1;
  background:var(--grad-hero-overlay);
}

.hero-content {
  position:relative; z-index:3; max-width:var(--page-max); width:100%;
  display:grid; grid-template-columns:61.8% 38.2%;
}
.hero-content-inner { grid-column:1; max-width:740px; }

/* Badge */
.hero-badge {
  display:inline-flex; align-items:center; gap:var(--sp-2); padding:var(--sp-2) var(--sp-4);
  /* A dark backing, like the header image's badge (U-42): a light wash let the
     photo through, and the label read at 3.00:1 over it. */
  background:color-mix(in srgb,var(--scrim) 80%,transparent); border:1px solid var(--mark-on-dark);
  border-radius:var(--radius-sm); font-family:var(--mono); font-size:var(--fs-xs);
  color:var(--highlight-on-dark); font-weight:500; margin-bottom:var(--sp-6);
  text-transform:uppercase; letter-spacing:var(--ls-label);
}
.hero-badge .pulse {
  width:6px; height:6px; border-radius:50%; background:var(--accent-on-dark);
  animation:pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; box-shadow:0 0 0 0 color-mix(in srgb,var(--glow) 60%,transparent); }
  50%     { opacity:0.6; box-shadow:0 0 0 8px color-mix(in srgb,var(--glow) 0%,transparent); }
}

/* Typography */
.hero h1 {
  font-family:var(--font-head); font-size:var(--fs-display-xl);
  font-weight:var(--fw-heading); line-height:var(--lh-display); color:var(--text-on-dark); margin-bottom:var(--sp-5); letter-spacing:var(--ls-display);
}
/* Plain colour, not the gradient it was: both stops were --brand-bright, so it
   looks the same, and only real glyphs can carry the halo it needs over the
   x-ray (2.26:1 without it, against 3:1 for large text). */
/* Keeps a hyphenated term whole: the browser breaks after a hyphen. */
.hero h1 .nowrap { white-space:nowrap; }
.hero h1 em {
  font-style:normal; display:block; text-wrap:balance;
  color:var(--highlight-on-dark); text-shadow:var(--text-halo);
}
.hero-sub {
  font-size:var(--fs-lead); color:var(--text-on-dark);
  line-height:var(--lh-body); margin-bottom:var(--sp-6); max-width:580px;
}
.hero-sub a { color:var(--text-on-dark); text-underline-offset:3px; }
.hero-sub a:hover { color:var(--highlight-on-dark); }
.hero-actions { display:flex; gap:var(--sp-3); flex-wrap:wrap; }

