/* ========================================================================
   TRACK RECORD PAGE
   Loaded after styles.css on track-record.html only.
   All selectors are scoped under `main.track-record` or use page-specific
   classes (.tr-hero, .entry, .gallery, .shot, .closing, .lightbox) so they
   never collide with the rest of the site.
   ======================================================================== */

.track-record { --tr-rail-x: 180px; }

/* ─── Hero ─── */
.tr-hero {
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(200, 101, 42, 0.06), transparent 60%),
    var(--bg);
}
.tr-hero-swirl {
  position: absolute;
  top: -40px;
  right: -100px;
  width: 380px;
  height: 380px;
  color: var(--pause-orange);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}
.tr-hero-inner { position: relative; z-index: 1; max-width: 880px; }
.tr-hero-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(44px, 6.5vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 6px 0 14px;
  color: var(--text);
}
.tr-title-accent {
  font-style: italic;
  font-weight: 500;
  color: var(--pause-orange);
}
.tr-hero-lede {
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0;
}

/* ─── Foreword ─── */
.track-record .foreword {
  padding: 56px 0 64px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.track-record .foreword-inner { max-width: 920px; }
.track-record .foreword-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
  color: var(--text);
}
.track-record .foreword-body p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 18px;
}
.track-record .foreword-body p:first-child::first-letter {
  font-family: "Fraunces", Georgia, serif;
  font-size: 4.4em;
  font-weight: 500;
  float: left;
  line-height: 0.85;
  padding: 6px 12px 0 0;
  color: var(--pause-orange);
  font-style: italic;
}
.track-record .signature {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: right;
}
.track-record .sig-name {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 22px;
  color: var(--text);
}
.track-record .sig-role {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 2px;
}

/* ─── Timeline ─── */
.track-record .timeline {
  padding: 80px 0 100px;
  background: var(--bg);
}
.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0 0 56px;
  position: relative;
}
.timeline-list::before {
  content: "";
  position: absolute;
  left: var(--tr-rail-x);
  top: 14px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom,
    transparent 0,
    var(--border-strong) 24px,
    var(--border-strong) 100%);
}

.entry {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 56px;
  padding: 44px 0;
  position: relative;
}
.entry:first-child { padding-top: 8px; }
.entry:last-child { padding-bottom: 0; }

.entry::before {
  content: "";
  position: absolute;
  left: calc(var(--tr-rail-x) - 4px);
  top: 58px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
}
.entry:first-child::before { top: 22px; }
.entry.is-active::before {
  background: var(--pause-orange);
  border-color: var(--pause-orange);
  transform: scale(1.6);
  box-shadow: 0 0 0 6px rgba(200, 101, 42, 0.12);
}

.entry-date {
  position: sticky;
  top: 96px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 28px;
}
.entry-date .month {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-style: italic;
  font-size: 26px;
  color: var(--muted);
  line-height: 1;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}
.entry-date .year {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--border-strong);
  margin-top: 6px;
  transition: color 0.3s ease;
}
.entry.is-active .entry-date .month { color: var(--text); }
.entry.is-active .entry-date .year { color: var(--pause-orange); }

.entry-body { min-width: 0; }
.entry-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
  color: var(--text);
}
.entry-text p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 14px;
}
.entry-text strong { color: var(--text); font-weight: 600; }

.speaker-list {
  margin: 4px 0 20px;
  padding-left: 0;
  list-style: none;
}
.speaker-list li {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}
.speaker-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 8px;
  height: 1.5px;
  background: var(--pause-orange);
}
.speaker-list strong { color: var(--text); font-weight: 600; }

/* ─── Galleries ─── */
.gallery {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  max-width: 760px;
}
.gallery-1 { grid-template-columns: 1fr; max-width: 640px; }
.gallery-3 {
  grid-template-columns: 1.3fr 1fr 1fr;
  grid-auto-rows: 260px;
}
/* When a gallery-3 contains a wide shot, switch to 2-up + full-width row */
.gallery-3:has(.shot-wide) {
  grid-template-columns: 1fr 1fr;
}
.gallery-3 .shot-wide {
  grid-column: 1 / -1;
}
.gallery-4 {
  grid-template-columns: 1fr 1fr 1fr;
  grid-auto-rows: 190px;
  max-width: 760px;
}
.gallery-4 .shot-tall { grid-row: span 2; }

.shot {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-2);
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-1 .shot {
  aspect-ratio: auto;
  border: 1px solid var(--border);
}
.gallery-1 .shot img {
  height: auto;
  max-height: 480px;
  object-fit: contain;
  background: var(--surface);
}
.shot:hover {
  box-shadow: 0 1px 2px var(--shadow), 0 8px 24px var(--shadow);
  transform: translateY(-1px);
}
.shot:hover img { transform: scale(1.025); }

/* ─── Closing ─── */
.track-record .closing {
  padding: 96px 0 104px;
  background:
    radial-gradient(ellipse 70% 90% at 50% 100%, rgba(200, 101, 42, 0.09), transparent 70%),
    var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
}
.closing-inner { max-width: 680px; }
.closing-quote {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(22px, 2.4vw, 30px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 24px;
}
.closing-sub {
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin: 0 0 32px;
}
.closing-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Lightbox ─── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(26, 22, 18, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 40px;
  backdrop-filter: blur(6px);
}
.lightbox.open { display: flex; }
.lb-image {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: rgba(255, 255, 255, 0.14);
}
.lb-close { top: 24px; right: 24px; width: 44px; height: 44px; }
.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
}
.lb-close svg, .lb-prev svg, .lb-next svg { display: block; }
.lb-prev { left: 24px; }
.lb-next { right: 24px; }

/* ─── Responsive ─── */
@media (max-width: 860px) {
  .tr-hero { padding: 56px 0 40px; }
  .tr-hero-swirl { width: 300px; height: 300px; top: -40px; right: -120px; }
  .track-record .foreword { padding: 60px 0; }
  .track-record .timeline { padding: 56px 0 72px; }

  .timeline-list::before { left: 6px; }

  .entry {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 32px 0 32px 28px;
  }
  .entry::before, .entry:first-child::before { left: 2px; top: 40px; }
  .entry-date {
    position: static;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    padding: 0;
  }
  .entry-date .month { font-size: 20px; }
  .entry-date .year { margin-top: 0; font-size: 11px; }

  .gallery-3, .gallery-4 {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 170px;
  }
  .gallery-4 .shot-tall { grid-row: auto; }
}

@media (max-width: 520px) {
  .gallery-3, .gallery-4,
  .gallery-3:has(.shot-wide) {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .gallery-3 .shot, .gallery-4 .shot { aspect-ratio: 16 / 10; }
  .track-record .closing { padding: 72px 0 80px; }
  .closing-actions { flex-direction: column; align-items: stretch; }
}

@media (max-width: 720px) {
  .lightbox { padding: 12px; }
  .lb-image {
    max-height: calc(100vh - 120px);
    border-radius: 4px;
  }
  .lb-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }
  .lb-prev, .lb-next {
    top: auto;
    bottom: 16px;
    transform: none;
    width: 46px;
    height: 46px;
  }
  .lb-prev { left: 50%; margin-left: -52px; }
  .lb-next { right: 50%; margin-right: -52px; }
}
