/* ============================================
   Timeline Section - Uses theme.css variables
   ============================================ */

/* Tag palette - timeline specific (uses guideline colors) */
:root {
  --tl-tag-1: #db6700;
  --tl-tag-2: #f2b272;
  --tl-tag-3: #db6700;
  --tl-tag-4: #f2b272;
  --tl-tag-5: #db6700;
}

/* ============================================
   Section Shell
   ============================================ */
.tl-section {
  padding: 5rem 0;
  background: var(--bg-light);
  overflow: hidden;
}

.tl-wrap {
  max-width: var(--container-max-width, 1140px);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================
   Header
   ============================================ */
.tl-head {
  margin-bottom: 5.5rem;
  text-align: center;
}

.tl-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.tl-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-h2);
  font-weight: 700;
  line-height: 1.2;
  color: var(--charcoal-black);
  margin-bottom: 1.5rem;
}

.tl-title em {
  color: var(--gray-muted);
}

.tl-sub {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: 1.75;
  color: var(--gray-muted);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

/* ============================================
   Track — single vertical spine
   ============================================ */
.tl-track {
  position: relative;
}

/* The spine line */
.tl-track::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: var(--border);
}

/* ============================================
   Item
   ============================================ */
.tl-item {
  position: relative;
  padding: 0 0 5rem 2.75rem;
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Dot on spine */
.tl-item::before {
  content: "";
  position: absolute;
  top: 0.45rem;
  left: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-light);
  border: 1.5px solid var(--gray-muted);
  transition:
    border-color 0.3s,
    background 0.3s;
}

.tl-item:hover::before {
  background: var(--charcoal-black);
  border-color: var(--charcoal-black);
}

/* ============================================
   Year Ghost Number
   ============================================ */
.tl-year-ghost {
  position: absolute;
  top: -1.6rem;
  right: 0;
  font-family: var(--font-heading);
  font-size: clamp(5rem, 12vw, 9rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--border);
  pointer-events: none;
  user-select: none;
  transition: -webkit-text-stroke-color 0.4s;
}

.tl-item:hover .tl-year-ghost {
  -webkit-text-stroke-color: var(--gray-muted);
}

/* ============================================
   Tag
   ============================================ */
.tl-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 2rem;
  margin-bottom: 0.85rem;
  border: 1px solid currentColor;
}

.tl-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Tag color variants */
.tl-item.c1 .tl-tag {
  color: var(--tl-tag-1);
}
.tl-item.c2 .tl-tag {
  color: var(--tl-tag-2);
}
.tl-item.c3 .tl-tag {
  color: var(--tl-tag-3);
}
.tl-item.c4 .tl-tag {
  color: var(--tl-tag-4);
}
.tl-item.c5 .tl-tag {
  color: var(--tl-tag-5);
}

/* Dot color variants */
.tl-item.c1:hover::before {
  background: var(--tl-tag-1);
  border-color: var(--tl-tag-1);
}
.tl-item.c2:hover::before {
  background: var(--tl-tag-2);
  border-color: var(--tl-tag-2);
}
.tl-item.c3:hover::before {
  background: var(--tl-tag-3);
  border-color: var(--tl-tag-3);
}
.tl-item.c4:hover::before {
  background: var(--tl-tag-4);
  border-color: var(--tl-tag-4);
}
.tl-item.c5:hover::before {
  background: var(--tl-tag-5);
  border-color: var(--tl-tag-5);
}

/* ============================================
   Content
   ============================================ */
.tl-year {
  font-family: var(--font-body);
  font-size: var(--font-size-small);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--gray-muted);
  margin-bottom: 0.5rem;
}

.tl-content-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-h3);
  font-weight: 700;
  line-height: 1.2;
  color: var(--charcoal-black);
  margin-bottom: 0.85rem;
}

.tl-desc {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: 1.8;
  color: var(--gray-muted);
  max-width: 540px;
}

/* Ruled separator below each item */
.tl-rule {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-top: 3rem;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.7s 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.tl-item:last-child .tl-rule {
  display: none;
}

.tl-item.visible .tl-rule {
  transform: scaleX(1);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 600px) {
  .tl-year-ghost {
    font-size: 4.5rem;
    right: -0.5rem;
    top: -1rem;
  }

  .tl-item {
    padding-left: 1.75rem;
    padding-bottom: 3.5rem;
  }

  .tl-head {
    margin-bottom: 4rem;
  }
}
