/* Timeline page. Layers on top of styles.css, reusing its tokens,
   nav, footer, buttons, cursor and .reveal. Nothing here overrides
   the main page. */

.page-timeline { background: var(--bg); }

/* Masthead */
.tl-masthead {
  min-height: 88vh;
  padding: 9rem clamp(1.2rem, 4vw, 3.5rem) 5rem;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.tl-eyebrow {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--accent); margin-bottom: 1.6rem;
}
.tl-title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(3.2rem, 12vw, 9.5rem); line-height: 0.92;
  letter-spacing: -0.03em;
}
.tl-title em { font-style: italic; color: var(--accent); }
.tl-title .accent-dot { color: var(--accent); font-style: normal; }
.tl-lede {
  max-width: 46ch; margin-top: 2.2rem;
  color: var(--ink-dim); font-size: clamp(1rem, 1.4vw, 1.12rem);
}

/* Sits on the right so it never crosses the lede, which runs long
   at narrow widths. */
.tl-cue {
  position: absolute; bottom: 2.5rem; right: clamp(1.2rem, 4vw, 3.5rem);
  width: 1px; height: 3.5rem; background: var(--line); overflow: hidden;
}
.tl-cue span {
  display: block; width: 100%; height: 45%; background: var(--accent);
  animation: tl-cue-run 1.9s ease-in-out infinite;
}
@keyframes tl-cue-run {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(320%); }
}

/* Spine */
.tl {
  position: relative;
  padding: 5rem clamp(1.2rem, 4vw, 3.5rem) 7rem;
  max-width: 1240px; margin: 0 auto;
}
.tl-rail {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; background: var(--line); transform: translateX(-0.5px);
}
.tl-rail-fill {
  position: absolute; top: 0; left: 0; width: 100%; height: 0;
  background: var(--accent);
}

/* Year markers sit on the rail */
.tl-year {
  position: relative; z-index: 2;
  width: max-content; margin: 4.5rem auto 3rem;
  padding: 0.45rem 1.4rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 0.02em;
  transition: background-color 0.7s ease;
}
.tl-year:first-child { margin-top: 0; }
.tl-year.is-now { color: var(--accent); border-color: var(--accent); }

/* Nodes alternate around the rail */
.tl-node {
  position: relative;
  width: 50%; padding-right: clamp(2.2rem, 5vw, 4rem);
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}
.tl-node.is-flipped {
  margin-left: 50%;
  padding-right: 0; padding-left: clamp(2.2rem, 5vw, 4rem);
}
/* The dot on the rail */
.tl-node::before {
  content: ""; position: absolute; top: 0.55rem; right: -5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--accent);
  transition: background-color 0.35s ease, transform 0.35s ease;
  z-index: 2;
}
.tl-node.is-flipped::before { right: auto; left: -5px; }
.tl-node.visible::before { background: var(--accent); }
.tl-node:hover::before { transform: scale(1.5); }

.tl-node.is-end { width: 100%; margin-left: 0; padding: 0; text-align: center; }
.tl-node.is-end::before { display: none; }
.tl-node.is-end .tl-card { max-width: 44ch; margin: 0 auto; }

.tl-card { display: flex; flex-direction: column; gap: 1.4rem; }
.tl-shot {
  overflow: hidden; border-radius: 2px;
  background: var(--bg-soft);
  aspect-ratio: 3 / 2;
}
.tl-shot.is-portrait { aspect-ratio: 4 / 5; }
.tl-shot img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.9s ease;
  filter: saturate(0.88);
}
.tl-node:hover .tl-shot img { transform: scale(1.06); filter: saturate(1); }

.tl-meta {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent); margin-bottom: 0.7rem;
}
.tl-head {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.5rem, 2.6vw, 2.15rem); line-height: 1.12;
  letter-spacing: -0.015em; margin-bottom: 0.9rem;
}
.tl-copy p { color: var(--ink-dim); max-width: 46ch; }
.tl-copy p + p { margin-top: 0.9rem; }
.tl-aside {
  font-family: var(--font-display); font-style: italic;
  color: var(--ink) !important; font-size: 1.02rem;
}
.tl-quote {
  margin: 1.1rem 0; padding-left: 1.1rem;
  border-left: 2px solid var(--accent);
  font-family: var(--font-display); font-style: italic;
  font-size: 1.15rem; line-height: 1.35; color: var(--ink);
}
.tl-link {
  display: inline-block; margin-top: 1rem;
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent);
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
  transition: opacity 0.3s;
}
.tl-link:hover { opacity: 0.65; }

.tl-end-cta {
  display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap;
  margin-top: 1.8rem;
}

/* Single column below the fold of the alternating layout */
@media (max-width: 900px) {
  .tl { padding-top: 3rem; }
  .tl-rail { left: 5px; transform: none; }
  .tl-node,
  .tl-node.is-flipped {
    width: 100%; margin-left: 0;
    padding-left: 2rem; padding-right: 0;
  }
  .tl-node::before,
  .tl-node.is-flipped::before { left: 1px; right: auto; }
  .tl-year { margin-left: 0; }
  .tl-node.is-end { padding-left: 2rem; text-align: left; }
  .tl-node.is-end .tl-card { margin: 0; }
  .tl-end-cta { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .tl-masthead { min-height: 78vh; padding-top: 7.5rem; }
  .tl-card { gap: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tl-cue span { animation: none; }
  .tl-shot img, .tl-node::before { transition: none; }
}
