/* ==========================================================================
   Projekte Page — projekte.css
   Scroll-driven vertical timeline / roadmap
   ========================================================================== */

/* ==========================================================================
   TIMELINE SECTION
   ========================================================================== */
.timeline {
  padding: 0 0 80px;
  background: var(--white);
}

.timeline__inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 0 24px;
}

/* ==========================================================================
   VERTICAL LINE + SCROLL PROGRESS
   ========================================================================== */
.timeline__track {
  position: absolute;
  left: 32px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--border) 3%,
    var(--border) 97%,
    transparent 100%
  );
  z-index: 1;
}

/* Wine-red progress fill — height set by JS on scroll */
.timeline__progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom, var(--wine), var(--wine));
  border-radius: 1px;
  z-index: 2;
  will-change: height;
}

/* ==========================================================================
   TIMELINE ENTRY
   ========================================================================== */
.timeline__entry {
  position: relative;
  display: flex;
  gap: 0;
  padding: 48px 0 0;
}

.timeline__entry:first-child {
  padding-top: 0;
}

/* ==========================================================================
   LEFT: STICKY YEAR LABEL + DOT MARKER
   ========================================================================== */
.timeline__marker {
  position: sticky;
  top: calc(var(--nav-h) + 48px);
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  z-index: 10;
  height: fit-content;
}

/* Circle dot on the line */
.timeline__dot-wrap {
  position: relative;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 12px; /* aligns center with the 32px left track + 1px */
}

.timeline__dot-bg {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--white);
}

.timeline__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--border);
  position: relative;
  z-index: 1;
  transition: background .4s var(--ease), border-color .4s var(--ease);
}

/* Active dot (once scrolled past) */
.timeline__dot--active {
  background: var(--wine);
  border-color: var(--wine);
}

/* Year label — hidden on mobile, visible on desktop */
.timeline__year {
  display: none;
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text3);
  letter-spacing: -.03em;
  line-height: 1;
  white-space: nowrap;
  transition: color .4s var(--ease);
}

.timeline__year--active {
  color: var(--dark);
}

/* ==========================================================================
   RIGHT: CONTENT AREA
   ========================================================================== */
.timeline__content {
  padding-left: 48px;
  padding-right: 0;
  width: 100%;
  min-width: 0;
}

/* Mobile year (shown above content on small screens) */
.timeline__year-mobile {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
  letter-spacing: -.02em;
}

/* Entry heading */
.timeline__heading {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

/* Entry description */
.timeline__desc {
  font-size: .9375rem;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 560px;
}

/* Milestone checklist items */
.timeline__milestones {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.timeline__milestone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8125rem;
  color: var(--text2);
  line-height: 1.5;
}

.timeline__milestone svg {
  width: 16px;
  height: 16px;
  color: var(--wine);
  flex-shrink: 0;
}

/* ==========================================================================
   IMAGE GRID (2-col cards with subtle shadow)
   ========================================================================== */
.timeline__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.timeline__img {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 0 24px rgba(34,42,53,.06),
    0 1px 1px rgba(0,0,0,.05),
    0 0 0 1px rgba(34,42,53,.04),
    0 0 4px rgba(34,42,53,.08),
    0 16px 68px rgba(47,48,55,.05);
}

/* Colored placeholder blocks (matching brand) */
.timeline__img-placeholder {
  width: 100%;
  height: 0;
  padding-bottom: 65%;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 24px rgba(34,42,53,.06),
    0 1px 1px rgba(0,0,0,.05),
    0 0 0 1px rgba(34,42,53,.04),
    0 0 4px rgba(34,42,53,.08),
    0 16px 68px rgba(47,48,55,.05);
}

.timeline__img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Watermark text inside placeholder */
.timeline__img-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  pointer-events: none;
}

/* Tags inside entries */
.timeline__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.timeline__tag {
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--wine-light);
  color: var(--wine);
}

/* ==========================================================================
   SCROLL REVEAL for timeline entries
   ========================================================================== */
.timeline__entry .timeline__content {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}

.timeline__entry.timeline--visible .timeline__content {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   DESKTOP (768px+)
   ========================================================================== */
@media (min-width: 768px) {
  .timeline__track {
    left: 40px;
  }

  .timeline__dot-wrap {
    margin-left: 20px;
  }

  .timeline__year {
    display: block;
    min-width: 180px;
  }

  .timeline__year-mobile {
    display: none;
  }

  .timeline__content {
    padding-left: 24px;
  }

  .timeline__entry {
    padding-top: 80px;
  }

  .timeline__entry:first-child {
    padding-top: 0;
  }

  .timeline__images {
    gap: 16px;
  }
}

/* ==========================================================================
   LARGE DESKTOP (1280px+)
   ========================================================================== */
@media (min-width: 1280px) {
  .timeline__track {
    left: 56px;
  }

  .timeline__dot-wrap {
    margin-left: 36px;
  }

  .timeline__year {
    min-width: 240px;
  }

  .timeline__entry {
    padding-top: 100px;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .timeline__progress {
    transition: none !important;
  }

  .timeline__entry .timeline__content {
    opacity: 1 !important;
    transform: none !important;
  }

  .timeline__dot {
    transition: none !important;
  }

  .timeline__year {
    transition: none !important;
  }
}
