/* MDP · Baalá Build · scroll-driven video section
 * Video MP4 con currentTime tied to scroll progress.
 * Fallback: image-sequence si video falla.
 */

@import url("./tokens.css");

.act-baala-build {
  position: relative;
  height: 380vh;
  background: var(--carbon-1000);
  --p: 0;
}
.bv-track {
  position: relative;
  height: 100%;
}
.bv-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  color: var(--paper-50);
  background: var(--carbon-1000);
}

.bv-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.bv-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  opacity: 1;
  transition: opacity 480ms;
}
.bv-stage.video-loaded .bv-fallback { opacity: 0; pointer-events: none; }

.bv-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(0,0,0,0.55) 0%,
      rgba(0,0,0,0.10) 30%,
      rgba(0,0,0,0.10) 70%,
      rgba(0,0,0,0.78) 100%);
}

.bv-content {
  position: relative;
  z-index: 5;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 56px var(--pad-x) 48px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
}

.bv-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}
.bv-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(250, 247, 240, 0.7);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
.bv-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-warm);
  animation: pulse 1.6s ease-in-out infinite;
}
.bv-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(250, 247, 240, 0.5);
}

.bv-headline-block {
  align-self: end;
  max-width: 720px;
}
.bv-headline {
  font-family: var(--sans-display);
  font-weight: 400;
  font-size: clamp(48px, 7vw, 120px);
  line-height: 0.92;
  letter-spacing: -0.022em;
  margin: 0 0 18px;
  color: var(--paper-50);
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.65);
}
.bv-sub {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.55;
  max-width: 48ch;
  color: rgba(250, 247, 240, 0.85);
  margin: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.bv-bottom {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  flex-wrap: wrap;
}

/* Phase progress · vertical bar + label */
.bv-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}
.bv-state {
  color: var(--paper-50);
  min-width: 14ch;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  transition: color 320ms var(--ease-out-expo);
}
.bv-bar {
  width: 200px;
  height: 1px;
  background: rgba(250, 247, 240, 0.25);
  position: relative;
}
.bv-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  height: 100%;
  background: var(--accent-warm);
  box-shadow: 0 0 8px rgba(212, 154, 111, 0.6);
  transition: width 80ms linear;
}
.bv-pct {
  color: rgba(250, 247, 240, 0.7);
  min-width: 4ch;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.bv-cta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--paper-50);
  border-bottom: 1px solid var(--paper-50);
  padding-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: gap var(--dur-comfort) var(--ease-out-expo),
              color var(--dur-comfort) var(--ease-out-expo),
              border-color var(--dur-comfort) var(--ease-out-expo);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.bv-cta:hover { gap: 18px; color: var(--accent-warm); border-color: var(--accent-warm); }

@media (max-width: 767px) {
  .act-baala-build { height: 280vh; }
  .bv-content { padding: 32px var(--pad-x) 32px; gap: 16px; }
  .bv-headline { font-size: clamp(36px, 11vw, 64px); }
  .bv-sub { font-size: 14px; }
  .bv-bottom { flex-direction: column; align-items: flex-start; }
  .bv-progress { gap: 12px; }
  .bv-bar { width: 120px; }
  .bv-state { min-width: 10ch; font-size: 9px; }
}
