/* ============================================================
   ESTRUCTA MOTION — adicional a estructa.css
   Layer: GSAP / ScrollTrigger visual prep
   ============================================================ */

/* ---- Progress bar ---- */
#est-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--olive-deep), var(--olive-bright));
  z-index: 200;
  pointer-events: none;
  transform-origin: left center;
  transition: opacity .3s var(--ease);
}

/* ---- Hero initial states (GSAP takes over, prevents FOUC) ---- */
/* Only apply when JS is active (no-js fallback via .reveal system) */
html.gsap-ready .hero .markbox,
html.gsap-ready .hero .wm-lock,
html.gsap-ready .hero .kicker-lock,
html.gsap-ready .hero .statement .a,
html.gsap-ready .hero .statement .b,
html.gsap-ready .hero .hero-div,
html.gsap-ready .hero .cats,
html.gsap-ready .hero .cta-row,
html.gsap-ready .hero .hero-ticker {
  opacity: 0;
}

/* Hero video backdrop */
.hero .hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0; /* GSAP animates to .5 */
  filter: grayscale(.28) contrast(1.08) brightness(.88);
  will-change: transform, opacity;
}

/* Mobile: portrait viewport crops a horizontal 16:9 video hard on the sides.
   Shift focus to keep the columns + light rays (center-right) framed nicely. */
@media (max-width: 760px) {
  .hero .hero-photo {
    object-position: 62% center;
  }
}

.hero .blue,
.hero .grain,
.hero .vig {
  z-index: 1;
}

.hero-inner,
.hero-ticker {
  position: relative;
  z-index: 3;
}

/* ---- Scroll reveal — GSAP owns these, CSS is fallback ---- */
/* Keep .reveal opacity:0 base (already in estructa.css) */
/* GSAP will animate directly, .in class is fallback only */

/* ---- Enhanced hover: linea cards ---- */
.linea {
  will-change: transform;
}

/* ---- Project cards — parallax wrapper ---- */
.proj .ph {
  will-change: transform;
}

/* ---- Step rows — motion state ---- */
html.gsap-ready .step {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  html.gsap-ready .hero .markbox,
  html.gsap-ready .hero .wm-lock,
  html.gsap-ready .hero .kicker-lock,
  html.gsap-ready .hero .statement .a,
  html.gsap-ready .hero .statement .b,
  html.gsap-ready .hero .hero-div,
  html.gsap-ready .hero .cats,
  html.gsap-ready .hero .cta-row,
  html.gsap-ready .hero .hero-ticker,
  html.gsap-ready .step {
    opacity: 1 !important;
  }
  #est-progress { display: none; }
}

/* ---- Magnetic button — needs overflow visible on parent ---- */
.btn {
  position: relative;
  overflow: visible;
  will-change: transform;
}

/* ---- CTA band — stagger children ---- */
.cta-band .inner > * {
  will-change: transform, opacity;
}

/* ---- Line animation on marker hover (extra polish) ---- */
.marker .circ {
  overflow: hidden;
}

/* ---- Smooth page transition overlay (out-only) ---- */
#est-curtain {
  position: fixed;
  inset: 0;
  background: var(--forest);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top center;
}
