/* Parallax hero + sticky reading column. Base scroll styles: Locomotive bundled CSS. */

:root {
  --bg: #0c0c0e;
  --surface: #141418;
  --text: #f2f2f5;
  --muted: #8c8d96;
  --accent: #6eb5ff;
  --border: rgba(255, 255, 255, 0.08);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  --topbar-h: 52px;
  --page-gutter: clamp(24px, 6vw, 56px);
}

html.no-locomotive body {
  overflow: auto;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: clamp(16px, 2.2vw, 18px);
  line-height: 1.6;
}

a {
  color: var(--accent);
}

.wrap {
  width: min(1100px, calc(100% - 2 * var(--page-gutter)));
  margin-inline: auto;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--topbar-h);
  padding-inline: var(--page-gutter);
  background: rgba(12, 12, 14, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.top-bar a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.top-bar a:hover {
  color: var(--text);
}

.top-bar .docs {
  font-family: var(--mono);
  font-size: 0.72rem;
}

/* Parallax demo: tall viewport so speed difference is obvious */
.hero-parallax {
  min-height: min(92vh, 720px);
  padding-top: calc(var(--topbar-h) + clamp(2rem, 8vh, 4rem));
  padding-bottom: clamp(3rem, 10vh, 5rem);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(110, 181, 255, 0.12), transparent 55%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

/* .hero-parallax-inner uses .wrap only — never width:100% on this block or it overrides .wrap and pins hero text to the viewport edge */

.hero-label {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-label code {
  font-size: inherit;
  color: #a8b0c4;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.16em 0.45em 0.16em 0.55em;
  border-radius: 5px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-title {
  margin: 0 0 1.25rem;
  max-width: 14ch;
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
  color: var(--text);
}

.hero-sub {
  margin: 0;
  max-width: 36ch;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Locomotive v5 attribute lab (data-scroll-*) */
.loco-attrs {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #101014 0%, var(--bg) 100%);
}

.loco-attrs-inner {
  padding-block: clamp(2.5rem, 7vh, 4rem);
}

.loco-attrs-intro {
  max-width: 70ch;
  margin-bottom: clamp(1.75rem, 4vh, 2.5rem);
}

.loco-attrs-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.45rem, 3.5vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.loco-attrs-lede {
  margin: 0;
  color: #b9bac4;
  font-size: 0.98rem;
  line-height: 1.6;
}

.loco-attrs-lede code {
  font-size: 0.88em;
  color: #c8cad4;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.loco-attrs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

@media (min-width: 900px) {
  .loco-attrs-card--wide {
    grid-column: span 2;
  }
}

.loco-attrs-card {
  padding: clamp(1.1rem, 2.5vw, 1.35rem);
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.loco-attrs-card.loco-attrs-inview {
  border-color: rgba(110, 181, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(110, 181, 255, 0.1),
    0 18px 40px rgba(0, 0, 0, 0.35);
}

.loco-attrs-card-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.loco-attrs-card-title code {
  font-size: 0.82rem;
  font-weight: 500;
  color: #a8b0c4;
}

.loco-attrs-card-body {
  margin: 0;
  font-size: 0.9rem;
  color: #b4b5bf;
  line-height: 1.55;
}

.loco-attrs-card-body code {
  font-size: 0.82em;
  color: #c8cad4;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.08em 0.28em;
  border-radius: 3px;
}

.loco-attrs-progress-host {
  height: 10px;
  margin-top: 1rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.loco-attrs-progress-host[data-scroll-css-progress] .loco-attrs-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, var(--accent), #9ad0ff);
  border-radius: inherit;
}

.loco-attrs-progress-spacer {
  min-height: 200px;
  margin-top: 1rem;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.loco-attrs-readout {
  margin: 0.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.loco-attrs-speedline {
  color: var(--accent);
  font-weight: 500;
}

/* Storytelling lab: headlines, copy, images, numbers (Locomotive data-scroll-*) */
.story-lab {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.story-lab-inner {
  padding-block: clamp(2.5rem, 7vh, 4.5rem);
}

.story-lab-intro {
  max-width: 68ch;
  margin-bottom: clamp(2rem, 5vh, 3rem);
}

.story-lab-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3.8vw, 2.05rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.story-lab-lede {
  margin: 0;
  color: #b9bac4;
  font-size: 0.98rem;
  line-height: 1.6;
}

.story-lab-lede code {
  font-size: 0.88em;
  color: #c8cad4;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.32em;
  border-radius: 4px;
}

.story-block {
  margin-bottom: clamp(2.5rem, 6vh, 3.5rem);
}

.story-kicker {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.story-display {
  margin: 0 0 0.75rem;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text);
}

.story-display--split {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.story-display-line {
  display: block;
}

.story-dek,
.story-body {
  margin: 0;
  max-width: 56ch;
  font-size: 1rem;
  line-height: 1.6;
  color: #b8b9c4;
}

.story-body code {
  font-size: 0.85em;
  color: #c8cad4;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.08em 0.28em;
  border-radius: 3px;
}

/* Chapter: stagger children when .story-inview on parent */
.story-block--chapter .story-kicker,
.story-block--chapter .story-display,
.story-block--chapter .story-dek {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.story-block--chapter.story-inview .story-kicker {
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.story-block--chapter.story-inview .story-display {
  opacity: 1;
  transform: none;
  transition-delay: 0.1s;
}

.story-block--chapter.story-inview .story-dek {
  opacity: 1;
  transform: none;
  transition-delay: 0.2s;
}

.story-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
  margin-bottom: clamp(2.5rem, 6vh, 3.5rem);
}

@media (max-width: 800px) {
  .story-columns {
    grid-template-columns: 1fr;
  }
}

.story-run {
  border-radius: 4px;
  padding: 0.08em 0.15em;
  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.story-run.story-run-lit {
  color: var(--bg);
  background: linear-gradient(120deg, var(--accent), #8ec8ff);
  box-shadow: 0 0 0 1px rgba(110, 181, 255, 0.35);
}

.story-quote {
  margin: 0;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  opacity: 0;
  transform: scale(0.985) translateY(12px);
  transition:
    opacity 0.5s ease,
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.story-quote p {
  margin: 0 0 0.75rem;
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  line-height: 1.45;
  color: #e4e5ec;
  font-style: italic;
}

.story-quote footer {
  font-size: 0.85rem;
  color: var(--muted);
}

.story-quote.story-inview {
  opacity: 1;
  transform: none;
}

.story-photo {
  margin: 0 0 clamp(2.5rem, 6vh, 3.5rem);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: min(42vh, 420px);
  background: #0a0a0d;
}

.story-photo img {
  display: block;
  width: 100%;
  height: min(48vh, 480px);
  object-fit: cover;
  clip-path: inset(0 calc((1 - var(--progress, 0)) * 100%) 0 0);
  filter: saturate(calc(0.55 + var(--progress, 0) * 0.45));
  transition: filter 0.15s linear;
}

.story-photo-cap {
  padding: 0.85rem 1rem 1rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.story-photo-cap code {
  font-size: 0.9em;
  color: #aeb6c9;
}

/* Tall sticky scrub: --progress is slow in wall-clock; image inherits --progress from .story-filter-scene */
.story-filter-scene {
  position: relative;
  min-height: min(255vh, 2300px);
  margin: 0 0 clamp(2.5rem, 6vh, 3.5rem);
}

.story-filter-scene-sticky {
  position: sticky;
  top: calc(var(--topbar-h) + 1rem);
  padding-bottom: clamp(1.5rem, 4vh, 2.5rem);
}

.story-filter-strip {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a0a0d;
}

.story-filter-strip img {
  --p: var(--progress, 0);
  /*
    Entry: long max-blur plateau (p ≤ ~0.18), then slower sharpen (~0.18→~0.34) so the frame settles before clarity.
    Hold sharp → re-blur (color) → B&W → resume. Edges: 0.18 | 0.34 | 0.58 | 0.72 | 0.84 | 1
  */
  --b-open: clamp(0, calc((0.34 - var(--p)) / 0.16), 1);
  --b-reblur: clamp(0, calc((var(--p) - 0.58) / 0.14), 1);
  --blur-core: max(var(--b-open), var(--b-reblur));
  --blur-recover: clamp(0, calc((var(--p) - 0.84) / 0.16), 1);
  --blur-amt: calc(var(--blur-core) * (1 - var(--blur-recover)));
  --sat-gray: clamp(0, calc((var(--p) - 0.72) / 0.12), 1);
  --sat-back: clamp(0, calc((var(--p) - 0.84) / 0.16), 1);
  --sat-amt: calc(1 - var(--sat-gray) + var(--sat-gray) * var(--sat-back));
  display: block;
  width: 100%;
  height: min(52vh, 520px);
  object-fit: cover;
  opacity: 1;
  filter: blur(calc(52px * var(--blur-amt))) saturate(var(--sat-amt));
  will-change: filter;
}

.story-filter-cap {
  padding: 0.85rem 1rem 1rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
}

.story-filter-cap strong {
  color: #d8d9e0;
  font-weight: 600;
}

.story-filter-cap code {
  font-size: 0.9em;
  color: #aeb6c9;
}

.story-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin-bottom: clamp(2.5rem, 6vh, 3.5rem);
}

.story-stat {
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  min-height: 160px;
}

.story-stat--tall {
  min-height: 240px;
}

.story-stat-label {
  display: block;
  font-size: 0.72rem;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.story-stat-label code {
  font-size: inherit;
  color: #aeb6c9;
}

.story-stat-value-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.6rem;
}

.story-stat-value {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.story-stat-value--blur {
  display: block;
  margin-top: 0.25rem;
  filter: blur(calc((1 - var(--progress, 0)) * 14px));
  opacity: calc(0.2 + var(--progress, 0) * 0.8);
  transform: translateY(calc((1 - var(--progress, 0)) * 14px));
}

.story-stat-suffix {
  font-size: 0.95rem;
  color: var(--muted);
}

.story-stat-hint {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: #8f909a;
  line-height: 1.45;
}

.story-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  padding-left: clamp(1rem, 3vw, 1.5rem);
}

.story-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  padding: clamp(1rem, 2.5vw, 1.35rem) 0;
  border-bottom: 1px solid var(--border);
}

.story-step:last-child {
  border-bottom: none;
}

.story-step-mark {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  transition:
    border-color 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease;
}

.story-step.story-step-on .story-step-mark {
  border-color: rgba(110, 181, 255, 0.65);
  color: var(--accent);
  box-shadow: 0 0 28px rgba(110, 181, 255, 0.22);
}

.story-step-title {
  display: block;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.story-step-text {
  margin: 0;
  font-size: 0.9rem;
  color: #a9aab4;
  line-height: 1.5;
}

.story-step-text code {
  font-size: 0.88em;
  color: #c8cad4;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.06em 0.22em;
  border-radius: 3px;
}

html.no-locomotive .story-block--chapter .story-kicker,
html.no-locomotive .story-block--chapter .story-display,
html.no-locomotive .story-block--chapter .story-dek {
  opacity: 1;
  transform: none;
  transition: none;
}

html.no-locomotive .story-quote {
  opacity: 1;
  transform: none;
  transition: none;
}

html.no-locomotive .story-photo img {
  clip-path: none;
  filter: none;
}

html.no-locomotive .story-filter-scene {
  min-height: auto;
}

html.no-locomotive .story-filter-strip img {
  filter: none;
  opacity: 1;
  transform: none;
}

html.no-locomotive .story-stat-value--blur {
  filter: none;
  opacity: 1;
  transform: none;
}

html.no-locomotive .story-step .story-step-mark {
  border-color: rgba(110, 181, 255, 0.35);
  color: var(--accent);
}

/* Two columns: left headline pins until right column finishes scrolling */
.reading {
  padding-top: 0;
  padding-bottom: clamp(4rem, 12vh, 7rem);
}

.reading-inner {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding-top: max(clamp(2.5rem, 6vh, 4rem), calc(var(--topbar-h) + 0.5rem));
  padding-bottom: clamp(2.5rem, 6vh, 4rem);
}

@media (max-width: 800px) {
  .reading-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.reading-head {
  position: sticky;
  top: calc(var(--topbar-h) + 1.25rem);
  padding-bottom: 1rem;
}

@media (max-width: 800px) {
  .reading-head {
    position: static;
    top: auto;
  }
}

.reading-head h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4.2vw, 2.35rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.reading-kicker {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 28ch;
}

.reading-body {
  max-width: 52ch;
  color: #c8c8ce;
}

.reading-body p {
  margin: 0 0 1.25em;
}

.reading-body p:last-child {
  margin-bottom: 0;
  color: var(--accent);
  font-size: 0.95rem;
}

/* Horizontal pass: sticky viewport + long scrub; image + caption follow view timeline */
.slide-reveal {
  border-top: 1px solid var(--border);
  padding-bottom: clamp(4rem, 14vh, 8rem);
  background: linear-gradient(180deg, var(--bg) 0%, #0a0a0d 55%, var(--bg) 100%);
}

.slide-reveal-intro {
  padding-top: clamp(3rem, 8vh, 5rem);
  padding-bottom: clamp(2rem, 5vh, 3rem);
  max-width: 62ch;
}

.slide-reveal-label {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.slide-reveal-intro h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3.8vw, 2.1rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.slide-reveal-lede {
  margin: 0;
  color: #b9bac4;
  font-size: 1.02rem;
  line-height: 1.6;
}

.slide-reveal-lede strong {
  color: var(--text);
  font-weight: 600;
}

.slide-reveal-scrub {
  position: relative;
  height: clamp(210vh, 260vh, 300vh);
}

@supports (view-timeline-name: --reveal-left) {
  .slide-reveal--out-left .slide-reveal-scrub {
    view-timeline-name: --reveal-left;
    view-timeline-axis: block;
  }

  .slide-reveal--out-left .slide-reveal-panel {
    animation: slide-reveal-x-out-left linear both;
    animation-timeline: --reveal-left;
    animation-range: entry 0% exit 100%;
  }

  .slide-reveal--out-right .slide-reveal-scrub {
    view-timeline-name: --reveal-right;
    view-timeline-axis: block;
  }

  .slide-reveal--out-right .slide-reveal-panel {
    animation: slide-reveal-x-out-right linear both;
    animation-timeline: --reveal-right;
    animation-range: entry 0% exit 100%;
  }
}

.slide-reveal-sticky {
  position: sticky;
  top: var(--topbar-h);
  min-height: calc(100dvh - var(--topbar-h));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: clip;
  padding-block: clamp(0.75rem, 3vh, 1.5rem);
}

.slide-reveal-panel {
  width: min(720px, 100%);
  margin-inline: auto;
  display: grid;
  gap: 1rem 0;
}

.slide-reveal-figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.slide-reveal-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.slide-reveal-caption {
  margin: 0;
  font-size: 0.98rem;
  color: #c4c5ce;
  line-height: 1.55;
  max-width: 52ch;
}

@keyframes slide-reveal-x-out-left {
  0% {
    transform: translateX(calc(42vw + 10%));
  }
  36% {
    transform: translateX(0);
  }
  64% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-42vw - 10%));
  }
}

@keyframes slide-reveal-x-out-right {
  0% {
    transform: translateX(calc(42vw + 10%));
  }
  36% {
    transform: translateX(0);
  }
  64% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(42vw + 10%));
  }
}

/* One sticky image stack (left) + one long read in three segments (right); each segment drives its photo */
.left-reveal-series {
  padding-bottom: clamp(4rem, 14vh, 8rem);
  background: linear-gradient(180deg, var(--bg) 0%, #09090c 40%, var(--bg) 100%);
}

.left-reveal-series-intro {
  border-top: 1px solid var(--border);
  padding-top: clamp(3rem, 8vh, 5rem);
  padding-bottom: clamp(2rem, 5vh, 3rem);
  max-width: 68ch;
}

.left-reveal-series-intro h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3.8vw, 2.1rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.left-reveal-series-lede {
  margin: 0;
  color: #b9bac4;
  font-size: 1.02rem;
  line-height: 1.6;
}

.left-reveal-series-lede strong {
  color: var(--text);
  font-weight: 600;
}

.unified-pair {
  display: grid;
  grid-template-columns: minmax(0, 38vw) minmax(0, 1fr);
  gap: clamp(1.25rem, 3.5vw, 2.75rem);
  align-items: stretch;
  border-top: 1px solid var(--border);
  padding-block: clamp(2.5rem, 6vh, 4.5rem);
}

.unified-pair-media {
  position: relative;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
}

.unified-pair-sticky {
  position: sticky;
  top: calc(var(--topbar-h) + 1rem);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow-x: clip;
  padding-bottom: 0.5rem;
}

.unified-pair-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
}

.unified-pair-panel {
  position: absolute;
  inset: 0;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
}

.unified-pair-panel--1 {
  z-index: 1;
}

.unified-pair-panel--2 {
  z-index: 2;
}

.unified-pair-panel--3 {
  z-index: 3;
}

.unified-pair-panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.unified-pair-text {
  min-width: 0;
  max-width: 58ch;
  justify-self: end;
  color: #c4c5ce;
}

.unified-segment--2,
.unified-segment--3 {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.unified-pair-text p {
  margin: 0 0 1.2em;
}

.unified-segment p:last-of-type {
  margin-bottom: 0;
}

.unified-segment--3 p:last-of-type {
  color: var(--accent);
  font-size: 0.98rem;
}

.pair-chunk-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.unified-pair-panel--2,
.unified-pair-panel--3 {
  opacity: 0;
  pointer-events: none;
}

@supports (timeline-scope: --uni-1) {
  .unified-pair-panel--2,
  .unified-pair-panel--3 {
    opacity: 1;
    pointer-events: auto;
  }

  .unified-pair {
    timeline-scope: --uni-1, --uni-2, --uni-3;
  }

  .unified-segment--1 {
    view-timeline-name: --uni-1;
    view-timeline-axis: block;
  }

  .unified-segment--2 {
    view-timeline-name: --uni-2;
    view-timeline-axis: block;
  }

  .unified-segment--3 {
    view-timeline-name: --uni-3;
    view-timeline-axis: block;
  }

  .unified-pair-panel--1 {
    animation: pair-from-left linear both;
    animation-timeline: --uni-1;
    animation-range: entry 0% exit 100%;
  }

  .unified-pair-panel--2 {
    animation: pair-from-left linear both;
    animation-timeline: --uni-2;
    animation-range: entry 0% exit 100%;
  }

  .unified-pair-panel--3 {
    animation: pair-from-left linear both;
    animation-timeline: --uni-3;
    animation-range: entry 0% exit 100%;
  }
}

@keyframes pair-from-left {
  0% {
    transform: translateX(calc(-42vw - 10%));
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  36% {
    transform: translateX(0);
    opacity: 1;
  }
  64% {
    transform: translateX(0);
    opacity: 1;
  }
  95% {
    opacity: 1;
  }
  100% {
    transform: translateX(calc(-42vw - 10%));
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .unified-pair {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .unified-pair-text {
    justify-self: start;
    max-width: none;
    order: 1;
  }

  .unified-pair-media {
    order: 2;
  }

  .unified-pair-stack {
    aspect-ratio: auto;
    height: auto;
    max-height: none;
    margin-inline: 0;
  }

  .unified-pair-panel {
    position: relative;
    inset: auto;
    margin-bottom: 1rem;
    animation: none !important;
  }

  .unified-pair-panel:last-of-type {
    margin-bottom: 0;
  }

  .unified-pair-panel--2,
  .unified-pair-panel--3 {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide-reveal-panel {
    animation: none !important;
  }

  .unified-pair-stack {
    aspect-ratio: auto;
    height: auto;
  }

  .unified-pair-panel {
    position: relative;
    inset: auto;
    margin-bottom: 1rem;
    animation: none !important;
  }

  .unified-pair-panel:last-of-type {
    margin-bottom: 0;
  }

  .unified-pair-panel--2,
  .unified-pair-panel--3 {
    opacity: 1;
    pointer-events: auto;
  }
}
