/* =============================================================================
   Blackrock Drill & Blast · css/sections/hero.css · the home hero (A · HUD bench, locked in round 15; hero B and its toggles removed)
     parts/hero-a.html: the bench plate (the AI re-angle of the licensed Adobe photo) + timing wave (SVG built by
     js/sections/hero.js) + HUD + copy.
   Everything renders complete without JS; js/sections/hero.js only adds motion (and the wave's dots).
   ============================================================================= */

/* ---------- 1. shared ---------- */
.hero {
  --hero-h: clamp(640px, 100svh, 1100px);
  --hero-pad-b: clamp(36px, 6.4vh, 76px);
  --hud-line: rgba(236, 233, 226, .16);
  --veil: 15, 17, 19;                      /* ink-0 as rgb, for the photo scrims */
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: clamp(640px, 100vh, 1100px);
  min-height: var(--hero-h);
  overflow: hidden; overflow: clip;
  background: var(--ink-0); color: var(--bone);
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero .hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero__body { position: relative; z-index: 3; padding-top: calc(var(--nav-h) + 28px); padding-bottom: var(--hero-pad-b); }
.hero__title { margin-top: 18px; }
.hero__foot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 48px; margin-top: clamp(20px, 3vh, 34px); }
.hero__foot .lead { flex: 0 1 50ch; }
.hero .lead { color: var(--stone); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
/* the photo status tag: bottom-left of the hero, aligned with the copy. It sits outside .hero__media (that layer is under the scrim). */
.hero .hero__ph { z-index: 4; left: max(var(--gutter), (100% - var(--max)) / 2); bottom: 16px; }

/* ---------- 2. A · HUD bench ---------- */
/* the plate (hero-reangle2.jpg, 2560 x 1428, ~16:9) has the rig centred in its top half: narrower screens crop it left/right
   around the rig (50%); wider than the plate it is cropped at the bottom and hangs from the top (the mast head stays in
   frame). js/sections/hero.js sets the object-position per plate (PLATES) and reads the computed value to put the dots on
   the collars, any value works. */
.hero--a .hero__img { object-position: 50% 0%; }
@media (min-width: 751px) { .ha-plate { will-change: transform; } }   /* the parallax layer (desktop only) */
.ha-wave { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.hero--a .hero__scrim {
  background:
    linear-gradient(180deg, rgba(var(--veil), .74) 0, rgba(var(--veil), .3) calc(var(--nav-h) + 36px), rgba(var(--veil), 0) 36%),
    linear-gradient(0deg, rgba(var(--veil), .9) 0, rgba(var(--veil), .66) 24%, rgba(var(--veil), .18) 44%, rgba(var(--veil), 0) 58%),
    linear-gradient(90deg, rgba(var(--veil), .5) 0, rgba(var(--veil), 0) 48%),
    rgba(var(--veil), .1);
}

/* the wave (elements created in js; see buildWave). Armed = bone ring; fired = amber ring + core (the flash, glow and
   ripple are transient). Isochrones = lines of equal delay, every 25 ms (the 100 ms ones are --major). Only opacity and
   transforms animate. */
.ha-hole__ring { fill: rgba(15, 17, 19, .35); stroke: rgba(236, 233, 226, .78); stroke-width: 1; }
.ha-hole__lit { fill: rgba(15, 17, 19, .4); stroke: var(--amber); stroke-width: 1.3; opacity: 0; }
.ha-hole__flash { fill: #FFC266; opacity: 0; }
.ha-hole__core { fill: var(--amber); opacity: 0; }
.ha-hole__glow { opacity: 0; }
.ha-hole__ripple { fill: none; stroke: var(--amber); stroke-width: 1.4; vector-effect: non-scaling-stroke; opacity: 0; }
.ha-hole__beacon { fill: none; stroke: var(--amber); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0; }
.ha-hole__ms { font: 500 10px var(--mono); letter-spacing: .06em; fill: var(--bone); paint-order: stroke; stroke: rgba(15, 17, 19, .82); stroke-width: 3px; stroke-linejoin: round; opacity: 0; font-variant-numeric: tabular-nums; }
.ha-hole__ms tspan { fill: var(--amber); }
.ha-hole__ms.is-masked { visibility: hidden; }
.ha-tie { fill: none; stroke: var(--amber); stroke-width: 1.2; stroke-linecap: round; opacity: 0; }
.ha-iso__lv { opacity: 0; }                                          /* one level: a dark case under an amber line (reads on sand and on rock) */
.ha-iso__case, .ha-iso__line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ha-iso__case { stroke: rgba(15, 17, 19, .42); stroke-width: 3.2; }
.ha-iso__line { stroke: var(--amber); stroke-width: 1.25; }
.ha-iso__lv--major .ha-iso__case { stroke-width: 3.6; }
.ha-iso__lv--major .ha-iso__line { stroke-width: 1.5; }

/* HUD */
.ha-hud { position: absolute; z-index: 2; inset: calc(var(--nav-h) + 14px) var(--gutter) 22px; pointer-events: none; }
.ha-hud__frame { position: absolute; inset: 0; }
.ha-hud__frame.brackets::after { --b: var(--amber); --l: 26px; }
.ha-hud__reticle { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; overflow: visible; }
.ha-hud__reticle-cross { fill: none; stroke: rgba(236, 233, 226, .78); stroke-width: 1; }
.ha-hud__reticle-ring { fill: none; stroke: rgba(236, 233, 226, .34); stroke-width: 1; }
.ha-hud__reticle-tick { fill: none; stroke: var(--amber); stroke-width: 1.5; }
.ha-hud__coord { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 7px; }
.ha-hud__ruler { width: 241px; height: 9px; overflow: visible; }
.ha-hud__ruler path { fill: none; stroke: rgba(236, 233, 226, .72); stroke-width: 1; shape-rendering: crispEdges; }
.ha-hud__coord .mono { font-size: 11px; letter-spacing: .16em; color: var(--bone); }
.ha-ro-list {
  position: absolute; inset: 16px 16px 46px; margin: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "tl . tr" ". . ." ". . ppv" ". . air"; gap: 8px; align-items: start;
}
.ha-ro {
  position: relative; display: grid; gap: 5px; padding: 9px 13px 10px; min-width: 168px;
  background: rgba(15, 17, 19, .58); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px var(--hud-line);
}
.ha-ro::before { content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 14px; background: var(--amber); }
.ha-ro dt { font: 500 10px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--amber); }
.ha-ro dd { margin: 0; font: 400 12.5px/1.25 var(--mono); letter-spacing: .04em; color: var(--bone); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ha-ro dd span { white-space: nowrap; }
.ha-ro--tl { grid-area: tl; }
.ha-ro--tr { grid-area: tr; justify-self: end; }
.ha-ro--ppv { grid-area: ppv; justify-self: end; width: 100%; }
.ha-ro--air { grid-area: air; justify-self: end; width: 100%; }
.ha-gauge { position: relative; display: block; height: 3px; margin: 3px 3px 0 0; background: rgba(236, 233, 226, .16); }
.ha-gauge::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v, 0) * 100%); background: var(--amber); }
.ha-gauge::after { content: ""; position: absolute; right: -2px; top: -4px; bottom: -4px; width: 2px; background: var(--signal-red); }  /* the limit */
.ha-hud__caption { position: absolute; right: 16px; bottom: 14px; font-size: 11px; letter-spacing: .1em; color: var(--stone); text-transform: none; }

/* copy (clear of the HUD's bottom brackets) */
.hero--a .hero__body { padding-inline: 16px; padding-bottom: calc(var(--hero-pad-b) + 22px); }
.hero--a .hero__title span { display: block; }   /* one sentence per line (balance alone split "Breaking / rock. Building" on phones) */
/* the four readout slots keep their grid names: tl = PATTERN, tr = BENCH, ppv = DELAYS, air = VIBRATION (illustrative) */
.hero--a .hero__foot { max-width: calc(100% - 250px); }
/* the photo tag: aligned with the copy, in the band between the CTAs and the HUD's bottom edge (clear of its bracket) */
.hero--a .hero__ph { left: calc(max(var(--gutter), (100% - var(--max)) / 2) + 16px); bottom: calc(var(--hero-pad-b) / 2 + 11px); }

/* short desktop viewports (laptops at 1440x800, 1366x768, 1280x720): the re-angle plate fills the height, so the rig's
   tracks would sit under the headline; tighten the copy block (smaller display size, tighter rhythm, less bottom padding)
   so the headline starts below the rig. Measured need: ~24 px at 1440x800; this gives ~60 px. */
@media (min-width: 751px) and (max-height: 860px) {
  .hero--a { --t-hero: clamp(48px, 7.6vw, 150px); }
  .hero--a .hero__body { padding-bottom: calc(var(--hero-pad-b) + 6px); }
  .hero--a .hero__title { margin-top: 10px; }
  .hero--a .hero__foot { margin-top: 16px; }
  .hero--a .lead { font-size: clamp(17px, 1.3vw, 20px); }
}

@media (max-width: 1180px) {
  .ha-ro--tr { display: none; }                                      /* keep the corners light on small laptops */
  .hero--a .hero__foot { max-width: calc(100% - 230px); }
  .hero--a .hero__foot .lead { flex-basis: 44ch; }
}
@media (max-width: 1000px) {
  .ha-ro--air, .ha-hud__caption { display: none; }
  .ha-ro-list { grid-template-areas: "tl . ppv" ". . ." ". . ." ". . ."; }
  .hero--a .hero__foot { max-width: none; }
}

/* A on phones: the plate is a band at the top (centred on the pattern), the copy stacks under it */
@media (max-width: 750px) {
  .hero--a { --plate-h: clamp(440px, 124vw, 560px); --img-h: min(75vw, calc(var(--plate-h) - var(--nav-h) + 8px)); justify-content: flex-end; }   /* --img-h = the 4:3 window's height (mobile pass 2026-10-19) */
  .hero--a .ha-plate { bottom: auto; height: var(--plate-h); }
  /* a 4:3 window on the plate, full width, from just under the nav (the HUD frame is sized to it): the ~16:9 plate is
     cropped left/right around the rig; on wide phones the window is capped at the plate. js/sections/hero.js follows the
     img box and its object-position, and drops the collars that touch its edges. */
  .hero--a .hero__img { top: calc(var(--nav-h) - 8px); height: auto; aspect-ratio: 4 / 3; max-height: calc(var(--plate-h) - var(--nav-h) + 8px); object-position: 50% 0%; }
  .hero--a .hero__scrim {
    bottom: auto; height: var(--plate-h);
    background:
      linear-gradient(180deg, rgba(var(--veil), .78) 0, rgba(var(--veil), .2) calc(var(--nav-h) + 30px), rgba(var(--veil), 0) 34%),
      linear-gradient(0deg, var(--ink-0) 0, rgba(var(--veil), .82) 18%, rgba(var(--veil), .2) 40%, rgba(var(--veil), 0) 52%),
      rgba(var(--veil), .1);
  }
  .ha-hud { inset: calc(var(--nav-h) + 8px) 12px auto; height: calc(var(--img-h) - 32px); }   /* the frame sits 16 px inside the window on every phone width */
  .ha-hud__frame.brackets::after { --l: 18px; }
  .ha-hud__coord { display: none; }
  .ha-hud__reticle { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .ha-ro-list { inset: 10px 10px auto; grid-template-areas: "tl . ppv"; grid-template-rows: auto; }
  .ha-ro { min-width: 0; padding: 7px 9px 8px; gap: 4px; }
  .ha-ro dt { font-size: 9px; }
  .ha-ro dd { font-size: 10.5px; white-space: normal; max-width: 19ch; }
  .ha-ro dd span { white-space: normal; overflow-wrap: anywhere; }
  .ha-ro--tl dd { max-width: 17ch; }
  .ha-ro--ppv { width: auto; }
  .hero--a .hero__body { padding-inline: 0; padding-top: calc(var(--nav-h) - 8px + var(--img-h) + 22px); padding-bottom: 28px; }   /* the eyebrow starts 22 px under the window's edge (it straddled it before) */
  .hero--a .hero__title { font-size: min(var(--t-hero), (100vw - 2 * var(--gutter)) / 5.95); }   /* "Breaking rock." (5.87 em) holds one line down to 320 px phones; 56 px from ~373 px up */
  .hero--a .hero__ph { left: max(var(--gutter), (100% - var(--max)) / 2); top: calc(var(--plate-h) - 170px); bottom: auto; }   /* on the photo */
}

/* ---------- 5. phones: shared copy rules ---------- */
@media (max-width: 750px) {
  .hero { --hero-h: auto; min-height: 100svh; }
  .hero__title { margin-top: 14px; }
  .hero .lead { font-size: 17px; line-height: 1.5; }
  .hero__foot { gap: 22px; }
  .hero__ctas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; width: 100%; }
  .hero__ctas .btn { width: 100%; min-height: 54px; font-size: 19px; }
  .hero .hero__ph { font-size: 9px; letter-spacing: .08em; padding: 4px 6px; max-width: calc(100% - 2 * var(--gutter)); line-height: 1.25; }   /* long tags wrap inside the gutters */
}

/* ---------- 6. reduced motion: everything static (js also skips the timelines) ---------- */
@media (prefers-reduced-motion: reduce) {
  .ha-plate { will-change: auto; transform: none !important; }
}
