/* ============================================================
   AthletEQ Institute — pre-roll video gate
   Shown once per visitor (30-day suppression). Muted autoplay
   with unmute + skip. Vertical (9:16) source, responsive.
   ============================================================ */

/* Lock the page behind the gate */
html.aeq-preroll-open,
html.aeq-preroll-open body {
  overflow: hidden;
  height: 100%;
}

.aeq-preroll {
  position: fixed;
  inset: 0;
  z-index: 2147483000; /* above nav and everything else */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1422;
  opacity: 1;
  transition: opacity .45s cubic-bezier(.2, .7, .2, 1);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.aeq-preroll.is-leaving {
  opacity: 0;
  pointer-events: none;
}

/* Blurred poster backdrop so wide (desktop/tablet) screens never
   show empty black bars beside the vertical video. */
.aeq-preroll__backdrop {
  position: absolute;
  inset: -8%;
  background-position: center;
  background-size: cover;
  filter: blur(38px) brightness(.45) saturate(1.1);
  transform: scale(1.08);
  z-index: 0;
}

.aeq-preroll__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 50% 30%, rgba(10,23,51,.35) 0%, rgba(11,20,34,.85) 100%);
}

/* Video stage */
.aeq-preroll__stage {
  position: relative;
  z-index: 1;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aeq-preroll__video {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  background: #000;
}

/* Desktop / tablet (landscape & wide): contain the vertical video,
   let the blurred backdrop fill the sides. */
@media (min-aspect-ratio: 1/1) {
  .aeq-preroll__video {
    height: 100%;
    width: auto;
    object-fit: contain;
  }
}

/* Mobile / portrait: fill the screen edge-to-edge. */
@media (max-aspect-ratio: 1/1) {
  .aeq-preroll__video {
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
}

/* ---- Controls ---- */
.aeq-preroll__controls {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.aeq-preroll__btn {
  pointer-events: auto;
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(11,20,34,.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1;
  padding: 11px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease, opacity .25s ease;
}

.aeq-preroll__btn:hover {
  background: rgba(0,224,230,.18);
  border-color: rgba(0,224,230,.6);
}

.aeq-preroll__btn:focus-visible {
  outline: 2px solid #19f0f7;
  outline-offset: 2px;
}

.aeq-preroll__btn svg { width: 18px; height: 18px; fill: currentColor; }

/* Skip (top-right) */
.aeq-preroll__skip { top: max(18px, env(safe-area-inset-top)); right: 18px; }
.aeq-preroll__skip[disabled] { opacity: .65; cursor: default; }
.aeq-preroll__skip[disabled]:hover { background: rgba(11,20,34,.55); border-color: rgba(255,255,255,.28); }

/* Sound toggle (bottom-right) */
.aeq-preroll__sound { bottom: max(22px, env(safe-area-inset-bottom)); right: 18px; }

/* Big center play (autoplay-blocked / reduced-motion fallback) */
.aeq-preroll__play {
  pointer-events: auto;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 84px; height: 84px;
  padding: 0;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,224,230,.92);
  border: none;
  color: #0a1733;
  box-shadow: 0 10px 40px rgba(0,224,230,.35);
}
.aeq-preroll__play svg { width: 34px; height: 34px; margin-left: 4px; }
.aeq-preroll.is-paused .aeq-preroll__play { display: inline-flex; }

/* Brand wordmark, bottom-left */
.aeq-preroll__brand {
  position: absolute;
  z-index: 2;
  left: 20px;
  bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-family: "Archivo", "Arial Narrow", sans-serif;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 13px;
  opacity: .9;
  pointer-events: none;
}
.aeq-preroll__brand img { width: 22px; height: 22px; display: block; }
.aeq-preroll__brand span span { color: #00e0e6; }

/* Progress bar */
.aeq-preroll__progress {
  position: absolute;
  z-index: 2;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255,255,255,.14);
}
.aeq-preroll__progress i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #19f0f7, #00b4bd);
  transition: width .2s linear;
}

@media (max-width: 540px) {
  .aeq-preroll__btn { font-size: 13px; padding: 10px 14px; }
  .aeq-preroll__brand { font-size: 12px; }
}
