/* Section: story — full-bleed video with scroll-linked "curtain" reveal.
   A navy panel sits on top of the video. As the section scrolls into view,
   the panel slides off to the right, revealing the video and copy. */

.story {
  position: relative;
  width: 100%;
  min-height: min(92vh, 860px);
  overflow: hidden;
  isolation: isolate;
  background: var(--color-navy-ink);
}

.story__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.story__tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(11, 17, 45, 0.20) 0%,
      rgba(11, 17, 45, 0.40) 70%,
      rgba(11, 17, 45, 0.55) 100%);
  z-index: 1;
}

.story__content {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(var(--sp-8), 14vw, var(--sp-10)) var(--sp-5);
  min-height: inherit;
  color: var(--color-white);
}
.story__inner { max-width: 780px; }

.story__eyebrow {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: 0.875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-white);
  opacity: 0.9;
  margin: 0 0 var(--sp-4);
}
.story__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-white);
  margin: 0 0 var(--sp-6);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.22);
}
.story__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--color-red);
  color: var(--color-white);
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.story__cta:hover { background: var(--color-red-deep); transform: translateY(-1px); }
.story__cta:active { transform: translateY(0); }

/* ——— Curtain wipe ———
   --reveal is set by JS on .story; 0 = fully covered, 1 = fully open.
   The curtain translates to the right as --reveal increases. */
.story__curtain {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: var(--color-navy);
  transform: translateX(calc(var(--reveal, 0) * 101%));
  transition: transform 80ms linear;   /* tiny smoothing between scroll ticks */
  will-change: transform;
  pointer-events: none;
}

/* If the browser supports CSS scroll-driven animations we use those for
   extra smoothness; JS remains as the compatible fallback. */
@supports (animation-timeline: view()) {
  @keyframes story-wipe {
    from { transform: translateX(0); }
    to   { transform: translateX(101%); }
  }
  .story__curtain {
    animation: story-wipe linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 35%;
    transition: none;
  }
}

/* Respect motion preferences: show the video instantly, no wipe. */
@media (prefers-reduced-motion: reduce) {
  .story__curtain { display: none; }
}
