

.story {
  --story-h: max(480px, calc(100svh - var(--hdr, 72px)));   
  position: relative;
}
main > section.story { padding: 0; }   

.story-stage { position: relative; background: var(--emerald-deep); color: var(--paper); }


.story-scene + .story-scene { border-block-start: 1px solid color-mix(in srgb, var(--paper) 10%, transparent); }
.story-media { position: relative; aspect-ratio: 2080 / 756; overflow: clip; background: var(--emerald-deep); }
.story-img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}
.story-copy-wrap { padding-block: 1.5rem 2.25rem; }
.story-text { max-inline-size: 34rem; }
.story-text .eyebrow { margin: 0 0 0.6rem; color: var(--pist-bright); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; }
.story-text h1,
.story-text h2 { font-size: clamp(1.7rem, 3.1vw, 2.9rem); line-height: var(--lh-display); color: var(--paper); }
.story-text .sub { margin-block-start: 0.75rem; color: color-mix(in srgb, var(--paper) 84%, transparent); font-size: 1.0625rem; line-height: 1.75; }
.story-text .cta-row { margin-block-start: 1.4rem; }
.story-text .btn-secondary { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 50%, transparent); background: transparent; }
.story-text .btn-secondary:hover { border-color: var(--paper); }
.story-progress-wrap { display: none; }
.story-film { display: none; }   


@media (prefers-reduced-motion: no-preference) {
  html.js .story-stage {
    block-size: var(--story-h);
    overflow: clip;
  }
  html.js .story-scene {
    position: absolute;
    inset: 0;
    border: 0;
  }
  
  html.js .story-scene + .story-scene .story-media,
  html.js .story-scene + .story-scene .story-text { visibility: hidden; opacity: 0; }

  html.js .story-media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    z-index: 1;
  }
  html.js .story-img { will-change: transform, opacity; }
  
  html.js .story-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
      color-mix(in srgb, var(--ink) 80%, transparent) 0%,
      color-mix(in srgb, var(--ink) 58%, transparent) 30%,
      color-mix(in srgb, var(--ink) 12%, transparent) 52%,
      transparent 64%);
    pointer-events: none;
  }
  
  html.js .story-film {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
  }
  html.js .story-film.is-ready { opacity: 1; }
  html.js .story-film-canvas { display: block; inline-size: 100%; block-size: 100%; }
  html.js .story-film::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
      color-mix(in srgb, var(--ink) 80%, transparent) 0%,
      color-mix(in srgb, var(--ink) 58%, transparent) 30%,
      color-mix(in srgb, var(--ink) 12%, transparent) 52%,
      transparent 64%);
  }
  html.js .story-copy-wrap {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-block: 0 calc(3.5rem + var(--bar-gap, 0px));
    pointer-events: none;
  }
  html.js[dir="rtl"] .story-copy-wrap { justify-content: flex-end; }
  html.js .story-text { max-inline-size: min(36%, 34rem); pointer-events: auto; }

  html.js .story-progress-wrap {
    display: block;
    position: absolute;
    inset-inline: 0;
    inset-block-end: calc(1.5rem + var(--bar-gap, 0px));
    z-index: 4;
    pointer-events: none;
  }
  html.js .story-progress { display: flex; align-items: center; gap: 0.9rem; inline-size: min(36%, 34rem); }
  html.js[dir="rtl"] .story-progress { margin-inline-start: auto; }
  html.js .story-count { color: color-mix(in srgb, var(--paper) 80%, transparent); font-size: 0.8125rem; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
  html.js .story-bar {
    position: relative;
    flex: 1;
    block-size: 2px;
    background: color-mix(in srgb, var(--paper) 22%, transparent);
    overflow: clip;
  }
  html.js .story-bar-fill {
    position: absolute;
    inset: 0;
    background: var(--gold-bright);
    transform: scaleX(0);
    transform-origin: left center;
  }
  html.js[dir="rtl"] .story-bar-fill { transform-origin: right center; }

  
  @media (max-width: 1100px) {
    html.js .story-text,
    html.js .story-progress { max-inline-size: none; inline-size: min(42%, 26rem); }
    html.js .story-media::after,
    html.js .story-film::after {
      background: linear-gradient(to right,
        color-mix(in srgb, var(--ink) 82%, transparent) 0%,
        color-mix(in srgb, var(--ink) 62%, transparent) 36%,
        color-mix(in srgb, var(--ink) 14%, transparent) 58%,
        transparent 70%);
    }
    html.js .story-text h1,
    html.js .story-text h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
  }

  
  @media (max-width: 760px) {
    html.js .story-media { inset-block-end: 44%; }
    html.js .story-film { inset-block-end: 44%; }
    html.js .story-film::after {
      background: linear-gradient(to top, color-mix(in srgb, var(--emerald-deep) 85%, transparent) 0%, transparent 35%);
    }
    html.js .story-media::after {
      background: linear-gradient(to top, color-mix(in srgb, var(--emerald-deep) 85%, transparent) 0%, transparent 35%);
    }
    html.js .story-img { object-position: var(--mpos, 50% 50%); will-change: opacity; }
    html.js .story-copy-wrap,
    html.js[dir="rtl"] .story-copy-wrap {
      inset-block-start: 56%;
      align-items: flex-start;
      justify-content: stretch;
      padding-block: 0.9rem calc(3rem + var(--bar-gap, 0px));
    }
    html.js .story-text,
    html.js .story-progress { inline-size: 100%; max-inline-size: none; }
    html.js .story-text h1,
    html.js .story-text h2 { font-size: clamp(1.45rem, 6.4vw, 1.9rem); }
    html.js .story-text .sub { font-size: 0.975rem; line-height: 1.65; margin-block-start: 0.5rem; }
    html.js .story-text .cta-row { margin-block-start: 1rem; }
    html.js .story-progress-wrap { inset-block-end: calc(1rem + var(--bar-gap, 0px)); }
  }
}


.after-hero { position: relative; z-index: 2; background: var(--paper); }
.after-hero > .wrap:first-child .glance { margin-block: 0; padding-block-start: 1.75rem; }



body.has-hero .story { --story-h: max(480px, 100lvh); --bar-gap: calc(100lvh - 100svh); }
@media (prefers-reduced-motion: no-preference) {
  
  html.js body.has-hero .story-stage::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-start: 0;
    block-size: 9rem;
    z-index: 3;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--ink) 55%, transparent), transparent);
    pointer-events: none;
  }
}
