/* ============================================================
   WHAT REALLY HAPPENED — explorer's-desk interactive archive
   ============================================================ */

.tl {
  --route: rgba(138, 205, 234, 0.20);
  --route-lit: rgba(169, 222, 243, 0.75);
  --brass: #C9A96A;
  --brass-soft: #E0C99A;
  --brass-ring: rgba(201, 169, 106, 0.55);
  position: relative;
  padding-block: clamp(4.5rem, 3rem + 7vw, 9rem);
  overflow: hidden;
  isolation: isolate;
  /* warm, worn leather-and-wood explorer's desk under a low lamp */
  background:
    radial-gradient(46% 34% at 50% 6%, rgba(232,201,144,0.16), transparent 62%),
    radial-gradient(140% 90% at 50% 118%, rgba(0,0,0,0.55), transparent 60%),
    radial-gradient(90% 60% at 6% 40%, rgba(120,80,36,0.10), transparent 55%),
    linear-gradient(180deg, #1A130B 0%, #0E0A06 42%, #140E08 100%);
}

/* ---------- Desk decor layers ---------- */
.tl__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.tl-decor { position: absolute; background-repeat: no-repeat; }
/* fine grain / desk grain */
.tl-decor--grain {
  inset: 0; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* the aged chart the route is pinned to */
.tl-decor--parchment {
  top: 220px; bottom: 96px; left: 50%; transform: translateX(-50%);
  width: min(880px, 92%);
  background-image: url("../img/timeline/parchment.webp");
  background-size: 880px auto; background-repeat: repeat;
  opacity: 0.5; mix-blend-mode: screen; border-radius: 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 13%, #000 87%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 13%, #000 87%, transparent 100%);
}
/* antique navigation chart (graticule + coastline + rhumb lines) */
.tl-decor--map {
  top: 3%; right: -8%; width: min(74vw, 940px); aspect-ratio: 1;
  background-image: url("../img/timeline/map-fragment.svg");
  background-size: contain; background-repeat: no-repeat; opacity: 0.42;
  transform: rotate(-4deg);
}
.tl-decor--map2 {
  left: -15%; bottom: -5%; width: min(62vw, 760px); aspect-ratio: 1;
  background-image: url("../img/timeline/map-fragment.svg");
  background-size: contain; background-repeat: no-repeat; opacity: 0.26; transform: rotate(7deg) scaleX(-1);
}
/* film sprocket reference down one edge */
.tl-decor--film {
  top: 7%; left: 2.4%; width: 34px; height: 62%;
  background-image: url("../img/timeline/film-strip.svg");
  background-size: 30px auto; background-repeat: repeat-y; opacity: 0.09;
}
/* passport stamps, used sparingly */
.tl-decor--stamp { background-image: url("../img/timeline/passport-stamp.svg"); background-size: contain; background-repeat: no-repeat; opacity: 0.22; }
.tl-decor--stamp-a { width: 178px; height: 178px; top: 11%; left: 5%; transform: rotate(-11deg); }
.tl-decor--stamp-b { width: 140px; height: 140px; bottom: 12%; right: 7%; transform: rotate(9deg); opacity: 0.18; }
/* torn old-paper edges top & bottom */
.tl-decor--paper-top, .tl-decor--paper-bot {
  left: 0; right: 0; height: 34px;
  background-image: url("../img/timeline/paper-edge.svg");
  background-size: 100% 100%; background-repeat: no-repeat; opacity: 0.16;
}
.tl-decor--paper-top { top: 0; }
.tl-decor--paper-bot { bottom: 0; transform: scaleY(-1); }

@media (prefers-reduced-motion: no-preference) {
  .tl-decor--map { animation: tl-drift 60s ease-in-out infinite alternate; }
}
@keyframes tl-drift { from { transform: rotate(-4deg) translateY(0); } to { transform: rotate(-4deg) translateY(-22px); } }

/* ---------- Header ---------- */
.tl__head { text-align: center; margin-bottom: clamp(2.5rem, 2rem + 3vw, 4rem); }
.tl__eyebrow { justify-content: center; margin-bottom: 1.3rem; color: var(--brass-soft); }
.tl__eyebrow::before { background: linear-gradient(90deg, transparent, var(--brass)); }
.tl__title { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.4rem); letter-spacing: 0.02em; }
.tl__subtitle { margin-top: 0.7rem; font-family: var(--font-mono); font-size: clamp(0.8rem, 0.7rem + 0.4vw, 0.98rem); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.tl__progress { margin: 2.2rem auto 0; max-width: 420px; }
.tl__count { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(233,240,247,0.72); display: flex; align-items: baseline; justify-content: center; gap: 0.6rem; }
.tl__count b { color: var(--brass-soft); font-size: 1.05rem; }
.tl__bar { margin-top: 0.9rem; height: 2px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.tl__bar span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--blue), var(--brass-soft)); transition: width 0.8s var(--ease); }

/* ---------- Route ---------- */
.tl__route { position: relative; max-width: 780px; margin: 0 auto; padding-block: 1rem; }
.tl__route::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%);
  background: repeating-linear-gradient(180deg, var(--route) 0 7px, transparent 7px 17px);
}
.tl__compass { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); width: 34px; height: 34px; opacity: 0.6; z-index: 2; }

.tl__year { position: relative; min-height: 128px; display: flex; align-items: center; }
.tl__year--l { justify-content: flex-start; }
.tl__year--r { justify-content: flex-end; }
.tl__year::after {
  content: ""; position: absolute; top: 50%; height: 1px; width: calc(50% - 60px);
  background: repeating-linear-gradient(90deg, var(--route) 0 5px, transparent 5px 11px);
  transition: background 0.4s var(--ease);
}
.tl__year--l::after { left: 60px; }
.tl__year--r::after { right: 60px; }
.tl__year:hover::after { background: repeating-linear-gradient(90deg, var(--route-lit) 0 5px, transparent 5px 11px); }

.tl__marker { position: relative; z-index: 2; display: inline-flex; flex-direction: column; align-items: center; }

.tl__disc {
  position: relative; width: 98px; height: 98px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 26%, #262a33 0%, #171a20 45%, #0c0e12 100%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.14), inset 0 -8px 16px rgba(0,0,0,0.55), 0 12px 28px -14px rgba(0,0,0,0.85);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.tl__disc::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; border: 1px dashed rgba(255,255,255,0.14); transition: border-color 0.4s var(--ease); }
.tl__disc-year { font-family: var(--font-mono); font-size: 1.28rem; font-weight: 500; letter-spacing: 0.02em; color: #E9F0F7; transition: color 0.4s var(--ease); position: relative; }

.tl__marker:hover .tl__disc, .tl__marker:focus-visible .tl__disc {
  transform: scale(1.07); border-color: rgba(138,205,234,0.7);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.18), 0 0 0 6px rgba(138,205,234,0.07), 0 0 34px -6px rgba(138,205,234,0.55), 0 12px 28px -14px rgba(0,0,0,0.85);
}
.tl__marker:hover .tl__disc-year { color: var(--blue-bright); }
.tl__marker:focus-visible { outline: none; }

.tl__marker.found .tl__disc { background: radial-gradient(circle at 34% 26%, #2c2a22 0%, #1a1712 45%, #100d09 100%); border-color: var(--brass-ring); box-shadow: inset 0 1px 1px rgba(255,255,255,0.14), 0 0 0 1px rgba(201,169,106,0.2), 0 0 26px -10px rgba(201,169,106,0.5), 0 12px 28px -14px rgba(0,0,0,0.85); }
.tl__marker.found .tl__disc::before { border-color: rgba(201,169,106,0.6); border-style: solid; }
.tl__marker.found .tl__disc-year { color: var(--brass-soft); }
.tl__check { position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; border-radius: 50%; background: var(--brass); color: #1a1206; display: grid; place-items: center; transform: scale(0); opacity: 0; transition: transform 0.4s var(--ease), opacity 0.4s var(--ease); box-shadow: 0 4px 10px -3px rgba(0,0,0,0.6); }
.tl__check svg { width: 14px; height: 14px; }
.tl__marker.found .tl__check { transform: scale(1); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .tl-decor--map { animation: none; }
  .tl__disc, .tl__check, .tl__bar span { transition: none; }
  .tl__marker:hover .tl__disc, .tl__marker:focus-visible .tl__disc { transform: none; }
}

/* ---------- Year card (documentary chapter) ---------- */
.tl-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: clamp(0px, 2vw, 2rem); opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s; }
.tl-modal.open { opacity: 1; visibility: visible; }
.tl-modal__backdrop { position: absolute; inset: 0; background: rgba(5,6,8,0.82); backdrop-filter: blur(12px); }

.tl-card {
  position: relative; width: min(1000px, 100%); max-height: min(90svh, 880px);
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 18px; border: 1px solid var(--line); background: #0B0C10;
  box-shadow: 0 60px 140px -40px rgba(0,0,0,0.9);
  transform: translateY(22px) scale(0.985); opacity: 0.6;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}
.tl-modal.open .tl-card { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .tl-card { transition: none; transform: none; } }

.tl-card__grid { display: grid; grid-template-columns: 46% 1fr; flex: 1; min-height: 0; }

/* The photograph — 100% visible, presented like a documentary print */
.tl-card__photo { position: relative; overflow: hidden; background: #05060a; border-right: 1px solid var(--line); }
.tl-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-card__photo::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), inset 0 -80px 90px -40px rgba(5,6,10,0.7); pointer-events: none; }
.tl-card__filmtab { position: absolute; top: 0; bottom: 0; left: 0; width: 16px; background-image: url("../img/timeline/film-strip.svg"); background-size: 14px auto; background-repeat: repeat-y; background-position: center; opacity: 0.5; mix-blend-mode: screen; }
.tl-card__stamp { position: absolute; top: 14px; right: 14px; width: 82px; height: 82px; background-image: url("../img/timeline/passport-stamp.svg"); background-size: contain; background-repeat: no-repeat; opacity: 0.55; transform: rotate(-8deg); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.tl-card__caption { position: absolute; left: 14px; bottom: 12px; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.82); text-shadow: 0 1px 6px rgba(0,0,0,0.8); }

.tl-card__content { display: flex; flex-direction: column; min-height: 0; }
.tl-card__top { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.3rem 0.4rem; gap: 1rem; }
.tl-card__badge { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass-soft); display: inline-flex; align-items: center; gap: 0.5rem; }
.tl-card__badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 10px var(--brass); }
.tl-close { position: absolute; top: 14px; right: 14px; z-index: 6; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--paper); transition: all 0.3s var(--ease); background: rgba(6,7,10,0.55); backdrop-filter: blur(6px); flex: none; }
.tl-close:hover { border-color: rgba(138,205,234,0.6); background: rgba(138,205,234,0.1); transform: rotate(90deg); }
.tl-close svg { width: 18px; height: 18px; }

.tl-card__scroll { position: relative; overflow-y: auto; padding: 0.4rem clamp(1.5rem, 2.5vw, 2.4rem) clamp(1.4rem, 3vw, 2.2rem); overscroll-behavior: contain; }
.tl-card__year { font-family: var(--font-serif); font-weight: 500; font-size: clamp(3rem, 2rem + 5vw, 4.6rem); line-height: 0.9; letter-spacing: -0.01em; }
.tl-card__year::after { content: ""; display: block; width: 54px; height: 2px; margin-top: 0.9rem; background: linear-gradient(90deg, var(--blue), transparent); }

.tl-stories { list-style: none; padding: 0; margin: 1.6rem 0 0; }
.tl-story { padding: 1.1rem 0; border-top: 1px solid rgba(255,255,255,0.08); display: flex; gap: 1rem; }
.tl-story:first-child { border-top: 0; }
.tl-story__num { font-family: var(--font-mono); font-size: 0.72rem; color: var(--blue); padding-top: 0.4rem; min-width: 1.7rem; letter-spacing: 0.05em; }
.tl-story__body { flex: 1; }
.tl-story__text { font-family: var(--font-serif); font-size: clamp(1.18rem, 1.05rem + 0.5vw, 1.42rem); line-height: 1.32; color: #EEF3F8; font-weight: 500; }
.tl-cta { margin-top: 0.8rem; display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--blue-bright); padding: 0.48rem 0.9rem; border: 1px solid rgba(138,205,234,0.28); border-radius: 100px; background: rgba(138,205,234,0.05); transition: all 0.35s var(--ease); }
.tl-cta svg { width: 12px; height: 12px; }
.tl-cta:hover { border-color: rgba(138,205,234,0.6); background: rgba(138,205,234,0.12); color: var(--paper); transform: translateY(-1px); }
.tl-cta .dot { opacity: 0.5; }

.tl-card__nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem clamp(1.5rem, 3vw, 2.4rem); border-top: 1px solid rgba(255,255,255,0.08); background: rgba(8,9,12,0.6); }
.tl-nav-btn { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(233,240,247,0.7); transition: color 0.3s var(--ease); }
.tl-nav-btn svg { width: 15px; height: 15px; }
.tl-nav-btn:hover { color: var(--paper); }
.tl-nav-btn:disabled { opacity: 0.25; cursor: default; }
.tl-nav-btn--next { margin-left: auto; }

@media (max-width: 780px) {
  .tl-card { width: 100%; height: 100svh; max-height: none; border-radius: 0; border: 0; }
  .tl-card__grid { grid-template-columns: 1fr; grid-template-rows: minmax(200px, 38svh) 1fr; }
  .tl-card__photo { border-right: 0; border-bottom: 1px solid var(--line); }
  .tl__route { max-width: 520px; }
  .tl__disc { width: 84px; height: 84px; }
  .tl__disc-year { font-size: 1.12rem; }
  .tl__year { min-height: 108px; }
  .tl__year--l::after { left: 52px; } .tl__year--r::after { right: 52px; }
  .tl__year::after { width: calc(50% - 52px); }
  .tl-decor--film, .tl-decor--stamp-a { display: none; }
}
@media (max-width: 400px) {
  .tl__disc { width: 74px; height: 74px; }
  .tl__disc-year { font-size: 1rem; }
  .tl__year--l::after { left: 46px; } .tl__year--r::after { right: 46px; }
  .tl__year::after { width: calc(50% - 46px); }
}
