/* ════════════════════════════════════════════════════════
   timeline.css — page-specific styles for timeline.html
   Theme variables, resets, and header come from theme.css
   Signature: a 35mm filmstrip you scroll through by hand,
   each frame burned with its original export date-stamp.
════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

:root {
  --stamp-amber: #ff8a00;
  --stamp-red:   #ff3b1f;
  --film-black:  #0b0b0d;
  --film-black-2:#141416;
}

.header-nav ul li a.active {
  background: var(--header-active);
}
.header-nav ul li a.active::after { transform: scaleX(1); }

/* ════════════════════════════════
   HERO
════════════════════════════════ */
#tl-hero {
  background: var(--blue);
  color: #fff;
  height: calc(100vh - 54px);
  height: calc(100svh - 54px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px 80px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

#tl-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(45deg,  rgba(255,255,255,0.045) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.045) 25%, transparent 25%),
    linear-gradient(45deg,  transparent 75%, rgba(255,255,255,0.045) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.045) 75%);
  background-size: 40px 40px;
  background-position: 0 0, 0 20px, 20px -20px, -20px 0;
  pointer-events: none;
}

#tl-hero .container {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.tl-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 14px;
}

#tl-hero h1 {
  font-family: 'Boldonse', 'Noto Sans SC', sans-serif;
  font-size: clamp(2.2rem, 11vw, 6.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  padding: 0.15em 0;
}

#tl-hero p {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: rgba(255,255,255,0.72);
  margin: 20px auto 0;
  font-family: 'Space Mono', monospace;
}

#tl-hero p .tl-count { color: var(--yellow); font-weight: 700; }

.hero-scroll {
  position: absolute;
  bottom: 24px;
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.45);
  font-family: 'BBHBartle', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 1;
}

.hero-scroll span {
  display: block;
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}

.hero-scroll span::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--yellow);
  animation: scrollLine 2s ease-in-out infinite;
}

.tl-hint {
  position: absolute;
  bottom: 26px; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  z-index: 1;
}
.tl-hint-arrow {
  display: inline-block;
  animation: tl-hint-slide 1.6s ease-in-out infinite;
}
@keyframes tl-hint-slide {
  0%, 100% { transform: translateX(0); opacity: 0.5; }
  50%      { transform: translateX(8px); opacity: 1; }
}

/* ════════════════════════════════
   FILMSTRIP SECTION
════════════════════════════════ */
#tl-strip-section {
  position: relative;
  background: var(--film-black);
  padding: 0;
}

.tl-progress-track {
  height: 4px;
  background: rgba(255,255,255,0.08);
  position: relative;
}
.tl-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--yellow), var(--stamp-amber));
  transition: width 0.05s linear;
}

/* Sprocket hole strips top & bottom, like real 35mm film */
.tl-sprocket {
  height: 20px;
  background: var(--film-black-2);
  background-image: repeating-linear-gradient(
    90deg,
    var(--film-black) 0px, var(--film-black) 10px,
    transparent 10px, transparent 26px
  );
  background-position: 8px center;
}
.tl-sprocket::before,
.tl-sprocket::after { content: none; }
.tl-sprocket {
  background-color: var(--film-black-2);
}
.tl-sprocket {
  mask-image: none;
}
/* punched holes via radial gradients repeated */
.tl-sprocket {
  background-image:
    repeating-linear-gradient(90deg,
      transparent 0, transparent 10px,
      var(--film-black) 10px, var(--film-black) 24px);
  background-size: 26px 20px;
  background-repeat: repeat-x;
  background-position: 12px center;
}

@media (min-width: 640px) {
  .tl-sprocket { height: 26px; }
  .tl-sprocket { background-size: 34px 26px; }
}

.tl-track {
  display: flex;
  align-items: stretch;
  gap: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 18px 6vw;
  background: var(--film-black);
  -webkit-overflow-scrolling: touch;
}
.tl-track:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: -2px;
}
.tl-track::-webkit-scrollbar { height: 10px; }
.tl-track::-webkit-scrollbar-track { background: var(--film-black-2); }
.tl-track::-webkit-scrollbar-thumb {
  background: var(--stamp-amber);
  border-radius: 6px;
}

/* ── FRAME ── */
.tl-frame {
  position: relative;
  flex: 0 0 auto;
  width: clamp(150px, 26vw, 240px);
  aspect-ratio: 3 / 4;
  background: #1a1a1e repeating-linear-gradient(
    45deg, rgba(255,255,255,0.02) 0 6px, transparent 6px 12px
  );
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.tl-frame:hover { transform: translateY(-4px); border-color: var(--stamp-amber); }
.tl-frame:hover .tl-frame-stamp { color: var(--stamp-amber); }

.tl-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.tl-frame img.loaded { opacity: 1; }

.tl-frame-stamp {
  position: absolute;
  right: 6px; bottom: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--stamp-red);
  text-shadow: 0 0 6px rgba(0,0,0,0.8), 0 1px 2px rgba(0,0,0,0.9);
  pointer-events: none;
  transition: color 0.2s ease;
}

/* Bookmark ribbon overlay for commissions / gifts */
.tl-frame-bookmark {
  position: absolute;
  top: 0;
  left: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 0.52rem;
  font-weight: 700;
  padding: 6px 5px 8px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  z-index: 2;
  pointer-events: none;
  letter-spacing: 0.02em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  line-height: 1;
  text-shadow: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.tl-frame-bookmark.is-gift {
  background: var(--yellow);
  color: #0d0d0d;
}

.tl-frame-bookmark.is-commission {
  background: var(--stamp-red);
  color: #fff;
}

/* Thin vertical month divider ("long stick") */
.tl-divider {
  flex: 0 0 auto;
  width: 56px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  pointer-events: none;
}

.tl-divider::before {
  content: '';
  position: absolute;
  top: -18px; /* extend to very top edge of track */
  bottom: -18px; /* extend to very bottom edge of track */
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  background: var(--yellow);
  opacity: 0.8;
}

.tl-divider-month {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--film-black);
  padding: 2px 6px;
  z-index: 1;
  transform: rotate(-90deg); /* align vertically along line */
}

.tl-divider-year {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.05em;
  background: var(--film-black);
  padding: 2px 6px;
  z-index: 1;
}

/* Nav buttons floating over the strip (desktop convenience) */
.tl-navbtn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 0;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(13, 13, 13, 0.75);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: background 0.2s, transform 0.2s, border-color 0.2s, color 0.2s;
}
.tl-navbtn:hover {
  background: var(--yellow);
  color: #000;
  border-color: var(--yellow);
  transform: translateY(-50%) scale(1.05);
}
.tl-navbtn-left { left: 14px; }
.tl-navbtn-right { right: 14px; }
@media (max-width: 720px) {
  .tl-navbtn { display: none; }
  #tl-hero h1 {
    white-space: nowrap;
    font-size: clamp(1.8rem, 8vw, 3.8rem);
  }
}

/* ════════════════════════════════
   LIGHTBOX
════════════════════════════════ */
#tl-lightbox {
  position: fixed; inset: 0;
  z-index: 999;
  display: none;
  align-items: center; justify-content: center;
}
#tl-lightbox.open { display: flex; }

.tl-lb-backdrop {
  position: absolute; inset: 0;
  background: rgba(5,5,8,0.92);
  backdrop-filter: blur(4px);
}

.tl-lb-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 900px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ── Toolbar (top-right: zoom + close) ── */
.tl-lb-toolbar {
  position: absolute;
  top: 0; right: 0;
  display: flex;
  gap: 6px;
  z-index: 3;
}

.tl-lb-tool {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  z-index: 2;
  font-family: 'BBHBartle', sans-serif;
  border-radius: 0;
}
.tl-lb-tool:hover {
  background: var(--yellow);
  color: #000;
  border-color: var(--yellow);
}

/* ── Image wrap ── */
.tl-lb-imgwrap {
  position: relative;
  max-width: 100%;
  max-height: 76vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.tl-lb-imgwrap img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.2s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  transform-origin: center center;
}
.tl-lb-imgwrap img.loaded { opacity: 1; }
.tl-lb-imgwrap.zoomed {
  overflow: auto;
  cursor: grab;
}
.tl-lb-imgwrap.zoomed img {
  max-width: none;
  max-height: none;
}

.tl-lb-spinner {
  position: absolute;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--yellow);
  animation: tl-spin 0.8s linear infinite;
}
.tl-lb-spinner.hidden { display: none; }
@keyframes tl-spin { to { transform: rotate(360deg); } }

.tl-lb-stamp {
  position: absolute;
  right: 14px; bottom: 12px;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--stamp-red);
  text-shadow: 0 0 8px rgba(0,0,0,0.85), 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
}

/* ── Bottom row (arrows + counter) ── */
.tl-lb-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.tl-lb-arrow {
  width: 44px; height: 44px;
  border-radius: 0;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.tl-lb-arrow:hover {
  background: var(--yellow);
  color: #000;
  border-color: var(--yellow);
}

.tl-lb-counter {
  min-width: 70px;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.08em;
}

@media (max-width: 640px) {
  .tl-lb-arrow { width: 38px; height: 38px; font-size: 1.4rem; }
  .tl-lb-tool { width: 30px; height: 30px; font-size: 0.75rem; }
}

/* ════════════════════════════════
   FUTURE-PROOF TIMELINE YEAR BAR
════════════════════════════════ */
.tl-year-bar {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 20px;
  transition: opacity 0.4s ease, background 0.3s, border-color 0.3s;
  position: relative;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.tl-year-bar.is-loaded {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.tl-year-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.tl-year-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 4px;
  box-sizing: border-box;
}

.tl-year-label {
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: left;
}

.tl-year-info {
  font-family: 'Roboto', sans-serif;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: right;
}

.tl-year-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tl-year-scroll-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 38px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 0px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  user-select: none;
}

.tl-year-scroll-btn:hover {
  background: var(--yellow);
  color: #0d0d0d;
  border-color: var(--yellow);
}

.tl-year-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 2px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  scroll-behavior: smooth;
}
.tl-year-chips::-webkit-scrollbar {
  display: none;
}

.tl-year-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: 0px;
  color: var(--text);
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.tl-year-chip:hover {
  background: rgba(0, 123, 255, 0.08);
  border-color: var(--blue);
  color: var(--blue);
}

.tl-year-chip.active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #0d0d0d;
  box-shadow: none !important;
}

.tl-year-count-badge {
  font-family: 'Roboto', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 0px;
  color: inherit;
  letter-spacing: 0;
  line-height: 1;
}

[data-theme="dark"] .tl-year-count-badge {
  background: rgba(255, 255, 255, 0.12);
}

.tl-year-chip.active .tl-year-count-badge {
  background: rgba(0, 0, 0, 0.18);
  color: #0d0d0d;
}

.tl-year-chip.is-shortcut {
  font-family: 'Roboto', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.tl-year-chip.is-shortcut:hover {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

/* ════════════════════════════════
   CTA + FOOTER (PLAIN THEMED PAGE)
════════════════════════════════ */
#cta {
  background: var(--bg);
  color: var(--text);
  text-align: center;
  padding: 90px 20px;
  position: relative;
  transition: background 0.3s, color 0.3s;
  border-top: 1px solid var(--border);
}

#cta .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

#cta h2 {
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  margin-bottom: 14px;
  color: var(--text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#cta p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 36px;
  max-width: 500px;
}

.btn-primary-cta {
  display: inline-block;
  padding: 15px 44px;
  background: var(--blue);
  color: #ffffff;
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 0px;
  border: none;
  transition: background 0.2s, color 0.2s;
  box-shadow: none !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn-primary-cta:hover {
  background: var(--yellow);
  color: #0d0d0d;
  box-shadow: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .tl-hint-arrow { animation: none; }
  .tl-track { scroll-behavior: auto; }
}

