/* ─── ROOT ─── */
.jr-root {
  font-family: "Inter", sans-serif;
  background: #fff;
  width: 100%;
}

/* ─── HEADER ─── */
.jr-header {
  padding: 100px 56px 80px;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(108, 92, 231, 0.08),
      transparent 40%
    ),
    #ffffff;
  position: relative;
}

/* EYEBROW */
.jr-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6c5ce7;
  margin-bottom: 22px;
}

.jr-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, #6c5ce7, transparent);
  border-radius: 2px;
}

/* HEADING */
.jr-header h2 {
  font-size: clamp(2.8rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #0d0d0d;
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin: 0 0 18px;
}

/* GRADIENT BRAND TEXT */
.jr-header h2 span {
  background: linear-gradient(135deg, #6c5ce7, #8e7dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* SUBTEXT */
.jr-header-sub {
  font-size: 0.95rem;
  color: #6b7280; /* much better than #bbb */
  font-weight: 400;
  max-width: 520px;
  line-height: 1.6;
}

/* ─── BODY GRID ─── */
.jr-body {
  display: grid;
  grid-template-columns: 52% 48%;
}

/* ─── LEFT ─── */
.jr-left {
  border-right: 1px solid #f0f0f0;
  position: relative;
}

/* Progress line */
.jr-prog-track {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #f0eeff;
}
.jr-prog-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  background: #6c5ce7;
  border-radius: 0 0 2px 2px;
  transition: height 0.1s linear;
}

/* ─── TIMELINE ITEM ─── */
.jr-item {
  /* CRITICAL: each item is exactly one viewport tall */
  height: 80vh;
  min-height: 520px;
  padding: 0 56px 0 44px;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  display: flex;
  align-items: center;
}
.jr-item:last-child {
  border-bottom: none;
}

/* Node dot */
.jr-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #d5d0f5;
  box-shadow: 0 0 0 4px #f5f3ff;
  transition:
    border-color 0.4s,
    box-shadow 0.4s,
    transform 0.4s;
  z-index: 2;
}
.jr-item.in-view::before {
  border-color: #6c5ce7;
  box-shadow: 0 0 0 7px #ede9ff;
  transform: translateY(-50%) scale(1.3);
}

/* Fade-up on scroll */
.jr-item-inner {
  opacity: 0.18;
  transform: translateY(22px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
  width: 100%;
}
.jr-item.in-view .jr-item-inner {
  opacity: 1;
  transform: translateY(0);
}

/* Ghost year */
.yr-ghost {
  font-size: clamp(3.5rem, 5.5vw, 5rem);
  font-weight: 800;
  color: #f0eeff;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: -6px;
  user-select: none;
  transition: color 0.4s;
}
.jr-item.in-view .yr-ghost {
  color: #e4dfff;
}

/* Chip */
.yr-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6c5ce7;
  background: #f3f1ff;
  border-radius: 20px;
  padding: 4px 11px;
  margin-bottom: 16px;
}
.yr-chip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #6c5ce7;
  flex-shrink: 0;
}

.jr-title {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
  line-height: 1.32;
  margin-bottom: 16px;
}
.jr-desc {
  font-size: 0.875rem;
  color: #777;
  line-height: 1.82;
  font-weight: 400;
  max-width: 440px;
}
.jr-stat {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #222;
  background: #fafafa;
  border: 1px solid #ebebeb;
  border-radius: 9px;
  padding: 9px 18px;
}
.jr-stat-pip {
  width: 3px;
  height: 18px;
  background: #6c5ce7;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ─── RIGHT ─── */
.jr-right {
  position: relative;
}
.jr-sticky {
  position: sticky;
  top: 0;
  /* CRITICAL: exactly 100vh — matches each left item height */
  height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 28px 36px 24px;
  gap: 18px;
  /* background: #fcfbff; */
  overflow: hidden;
}

/* ─── IMAGE STAGE ─── */
.img-stage {
  position: relative;
  flex: 1; /* fills all space except the footer row */
  border-radius: 18px;
  overflow: hidden;
}
.img-frame {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.93) translateY(20px);
  transition:
    opacity 0.62s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.62s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}
.img-frame.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  z-index: 3;
}
.img-frame.exit {
  opacity: 0;
  transform: scale(1.04) translateY(-14px);
  z-index: 2;
}
.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 32px;
  position: relative;
  z-index: 2;
}
.img-fallback {
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  opacity: 0.25;
  position: absolute;
}
.img-year-pill {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 10;

  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #fff;
  background: #6c5ce7;
  border-radius: 30px;
  padding: 7px 16px;
}

/* ─── FOOTER ─── */
.img-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  height: 28px;
}
.img-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.img-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e0dcff;
  transition:
    width 0.3s ease,
    border-radius 0.3s ease,
    background 0.3s ease;
}
.img-dot.active {
  width: 22px;
  border-radius: 3px;
  background: #6c5ce7;
}
.img-counter {
  font-size: 0.7rem;
  font-weight: 700;
  color: #ccc;
  letter-spacing: 0.06em;
}
.img-counter span {
  color: #6c5ce7;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .jr-header {
    padding: 56px 36px 48px;
  }
  .jr-item {
    padding: 0 36px 0 32px;
  }
  .jr-sticky {
    padding: 24px 28px 20px;
  }
}
@media (max-width: 780px) {
  .jr-body {
    grid-template-columns: 1fr;
  }
  .jr-right {
    display: none;
  }
  .jr-left {
    border-right: none;
  }
  .jr-header {
    padding: 40px 24px 36px;
  }
  .jr-item {
    height: auto;
    min-height: unset;
    padding: 56px 24px 56px 28px;
  }
  .jr-item-inner {
    opacity: 1;
    transform: none;
  }
}
