/* =====================================================================
   STYLE.CSS — Template "Tiup Lilin" 🎂
   =====================================================================
   Warna ikut penuh palet brand Sampaikan dari core.css (tidak di-override
   di sini) — kebetulan pas banget, warna aksen brand namanya juga "Lilin"
   🕯️ (brand-guideline-sampaikan.md Bagian 2 & 7). Identitas template ini
   datang dari nyala lilin yang benar-benar padam kena tiupan (Bagian 6.8).
   ===================================================================== */

/* ---------------------------------------------------------------------
   BABAK 1 — GERBANG (kue + lilin)
   --------------------------------------------------------------------- */
.babak-gerbang {
  padding: 0;
  min-height: 100dvh;
}

.gerbang-stage {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: var(--space-5);
  background: radial-gradient(ellipse at center 35%, rgba(255, 157, 77, 0.12), transparent 60%);
}

.cake {
  position: relative;
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.candles {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: -4px;
  z-index: 2;
  flex-wrap: wrap;
  max-width: 200px;
}

.candle {
  position: relative;
  width: 6px;
  height: 34px;
  background: linear-gradient(to bottom, #fff4de, #f0d9a8);
  border-radius: 2px;
}

.candle__api {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 16px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff3c4 0%, var(--color-accent) 55%, transparent 80%);
  filter: drop-shadow(0 0 6px var(--color-accent));
  transform-origin: bottom center;
}

@media (prefers-reduced-motion: no-preference) {
  .candle__api {
    animation: api-kedip 900ms ease-in-out infinite alternate;
  }
}

@keyframes api-kedip {
  0% {
    transform: translateX(-50%) scale(1) rotate(-2deg);
  }
  100% {
    transform: translateX(-50%) scale(1.08) rotate(2deg);
  }
}

/* Lilin padam: dipasang JS saat tiupan/tap terdeteksi */
.candle.is-padam .candle__api {
  opacity: 0;
  animation: none;
}

.cake-tier {
  width: 100%;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(to bottom, #7a3b2e, #5c2a20);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.15);
}

.cake-tier--top {
  height: 46px;
  width: 70%;
}

.cake-tier--bottom {
  height: 58px;
  margin-top: 4px;
}

.cake-plate {
  width: 115%;
  height: 10px;
  border-radius: var(--radius-pill);
  background: rgba(247, 237, 225, 0.15);
  margin-top: 6px;
}

.gerbang-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

.gerbang-umur {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-accent);
  margin: 0;
}

.gerbang-instruksi {
  color: var(--color-text-muted);
  margin: 0 0 var(--space-2) 0;
}

#btn-tap-fallback {
  margin-top: var(--space-2);
}

/* ---------------------------------------------------------------------
   BABAK UMUM (dipakai lintas template, mirror dari peta-jarak)
   --------------------------------------------------------------------- */
.babak-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  margin: 0 0 var(--space-4) 0;
}

.babak-perjalanan,
.babak-klimaks,
.babak-balasan,
.babak-amplop {
  padding-bottom: calc(var(--space-8) + 64px);
}

.video-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-elevated);
}

.video-wrap video {
  width: 100%;
}

.babak-balasan__content {
  min-height: 70dvh;
  justify-content: center;
  align-items: center;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.babak-balasan__lead {
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

/* ---------------------------------------------------------------------
   BABAK 5 — AMPLOP "BUKA KALAU..."
   --------------------------------------------------------------------- */
.amplop-intro {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.amplop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.amplop-card {
  position: relative; /* jangkar buat .lottie-burst (delight moment saat dibuka) */
  background: var(--color-bg-elevated);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.amplop-card__toggle {
  background: none;
  border: none;
  color: var(--color-text);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: left;
  padding: 0;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.amplop-card__toggle::before {
  content: "✉️ ";
}

.amplop-card__count {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.amplop-card__content {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  color: var(--color-text-muted);
  border-top: 1px solid rgba(247, 237, 225, 0.12);
  padding-top: var(--space-2);
}

.amplop-card__content audio,
.amplop-card__content video {
  width: 100%;
  border-radius: var(--radius-sm);
}
