/* ==========================================================================
   WEBAURA — Cinematic full-screen video hero (homepage)
   - Silent, looping background film with no controls, behind the nav, logo, headline and buttons.
   - Fallback: the poster frame (same scene) as a CSS background, so the hero always looks
     finished, even before the video loads, if autoplay is blocked or for reduced motion.
   - The hero is always light-on-dark in both themes, so text sits on the dark overlay.
   ========================================================================== */

.hero--video {
  /* the hero keeps a dark, cinematic palette in BOTH themes (light mode included) */
  color-scheme: dark;
  --bg: #0B1110; --bg-2: #111A17; --surface: #16211D; --surface-2: #1B2823; --field: #0E1513;
  --ink: #F6F2EA; --text: #ECE8E0; --text-2: #D4DAD5; --muted: #B9C3BD;
  --line: rgba(246,242,234,.14); --line-2: rgba(246,242,234,.24);
  --accent: #6CC1A6; --accent-2: #4FA58C; --on-accent: #0F1A16; --soft: #1F3029;
  --glass: rgba(16,24,21,.55);
  --ok: #6CC1A6; --warn: #F5C451; --err: #FF8A7A; --peach: #F4A97B; --peach-ink: #F4A97B; --accent-warm: #F4A97B;
  --sh: 0 1px 2px rgba(0,0,0,.3), 0 30px 60px -30px rgba(0,0,0,.85);
  --logo-on-dark: block; --logo-on-light: none;
  min-height: 100vh; min-height: 100svh;
  background: #070B0A;
}

/* ---------- media layer ---------- */
.hero--video .hero__media {
  background: #070B0A url("../images/hero-video-poster.jpg") center 42% / cover no-repeat;
  background-image: image-set(url("../images/hero-video-poster.webp") type("image/webp"), url("../images/hero-video-poster.jpg") type("image/jpeg"));
}
@media (orientation: portrait) and (max-width: 1024px) {
  .hero--video .hero__media {
    background-image: url("../images/hero-video-poster-mobile.jpg");
    background-image: image-set(url("../images/hero-video-poster-mobile.webp") type("image/webp"), url("../images/hero-video-poster-mobile.jpg") type("image/jpeg"));
    background-position: center 35%;
  }
}
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: center 42%;
  pointer-events: none; /* never interactive, no controls, no context menu target */
  transform: scale(1.06); transition: opacity 1.4s cubic-bezier(.22, 1, .36, 1);
}
.hero__video::-webkit-media-controls, .hero__video::-webkit-media-controls-enclosure,
.hero__video::-webkit-media-controls-start-playback-button, .hero__video::-webkit-media-controls-panel { display: none !important; -webkit-appearance: none; }
/* fade the film in only once it is actually playing, so there is never a black flash */
.js .hero__video { opacity: 0; }
.js .hero__video.is-playing { opacity: 1; animation: heroFilmDrift 18s cubic-bezier(.22, 1, .36, 1) forwards; }
@keyframes heroFilmDrift { from { transform: scale(1.12); } to { transform: scale(1.03); } }
@media (orientation: portrait) and (max-width: 1024px) { .hero__video { object-position: center 35%; } }

/* ---------- dark overlay: readable text, cinematic depth ---------- */
.hero--video .hero__shade {
  background:
    radial-gradient(120% 90% at 70% 40%, rgba(7, 11, 10, 0) 0%, rgba(7, 11, 10, .2) 70%, rgba(7, 11, 10, .5) 100%),
    linear-gradient(90deg, rgba(7, 11, 10, .82) 0%, rgba(7, 11, 10, .62) 32%, rgba(7, 11, 10, .24) 58%, rgba(7, 11, 10, .1) 100%),
    linear-gradient(180deg, rgba(7, 11, 10, .5) 0%, rgba(7, 11, 10, 0) 20%),
    linear-gradient(0deg, rgba(7, 11, 10, .85) 0%, rgba(7, 11, 10, 0) 24%);
}
/* a fine film grain, barely visible, for a premium finish */
.hero--video .hero__shade::after {
  content: ""; position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- content on the film ---------- */
.hero--video .hero__title { color: #F6F2EA; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.hero--video .hero__sub { color: #D4DAD5; }
.hero--video .eyebrow { color: #8FD4BD; }
.hero--video .hero__own { background: rgba(10, 16, 14, .55); border-color: rgba(246, 242, 234, .16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hero--video .btn--glass { background: rgba(246, 242, 234, .08); border-color: rgba(246, 242, 234, .32); color: #F6F2EA; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.hero--video .btn--glass:hover { background: rgba(246, 242, 234, .16); }
.hero--video .hmock__browser { box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .85), 0 0 0 1px rgba(246, 242, 234, .1); }

/* ---------- navigation over the film (both themes) until the visitor scrolls ---------- */
[data-hero="video"]:not(.menu-open) .nav-shell:not(.is-scrolled):not(.is-solid):not(:has(.is-open)) {
  color-scheme: dark;
  --ink: #F6F2EA; --text: #ECE8E0; --text-2: #DDE3DE; --muted: #C2CCC6; --line: rgba(246,242,234,.16); --line-2: rgba(246,242,234,.3);
  --logo-on-dark: block; --logo-on-light: none;
  background: linear-gradient(180deg, rgba(7, 11, 10, .55), rgba(7, 11, 10, 0));
}
[data-hero="video"]:not(.menu-open) .nav-shell:not(.is-scrolled):not(.is-solid):not(:has(.is-open)) .btn--ghost { color: #F6F2EA; border-color: rgba(246,242,234,.32); }

/* ---------- tablet and mobile ---------- */
@media (max-width: 1080px) {
  .hero--video .hero__shade {
    background:
      linear-gradient(180deg, rgba(7, 11, 10, .72) 0%, rgba(7, 11, 10, .48) 30%, rgba(7, 11, 10, .58) 62%, rgba(7, 11, 10, .9) 100%);
  }
}
@media (max-width: 760px) {
  .hero--video { align-items: flex-end; }
  .hero--video .hero__shade {
    background:
      linear-gradient(180deg, rgba(7, 11, 10, .66) 0%, rgba(7, 11, 10, .4) 26%, rgba(7, 11, 10, .62) 55%, rgba(7, 11, 10, .94) 100%);
  }
  .hero--video .hero__title { text-shadow: 0 2px 24px rgba(0, 0, 0, .5); }
}

/* ---------- reduced motion / data saver: still frame, no film ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }
}
.hero--video.is-still .hero__video { display: none; }

/* primary buttons on the film keep the bright WEBAURA mint in both themes */
.hero--video .btn--primary, [data-theme="light"] .hero--video .btn--primary { --b-bg: #6CC1A6; --b-bd: #6CC1A6; --b-fg: #0F1A16; }
.hero--video .btn--primary:hover, [data-theme="light"] .hero--video .btn--primary:hover { --b-bg: #86D3BA; --b-bd: #86D3BA; }
