:root {
  --bg: #1a0f14;
  --bg2: #2a1520;
  --cream: #f6ede4;
  --muted: #bfa9a6;
  --rose: #d98fa0;
  --gold: #e8c9a0;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(217,143,160,.18), transparent 60%),
    radial-gradient(800px 600px at 0% 100%, rgba(232,201,160,.10), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0; }
em { font-style: italic; color: var(--gold); }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }

.small-caps {
  font-size: .72rem; letter-spacing: .32em; text-transform: uppercase;
  color: var(--rose); margin-bottom: clamp(.8rem, 2.5vh, 1.4rem);
}

/* ---------- kelopak halus ---------- */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.petal {
  position: absolute; top: -40px; width: 10px; height: 14px;
  background: radial-gradient(ellipse at 30% 30%, var(--rose), rgba(217,143,160,.35));
  border-radius: 80% 0 80% 0;
  opacity: 0;
  animation: fall linear infinite;
}
@keyframes fall {
  0%   { transform: translate3d(0,-5vh,0) rotate(0deg); opacity: 0; }
  10%  { opacity: .45; }
  90%  { opacity: .3; }
  100% { transform: translate3d(var(--drift), 110vh, 0) rotate(540deg); opacity: 0; }
}

main { position: relative; z-index: 1; }

/* ---------- hero ---------- */
.hero 
{  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: clamp(36px, 9vh, 80px) 24px clamp(32px, 7vh, 60px);
}
.hero h1 { font-size: clamp(2.2rem, min(9vw, 13vh), 5.6rem); letter-spacing: -.01em; }
.hero-sub { max-width: 34ch; color: var(--muted); font-size: 1.05rem; margin-top: 1.6rem; }

.divider { display: flex; align-items: center; gap: 16px; margin: clamp(1rem, 3.5vh, 2rem) 0 .4rem; color: var(--rose); }
.divider span { width: 64px; height: 1px; background: linear-gradient(90deg, transparent, var(--rose)); }
.divider span:last-child { transform: scaleX(-1); }
.divider i { font-style: normal; font-size: 1.1rem; }
.happybirthday {font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.scroll-cue {
  margin-top: 3.4rem; text-decoration: none; color: var(--muted);
  font-size: .72rem; letter-spacing: .25em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(var(--rose), transparent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .3; transform: scaleY(.6); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- hitung mundur ---------- */
#countdown { transition: opacity 1.2s ease; }
#countdown.leaving { opacity: 0; pointer-events: none; }
.count-units {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 640px); margin: clamp(1.1rem, 4vh, 2.2rem) auto clamp(1rem, 3vh, 1.8rem);
}
.count-unit { min-width: 0; padding: .3rem .25rem; border-left: 1px solid rgba(217,143,160,.22); }
.count-unit:first-child { border-left: 0; }
.count-num {
  display: block; font-family: var(--serif); font-weight: 400; line-height: 1;
  font-size: clamp(2.1rem, min(11vw, 12vh), 4.6rem);
  font-variant-numeric: lining-nums tabular-nums;
}
.count-lbl {
  display: block; margin-top: .7rem; color: var(--rose);
  font-size: clamp(.56rem, 2.3vw, .7rem); letter-spacing: .16em; text-transform: uppercase;
}
@media (prefers-reduced-motion: reduce) { #countdown { transition: none; } }

/* ---------- animasi masuk ---------- */
.fade { opacity: 0; transform: translateY(14px); animation: in 1.2s ease forwards; animation-delay: var(--d, 0s); }
@keyframes in { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .petal, .scroll-cue i { animation: none; }
  .petals { display: none; }
  .fade { opacity: 1; transform: none; animation: none; }
}

/* ---------- layar pendek (HP mendatar) ---------- */
@media (max-height: 480px) {
  .divider { display: none; }
  .hero { padding-top: 28px; padding-bottom: 24px; }
  .count-lbl { margin-top: .35rem; }
}
