:root {
  --ink: #000;
  --paper: #f2f0eb;
  --silver: #c0c0c0;
  --mist: rgba(255, 255, 255, .68);
  --faint: rgba(255, 255, 255, .38);
  --hairline: rgba(255, 255, 255, .14);
  --header-h: 70px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--ink);
  color-scheme: dark;
  scroll-behavior: auto !important;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--ink);
  color: #fff;
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 300;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
::selection { background: var(--paper); color: var(--ink); }

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 15px;
  background: #fff;
  color: #000;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .2s ease;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--header-h);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  width: min(calc(100% - 40px), 1440px);
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand img { width: 178px; height: auto; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, .68);
  font-size: .72rem;
  letter-spacing: .18em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease;
}

.back-link::before { content: "←"; font-size: 1rem; }
.back-link:hover { color: #fff; }

.version-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
}

.version-switch a {
  padding: 7px 11px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .5);
  font-size: .62rem;
  letter-spacing: .11em;
  text-decoration: none;
  text-transform: uppercase;
}

.version-switch a[aria-current="page"] {
  background: #fff;
  color: #000;
}

.intro {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  display: grid;
  align-items: end;
  padding: calc(var(--header-h) + 8vh) max(24px, 6vw) 10vh;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
}

.intro::before {
  content: "4,6";
  position: absolute;
  z-index: -2;
  top: 5vh;
  right: -1vw;
  color: transparent;
  font-family: "Raleway", sans-serif;
  font-size: clamp(17rem, 47vw, 52rem);
  font-weight: 200;
  letter-spacing: -.1em;
  line-height: .75;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .075);
  pointer-events: none;
}

.intro::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 75% 23%, rgba(255, 255, 255, .075), transparent 24rem),
    linear-gradient(180deg, transparent 55%, #000 98%);
  pointer-events: none;
}

.intro__content { width: min(100%, 1040px); }

.eyebrow {
  margin: 0 0 22px;
  color: var(--silver);
  font-size: clamp(.68rem, .8vw, .82rem);
  letter-spacing: .34em;
  text-transform: uppercase;
}

h1, h2, h3 { font-family: "Raleway", sans-serif; }

h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(3.2rem, 8.8vw, 8.8rem);
  font-weight: 200;
  letter-spacing: -.045em;
  line-height: .87;
  text-transform: uppercase;
}

h1 strong, h2 strong, h3 strong { font-weight: 650; }

.intro__lead {
  max-width: 650px;
  margin: clamp(30px, 5vw, 56px) 0 0;
  color: var(--mist);
  font-size: clamp(1.02rem, 1.6vw, 1.34rem);
  line-height: 1.55;
}

.intro__meta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  color: var(--faint);
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.scroll-cue {
  position: absolute;
  right: max(24px, 6vw);
  bottom: 10vh;
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--faint);
  font-size: .69rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.scroll-cue::after {
  content: "";
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, #fff, transparent);
}

.timeline-shell {
  position: relative;
  height: var(--timeline-height, auto);
  border-top: 1px solid rgba(255, 255, 255, .07);
  background:
    radial-gradient(circle at 15% 25%, rgba(255, 255, 255, .045), transparent 26rem),
    #000;
}

.timeline-viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 0;
  overflow: hidden;
  overflow: clip;
}

.timeline-topbar {
  position: absolute;
  z-index: 8;
  top: var(--header-h);
  inset-inline: 0;
  min-height: 76px;
  padding: 14px max(18px, 4vw);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: linear-gradient(180deg, rgba(0, 0, 0, .96), rgba(0, 0, 0, .72));
}

.timeline-topbar h2 {
  margin: 0;
  font-size: clamp(1.12rem, 2vw, 1.85rem);
  font-weight: 300;
  letter-spacing: -.015em;
  line-height: 1;
  text-transform: uppercase;
}

.timeline-topbar p {
  margin: 7px 0 0;
  color: var(--faint);
  font-size: .74rem;
  letter-spacing: .08em;
}

.timeline-counter {
  min-width: 6ch;
  color: var(--mist);
  font-family: "Raleway", sans-serif;
  font-size: .78rem;
  letter-spacing: .16em;
  text-align: right;
}

.timeline-track {
  --axis-y: calc(100% - 58px);
  --line-fill-px: 0px;
  position: absolute;
  z-index: 2;
  top: calc(var(--header-h) + 76px);
  bottom: 0;
  left: 0;
  width: max-content;
  min-height: 0;
  margin: 0;
  padding: 20px max(22px, 8vw) 70px 74vw;
  display: flex;
  align-items: stretch;
  gap: clamp(46px, 7vw, 126px);
  list-style: none;
  will-change: transform;
}

.timeline-track::before,
.timeline-track::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: var(--axis-y);
  left: 0;
  height: 1px;
  pointer-events: none;
}

.timeline-track::before {
  right: 0;
  background: rgba(255, 255, 255, .13);
}

.timeline-track::after {
  width: var(--line-fill-px);
  background: #fff;
  box-shadow: 0 0 18px rgba(255, 255, 255, .22);
}

.timeline-scene {
  --media-opacity: 0;
  --media-y: 28px;
  --media-scale: .96;
  --copy-opacity: 0;
  --copy-y: 24px;
  position: relative;
  z-index: 1;
  flex: 0 0 clamp(700px, 72vw, 1080px);
  min-width: 0;
  height: 100%;
  padding-bottom: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, .92fr);
  align-items: stretch;
  gap: clamp(24px, 5vw, 76px);
}

.timeline-scene:nth-child(even) {
  grid-template-columns: minmax(260px, .92fr) minmax(0, 1.08fr);
}

.timeline-scene:nth-child(even) .scene-media { grid-column: 2; }
.timeline-scene:nth-child(even) .scene-copy { grid-column: 1; grid-row: 1; }

.scene-media {
  position: relative;
  min-height: 0;
  overflow: hidden;
  overflow: clip;
  opacity: var(--media-opacity);
  transform: translate3d(0, var(--media-y), 0) scale(var(--media-scale));
  transform-origin: center;
  transition: opacity .12s linear, transform .12s linear;
}

.scene-media::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .16);
  pointer-events: none;
}

.scene-media::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, .76));
  pointer-events: none;
}

.scene-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.8) contrast(1.04);
}

.scene-media--collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  background: #090909;
}

.scene-media--collage img {
  min-width: 0;
  min-height: 0;
}

.scene-media--collage[data-images="2"] img { height: 100%; }

.scene-media--collage[data-images="3"] {
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.scene-media--collage[data-images="3"] img:first-child {
  grid-row: 1 / 3;
}

.scene-media--collage[data-images="4"] {
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.scene-media figcaption {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 13px;
  left: 16px;
  color: rgba(255, 255, 255, .64);
  font-size: .67rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.scene-media--placeholder {
  background:
    radial-gradient(circle at 40% 36%, rgba(255, 255, 255, .11), transparent 6%),
    radial-gradient(circle at 60% 62%, rgba(255, 255, 255, .06), transparent 9%),
    repeating-radial-gradient(ellipse at 50% 50%, transparent 0 11px, rgba(255, 255, 255, .035) 12px 13px),
    #070707;
}

.scene-copy {
  min-width: 0;
  align-self: center;
  opacity: var(--copy-opacity);
  transform: translate3d(0, var(--copy-y), 0);
  transition: opacity .12s linear, transform .12s linear;
}

.scene-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(18px, 3vh, 30px);
  color: var(--silver);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.scene-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.scene-copy time {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-family: "Raleway", sans-serif;
  font-size: clamp(1.6rem, 3.6vw, 4rem);
  font-weight: 200;
  letter-spacing: -.045em;
  line-height: .9;
}

.scene-copy h3 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(1.65rem, 3.35vw, 3.55rem);
  font-weight: 250;
  letter-spacing: -.03em;
  line-height: .98;
}

.scene-copy > p:not(.materials) {
  max-width: 46ch;
  margin: clamp(18px, 3vh, 28px) 0 0;
  color: var(--mist);
  font-size: clamp(.88rem, 1.15vw, 1.03rem);
  line-height: 1.5;
}

.materials {
  max-width: 46ch;
  margin: clamp(16px, 2.5vh, 24px) 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--hairline);
}

.materials span {
  display: block;
  margin-bottom: 5px;
  color: var(--faint);
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.materials strong {
  color: rgba(255, 255, 255, .9);
  font-family: "Raleway", sans-serif;
  font-size: clamp(.78rem, 1vw, .9rem);
  font-weight: 450;
  letter-spacing: .03em;
}

.scene-node {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: -17px;
  width: 11px;
  height: 11px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 7px #000;
  transform: translateX(-50%);
  transition: background .25s ease, box-shadow .25s ease, transform .25s var(--ease-out);
}

.timeline-scene[aria-current="step"] .scene-node {
  background: #fff;
  box-shadow: 0 0 0 7px #000, 0 0 28px rgba(255, 255, 255, .42);
  transform: translateX(-50%) scale(1.28);
}

.scene-index {
  position: absolute;
  right: 50%;
  bottom: -43px;
  margin-right: -1.6ch;
  color: rgba(255, 255, 255, .34);
  font-family: "Raleway", sans-serif;
  font-size: .62rem;
  letter-spacing: .14em;
}

.timeline-ui {
  position: absolute;
  z-index: 10;
  right: max(18px, 4vw);
  bottom: 14px;
  display: flex;
  gap: 8px;
}

.timeline-ui button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: rgba(0, 0, 0, .76);
  color: #fff;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.timeline-ui button:hover { background: #151515; border-color: rgba(255, 255, 255, .5); }
.timeline-ui button:disabled { opacity: .28; cursor: default; }

.closing {
  min-height: 84vh;
  min-height: 84svh;
  display: grid;
  place-items: center;
  padding: 14vh max(24px, 6vw);
  border-top: 1px solid rgba(255, 255, 255, .07);
  background:
    radial-gradient(circle at 70% 52%, rgba(255, 255, 255, .06), transparent 25rem),
    #000;
}

.closing__inner { width: min(100%, 920px); text-align: center; }
.closing h2 {
  margin: 0 auto;
  font-size: clamp(2.6rem, 7vw, 7.2rem);
  font-weight: 200;
  letter-spacing: -.04em;
  line-height: .9;
  text-transform: uppercase;
}

.closing__inner > p:not(.eyebrow) {
  max-width: 56ch;
  margin: 34px auto 0;
  color: var(--mist);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.closing__link {
  margin-top: 38px;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, .35);
  font-size: .72rem;
  letter-spacing: .2em;
  text-decoration: none;
  text-transform: uppercase;
}

.closing__link::after { content: "→"; font-size: 1rem; }

footer {
  padding: 28px max(24px, 6vw) 42px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.source-note {
  max-width: 86ch;
  margin: 0;
  color: var(--faint);
  font-size: .72rem;
}

.no-js .timeline-shell,
.is-reading .timeline-shell { height: auto !important; }

.no-js .timeline-viewport,
.is-reading .timeline-viewport {
  position: relative;
  height: auto;
  min-height: 0;
  overflow: visible;
  padding: calc(var(--header-h) + 104px) max(20px, 5vw) 80px;
}

.no-js .timeline-topbar,
.is-reading .timeline-topbar {
  position: relative;
  top: auto;
  margin: calc(-1 * (var(--header-h) + 104px)) max(-20px, -5vw) 48px;
}

.no-js .timeline-track,
.is-reading .timeline-track {
  position: relative;
  inset: auto;
  width: auto;
  padding: 0;
  display: grid;
  gap: 74px;
  transform: none !important;
}

.no-js .timeline-track::before,
.no-js .timeline-track::after,
.is-reading .timeline-track::before,
.is-reading .timeline-track::after { display: none; }

.no-js .timeline-scene,
.is-reading .timeline-scene {
  width: min(100%, 1120px);
  height: auto;
  min-height: 540px;
  margin-inline: auto;
  padding: 0;
}

.no-js .scene-media,
.no-js .scene-copy,
.is-reading .scene-media,
.is-reading .scene-copy {
  opacity: 1;
  transform: none;
}

.no-js .scene-node,
.no-js .scene-index,
.no-js .timeline-ui,
.is-reading .scene-node,
.is-reading .scene-index,
.is-reading .timeline-ui { display: none; }

@media (max-width: 719px) {
  :root { --header-h: 60px; }
  .site-header__inner { width: calc(100% - 28px); }
  .brand img { width: 144px; }
  .site-header__inner { gap: 12px; }
  .version-switch { flex: 0 0 auto; padding: 2px; }
  .version-switch a {
    width: 28px;
    height: 28px;
    padding: 0;
    display: grid;
    place-items: center;
    font-size: 0;
  }
  .version-switch a::after {
    content: attr(data-short);
    font-size: .58rem;
    letter-spacing: .08em;
  }
  .back-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .intro { padding-inline: 22px; }
  .closing { min-height: 0; place-items: start center; padding: calc(var(--header-h) + 28px) 22px 64px; }
  .intro::before { top: 13vh; right: -4vw; font-size: clamp(14rem, 72vw, 23rem); }
  .intro__content { padding-bottom: 7vh; }
  .intro__lead { max-width: 34ch; }
  .scroll-cue { display: none; }
  .timeline-topbar { min-height: 68px; padding: 10px 18px; }
  .timeline-topbar p { max-width: 30ch; font-size: .64rem; line-height: 1.3; }
  .timeline-counter { font-size: .7rem; }
  .timeline-track {
    --axis-y: calc(100% - 50px);
    top: calc(var(--header-h) + 68px);
    gap: 34px;
    padding: 14px 18px 62px 74vw;
  }
  .timeline-scene,
  .timeline-scene:nth-child(even) {
    flex-basis: calc(100vw - 36px);
    padding-bottom: 34px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(136px, 43%) minmax(0, 57%);
    gap: 15px;
  }
  .timeline-scene:nth-child(even) .scene-media,
  .timeline-scene:nth-child(even) .scene-copy { grid-column: 1; }
  .timeline-scene:nth-child(even) .scene-media { grid-row: 1; }
  .timeline-scene:nth-child(even) .scene-copy { grid-row: 2; }
  .scene-copy { align-self: start; padding-inline: 4px; }
  .scene-kicker { margin-bottom: 8px; font-size: .58rem; }
  .scene-kicker::before { width: 18px; }
  .scene-copy time { display: inline; margin: 0 9px 0 0; font-size: clamp(1.1rem, 6vw, 1.65rem); }
  .scene-copy h3 { display: inline; max-width: none; font-size: clamp(1.22rem, 6vw, 1.7rem); line-height: 1.05; }
  .scene-copy > p:not(.materials) { margin-top: 10px; font-size: clamp(.77rem, 3.5vw, .9rem); line-height: 1.35; }
  .materials { margin-top: 9px; padding-top: 8px; }
  .materials span { margin-bottom: 2px; font-size: .54rem; }
  .materials strong { font-size: .7rem; }
  .scene-media figcaption { right: 10px; bottom: 8px; left: 10px; font-size: .55rem; }
  .timeline-ui { right: 14px; bottom: 8px; }
  .timeline-ui button { width: 34px; height: 34px; }
  .scene-node { bottom: -17px; }
  .scene-index { bottom: -40px; }
  .no-js .timeline-viewport,
  .is-reading .timeline-viewport { padding: calc(var(--header-h) + 92px) 18px 70px; }
  .no-js .timeline-topbar,
  .is-reading .timeline-topbar { margin: calc(-1 * (var(--header-h) + 92px)) -18px 40px; }
  .no-js .timeline-scene,
  .is-reading .timeline-scene { min-height: 540px; grid-template-rows: minmax(220px, 47vw) auto; }
}

@media (max-width: 360px), (max-height: 630px) {
  .timeline-topbar { min-height: 60px; }
  .timeline-topbar p { display: none; }
  .timeline-track { top: calc(var(--header-h) + 60px); }
  .timeline-scene,
  .timeline-scene:nth-child(even) { grid-template-rows: minmax(120px, 39%) minmax(0, 61%); gap: 10px; }
  .scene-copy > p:not(.materials) { font-size: .75rem; line-height: 1.28; }
  .scene-copy time { font-size: 1.05rem; }
  .scene-copy h3 { font-size: 1.18rem; }
  .scene-kicker { margin-bottom: 6px; }
  .materials { margin-top: 7px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  :root { --header-h: 52px; }
  .site-header__inner { width: calc(100% - 28px); }
  .brand img { width: 116px; }
  .timeline-topbar { min-height: 52px; padding: 6px 20px; }
  .timeline-topbar h2 { font-size: 1rem; }
  .timeline-topbar p { display: none; }
  .timeline-track {
    --axis-y: calc(100% - 36px);
    top: calc(var(--header-h) + 52px);
    gap: 40px;
    padding: 8px 5vw 46px 64vw;
  }
  .timeline-scene,
  .timeline-scene:nth-child(even) {
    flex-basis: min(76vw, 650px);
    padding-bottom: 22px;
    grid-template-columns: minmax(0, 1.02fr) minmax(250px, .98fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 22px;
  }
  .timeline-scene:nth-child(even) .scene-media { grid-column: 2; grid-row: 1; }
  .timeline-scene:nth-child(even) .scene-copy { grid-column: 1; grid-row: 1; }
  .scene-kicker { margin-bottom: 5px; font-size: .54rem; }
  .scene-copy time { display: block; margin: 0 0 3px; font-size: 1.25rem; }
  .scene-copy h3 { display: block; font-size: 1.42rem; line-height: .98; }
  .scene-copy > p:not(.materials) { margin-top: 8px; font-size: .71rem; line-height: 1.24; }
  .materials { margin-top: 7px; padding-top: 6px; }
  .materials span { margin-bottom: 2px; font-size: .5rem; }
  .materials strong { font-size: .65rem; }
  .scene-media figcaption { right: 10px; bottom: 7px; left: 10px; font-size: .52rem; }
  .scene-node { bottom: -19px; }
  .scene-index { bottom: -38px; }
  .timeline-ui { right: 14px; bottom: 5px; }
  .timeline-ui button { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .site-header, .scroll-cue, .timeline-ui { display: none !important; }
  body { background: #fff; color: #000; }
  .intro, .closing { min-height: auto; padding: 40px 0; background: #fff; }
  .intro::before, .intro::after { display: none; }
  .timeline-shell { height: auto !important; background: #fff; }
  .timeline-viewport { position: relative; height: auto; overflow: visible; padding: 40px 0; }
  .timeline-topbar { position: relative; top: auto; background: #fff; color: #000; }
  .timeline-track { position: relative; inset: auto; width: auto; display: block; padding: 0; transform: none !important; }
  .timeline-track::before, .timeline-track::after, .scene-node, .scene-index { display: none; }
  .timeline-scene { break-inside: avoid; width: 100%; min-height: 420px; margin-bottom: 32px; color: #000; }
  .scene-media, .scene-copy { opacity: 1; transform: none; }
  .scene-copy > p:not(.materials), .materials strong, .closing__inner > p:not(.eyebrow), .source-note { color: #222; }
  footer { color: #000; }
}

/* Only loaded by this page template. */
body.pedraria-timeline-page h1, body.pedraria-timeline-page h2, body.pedraria-timeline-page h3 { color: #fff; font-family: "Raleway", sans-serif; }
