/**
 * Bill Luke Customs — logo intro, E7 "Faceoff"
 * Load from <head> with blc-logo-intro.js (no defer/async):
 *   <link rel="stylesheet" href="blc-logo-intro.css" />
 *   <script src="blc-logo-intro.js"></script>
 * The faceoff video is the entire loading screen. When it ends, the
 * overlay fades to the site. The intro stage is always dark, including Day.
 * No tach, gauge, needle, shake, or shatter.
 */

html.blc-logo-intro-pending,
html.blc-logo-intro-active,
html.blc-logo-intro-exiting,
html.blc-logo-intro-pending body,
html.blc-logo-intro-active body,
html.blc-logo-intro-exiting body {
  overflow: hidden !important;
}

/* Paint the dark backdrop before the script mounts, so the page never flashes. */
html.blc-logo-intro-pending::before {
  content: "";
  position: fixed;
  inset: 0;
  background: #0c0e12;
  z-index: 2147483000;
  pointer-events: none;
}

html.blc-logo-intro-pending .hero-badge,
html.blc-logo-intro-pending .hero-badge img,
html.blc-logo-intro-active .hero-badge,
html.blc-logo-intro-active .hero-badge img {
  opacity: 0 !important;
}

.blc-logo-intro {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  contain: layout paint;
  background: #0c0e12;
}

.blc-logo-intro-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.blc-logo-intro-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 80% at 50% 50%, #15181d 0%, #0c0e12 62%, #08090c 100%);
}

/* Faceoff clip: contain so the trucks are never cropped. Letterbox is the
   same dark as the stage, so bars disappear into the backdrop. */
.blc-intro-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #0c0e12;
  pointer-events: none;
  display: block;
}

.blc-logo-intro-mark-wrap {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  transform-origin: 0 0;
  will-change: transform;
  backface-visibility: hidden;
}

.blc-logo-intro-mark {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  transform-origin: 50% 50%;
  z-index: 3;
  opacity: 0 !important;
}

/* The mark is only used for autoplay fallback and reduced motion. */
.blc-logo-intro:not(.is-fallback):not(.is-reduced) .blc-logo-intro-mark-wrap {
  display: none !important;
}

/* Autoplay fallback: keep the dark poster and show the static badge. */
.blc-logo-intro.is-fallback .blc-logo-intro-mark {
  opacity: 1 !important;
}

/* Reduced motion: no video; the centered badge simply fades to the page. */
.blc-logo-intro.is-reduced .blc-intro-video { display: none; }
.blc-logo-intro.is-reduced .blc-logo-intro-mark { opacity: 1 !important; }

@media (prefers-reduced-motion: reduce) {
  .blc-intro-video { display: none; }
  .blc-logo-intro-mark { opacity: 1 !important; }
}

/* Day ink rules target the badge SVG globally; the intro stage is always dark.
   Beat html[data-theme="day"] img[src*="badge"] { opacity: 1 !important }. */
html[data-theme="day"] .blc-logo-intro img.blc-logo-intro-mark,
html[data-theme="day"] .blc-logo-intro-mark,
html[data-theme="day"] .blc-intro-video {
  filter: none !important;
}
html[data-theme="day"] .blc-logo-intro img.blc-logo-intro-mark,
html[data-theme="day"] .blc-logo-intro-mark {
  opacity: 0 !important;
}
html[data-theme="day"] .blc-logo-intro.is-fallback img.blc-logo-intro-mark,
html[data-theme="day"] .blc-logo-intro.is-fallback .blc-logo-intro-mark,
html[data-theme="day"] .blc-logo-intro.is-reduced img.blc-logo-intro-mark,
html[data-theme="day"] .blc-logo-intro.is-reduced .blc-logo-intro-mark {
  opacity: 1 !important;
}

/* Skip hint (2026-11-16) */
.blc-logo-intro .blc-intro-skip{position:absolute;right:18px;bottom:calc(18px + env(safe-area-inset-bottom,0px));z-index:5;pointer-events:auto;cursor:pointer;
  font:600 12px/1 system-ui,-apple-system,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#fff;
  background:rgba(18,20,23,.55);border:1px solid rgba(224,122,46,.8);border-radius:999px;padding:9px 14px;
  opacity:0;animation:blcSkipIn .4s ease .6s forwards}
.blc-logo-intro.is-exiting .blc-intro-skip,.blc-logo-intro.is-skipped .blc-intro-skip{display:none}
@keyframes blcSkipIn{to{opacity:.9}}
