/* ImpulsArte v2.1.0 — encabezado cinematográfico con scroll.
   Solo afecta la página pública de la agencia. No modifica ImpulsArte OS ni Arcade. */

body.site-scroll-enhanced { background: #f7f8fc !important; }
body.site-scroll-enhanced .site-header {
  position: fixed;
  z-index: 60;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
body.site-scroll-enhanced .site-header.site-header--on-dark {
  background: rgba(16, 18, 37, .76);
  border-color: rgba(255,255,255,.15);
  box-shadow: none;
  backdrop-filter: blur(12px);
}
body.site-scroll-enhanced .site-header.site-header--solid {
  background: rgba(23,25,43,.96);
  box-shadow: 0 14px 45px rgba(23,25,43,.16);
}
body.site-scroll-enhanced .main-nav a { transition: color .2s ease, background .2s ease, border-color .2s ease; }
body.site-scroll-enhanced .menu-button { display:none; }

.scroll-experience {
  position: relative;
  min-height: 2200px;
  height: 420svh;
  scroll-margin-top: 0 !important;
}
.sticky-scene {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 580px;
  overflow: hidden;
  background: #060b22 url('/scroll-cinematic/poster-desktop.webp') center center / cover no-repeat;
  isolation: isolate;
}
#sceneCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity .45s ease;
  z-index: 0;
}
#sceneCanvas.ready { opacity: 1; }
.scroll-shading {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 19% 24%, rgba(97,127,255,.26), transparent 26%),
    linear-gradient(90deg, rgba(3,7,24,.83) 0%, rgba(3,7,24,.58) 28%, rgba(3,7,24,.16) 58%, rgba(3,7,24,.02) 100%),
    linear-gradient(180deg, rgba(6,10,27,.12) 0%, rgba(6,10,27,0) 22%, rgba(6,10,27,0) 76%, rgba(6,10,27,.56) 100%);
}
.scroll-stories {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: min(1320px, calc(100% - 68px));
  margin: 0 auto;
}
.scroll-story {
  position: absolute;
  top: 50%;
  left: 0;
  width: min(590px, 50vw);
  max-width: calc(100vw - 42px);
  transform: translateY(calc(-50% + 24px));
  opacity: 0;
  visibility: hidden;
  transition: opacity .55s ease, transform .72s cubic-bezier(.2,.7,.15,1), visibility .55s ease;
  pointer-events: none;
}
.scroll-story.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%);
  pointer-events: auto;
}
.scroll-story .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: #c6d8ff;
}
.scroll-story .eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: rgba(201,216,255,.8);
}
.scroll-story h1,
.scroll-story h2 {
  margin: 0 0 20px;
  color: #fff;
  font-size: clamp(3.3rem, 5.9vw, 6.25rem);
  line-height: .98;
  letter-spacing: -.075em;
  font-weight: 780;
  text-wrap: balance;
}
.scroll-story h1 em,
.scroll-story h2 em {
  color: #a9c9ff;
  font-style: normal;
}
.scroll-story .lead {
  max-width: 490px;
  margin: 0 0 28px;
  color: rgba(236,242,255,.9);
  font-size: clamp(1rem, 1.18vw, 1.15rem);
  line-height: 1.72;
  text-wrap: pretty;
}
.story-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 30px;
}
.story-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(201,216,255,.22);
  background: rgba(255,255,255,.07);
  color: #edf3ff;
  font-size: .83rem;
  font-weight: 650;
  line-height: 1;
  backdrop-filter: blur(12px);
}
.story-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.story-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 19px;
  border-radius: 999px;
  border: 1px solid rgba(188,204,255,.36);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 730;
  line-height: 1;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.story-action:hover { transform: translateY(-2px); }
.story-action.primary { background: #fff; color: #1f2440; }
.story-action.primary:hover { background: #eef3ff; }
.story-action.ghost { background: rgba(255,255,255,.08); color: #fff; }
.story-action.ghost:hover { background: rgba(255,255,255,.16); }
.scene-bottom {
  position: absolute;
  left: max(34px, calc((100vw - min(1320px, calc(100% - 68px))) / 2));
  right: max(34px, calc((100vw - min(1320px, calc(100% - 68px))) / 2));
  bottom: clamp(26px, 5vh, 58px);
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  color: #d4def7;
}
.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(214,226,252,.92);
}
.scroll-mark {
  font-size: 1.3rem;
  line-height: 1;
}
.progress-widget {
  display: flex;
  align-items: center;
  gap: 14px;
}
.step-counter {
  font-size: .82rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.progress-track {
  width: 120px;
  height: 2px;
  border-radius: 999px;
  background: rgba(197,210,242,.28);
  overflow: hidden;
}
.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #7ea9ff 0%, #b7d4ff 100%);
  transition: width .12s linear;
}

.hero-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr);
  gap: clamp(28px, 4vw, 62px);
  align-items: start;
  margin-top: -88px;
  margin-bottom: 26px;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(228,230,240,.94);
  border-radius: 28px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 24px 72px rgba(26,31,73,.09);
  position: relative;
  z-index: 5;
}
.hero-overview h2 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 3.6vw, 3.35rem);
  line-height: 1.04;
  letter-spacing: -.055em;
  color: var(--imp-ink);
}
.hero-overview p { margin: 0; color: #596174; line-height: 1.75; font-size: 1.02rem; }
.hero-overview .kicker { margin-bottom: 12px; }
.overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 24px;
}
.overview-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 700;
}
.overview-actions a.primary { background: var(--imp-purple); color: #fff; box-shadow: 0 12px 28px rgba(99,84,233,.18); }
.overview-actions a.secondary { background: #f5f6fb; color: var(--imp-ink); border: 1px solid #dde0ea; }
.overview-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.overview-stat,
.overview-callout {
  padding: 20px 18px;
  border-radius: 19px;
  border: 1px solid #eaebf2;
  background: #fbfbfe;
}
.overview-stat strong {
  display: block;
  margin-bottom: 8px;
  color: var(--imp-purple);
  font-size: clamp(1.7rem, 2.7vw, 2.35rem);
  line-height: 1;
  letter-spacing: -.055em;
}
.overview-stat span,
.overview-callout span { display: block; color: #6a7285; font-size: .88rem; line-height: 1.45; }
.overview-callout {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #f1edff 0%, #f7f8fc 100%);
  border-color: #e4dfff;
}
.overview-callout strong {
  display: block;
  margin-bottom: 8px;
  color: #2c2f44;
  font-size: 1.1rem;
  font-weight: 760;
}
.overview-callout p {
  margin: 0;
  color: #5d6374;
  font-size: .95rem;
  line-height: 1.65;
}

/* Ajustes visuales para acompañar mejor la nueva introducción. */
.creative-showcase { padding-top: 56px; }
.references-section { padding-top: 90px; }
.contact-section { padding-top: 86px; }

@media (max-width: 980px) {
  body.site-scroll-enhanced .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    color: #fff;
  }
  body.site-scroll-enhanced .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 78px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(22,24,43,.98);
    box-shadow: 0 16px 40px rgba(0,0,0,.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }
  body.site-scroll-enhanced .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  body.site-scroll-enhanced .main-nav a { padding: 13px 14px; }
  .scroll-experience { min-height: 2080px; height: 410svh; }
  .scroll-stories,
  .scene-bottom { width: calc(100% - 44px); }
  .scroll-story { width: min(520px, 64vw); }
  .hero-overview { grid-template-columns: 1fr; margin-top: -62px; }
}

@media (max-width: 700px) {
  .scroll-experience { min-height: 1880px; height: 385svh; }
  .sticky-scene {
    min-height: 540px;
    background-image: url('/scroll-cinematic/poster-mobile.webp');
    background-position: center center;
  }
  .scroll-shading {
    background:
      radial-gradient(circle at 52% 12%, rgba(115,150,255,.2), transparent 34%),
      linear-gradient(180deg, rgba(5,9,28,.82) 0%, rgba(5,9,28,.3) 24%, rgba(5,9,28,.03) 48%, rgba(5,9,28,.14) 72%, rgba(5,9,28,.76) 100%);
  }
  .scroll-stories {
    width: calc(100% - 38px);
  }
  .scroll-story {
    top: clamp(118px, 17svh, 156px);
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    transform: translateY(18px);
  }
  .scroll-story.is-active { transform: translateY(0); }
  .scroll-story .eyebrow {
    margin-bottom: 14px;
    font-size: .66rem;
    letter-spacing: .17em;
    gap: 8px;
  }
  .scroll-story .eyebrow::before { width: 18px; }
  .scroll-story h1,
  .scroll-story h2 {
    margin-bottom: 12px;
    font-size: clamp(2.55rem, 10.5vw, 3.7rem);
    line-height: 1.04;
  }
  .scroll-story .lead {
    max-width: 340px;
    margin-bottom: 18px;
    font-size: .92rem;
    line-height: 1.56;
  }
  .story-chip-row {
    gap: 7px;
    margin-bottom: 18px;
  }
  .story-chip-row span {
    min-height: 31px;
    padding: 7px 11px;
    font-size: .72rem;
  }
  .story-actions { gap: 8px; }
  .story-action {
    min-height: 42px;
    padding: 10px 13px;
    font-size: .8rem;
  }
  .scene-bottom {
    width: calc(100% - 38px);
    left: 19px;
    right: 19px;
    bottom: 20px;
    align-items: center;
  }
  .scroll-hint {
    font-size: .58rem;
    letter-spacing: .14em;
    gap: 7px;
  }
  .scroll-mark { font-size: 1rem; }
  .step-counter { font-size: .68rem; }
  .progress-track { width: 58px; }
  .hero-overview {
    width: min(1200px, calc(100% - 20px));
    margin-top: -34px;
    margin-bottom: 14px;
    padding: 24px 20px;
    border-radius: 20px;
  }
  .hero-overview h2 { font-size: clamp(1.75rem, 8vw, 2.4rem); margin-bottom: 13px; }
  .hero-overview p { font-size: .97rem; line-height: 1.68; }
  .overview-actions { gap: 9px; margin-top: 18px; }
  .overview-actions a { width: 100%; }
  .overview-stats { grid-template-columns: 1fr; }
  .overview-stat, .overview-callout { padding: 18px 16px; border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #sceneCanvas, .scroll-story, .story-action, .progress-fill, .site-header, .main-nav { transition: none !important; }
}
