/* Immersive hero experiment (Sam, 2026-09-28): the rolling video is a full-bleed layer pinned behind the
   hero copy instead of a boxed clip. The page's opaque sections scroll over it. Loaded by the homepage. */
.hero-im {
  position: relative;
  min-height: calc(100vh - 83px);
  min-height: calc(100svh - 83px);
  display: grid;
  align-items: center;
  padding-block: 64px 72px;
}
.hero-im-inner { position: relative; z-index: 1; }
.hero-im .hero-copy { max-width: 760px; }
.hero-im .hero-description { max-width: 620px; }
/* Foreground: brighter tones, a mint second line and a soft dark halo, so the copy separates from the footage. */
.hero-im h1 { color: #fff; text-shadow: 0 2px 28px rgba(4, 12, 22, .55), 0 1px 2px rgba(4, 12, 22, .45); }
/* Second line and kicker use the logo's "Lab" colours (logo-canonical.md: 135deg #39d98a to #4f87ff), not the pale UI mint.
   Text shadow would show through clipped-gradient glyphs, so that line takes a drop-shadow filter instead. */
.hero-im h1 span { background: linear-gradient(135deg, #39d98a, #4f87ff); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 2px 16px rgba(4, 12, 22, .5)); }
.hero-im .hero-kicker { color: #39d98a; }
.hero-im .availability i { background: #39d98a; }
.hero-im .availability { color: #dbe5ee; }
.hero-im .hero-description { color: #e3eaf1; text-shadow: 0 1px 14px rgba(4, 12, 22, .7); }
.hero-im .hero-actions .text-link { color: #fff; }

/* The media layer sits behind everything; the hero is transparent, every later section is opaque. */
.hero-im-media {
  position: fixed;
  inset: 0 0 auto 0;
  height: 100vh;
  height: 100svh;
  z-index: -1;
  overflow: hidden;
  background: var(--navy);
}
.hero-im-media > img,
.hero-im-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 50%;   /* crop only the left, behind the copy; the panels live on the right */
  transform: scale(calc(1 + 0.06 * var(--p, 0)));
  transform-origin: 70% 55%;
}
.hero-im-media > img, .hero-im-video { filter: brightness(.8) saturate(.78); }   /* footage is background: dimmer and quieter than the copy */
.hero-im-video { opacity: 0; transition: opacity 1.2s linear; }
.hero-im-video.is-on { opacity: 1; }
.hero-im-media.is-hidden { visibility: hidden; }

/* Legibility: a navy wash from the left behind the copy, and a fade into the briefings strip below. */
.hero-im-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 22, 37, 0.92) 0%, rgba(8, 22, 37, 0.82) 36%, rgba(8, 22, 37, 0.34) 60%, rgba(8, 22, 37, 0) 80%),
    linear-gradient(180deg, rgba(8, 22, 37, 0.38) 0%, rgba(8, 22, 37, 0) 13%, rgba(8, 22, 37, 0) 74%, rgba(16, 34, 50, 0.9) 100%);   /* light top band so the panels read clearly */
}
.hero-im-scrim::after {          /* darkens as the page scrolls over the video */
  content: "";
  position: absolute;
  inset: 0;
  background: #081625;
  opacity: calc(0.55 * var(--p, 0));
}
.hero-im .hero-copy { transform: translateY(calc(-36px * var(--p, 0))); }

/* Everything after the hero paints over the pinned media. */
.briefings { position: relative; z-index: 1; }

/* Header: transparent over the video at the top of the page, solid once scrolled (JavaScript adds .is-top). */
.site-header { transition: background-color 300ms ease, border-color 300ms ease; }
.site-header.is-top { background: rgba(8, 22, 37, 0.58); border-bottom-color: rgba(202, 219, 235, 0.1); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }   /* a light shade over the video, solid once scrolled */

.hero-im-toggle {                 /* bottom-left under the copy: a faded glyph, no box, so it stays background (Sam, 2026-09-28) */
  position: absolute;
  left: calc(var(--gutter) - 10px);
  bottom: 18px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  background: none;
  border: 0;
  color: #fff;
  opacity: .38;
  cursor: pointer;
  transition: opacity 200ms ease;
}
.hero-im-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.hero-im-toggle:hover, .hero-im-toggle:focus-visible { opacity: .8; }
.hero-im-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 850px) {
  .hero-im { min-height: calc(100svh - 74px); padding-block: 48px 64px; align-items: end; }
  .hero-im-scrim {
    background: linear-gradient(180deg, rgba(8, 22, 37, 0.35) 0%, rgba(8, 22, 37, 0.62) 42%, rgba(8, 22, 37, 0.9) 78%, rgba(16, 34, 50, 0.96) 100%);
  }
  .hero-im-media > img, .hero-im-video { object-position: 64% 50%; }
  .hero-im-toggle { left: auto; right: var(--gutter); }
}
/* Phones and tablets play the same footage without the telemetry cards, which cannot sit beside the copy there. */
@media (max-width: 600px) {
  .hero-im { min-height: calc(100svh - 72px); }
  .hero-im-toggle { left: auto; right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-im-media > img, .hero-im-video, .hero-im .hero-copy { transform: none; }
  .hero-im-video { transition: none; }
}

/* Live telemetry overlay (hero-overlay.js): sharp HTML/SVG over the footage-only video. Quiet by design so it reads
   as ambient product UI behind the headline (Sam, 2026-09-28). Desktop only. */
.hero-ov { position: absolute; inset: 0; pointer-events: none; transform: scale(calc(1 + 0.06 * var(--p, 0))); transform-origin: 70% 55%; }
.hero-ov[hidden] { display: none; }
.hero-ov-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-ov .ov-link { opacity: 0; }
.hero-ov .ov-line { stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; opacity: 0.9; animation: ov-march 1.1s linear infinite; }
.hero-ov .ov-halo { stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: ov-pulse 2.2s ease-out infinite; }
@keyframes ov-march { to { stroke-dashoffset: -8; } }   /* one dash period */
@keyframes ov-pulse { from { transform: scale(1); opacity: 0.6; } to { transform: scale(2); opacity: 0; } }
.hero-ov-card {
  position: absolute; left: 0; top: 0; width: clamp(292px, 21vw, 368px); visibility: hidden; opacity: 0;
  background: rgba(8, 22, 37, 0.72); border: 1px solid rgba(199, 245, 220, 0.16); border-radius: 2px;
  box-shadow: 0 10px 28px rgba(3, 10, 18, 0.35); color: var(--ink);
  -webkit-backdrop-filter: blur(12px) saturate(1.1); backdrop-filter: blur(12px) saturate(1.1);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
.hero-ov .ov-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 9px; border-bottom: 1px solid rgba(195, 210, 223, 0.12); }
.hero-ov .ov-id { font: 600 12.5px/1 var(--display); letter-spacing: 0.06em; }
.hero-ov .ov-type { font-weight: 500; color: var(--muted); letter-spacing: 0.04em; }
.hero-ov .ov-band { font: 600 10px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); padding: 3px 6px 2px; }
.hero-ov .ov-main { display: flex; align-items: center; gap: 12px; padding: 10px 14px 8px; }
.hero-ov .ov-gauge { position: relative; width: 48px; height: 48px; flex: none; }
.hero-ov .ov-gauge svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.hero-ov .ov-track { fill: none; stroke: rgba(195, 210, 223, 0.14); stroke-width: 3.5; }
.hero-ov .ov-arc { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.hero-ov .ov-num { position: absolute; inset: 0; display: grid; place-items: center; font: 600 17px/1 var(--display); }
.hero-ov .ov-k { font: 500 10px/1.2 var(--display); color: var(--muted); letter-spacing: 0.07em; text-transform: uppercase; }
.hero-ov .ov-status { font: 600 15px/1.2 var(--display); color: var(--c); margin-top: 3px; }
.hero-ov .ov-trend { font: 400 12px/1.3 var(--body); color: var(--muted); margin-top: 2px; }
.hero-ov .ov-fc { margin: 0 14px 6px; padding: 7px 9px 5px; background: rgba(195, 210, 223, 0.05); border: 1px solid rgba(195, 210, 223, 0.08); }
.hero-ov .ov-fc-head { display: flex; justify-content: space-between; align-items: baseline; font: 500 10.5px/1.2 var(--display); color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; }
.hero-ov .ov-fc-head b { font: 600 15px/1 var(--display); color: var(--c); letter-spacing: 0; }
.hero-ov .ov-chart { display: block; width: 100%; height: 34px; margin-top: 4px; overflow: visible; }
.hero-ov .ov-thr { stroke: rgba(242, 154, 134, 0.45); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.hero-ov .ov-now { stroke: rgba(195, 210, 223, 0.25); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hero-ov .ov-past { fill: none; stroke: rgba(244, 246, 248, 0.75); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.hero-ov .ov-next { fill: none; stroke-width: 1.6; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.hero-ov .ov-rows { margin: 0; padding: 2px 14px 9px; }
.hero-ov .ov-rows > div { display: grid; grid-template-columns: 94px 1fr; gap: 8px; padding: 5px 0; border-top: 1px solid rgba(195, 210, 223, 0.09); opacity: 0.3; }
.hero-ov dt { font: 600 9.5px/1.6 var(--display); color: var(--muted); letter-spacing: 0.07em; text-transform: uppercase; }
.hero-ov dd { margin: 0; font: 400 13px/1.35 var(--body); color: #e3e9ef; display: flex; justify-content: space-between; gap: 6px; white-space: nowrap; overflow: hidden; }
.hero-ov dd em { font: 600 11px/1.6 var(--display); font-style: normal; color: var(--c); }
@media (max-width: 1099px) { .hero-ov { display: none; } }
.hero-ov.is-paused .ov-line, .hero-ov.is-paused .ov-halo { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .hero-ov { display: none; } }
