/* CSS dipindah dari versi inline ke file terpisah */
:root {
  --color-light-1: #faf7f5;
  --color-light-2: #e1ddd2;
  --color-light-3: #d6c9b6;
  --color-dark: #372e27;
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.28);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --transition-fast: 0.25s ease;
}

.cava-timeline,
.cava-timeline * {
  font-family: "Garamond", "Times New Roman", serif;
  box-sizing: border-box;
}

.cava-timeline {
  position: relative;
  min-height: 100vh;
  padding: 32px 16px 64px;
  display: flex;
  justify-content: center;
  color: var(--color-light-1);
  background: radial-gradient(
    circle at top,
    #4b3a2f 0,
    var(--color-dark) 55%,
    #241b15 100%
  );
  overflow: hidden;
}

.cava-timeline::before,
.cava-timeline::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  filter: blur(2px);
  animation: shimmer 18s ease-in-out infinite alternate;
}

.cava-timeline::before {
  width: 380px;
  height: 380px;
  top: -80px;
  left: -120px;
  background: radial-gradient(
    circle,
    rgba(255, 244, 224, 0.7),
    transparent 65%
  );
}

.cava-timeline::after {
  width: 320px;
  height: 320px;
  bottom: -120px;
  right: -80px;
  background: radial-gradient(
    circle,
    rgba(255, 237, 209, 0.55),
    transparent 65%
  );
  animation-delay: 4s;
}

@keyframes shimmer {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.3;
  }
  50% {
    opacity: 0.55;
  }
  100% {
    transform: translate3d(30px, -20px, 0) scale(1.08);
    opacity: 0.15;
  }
}

.cava-timeline .star-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-repeat: repeat;
  background-size: 260px 260px;
  opacity: 0.4;
  mix-blend-mode: screen;
}

.cava-timeline .star-layer.layer1 {
  background-image: radial-gradient(
      3px 3px at 14px 18px,
      #ffffff 70%,
      transparent 71%
    ),
    radial-gradient(3px 3px at 90px 50px, #f8f3ea 70%, transparent 71%),
    radial-gradient(3px 3px at 140px 180px, #f5e0bd 70%, transparent 71%);
  animation: drift1 60s linear infinite;
}

.cava-timeline .star-layer.layer2 {
  background-image: radial-gradient(
      3px 3px at 40px 130px,
      #fdfaf6 70%,
      transparent 71%
    ),
    radial-gradient(3px 3px at 180px 30px, #f8e9d1 70%, transparent 71%);
  animation: drift2 90s linear infinite;
  opacity: 0.3;
}

.cava-timeline .star-layer.layer3 {
  background-image: radial-gradient(
      3px 3px at 70px 90px,
      #ffffff 70%,
      transparent 71%
    ),
    radial-gradient(3px 3px at 160px 160px, #f3dfc0 70%, transparent 71%);
  animation: drift3 120s linear infinite;
  opacity: 0.25;
}

@keyframes drift1 {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-220px, -220px, 0);
  }
}
@keyframes drift2 {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(220px, -180px, 0);
  }
}
@keyframes drift3 {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-180px, 220px, 0);
  }
}

.bg-sky {
  position: absolute;
  inset: -120px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-shooting-star {
  position: absolute;
  width: 160px;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(250, 247, 245, 0),
    rgba(250, 247, 245, 0.95),
    rgba(250, 247, 245, 0)
  );
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(250, 247, 245, 0.9);
  opacity: 0;
}

.bg-shooting-star::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.95);
}

.bg-shooting-star.bs1 {
  top: 80%;
  left: -25%;
  transform: rotate(-22deg);
  animation: bgShoot 14s linear infinite;
  animation-delay: 1s;
}

.bg-shooting-star.bs2 {
  top: 40%;
  left: -30%;
  transform: rotate(-18deg);
  animation: bgShoot 18s linear infinite;
  animation-delay: 6s;
}

.bg-shooting-star.bs3 {
  top: 15%;
  left: -35%;
  transform: rotate(-26deg);
  animation: bgShoot 20s linear infinite;
  animation-delay: 11s;
}

@keyframes bgShoot {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-22deg);
  }
  8% {
    opacity: 1;
  }
  45% {
    opacity: 1;
    transform: translate3d(260%, -180%, 0) rotate(-22deg);
  }
  65% {
    opacity: 0;
    transform: translate3d(310%, -220%, 0) rotate(-22deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(310%, -220%, 0) rotate(-22deg);
  }
}

.timeline-shell {
  width: 100%;
  max-width: 1024px;
  background: linear-gradient(
    135deg,
    rgba(225, 221, 210, 0.8),
    rgba(214, 201, 182, 0.92)
  );
  border-radius: var(--radius-xl);
  padding: 24px 20px 32px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.timeline-shell::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: radial-gradient(
      circle at 10% 20%,
      rgba(250, 247, 245, 0.55),
      transparent 60%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(247, 229, 203, 0.65),
      transparent 55%
    );
  opacity: 0.95;
  pointer-events: none;
}

.timeline-inner {
  position: relative;
  z-index: 1;
}

header.hero {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  padding-top: 4px;
  overflow: visible;
}

.hero-sky {
  position: absolute;
  inset: -12px 0 0 0;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}

.shooting-star {
  position: absolute;
  width: 90px;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(250, 247, 245, 0),
    rgba(250, 247, 245, 0.95),
    rgba(250, 247, 245, 0)
  );
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(250, 247, 245, 0.9);
  transform: rotate(-12deg);
  opacity: 0;
  animation-name: heroShoot;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.shooting-star::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.95);
}

.shooting-star.s1 {
  top: 8%;
  left: -20%;
  animation-duration: 7s;
  animation-delay: 0s;
}

.shooting-star.s2 {
  top: 42%;
  left: -30%;
  animation-duration: 9s;
  animation-delay: 3s;
  transform: rotate(-16deg);
}

.shooting-star.s3 {
  top: 68%;
  left: -25%;
  animation-duration: 8.5s;
  animation-delay: 5s;
  transform: rotate(-10deg);
}

@keyframes heroShoot {
  0% {
    transform: translateX(0) rotate(-12deg);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  40% {
    opacity: 1;
    transform: translateX(140%) rotate(-12deg);
  }
  60% {
    opacity: 0;
    transform: translateX(170%) rotate(-12deg);
  }
  100% {
    opacity: 0;
    transform: translateX(170%) rotate(-12deg);
  }
}

.hero-brand,
.hero-title,
.hero-subtitle {
  position: relative;
  z-index: 1;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 700;
  color: #2c2119;
  margin-bottom: 4px;
}

.hero-brand span.icon {
  font-size: 1.3em;
  line-height: 1;
}

.hero-title {
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 6px;
}

.hero-subtitle {
  font-size: 1rem;
  color: #5a4b3a;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero-subtitle strong {
  font-size: 1.02rem;
}

.intro-card {
  max-width: 780px;
  margin: 18px auto 28px;
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, #faf7f5, #e9dfcf);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
  position: relative;
  border: 1px solid rgba(55, 46, 39, 0.12);
  overflow: hidden;
}

.intro-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.16) 0px,
    rgba(255, 255, 255, 0.16) 1px,
    transparent 2px,
    transparent 5px
  );
  opacity: 0.35;
  pointer-events: none;
}

.intro-card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 80px;
  height: 80px;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.8),
    transparent 60%
  );
  transform: rotate(12deg);
  opacity: 0.7;
  pointer-events: none;
}

.intro-card-title {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 1.05rem;
  color: #3a2d22;
  margin-bottom: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.intro-card p {
  position: relative;
  z-index: 1;
  font-size: 0.93rem;
  line-height: 1.7;
  color: #4b392a;
  margin-bottom: 8px;
  text-align: justify;
}

.intro-card p:last-child {
  margin-bottom: 2px;
}

.section-block {
  max-width: 820px;
  margin: 24px auto 18px;
  padding: 14px 18px 12px;
  background: linear-gradient(135deg, #faf7f5, #e9dfcf);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  position: relative;
  border: 1px solid rgba(55, 46, 39, 0.1);
  overflow: hidden;
}

.section-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.13) 0px,
    rgba(255, 255, 255, 0.13) 1px,
    transparent 2px,
    transparent 5px
  );
  opacity: 0.35;
  pointer-events: none;
}

.section-block .section-heading {
  margin-top: 4px;
  margin-bottom: 6px;
}

.section-block .section-note {
  margin: 2px 0 0;
}

.section-heading {
  padding-left: 0;
  font-size: clamp(1.45rem, 2.4vw, 1.8rem);
  font-weight: 700;
  color: #34271d;
  position: relative;
  text-align: center;
}

.section-note {
  font-size: 0.9rem;
  color: #604b39;
  max-width: 720px;
  line-height: 1.5;
  text-align: justify;
}

.timeline {
  position: relative;
  margin-top: 6px;
  padding-left: 16px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 3px;
  background: linear-gradient(
    to bottom,
    rgba(55, 46, 39, 0.7),
    rgba(55, 46, 39, 0.1)
  );
  border-radius: 999px;
}

.timeline-item {
  position: relative;
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.6s ease;
}

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

.timeline-marker {
  position: absolute;
  left: 11px;
  top: 22px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-dark);
  border: 3px solid var(--color-light-2);
  box-shadow: 0 0 0 4px rgba(55, 46, 39, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-marker span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f5ebdd;
}

.timeline-card {
  margin-left: 44px;
  background: radial-gradient(
    circle at top left,
    var(--color-light-1),
    var(--color-light-3)
  );
  border-radius: 18px;
  padding: 14px 16px 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast), background var(--transition-fast);
}

.timeline-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
      circle at 0 0,
      rgba(250, 247, 245, 0.9),
      transparent 60%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(245, 227, 200, 0.85),
      transparent 55%
    );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.timeline-card:hover {
  transform: translateY(-4px) translateX(2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  background: radial-gradient(
    circle at top right,
    var(--color-light-1),
    var(--color-light-2)
  );
}

.timeline-card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card-left {
  flex: 1;
  min-width: 0;
}

.card-date {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a7355;
  margin-bottom: 2px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #3c2f24;
  margin-bottom: 1px;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(55, 46, 39, 0.12);
  background: rgba(250, 247, 245, 0.9);
  color: #5a4331;
  white-space: nowrap;
}

.tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b8916a;
}

.card-toggle {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(55, 46, 39, 0.9);
  color: var(--color-light-1);
  flex-shrink: 0;
  margin-left: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: background var(--transition-fast),
    transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card-toggle span {
  display: block;
  transform: rotate(0deg);
  transition: transform 0.25s ease;
}

.timeline-card.expanded .card-toggle {
  background: #a6784c;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.timeline-card.expanded .card-toggle span {
  transform: rotate(180deg);
}

.card-body {
  margin-top: 10px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.timeline-card.expanded .card-body {
  max-height: 2000px;
}

.card-body p {
  font-size: 1rem;
  line-height: 1.7;
  color: #4e3a2a;
  margin-bottom: 6px;
  text-align: justify;
}

.card-body p:last-child {
  margin-bottom: 2px;
}

.card-media {
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.card-media video,
.card-media img {
  width: 100%;
  display: block;
  height: auto;
}

.card-media-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.card-media-grid figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.card-media-grid img,
.card-media-grid video {
  width: 100%;
  display: block;
  height: auto;
}

.sub-timeline {
  margin-top: 10px;
  padding-left: 10px;
  border-left: 2px dashed rgba(55, 46, 39, 0.25);
}

.sub-item {
  margin-top: 10px;
  padding-left: 10px;
  background: rgba(250, 247, 245, 0.9);
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.sub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 6px;
  cursor: pointer;
}

.sub-left {
  flex: 1;
  min-width: 0;
}

.sub-date {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a7355;
  margin-bottom: 1px;
}

.sub-title {
  font-size: 1rem;
  font-weight: 700;
  color: #3a2d22;
}

.sub-toggle {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(55, 46, 39, 0.9);
  color: var(--color-light-1);
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  font-size: 0.75rem;
}

.sub-toggle span {
  transform: rotate(0deg);
  transition: transform 0.25s ease;
}

.sub-item.sub-expanded .sub-toggle span {
  transform: rotate(180deg);
}

.sub-body {
  padding: 0 10px 8px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.sub-item.sub-expanded .sub-body {
  max-height: 900px;
}

.sub-body p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #4e3a2a;
  margin-bottom: 5px;
  text-align: justify;
}

.timeline-card.closing-card {
  background: #372e27;
  color: #faf7f5;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.timeline-card.closing-card::before {
  display: none;
}

.timeline-card.closing-card:hover {
  background: #372e27;
  transform: translateY(-2px) translateX(1px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.timeline-card.closing-card .card-title {
  color: #fdf5ea;
  font-size: 1.12rem;
}

.timeline-card.closing-card .card-date {
  color: #d6c9b6;
}

.timeline-card.closing-card .card-tag {
  background: rgba(250, 247, 245, 0.08);
  border-color: rgba(250, 247, 245, 0.18);
  color: #f3e4cf;
}

.timeline-card.closing-card .tag-dot {
  background: #f3d29d;
}

.timeline-card.closing-card .card-body p {
  color: #f4e9da;
}

.timeline-card.closing-card .card-toggle {
  background: #f3d29d;
  color: #372e27;
}

.timeline-card.closing-card.expanded .card-toggle {
  background: #fbe3b4;
}

.scroll-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(55, 46, 39, 0.96);
  color: var(--color-light-1);
  border: 1px solid rgba(250, 247, 245, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease,
    box-shadow 0.25s ease, background 0.25s ease;
  font-family: "Garamond", "Times New Roman", serif;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.scroll-top:hover {
  background: #a6784c;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.scroll-top span {
  transform: translateY(-1px);
  font-size: 18px;
}

@media (max-width: 720px) {
  .timeline-shell {
    padding: 18px 14px 26px;
    border-radius: 18px;
  }
  .timeline::before {
    left: 16px;
  }
  .timeline-marker {
    left: 8px;
  }
  .timeline-card {
    margin-left: 38px;
  }
  .hero-title {
    font-size: 1.9rem;
  }
}
