/* hero-video feature styles */

/* Layer behind the hero content (.hero sets isolation, so z-index:-1 stays inside it).
   The video plays clearly on the right; a scrim fades it out behind the text column (light mode
   inverts it to pale blue). Measured against every second of the bundled clip at 900-2560px wide,
   all hero text stays >= 4.9:1 (large headline >= 4.9:1) in both themes. Re-measure and tune
   --hero-video-strength / --hero-scrim if you swap in brighter or busier footage. */
.hero-media{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none;background:var(--bg);--hero-video-strength:.7;--hero-scrim:85%}
.hero-video{display:block;width:100%;height:100%;object-fit:cover;opacity:var(--hero-video-strength)}
/* Scrim: the video shows at full strength on the right (around the journey card) and is
   faded out behind the text column on the left, so the motion is visible but the copy stays readable */
.hero-media::before{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,color-mix(in srgb,var(--bg) var(--hero-scrim),transparent) 0%,color-mix(in srgb,var(--bg) var(--hero-scrim),transparent) 52%,transparent 72%)}
/* Fade the bottom edge into the next section */
.hero-media::after{content:"";position:absolute;inset:auto 0 0;z-index:1;height:28%;background:linear-gradient(to bottom,transparent,var(--bg))}
/* One column (tablet): text runs full width, so the scrim covers the whole hero */
@media (max-width:960px){
  .hero-media::before{background:color-mix(in srgb,var(--bg) var(--hero-scrim),transparent)}
}

[data-theme="light"] .hero-media{--hero-video-strength:.65}
/* The small caption under the journey card sits where the video is strongest: give it a solid chip */
.hero.video-on .note{background:var(--bg);padding:2px 8px;border-radius:6px}
[data-theme="light"] .hero-video{filter:invert(1) hue-rotate(180deg)}

/* Pause / play (WCAG 2.2.2). Shown by hero-video.js wherever the video is offered; under reduced
   motion it starts in the "play" state and the video only runs after a click.
   Top-right, just under the header: visible on arrival and clear of the chat button. */
.hero-video-toggle{position:absolute;right:24px;top:72px;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border-radius:50%;border:1px solid var(--line-strong);background:var(--header-bg);color:var(--text);cursor:pointer;opacity:.75;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);transition:opacity .2s}
.hero-video-toggle:hover,.hero-video-toggle:focus-visible{opacity:1}
.hero-video-toggle[hidden]{display:none}
.hero-video-toggle svg{width:18px;height:18px}
.hero-video-toggle .i-play,
.hero-video-toggle[aria-pressed="true"] .i-pause{display:none}
.hero-video-toggle[aria-pressed="true"] .i-play{display:block}

/* High contrast and forced colours: plain background only */
@media (prefers-contrast:more){
  .hero-video{display:none}
}
@media (forced-colors:active){
  .hero-media,.hero-video-toggle{display:none}
}
@media (prefers-reduced-transparency:reduce){
  .hero-video-toggle{background:var(--bg-2);backdrop-filter:none;-webkit-backdrop-filter:none;opacity:1}
}
