/* ============================================================
   HERO FILM — "From slab to switch-on"
   Mobile-first: phones get a stacked layout (4:5 film on top, copy
   below on navy) that fits one screen; from 900px the film runs
   full-bleed behind the copy. Colours come from the AMDB mark:
   navy ink + cable gold.
   ============================================================ */
.hero-film {
  --film-navy: #10181d;
  --film-gold: #d6a945;
  --film-gold-hi: #e8bf5f;
  position: relative;
  background: var(--film-navy);
  color: #fff;
  padding-top: 60px; /* fixed header */
  isolation: isolate;
}

/* ---------- Media ---------- */
.hero-film__media {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 54svh;  /* leaves room for the two-line keyword eyebrow on 375px phones */
  width: 100%;
  overflow: hidden;
  background: #1b2328;
}
.hero-film__poster,
.hero-film__poster img,
.hero-film__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-film__video { opacity: 0; transition: opacity .6s var(--ease); }
.hero-film.is-playing .hero-film__video,
.hero-film.is-ended .hero-film__video { opacity: 1; }
.hero-film__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(16,24,29,.28), rgba(16,24,29,0) 22%),
    linear-gradient(to bottom, rgba(16,24,29,0) 62%, rgba(16,24,29,.78) 92%, var(--film-navy));
}

.hero-film__replay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: rgba(16,24,29,.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font: 600 12.5px/1 var(--sans);
  cursor: pointer;
  animation: filmFadeIn .5s var(--ease) both;
}
.hero-film__replay svg { width: 14px; height: 14px; }
.hero-film__replay:hover { background: rgba(16,24,29,.7); }
.hero-film__replay:focus-visible { outline: 2px solid var(--film-gold); outline-offset: 3px; }
.hero-film__replay[hidden] { display: none; }
@keyframes filmFadeIn { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- Copy ---------- */
.hero-film__content {
  position: relative;
  z-index: 2;
  padding: 14px 20px 22px;
}
.hero-film__heading { margin: 0; font: inherit; }
.hero-film__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--film-gold);
  margin-bottom: 10px;
}
/* Also carries .hero__title so main.js's word-by-word rise applies. */
.hero-film .hero-film__title {
  display: block;
  font-size: clamp(34px, 10.4vw, 46px);
  line-height: 1.02;
  letter-spacing: -.035em;
  color: #fff;
  max-width: none;
  margin: 0 0 12px;
}
.hero-film__sub {
  font-size: 14.5px;
  line-height: 1.45;
  color: rgba(255,255,255,.74);
  max-width: 520px;
  margin-bottom: 16px;
}
.hero-film__actions {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 10px;
}
.hero-film__actions .btn { min-height: 48px; padding-inline: 16px; gap: 8px; }
.hero-film__actions .btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn--gold { background: var(--film-gold, #d6a945); color: #10181d; font-weight: 700; }
.btn--gold:hover { background: var(--film-gold-hi, #e8bf5f); transform: scale(1.03); box-shadow: 0 10px 30px rgba(214,169,69,.35); }

/* Shorter phones: keep the whole hero on one screen. */
@media (max-width: 767px) and (max-height: 780px) {
  .hero-film__media { max-height: 48svh; }
}
@media (max-width: 767px) and (max-height: 700px) {
  .hero-film__media { max-height: 50svh; }
  .hero-film__sub { display: none; }
}

/* ---------- Tablet ---------- */
@media (min-width: 768px) {
  .hero-film { padding-top: 66px; }
  .hero-film__media { aspect-ratio: 16 / 9; max-height: 62svh; }
  .hero-film__content { padding: 20px 32px 32px; }
  .hero-film__actions { display: flex; }
  .hero-film__actions .btn { padding-inline: 26px; }
  .hero-film__replay { top: 20px; right: 24px; }
}

/* ---------- Desktop: full-bleed film, copy over it ---------- */
@media (min-width: 900px) {
  .hero-film {
    padding-top: 0;
    min-height: 100svh;
    min-height: max(620px, 100svh);
    display: flex;
    align-items: flex-end;
  }
  .hero-film__media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    max-height: none;
    height: 100%;
  }
  .hero-film__shade {
    background:
      linear-gradient(90deg, rgba(16,24,29,.86) 0%, rgba(16,24,29,.55) 34%, rgba(16,24,29,0) 62%),
      linear-gradient(to top, rgba(16,24,29,.85) 0%, rgba(16,24,29,0) 34%),
      linear-gradient(to bottom, rgba(16,24,29,.35), rgba(16,24,29,0) 22%);
  }
  .hero-film__replay { top: auto; bottom: 40px; right: 112px; }
  .hero-film__content {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 120px clamp(24px, 4vw, 64px) 104px;
  }
  .hero-film__eyebrow { font-size: 12.5px; letter-spacing: .14em; margin-bottom: 18px; }
  .hero-film .hero-film__title { font-size: clamp(56px, 6.2vw, 96px); max-width: 9.5em; margin-bottom: 20px; }
  .hero-film__sub { font-size: clamp(17px, 1.35vw, 20px); max-width: 500px; margin-bottom: 30px; }
  .hero-film__actions .btn { min-height: 52px; font-size: 15.5px; }
}
@media (min-width: 900px) and (max-height: 720px) {
  .hero-film__content { padding-bottom: 72px; }
  .hero-film__sub { display: none; }
}

/* ---------- Reduced motion: no autoplay, show the finished home ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-film__video { transition: none; }
}
