/* BOXXMEN Live Homepage — Seamless 120Hz Exploded Cinema + Zero-Cut 3D Cross-Dissolve */
html, body[data-page="home"] {
  overflow-x: clip !important;
}
body[data-page="home"] #scene {
  opacity: 0;
  will-change: opacity;
}
body[data-page="home"] > header {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}
body[data-page="home"].bx-show-header > header {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* 245vh runway: 0..78% = 193-frame 1080p explosion, 78..100% = seamless dissolve into 3D carton */
.bx-runway {
  position: relative;
  width: 100%;
  height: 245vh;
  z-index: 12;
  pointer-events: auto;
  background: transparent;
  color: var(--bx-fg, #E3ECF3);
  border-bottom: none;
  font-family: "Segoe UI Variable Display", "Inter", system-ui, sans-serif;
}
.bx-runway * { box-sizing: border-box; }
.bx-sticky {
  position: sticky; top: 0; width: 100%; height: 100vh; overflow: hidden;
  background: var(--bx-bg, #010204) url("poster_stealth.jpg") center / cover no-repeat;
  transform-origin: center center;
  will-change: opacity, transform;
}
#bx-hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1; opacity: 0;
}
#bx-hero-canvas.bx-ready { opacity: 1; }
.bx-vignette {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(ellipse 46% 52% at 14% 16%, rgba(1,2,4,0.80) 0%, transparent 70%),
    radial-gradient(ellipse 48% 40% at 16% 90%, rgba(1,2,4,0.86) 0%, transparent 70%),
    linear-gradient(180deg, rgba(1,2,4,0.34) 0%, transparent 16%, transparent 78%, var(--desk, #010204) 100%);
}

/* Smooth transition space before Step 1 so the 3D carton materializes cleanly */
#step-sizer {
  margin-top: -12vh;
  padding-top: 130px;
}

.bx-top-center {
  position: absolute; top: 14px; left: 37%; transform: translateX(-50%);
  z-index: 15; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.bx-lens-index {
  display: flex; gap: 10px; font-family: var(--mono, Consolas, monospace); font-size: 11px;
  letter-spacing: 0.11em; color: rgba(180,191,199,0.52); white-space: nowrap;
}
.bx-lens-index button {
  background: none; border: none; color: inherit; font: inherit; cursor: pointer; padding: 2px 4px;
}
.bx-lens-index button.on { color: var(--bx-hi, #84C7E6); font-weight: 700; }
.bx-theme-bar {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px;
  background: var(--bx-panel, rgba(6,9,15,0.94)); border: 1px solid var(--bx-line, rgba(116,136,158,0.30));
}
.bx-theme-bar span { font-family: var(--mono, Consolas, monospace); font-size: 9.5px; color: var(--bx-hi, #84C7E6); letter-spacing: 0.08em; }
.bx-tdot {
  width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.32);
  cursor: pointer; transition: transform 0.14s ease; padding: 0;
}
.bx-tdot:hover { transform: scale(1.22); }
.bx-tdot.active { box-shadow: 0 0 0 2px var(--bx-bg, #010204), 0 0 0 3.5px var(--bx-hi, #84C7E6); }

.bx-top-left {
  position: absolute; top: 38px; left: clamp(20px, 3vw, 48px); z-index: 15;
  display: flex; align-items: flex-start; gap: 16px;
}
.bx-badge-pill {
  margin-top: 8px; width: 52px; height: 28px; border-radius: 9px;
  background: linear-gradient(135deg, var(--bx-badge-a, #0E233A), var(--bx-badge-b, #1B4E7A));
  border: 1px solid rgba(255,255,255,0.28);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bx-headline {
  margin: 0 !important;
  font-size: clamp(32px, 3.8vw, 58px) !important; font-weight: 700 !important; line-height: 0.94 !important;
  letter-spacing: -0.04em !important; color: var(--bx-fg, #E3ECF3) !important;
}
.bx-headline-sub {
  display: inline-block; margin-left: 10px; font-size: 12px; font-weight: 600;
  line-height: 1.25; letter-spacing: 0.02em; color: var(--bx-muted, #8FA0B0); vertical-align: middle;
}
.bx-headline-sub strong { display: block; color: var(--bx-hi, #84C7E6); }

.bx-top-right {
  position: absolute; top: 16px; right: clamp(14px, 1.8vw, 28px); z-index: 15;
  display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; justify-content: flex-end;
}
.bx-pill-btn {
  height: 30px; padding: 0 10px; border-radius: 999px; background: var(--bx-panel, rgba(6,9,15,0.94));
  border: 1px solid var(--bx-line, rgba(116,136,158,0.30)); color: var(--bx-fg, #E3ECF3);
  font-size: 11px; font-weight: 600; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.bx-pill-btn:hover { border-color: var(--bx-hi, #84C7E6); color: var(--bx-hi, #84C7E6); }
.bx-pill-cta { background: rgba(27, 78, 122, 0.58); border-color: var(--bx-hi, #84C7E6); }

.bx-material-hub {
  position: absolute; left: clamp(20px, 3vw, 48px); top: 34vh; z-index: 15;
  width: min(350px, 88vw);
}
.bx-hub-label { font-size: 11px; color: var(--bx-muted, #8FA0B0); margin-bottom: 6px; display: flex; justify-content: space-between; }
.bx-hub-card {
  border-radius: 16px; background: var(--bx-panel, rgba(6,9,15,0.94));
  border: 1px solid var(--bx-line, rgba(116,136,158,0.30));
  padding: 0 12px 13px 12px; box-shadow: 0 18px 44px rgba(0,0,0,0.68);
}
.bx-swatches { display: flex; gap: 5px; margin-bottom: 10px; }
.bx-sw {
  flex: 1; height: 58px; border-bottom-left-radius: 7px; border-bottom-right-radius: 7px;
  padding: 6px 4px; display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid rgba(255,255,255,0.14); border-top: none; cursor: pointer;
  font-size: 8.5px; font-weight: 700; opacity: 0.78; transition: height 0.14s ease, opacity 0.14s ease; text-align: left;
}
.bx-sw:hover, .bx-sw.active { height: 68px; opacity: 1; border-color: var(--bx-hi, #84C7E6); }
.bx-sw code { font-family: var(--mono, Consolas, monospace); font-size: 7.2px; opacity: 0.88; }
.bx-hub-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; color: var(--bx-fg, #E3ECF3); }
.bx-hub-desc { margin: 0 0 8px 0 !important; font-size: 11px; color: var(--bx-muted, #8FA0B0); line-height: 1.38; max-width: none; }
.bx-hub-bar { height: 4px; border-radius: 999px; background: rgba(180,191,199,0.16); overflow: hidden; }
.bx-hub-bar i { display: block; height: 100%; width: 5%; background: var(--bx-bar); }

.bx-brand-lockup {
  position: absolute; left: clamp(18px, 2.2vw, 34px); bottom: 16px; z-index: 15;
  width: min(390px, 34vw);
}
.bx-brand-lockup img { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 24px rgba(0,0,0,0.88)); }

.bx-cinema-deck {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px;
  background: var(--bx-panel, rgba(6,9,15,0.94)); border: 1px solid var(--bx-line, rgba(116,136,158,0.30));
  box-shadow: 0 12px 30px rgba(0,0,0,0.68);
  font-family: var(--mono, Consolas, monospace); font-size: 10.5px; color: var(--bx-fg, #E3ECF3);
}
.bx-deck-btn {
  background: rgba(27,78,122,0.38); border: 1px solid var(--bx-hi, #84C7E6); color: var(--bx-fg, #E3ECF3);
  border-radius: 999px; padding: 4px 12px; font-family: inherit; font-size: 10.5px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.bx-deck-btn:hover { background: var(--bx-accent, #1B4E7A); }
.bx-deck-scrub { width: 145px !important; height: 18px !important; accent-color: var(--bx-hi, #84C7E6); cursor: pointer; }
.bx-deck-stat { color: var(--bx-muted, #8FA0B0); white-space: nowrap; }
.bx-deck-stat b { color: var(--bx-hi, #84C7E6); }

.bx-walkthrough {
  position: absolute; right: clamp(205px, 16vw, 255px); bottom: 68px; z-index: 15;
  width: min(350px, 84vw); border-radius: 16px; background: var(--bx-panel, rgba(6,9,15,0.94));
  border: 1px solid var(--bx-line, rgba(116,136,158,0.30)); padding: 15px 17px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.72);
}
.bx-walkthrough p { margin: 0 0 11px 0 !important; font-size: 12.6px; line-height: 1.45; color: var(--bx-fg, #E3ECF3); max-width: none; }
.bx-walkthrough p strong { color: var(--bx-hi, #84C7E6); }
.bx-wt-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bx-wt-step { font-family: var(--mono, Consolas, monospace); font-size: 10px; color: var(--bx-muted, #8FA0B0); }
.bx-wt-next {
  padding: 6px 15px; border-radius: 9px; background: rgba(27,78,122,0.38);
  border: 1px solid var(--bx-hi, #84C7E6); color: var(--bx-fg, #E3ECF3); font-weight: 700;
  font-size: 12px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}

.bx-crew-layer { position: absolute; inset: 0; z-index: 18; pointer-events: none; transition: opacity 0.25s ease; }
html[data-bx-crew="off"] .bx-crew-layer { opacity: 0; visibility: hidden; }
.bx-crew-bot {
  position: absolute; pointer-events: auto; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; text-decoration: none;
  will-change: transform;
  animation: bxCrewFloat 4.4s ease-in-out infinite;
}
.bx-crew-bot:nth-child(2) { animation-delay: -1.1s; animation-duration: 5.0s; }
.bx-crew-bot:nth-child(3) { animation-delay: -2.2s; animation-duration: 4.1s; }
.bx-crew-bot:nth-child(4) { animation-delay: -0.7s; animation-duration: 5.4s; }
.bx-crew-bot:nth-child(5) { animation-delay: -1.7s; animation-duration: 4.8s; }
.bx-crew-bot img { width: 80px; height: auto; transition: transform 0.16s ease; }
.bx-crew-bot:hover img { transform: scale(1.12) rotate(-6deg); }
.bx-crew-tip {
  background: rgba(5,8,14,0.95); border: 1px solid var(--bx-hi, #84C7E6); color: #EAF5FC;
  font-family: var(--mono, Consolas, monospace); font-size: 10px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap; margin-bottom: 4px;
}
@keyframes bxCrewFloat {
  0%, 100% { transform: translate3d(0, 0px, 0) rotate(-2deg); }
  50% { transform: translate3d(0, -10px, 0) rotate(2.5deg); }
}
@media (prefers-reduced-motion: reduce) { .bx-crew-bot { animation: none; } }

@media (max-width: 1180px) {
  .bx-brand-lockup { width: 220px; bottom: 64px; }
  .bx-walkthrough { right: 18px; bottom: 72px; width: 290px; }
  .bx-cinema-deck { padding: 6px 10px; gap: 7px; }
  .bx-deck-scrub { width: 105px !important; }
  .bx-top-center { left: 50%; }
  .bx-top-right { top: 76px; flex-wrap: wrap; max-width: 66vw; }
}
@media (max-width: 780px) {
  .bx-material-hub { display: none; }
  .bx-crew-bot:nth-child(1), .bx-crew-bot:nth-child(2), .bx-crew-bot:nth-child(4) { display: none; }
  .bx-walkthrough { left: 16px; right: 16px; width: auto; bottom: 66px; }
  .bx-brand-lockup { width: 190px; bottom: 168px; }
  .bx-top-center { top: 8px; left: 50%; }
  .bx-top-left { top: 76px; }
  .bx-top-right { display: none; }
}
