/* Native scrolling drives a single pinned stage. Without enhancement, all content flows. */
.story { position: relative; --scene-shade: 0; background: #1239d5; color: #fff0d6; }
.story-stage { position: relative; }
.story-backgrounds, .story-controls, .story-progress { display: none; }
.story-stage > .header { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 10; color: #fff0d6; }
.story .header .wordmark { color: inherit; }
.story .header .button { background: #fff0d6; color: #102997; border-color: #fff0d6; border-radius: 3px; }
.story-panel { scroll-margin-top: 0; }
.story-panel:focus { outline: none; }
.story .hero { background: #1239d5 url('assets/heroes/hero-observatorio-atacama.webp') center/cover; }
.story .orbital-scene { background: #1239d5 url('assets/heroes/hero-ideas-orbitales.webp') center/cover; }
.story .contact { background: #1239d5 url('assets/heroes/hero-laboratorio-monumental.webp') center/cover; }
.story .solutions { background: var(--paper); color: var(--ink); width: 100%; padding-inline: max(28px, calc((100% - 1260px)/2)); }
.story .recognition { color: #fff0d6; }
.story .recognition-heading p, .story .logos figcaption { color: #fff0d6; }
.story .logos img { filter: brightness(0) invert(1); mix-blend-mode: normal; opacity: .95; }
.orbital-copy { width: 100%; }
.orbital-copy > .eyebrow { margin-bottom: 20px; }
.story .lab-note { margin: 36px 0 0; padding: 0; background: none; display: block; max-width: 580px; }
.story .lab-note > p { display: none; }
.story .lab-note > div { justify-content: flex-start; gap: 16px 24px; font-size: 1rem; }
.story .lab-note small { color: inherit; opacity: .8; }
.story.is-pinned .story-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate; }
.is-pinned .story-backgrounds { display: block; position: absolute; inset: 0; z-index: -2; background: #1239d5; }
.story-backgrounds img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0; will-change: opacity; }
.story-backgrounds img:first-child { opacity: 1; }
.is-pinned .story-stage::after { content: ''; position: absolute; z-index: -1; inset: 0; background: #0b205d; opacity: var(--scene-shade); pointer-events: none; }
.is-pinned .story-panel { position: absolute; inset: 100px 0 76px; margin: auto; height: fit-content; max-width: none; opacity: 0; visibility: hidden; background: none; overflow: visible; will-change: opacity, transform; }
.is-pinned .story-panel:first-child { opacity: 1; visibility: visible; }
.is-pinned .story-panel::before { display: none; }
.is-pinned .hero .hero-inner, .is-pinned .orbital-inner, .is-pinned .contact-inner { min-height: 0; padding-block: 0; }
.is-pinned .hero .hero-inner { display: block; }
.is-pinned .solutions { width: min(1260px, calc(100% - 112px)); padding: 32px; background: #fbfaf6f7; border: 1px solid #ffffff70; border-radius: 8px; }
.is-pinned .section-heading { margin-bottom: 22px; }
.is-pinned .section-heading h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.is-pinned .section-heading .eyebrow { margin-bottom: 10px; }
.is-pinned .service-grid { gap: 22px; }
.is-pinned .service > img { height: clamp(100px, 17vh, 180px); margin-bottom: 16px; }
.is-pinned .service > p { margin: 10px 0; }
.is-pinned .service h3 { font-size: 1.15rem; }
.is-pinned .recognition { padding-block: 0; }
.is-pinned .recognition-heading { text-align: left; margin-bottom: 48px; max-width: 600px; }
.is-pinned .recognition h2 { font-size: clamp(2.4rem, 4vw, 4rem); line-height: 1.08; }
.is-pinned .recognition-heading p { margin-top: 22px; font-size: 1rem; }
.is-pinned .logos { width: 100%; padding: 32px 0; border-top: 1px solid #fff0d64d; }
.is-pinned .logos img { height: 42px; }
.is-pinned .logos figcaption { font-size: .875rem; }
.is-pinned .story-controls { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.story-controls a, .story-mode { min-height: 44px; display: inline-flex; align-items: center; font: inherit; font-size: .875rem; color: inherit; }
.story-nav { display: flex; gap: 20px; }
.story-nav a { opacity: .65; border-bottom: 1px solid transparent; }
.story-nav a[aria-current], .story-nav a:hover { opacity: 1; border-bottom-color: currentColor; }
.story-mode { border: 0; padding: 0; background: none; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.scroll-hint { font-size: .875rem; }
.story a:focus-visible, .story button:focus-visible { outline-color: #d78b22; }
.is-pinned .story-progress { display: block; position: absolute; bottom: 0; height: 2px; background: #fff0d62e; width: 100%; }
.story-progress span { display: block; height: 100%; background: #fff0d6; transform-origin: left; transform: scaleX(0); }
.story.is-simple .story-controls { display: flex; justify-content: flex-end; padding: 20px 0; }
.is-simple .scroll-hint, .is-simple .story-nav { display: none; }
@media (max-width: 1100px) {
  .is-pinned .solutions { width: calc(100% - 56px); padding: 24px; }
  .is-pinned .service-grid { gap: 14px; }
  .scroll-hint { display: none; }
}
@media (max-width: 800px) {
  .story-stage > .header { height: 80px; }
  .is-pinned .story-panel { inset: 90px 0 82px; }
  .is-pinned .solutions { width: calc(100% - 40px); padding: 20px; }
  .is-pinned .section-heading { gap: 6px; margin-bottom: 14px; }
  .is-pinned .section-heading .eyebrow { font-size: .75rem; margin-bottom: 6px; }
  .is-pinned .section-heading > p { display: none; }
  .is-pinned .service-grid { display: flex; flex-direction: column; gap: 0; }
  .is-pinned .service, .is-pinned .service:last-child { display: grid; grid-template-columns: 60px 1fr 44px; grid-template-rows: auto auto; column-gap: 12px; padding: 10px 0; margin: 0; border-bottom: 1px solid var(--line); }
  .is-pinned .service:last-child { border: 0; padding-bottom: 0; }
  .is-pinned .service > img, .is-pinned .service:last-child img { width: 60px; height: 60px; margin: 0; grid-row: 1 / 3; grid-column: 1; }
  .is-pinned .service h3 { grid-row: 1; grid-column: 2; font-size: 1rem; align-self: end; }
  .is-pinned .service > p, .is-pinned .service:last-child > p { grid-row: 2; grid-column: 2; font-size: .875rem; line-height: 1.35; margin: 4px 0 0; }
  .is-pinned .service p br { display: none; }
  .is-pinned .service .service-open { grid-row: 1 / 3; grid-column: 3; font-size: 0; border: 0; justify-content: center; align-self: center; min-height: 48px; }
  .is-pinned .service-open span { font-size: 1.6rem; }
  .story-nav { gap: 12px; }
  .story-controls a, .story-mode { font-size: .75rem; }
  .is-pinned .story-controls { gap: 6px; flex-wrap: wrap; justify-content: center; bottom: 10px; }
  .is-pinned .story-controls .story-mode { min-height: 24px; }
  .is-pinned .logos { gap: 24px; }
}
@media (max-width: 560px) {
  .story-backgrounds img { object-position: 58% center; }
  .is-pinned .story-stage::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #1239d5b3, #1239d533); pointer-events: none; }
  .is-pinned .hero-copy, .is-pinned .contact-copy { width: 100%; max-width: 350px; }
  .is-pinned .hero h1 { font-size: clamp(2.6rem, 11vw, 3.2rem); }
  .is-pinned .hero .eyebrow { font-size: .75rem; }
  .is-pinned .contact .contact-copy h2 { font-size: clamp(2.3rem, 10vw, 3rem); }
  .is-pinned .recognition h2 { font-size: 2.25rem; margin: 0; }
  .is-pinned .recognition-heading { margin-bottom: 24px; }
  .is-pinned .logos { gap: 24px 16px; }
  .is-pinned .logos figcaption { font-size: .75rem; }
  .story .lab-note > div { max-width: 280px; gap: 18px; line-height: 1.4; }
}
@media (prefers-reduced-motion: reduce) {
  .story-panel { transform: none !important; }
}

/* The same three approved space and laboratory scenes support the simple view. */
.story:not(.is-pinned) .recognition {
  width: 100%;
  padding-inline: max(28px, calc((100% - 1260px)/2));
  background: linear-gradient(#0b205d4d, #0b205d4d), url('assets/heroes/hero-estacion-orbital.webp') center / cover;
}
.story:not(.is-pinned) .solutions {
  background: linear-gradient(#fbfaf6ed, #fbfaf6ed), url('assets/heroes/hero-microscopia.webp') center / cover;
}

/* The footer enters over the existing final backdrop; it has no image of its own. */
.story.is-pinned > .footer { position: absolute; bottom: 0; left: 0; width: 100%; z-index: 12; }
.story:not(.is-pinned) .contact { background: linear-gradient(#07174333, #071743bd), url('assets/heroes/hero-laboratorio-monumental.webp') center / cover; }
.story:not(.is-pinned) .contact::before { display: none; }
.story:not(.is-pinned) .footer { position: relative; }
.story .footer h2 { color: #fff0d6bf; font-size: .75rem; line-height: 1.2; letter-spacing: .12em; margin: 10px 0 24px; }
.story .footer-links h2 { margin-bottom: 8px; }
@media (max-width: 700px) { .story .footer h2 { margin-top: 0; } }
