/* The opening film on blahom.com. From the executive portal ("01 Watch"): the frame, the sound
   pill and the end card. April (30/11): nothing in front of it — it plays the moment the page
   opens, and a name + email form sits over it within seconds (film-gate.js).
   Everything is scoped under #bl-film so nothing leaks into the landing underneath. */
html { background: #030308; }
/* The privacy link (marketing.js) waits with its question until the film is over. */
html.bl-film-on .bl-mkt__privacy { display: none; }
#bl-film {
  --ink: #f5f0e9; --mute: #b6aabe;
  position: fixed; inset: 0; z-index: 50; background: #030308; isolation: isolate; overflow: hidden;
  color: var(--ink); font-family: Arial, sans-serif; -webkit-font-smoothing: antialiased;
  transition: opacity 1.2s cubic-bezier(.4,0,.2,1);
}
#bl-film.leaving { opacity: 0; pointer-events: none; }
#bl-film[hidden] { display: none; }

/* ── The frame ─────────────────────────────────────────────────────────────── */
#bl-film .cinematic-frame { position: absolute; inset: 0; background: #04050a; overflow: hidden; cursor: pointer; }
#bl-film .cinematic-frame video { width: 100%; height: 100%; display: block; object-fit: cover; background: #04050a; }
/* A phone held upright: the whole 16:9 picture, never a zoomed crop of it (Dimitri, 30/11: zoomed
   it looked wrong). It sits a little above centre, so the name + email form has the dark band
   below it to itself. Until April's vertical cut of the film takes this place. */
@media (orientation: portrait) {
  #bl-film .cinematic-frame video { object-fit: contain; object-position: 50% 38%; }
}

/* ── Loading (desktop, and a phone whose film is still buffering) ──────────── */
#bl-film .film-loading { position: absolute; inset: 0; display: grid; place-content: center; background: #04050a; pointer-events: none; }
#bl-film .film-loading[hidden] { display: none; }
#bl-film .film-loading span { width: 34px; height: 34px; border: 1px solid #cdb5eb33; border-top-color: #ddc7f9; border-radius: 50%; animation: blf-spin 1.8s linear infinite; }
@keyframes blf-spin { to { transform: rotate(360deg); } }

/* ── The BLAHOM signature ───────────────────────────────────────────────────
   Over the picture, top left, on a wide screen; on an upright phone, centred in the dark band
   above the film (the film sits at 38% of the free height, so the band is 38% of it). */
#bl-film .blf-logo {
  position: absolute; z-index: 3; pointer-events: none; height: auto;
  top: max(20px, env(safe-area-inset-top)); left: max(24px, env(safe-area-inset-left));
  width: clamp(104px, 11vw, 170px);
  filter: drop-shadow(0 4px 18px rgba(0,0,0,.75)) drop-shadow(0 0 22px rgba(200,79,255,.25));
  animation: blf-fade 1.6s ease .3s both; transition: opacity .6s ease;
}
@media (orientation: portrait) {
  #bl-film .blf-logo {
    left: 50%; top: calc((100dvh - 56.25vw) * .19); transform: translate(-50%, -50%);
    width: min(56vw, 240px);
  }
}
#bl-film .cinematic-end:not([hidden]) ~ .blf-logo { opacity: 0; }

/* ── Sound pill ────────────────────────────────────────────────────────────── */
#bl-film .sound-cta { position: absolute; z-index: 3; left: max(24px, env(safe-area-inset-left)); bottom: max(24px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px 0 12px; border-radius: 999px; border: 1px solid #ffffff2e; background: #0c0812a8; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--ink); font: 600 10px/1 Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; box-shadow: 0 10px 34px #0000004d, inset 0 1px 0 #ffffff1a; transition: padding .6s cubic-bezier(.32,.72,0,1), gap .6s cubic-bezier(.32,.72,0,1), opacity .4s; animation: blf-rise .9s cubic-bezier(.215,.61,.355,1) .6s both; }
#bl-film .sound-cta[hidden] { display: none; }
#bl-film .sound-cta::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; border: 1px solid #d7c4ec; opacity: 0; animation: blf-halo 2.4s cubic-bezier(.32,.72,0,1) infinite; pointer-events: none; }
#bl-film .sound-icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#bl-film .sound-icon .spk { fill: currentColor; stroke: none; }
#bl-film .sound-icon .wave { animation: blf-wave 1.6s ease-in-out infinite; opacity: .15; }
#bl-film .sound-icon .w2 { animation-delay: .18s; }
#bl-film .sound-icon .w3 { animation-delay: .36s; }
#bl-film .sound-icon .mute { display: none; }
#bl-film .sound-label { white-space: nowrap; overflow: hidden; max-width: 160px; transition: max-width .6s cubic-bezier(.32,.72,0,1), opacity .4s; }
#bl-film .sound-cta.on::after, #bl-film .sound-cta.off::after { animation: none; }
#bl-film .sound-cta.on .wave { animation: none; opacity: 1; }
#bl-film .sound-cta.on { border-color: #d7c4ec8c; box-shadow: 0 10px 34px #0000004d, 0 0 24px #c9a5ea40, inset 0 1px 0 #ffffff1a; }
#bl-film .sound-cta.off .wave { display: none; }
#bl-film .sound-cta.off .mute { display: inline; }
#bl-film .sound-cta.compact { padding: 0 11px; gap: 0; opacity: .72; }
#bl-film .sound-cta.compact .sound-label { max-width: 0; opacity: 0; }
#bl-film .sound-cta.compact:hover { opacity: 1; }
@keyframes blf-wave { 0%, 100% { opacity: .15; } 35% { opacity: 1; } }
@keyframes blf-halo { 0% { opacity: .55; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.18, 1.45); } }
@keyframes blf-rise { from { opacity: 0; transform: translateY(14px); } }

/* ── The end card ────────────────────────────────── */
#bl-film .cinematic-end { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 8%; background: radial-gradient(ellipse at 50% 60%, #22162d, #040409 75%); animation: blf-fade 1.4s ease both; }
#bl-film .cinematic-end[hidden] { display: none; }
#bl-film .cinematic-end h1 { font: 400 clamp(29px, 4vw, 58px)/1.2 Georgia, serif; letter-spacing: -.025em; max-width: 950px; margin: 0 0 30px; }
#bl-film .cinematic-end p { font: 400 clamp(16px, 1.5vw, 22px)/1.7 Georgia, serif; color: #cfc3d7; margin: 0; }
@media (max-width: 700px) { #bl-film .cinematic-end h1 { font-size: 32px; } }
@keyframes blf-fade { from { opacity: 0; } }

/* ── Name + email over the film (from 3 s, collapsible) ─────────────────────── */
#bl-film .blf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#bl-film .blf-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#bl-film .blf-join {
  position: absolute; z-index: 3; left: 50%; transform: translateX(-50%);
  bottom: max(24px, env(safe-area-inset-bottom)); width: min(560px, calc(100% - 440px));
  display: flex; justify-content: center; animation: blf-rise .9s cubic-bezier(.215,.61,.355,1) both;
  font-family: 'Manrope', Arial, sans-serif;
}
#bl-film .blf-join[hidden] { display: none; }
/* Narrow screens: the sign-up gets its own row above the sound pill. */
@media (max-width: 760px) {
  #bl-film .blf-join { width: calc(100% - 32px); max-width: 440px; bottom: calc(max(24px, env(safe-area-inset-bottom)) + 60px); }
}
/* A phone held sideways: one compact line, so the film keeps its height. */
@media (max-height: 500px) and (min-width: 761px) {
  #bl-film .blf-join { width: min(560px, calc(100% - 420px)); }
  #bl-film .blf-join-open { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; padding: 6px 6px 6px 6px !important; border-radius: 28px !important; }
  #bl-film .blf-join-row { order: 1; flex: 1 1 0; min-width: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) auto; }
  #bl-film #blf-name { grid-column: auto; }
  #bl-film .blf-join-head { order: 2; margin: 0; }
  #bl-film .blf-join-eyebrow { display: none; }
  #bl-film .blf-join-fold { margin: 0; }
  #bl-film .blf-join-msg { order: 3; flex-basis: 100%; padding: 0 12px 4px; }
  #bl-film .blf-join.joined .blf-join-msg { order: 1; flex: 1 1 0; padding: 8px 6px 8px 12px; font-size: 13px; }
}
#bl-film .blf-join-open {
  width: 100%; box-sizing: border-box; margin: 0; padding: 12px 12px 12px 18px; border-radius: 22px;
  background: rgba(12,8,18,.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(233,200,122,.34);
  box-shadow: 0 18px 44px -14px rgba(0,0,0,.85), 0 0 30px rgba(200,79,255,.14), inset 0 1px 0 rgba(255,255,255,.12);
}
#bl-film .blf-join.folded .blf-join-open, #bl-film .blf-join:not(.folded) .blf-join-pill { display: none; }
#bl-film .blf-join-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 9px; }
#bl-film .blf-join-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: rgba(233,200,122,.9); }
#bl-film .blf-join-fold { display: grid; place-items: center; width: 30px; height: 30px; margin: -6px -2px -6px 0; border: 0; border-radius: 50%; background: transparent; color: rgba(242,237,228,.6); cursor: pointer; }
#bl-film .blf-join-fold:hover, #bl-film .blf-join-fold:focus-visible { color: #F2EDE4; background: rgba(255,255,255,.06); }
#bl-film .blf-join svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* One line: name, email, button. On a narrow screen the name takes the first line. */
#bl-film .blf-join-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) auto; gap: 8px; }
@media (max-width: 760px) {
  #bl-film .blf-join-row { grid-template-columns: minmax(0, 1fr) auto; }
  #bl-film #blf-name { grid-column: 1 / -1; }
}
#bl-film .blf-join-row input:not(.blf-trap) {
  flex: 1 1 auto; min-width: 0; height: 42px; box-sizing: border-box; padding: 0 16px; border-radius: 21px;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: #F2EDE4;
  font: 500 16px/1 'Manrope', Arial, sans-serif; outline: none; transition: border-color .3s, background .3s;
}
#bl-film .blf-join-row input:not(.blf-trap)::placeholder { color: rgba(181,171,156,.55); }
#bl-film .blf-join-row input:not(.blf-trap):focus { border-color: rgba(233,200,122,.7); background: rgba(255,255,255,.08); }
#bl-film .blf-join.bad-name #blf-name, #bl-film .blf-join.bad-email #blf-email { border-color: rgba(255,140,140,.7); animation: blf-shake .4s cubic-bezier(.36,.07,.19,.97); }
#bl-film .blf-join-go {
  flex: none; height: 42px; padding: 0 18px; border-radius: 21px; cursor: pointer; white-space: nowrap;
  border: 1px solid rgba(233,200,122,.72); color: #FFF6E2;
  background: linear-gradient(180deg, rgba(233,200,122,.32), rgba(200,79,255,.18));
  font: 700 10px/1 'Manrope', Arial, sans-serif; letter-spacing: .2em; text-transform: uppercase;
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.8), 0 0 22px rgba(233,200,122,.2), inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform .4s cubic-bezier(.32,.72,0,1), box-shadow .4s;
}
#bl-film .blf-join-go:hover { box-shadow: 0 14px 30px -12px rgba(0,0,0,.85), 0 0 30px rgba(200,79,255,.3), inset 0 1px 0 rgba(255,255,255,.45); }
#bl-film .blf-join-go:active { transform: scale(.97); }
#bl-film .blf-join-go[disabled] { opacity: .6; cursor: default; }
#bl-film .blf-join-msg { margin: 0; font: 500 12px/1.45 'Manrope', Arial, sans-serif; color: rgba(242,237,228,.78); }
#bl-film .blf-join-msg:not(:empty) { margin-top: 9px; }
#bl-film .blf-join.bad .blf-join-msg { color: #ffb4b4; }
#bl-film .blf-join.joined .blf-join-row { display: none; }
#bl-film .blf-join.joined .blf-join-msg { margin-top: 0; font-size: 14px; color: #F5E9C4; }
#bl-film .blf-join-pill {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(233,200,122,.45); background: rgba(12,8,18,.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #F5E9C4; font: 700 10px/1 'Manrope', Arial, sans-serif; letter-spacing: .22em; text-transform: uppercase;
  box-shadow: 0 10px 34px rgba(0,0,0,.35), 0 0 22px rgba(233,200,122,.14), inset 0 1px 0 rgba(255,255,255,.1);
}
#bl-film .blf-join-star { color: #C84FFF; font-size: 12px; letter-spacing: 0; }
@keyframes blf-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

@media (prefers-reduced-motion: reduce) {
  #bl-film .blf-join, #bl-film .blf-join-row input { animation: none !important; }
  #bl-film .sound-icon .wave, #bl-film .sound-cta::after, #bl-film .film-loading span { animation: none; }
  #bl-film .sound-icon .wave { opacity: 1; }
}
