/* ==========================================================================
   Natal Bersama Keluarga Besar Muntu se-Jabodetabek
   Stylesheet mobile-first — Christmas Elegance (warm, peaceful, glowing)
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License 1.1) ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-600.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-500-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-var.woff2") format("woff2");
}

/* ---------- Design tokens ---------- */
:root {
  --green-950: #0a1611;
  --green-900: #0f2a20;
  --green-800: #163a2b;
  --green-700: #1f4a37;
  --green-600: #2b5e46;

  --ivory: #faf6ee;
  --cream: #f3ebdb;
  --paper: #fffdf8;

  --gold-200: #f3e6c4;
  --gold-300: #ecd9a8;
  --gold-400: #dcc084;
  --gold-500: #c4a265;
  --gold-700: #85662f; /* teks emas di atas ivory (kontras ≥ 4.5:1) */

  --burgundy: #7c1f2d;
  --burgundy-500: #9a2b3c;

  --ink: #1b2a23;
  --ink-soft: #46564e;

  --font-serif: "Cormorant Garamond", "Cormorant", Garamond, Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 20px;
  --radius: 18px;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --shadow-card: 0 1px 2px rgba(15, 42, 32, .06), 0 12px 32px -14px rgba(15, 42, 32, .28);
  --focus: var(--gold-300);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-synthesis: none;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--green-950);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p,
ul,
figure,
blockquote {
  margin: 0;
}

svg {
  display: block;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

[tabindex="-1"]:focus {
  outline: none;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ivory);
  color: var(--green-900);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform .2s ease;
  --focus: var(--green-700);
}

.skip-link:focus {
  transform: none;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
}

.nowrap {
  white-space: nowrap;
}

/* ---------- Shared typography ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-700);
}

.eyebrow--light {
  color: var(--gold-300);
}

.section-title {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 9vw, 2.9rem);
  font-weight: 600;
  line-height: 1.08;
  color: var(--green-800);
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--gold-400);
}

.divider::before,
.divider::after {
  content: "";
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
}

.divider::after {
  transform: scaleX(-1);
}

.divider svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: .02em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background-color .25s ease;
  touch-action: manipulation;
}

.btn svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.btn--gold {
  color: var(--green-900);
  background: linear-gradient(180deg, #f0dfb2 0%, #d8b878 100%);
  box-shadow: 0 10px 30px -10px rgba(236, 200, 130, .65), inset 0 1px 0 rgba(255, 255, 255, .6);
}

.btn--green {
  color: var(--ivory);
  background: var(--green-800);
  box-shadow: 0 12px 28px -12px rgba(15, 42, 32, .7);
}

.btn--block {
  width: 100%;
}

@media (hover: hover) {
  .btn--gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -12px rgba(236, 200, 130, .8), inset 0 1px 0 rgba(255, 255, 255, .6);
  }

  .btn--green:hover {
    transform: translateY(-2px);
    background: var(--green-700);
    box-shadow: 0 18px 32px -14px rgba(15, 42, 32, .75);
  }
}

.btn:active {
  transform: translateY(1px) scale(.985);
}

/* ---------- Ambient decorations (shared) ---------- */
.ambient {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.stars i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s, 2px);
  height: var(--s, 2px);
  border-radius: 50%;
  background: #fff8e4;
  box-shadow: 0 0 6px 1px rgba(255, 236, 186, .7);
  opacity: .3;
  animation: twinkle var(--t, 4s) ease-in-out var(--d, 0s) infinite;
}

.sparkle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s, 12px);
  height: var(--s, 12px);
  fill: #fff4d6;
  opacity: .4;
  animation: twinkle var(--t, 5s) ease-in-out var(--d, 0s) infinite;
}

.snow i {
  position: absolute;
  top: -12px;
  left: var(--x);
  width: var(--s, 4px);
  height: var(--s, 4px);
  border-radius: 50%;
  background: #fffdf6;
  opacity: var(--o, .75);
  animation: snowfall var(--t, 14s) linear var(--d, 0s) infinite;
  will-change: transform;
}

/* Hentikan animasi dekoratif saat bagian tidak terlihat (hemat baterai) */
.is-offscreen .stars i,
.is-offscreen .sparkle,
.is-offscreen .snow i,
.is-offscreen .bauble,
.is-offscreen .motes i,
.is-offscreen .theme__rays,
.is-offscreen .flame,
.is-offscreen .candles__glow,
.is-offscreen .hero__star::before {
  animation-play-state: paused;
}

/* ==========================================================================
   A. HERO
   ========================================================================== */
.hero {
  --focus: var(--gold-300);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(clamp(36px, 7vh, 60px) + env(safe-area-inset-top)) var(--gutter) clamp(120px, 16vh, 200px);
  text-align: center;
  color: var(--ivory);
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(236, 217, 168, .14), transparent 70%),
    linear-gradient(180deg, #133628 0%, #0f2a20 45%, #0c2018 78%, var(--green-950) 100%);
}

.garland {
  position: absolute;
  top: -4px;
  width: clamp(146px, 40vw, 300px);
  height: auto;
}

.garland--left {
  left: -6px;
}

.garland--right {
  right: -6px;
  transform: scaleX(-1);
}

.bauble {
  position: absolute;
  top: 0;
  left: var(--x);
  width: var(--w, 26px);
  margin-left: calc(var(--w, 26px) / -2);
  transform-origin: 50% 0;
  animation: swing var(--t, 5s) ease-in-out var(--d, 0s) infinite alternate;
}

.bauble::before {
  content: "";
  display: block;
  width: 1px;
  height: var(--len, 60px);
  margin: 0 auto;
  background: linear-gradient(rgba(220, 192, 132, .15), rgba(220, 192, 132, .85));
}

.bauble svg {
  width: 100%;
  height: auto;
  margin-top: -1px;
}

.bauble--wide {
  display: none;
}

@media (min-width: 480px) {
  .bauble--wide {
    display: block;
  }
}

.forest {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: clamp(150px, 22vw, 240px);
}

.forest__back {
  fill: #163d2c;
}

.forest__front {
  fill: var(--green-950);
}

.hero__content {
  position: relative;
  width: 100%;
  max-width: 34rem;
  margin: auto; /* tengah vertikal, tetap aman bila konten lebih tinggi dari layar */
}

/* Halaman pembuka terkunci: tepat satu layar penuh, tidak bisa di-scroll
   sampai "Buka Undangan" ditekan (kelas dipasang oleh skrip di <head>). */
html.is-locked,
html.is-locked body {
  overflow: hidden;
  overscroll-behavior: none;
}

html.is-locked .hero {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto; /* cadangan untuk layar yang sangat pendek (mis. landscape) */
  scrollbar-width: none;
}

html.is-locked .hero::-webkit-scrollbar {
  display: none;
}

.hero__content > * {
  animation: rise 1s var(--ease-out) both;
}

.hero__content > :nth-child(2) { animation-delay: .08s; }
.hero__content > :nth-child(3) { animation-delay: .16s; }
.hero__content > :nth-child(4) { animation-delay: .24s; }
.hero__content > :nth-child(5) { animation-delay: .32s; }
.hero__content > :nth-child(6) { animation-delay: .4s; }

.hero__star {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
}

.hero__star::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 190, .42) 0%, rgba(236, 200, 130, .14) 30%, transparent 64%);
  animation: breathe 6s ease-in-out infinite;
}

.hero__star svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 10px rgba(255, 226, 160, .55));
}

.hero__title {
  margin: 14px 0 20px;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.02;
}

.hero__title-main {
  display: block;
  font-size: clamp(2.55rem, min(11.6vw, 8.6vh), 4.9rem);
  color: var(--ivory);
  text-shadow: 0 2px 24px rgba(0, 0, 0, .3);
}

.hero__title-family {
  display: block;
  margin-top: .1em;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.05rem, min(9.2vw, 6.6vh), 3.8rem);
  color: var(--gold-300);
}

.hero__title-region {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold-200);
}

.hero__title-region::before,
.hero__title-region::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.hero__lead {
  max-width: 30rem;
  margin: 0 auto;
  font-size: clamp(1rem, 4.2vw, 1.125rem);
  line-height: 1.7;
  color: rgba(250, 246, 238, .9);
  text-wrap: pretty;
}

.hero__date {
  margin: 26px auto 28px;
  line-height: 1.25;
}

.hero__date-day {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-300);
}

.hero__date-day::before,
.hero__date-day::after {
  content: "";
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-400));
}

.hero__date-day::after {
  transform: scaleX(-1);
}

.hero__date-full {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 7.4vw, 2.3rem);
  font-weight: 600;
  color: var(--ivory);
}

.hero__date-time {
  display: block;
  margin-top: 4px;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: rgba(250, 246, 238, .86);
}

.hero__cta svg {
  width: 18px;
  height: 18px;
  animation: nudge 2.4s ease-in-out 1.6s infinite;
}

/* ==========================================================================
   B. TEMA NATAL — cahaya menyinari kegelapan
   ========================================================================== */
.theme {
  --focus: var(--gold-300);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 76px var(--gutter) 150px;
  text-align: center;
  color: var(--ivory);
  background: var(--green-950);
}

.theme__glow,
.theme__rays {
  position: absolute;
  left: 50%;
  top: 44%;
  border-radius: 50%;
}

.theme__glow {
  width: 1000px;
  height: 1000px;
  margin: -500px 0 0 -500px;
  background: radial-gradient(circle, rgba(255, 241, 208, .5) 0%, rgba(245, 214, 150, .22) 17%, rgba(200, 160, 90, .08) 38%, transparent 62%);
}

.theme__rays {
  width: 900px;
  height: 900px;
  margin: -450px 0 0 -450px;
  background: repeating-conic-gradient(from 0deg, rgba(255, 228, 170, .09) 0deg 3deg, transparent 3deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 8%, transparent 62%);
  mask-image: radial-gradient(circle, #000 8%, transparent 62%);
  animation: spin 160s linear infinite;
}

/* Cahaya mulai redup, lalu perlahan bersinar ketika bagian ini terlihat */
.js .theme__glow {
  opacity: 0;
  transform: scale(.18);
  transition: opacity 2.6s ease, transform 3.6s var(--ease-out);
}

.js .theme__rays {
  opacity: 0;
  transition: opacity 3s ease 1s;
}

.js .theme.is-visible .theme__glow {
  opacity: 1;
  transform: none;
}

.js .theme.is-visible .theme__rays {
  opacity: 1;
}

.motes i {
  position: absolute;
  bottom: 0;
  left: var(--x);
  width: var(--s, 3px);
  height: var(--s, 3px);
  border-radius: 50%;
  background: #ffe9b8;
  box-shadow: 0 0 8px 2px rgba(255, 220, 150, .55);
  opacity: 0;
  animation: mote var(--t, 12s) linear var(--d, 0s) infinite;
}

.theme__content {
  position: relative;
  max-width: 40rem;
  margin: 0 auto;
}

.theme__star {
  width: 26px;
  height: 26px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 0 8px rgba(255, 226, 160, .6));
}

.theme__quote {
  max-width: 11em;
  margin: 18px auto 0;
  font-family: var(--font-serif);
  font-size: clamp(2.05rem, 9.2vw, 4.3rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.1;
  color: #fff6e0;
  text-shadow: 0 0 30px rgba(255, 214, 140, .45), 0 0 2px rgba(255, 240, 210, .35);
  text-wrap: balance;
}

.theme .divider {
  margin: 32px auto 28px;
}

.theme__label {
  margin-bottom: 12px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-300);
}

.theme__sub {
  max-width: 24ch;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 6vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ivory);
  text-wrap: balance;
}

.theme__ref {
  display: block;
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--gold-300);
}

.theme__reading {
  max-width: 30rem;
  margin: 30px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(220, 192, 132, .22);
  font-size: .92rem;
  line-height: 1.6;
  color: rgba(250, 246, 238, .8);
}

.theme__reading span {
  display: block;
  margin-bottom: 4px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold-300);
}

/* ==========================================================================
   C. DETAIL ACARA
   ========================================================================== */
.details {
  --focus: var(--green-700);
  position: relative;
  z-index: 1;
  margin-top: -56px;
  padding: 72px var(--gutter) 44px;
  background: var(--ivory);
  border-radius: 50% 50% 0 0 / 56px 56px 0 0;
  box-shadow: 0 -26px 60px -20px rgba(255, 220, 150, .5);
}

.section-head {
  margin-bottom: 30px;
  text-align: center;
}

.info-list {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid rgba(196, 162, 101, .38);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}

@media (hover: hover) {
  .info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 1px 2px rgba(15, 42, 32, .06), 0 18px 36px -16px rgba(15, 42, 32, .32);
  }
}

.info-card__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--gold-300);
  background: radial-gradient(circle at 30% 25%, var(--green-600), var(--green-800) 70%);
  box-shadow: inset 0 0 0 1px rgba(220, 192, 132, .45);
}

.info-card__icon svg {
  width: 22px;
  height: 22px;
}

.info-card__label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-700);
}

.info-card__value {
  margin-top: 4px;
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.4;
  color: var(--ink);
}

.info-card__value--address {
  font-size: 1.02rem;
  font-weight: 550;
  line-height: 1.55;
}

.details__actions {
  margin-top: 22px;
}

.details__actions .btn {
  padding-inline: 20px;
}

.countdown {
  margin-top: 34px;
  padding: 22px 16px 18px;
  text-align: center;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--green-800), var(--green-900));
  color: var(--ivory);
  box-shadow: var(--shadow-card);
}

.countdown__title {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold-300);
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px auto 0;
  max-width: 22rem;
}

.countdown__unit {
  padding: 10px 4px;
  border: 1px solid rgba(220, 192, 132, .3);
  border-radius: 12px;
  background: rgba(10, 22, 17, .35);
}

.countdown__num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1;
  color: var(--gold-200);
  font-variant-numeric: tabular-nums lining-nums;
}

.countdown__lbl {
  display: block;
  margin-top: 6px;
  font-size: .78rem;
  font-weight: 500;
  color: rgba(250, 246, 238, .85);
}

.countdown__msg {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold-200);
}

/* ==========================================================================
   D. PESAN UNDANGAN
   ========================================================================== */
.message {
  --focus: var(--green-700);
  position: relative;
  z-index: 1;
  padding: 36px var(--gutter) 96px;
  background: linear-gradient(180deg, var(--ivory) 0%, var(--cream) 100%);
  border-radius: 0 0 50% 50% / 0 0 56px 56px;
}

.letter {
  position: relative;
  padding: 58px 22px 40px;
  text-align: center;
  background: var(--paper);
  border: 1px solid rgba(196, 162, 101, .42);
  border-radius: 26px;
  box-shadow: var(--shadow-card);
}

.letter::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(196, 162, 101, .3);
  border-radius: 20px;
  pointer-events: none;
}

.letter__sprig {
  position: absolute;
  top: -26px;
  left: 50%;
  width: 132px;
  height: auto;
  margin-left: -66px;
  animation: float 6s ease-in-out infinite;
}

.letter__body {
  display: grid;
  gap: 18px;
  margin-top: 20px;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 5.2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
  text-wrap: pretty;
}

.letter__body p:last-child {
  color: var(--green-700);
}

/* ==========================================================================
   E. PENUTUP
   ========================================================================== */
.closing {
  --focus: var(--gold-300);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: -56px;
  padding: 128px var(--gutter) calc(40px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--ivory);
  background:
    radial-gradient(80% 50% at 50% 62%, rgba(236, 200, 130, .16), transparent 70%),
    linear-gradient(180deg, #0c2018 0%, var(--green-900) 45%, var(--green-950) 100%);
}

.closing__star {
  width: 34px;
  height: 34px;
  margin: 0 auto 22px;
  filter: drop-shadow(0 0 10px rgba(255, 226, 160, .55));
}

.closing__blessing {
  max-width: 22ch;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 7vw, 2.3rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ivory);
  text-wrap: balance;
}

.closing__title {
  margin-top: 26px;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 11.5vw, 4.4rem);
  font-weight: 600;
  line-height: 1.04;
  color: var(--gold-300);
  text-shadow: 0 0 34px rgba(255, 214, 140, .4);
}

.closing__title span {
  display: block;
}

.closing__title .amp {
  display: inline;
  font-style: italic;
  font-weight: 500;
  color: var(--gold-400);
}

.candles {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  height: 150px;
  margin: 40px auto 0;
}

.candles__glow {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: -1;
  width: 300px;
  height: 300px;
  margin-left: -150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 130, .34) 0%, rgba(255, 190, 100, .1) 38%, transparent 66%);
  animation: breathe 4.5s ease-in-out infinite;
}

.candle {
  position: relative;
  width: var(--w, 22px);
  height: var(--h, 80px);
  border-radius: 4px 4px 3px 3px;
  background: linear-gradient(90deg, #d8c6a0 0%, #fff8e9 38%, #f4e8cf 62%, #cdb991 100%);
  box-shadow: inset 0 6px 6px -4px rgba(255, 255, 255, .7), 0 0 18px rgba(255, 200, 120, .18);
}

.candle::before {
  /* sumbu */
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 2px;
  height: 8px;
  margin-left: -1px;
  border-radius: 1px;
  background: #3b2c1c;
}

.flame {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  width: 12px;
  height: 24px;
  margin-left: -6px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 72%, #fffef6 0%, #fff0b8 24%, #ffc561 52%, rgba(255, 150, 50, .2) 76%, transparent 80%);
  box-shadow: 0 0 14px 4px rgba(255, 196, 100, .45);
  transform-origin: 50% 90%;
  animation: flicker var(--t, 2.6s) ease-in-out var(--d, 0s) infinite alternate;
}

.candles__holly {
  position: absolute;
  bottom: -14px;
  left: 50%;
  width: 190px;
  margin-left: -95px;
}

.inviter {
  margin-top: 36px;
}

.inviter__label {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 500;
  color: rgba(250, 246, 238, .82);
}

.inviter__name {
  margin-top: 6px;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold-200);
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(220, 192, 132, .16);
  font-size: .82rem;
  color: rgba(250, 246, 238, .72);
}

.site-footer__credit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  letter-spacing: .02em;
}

.site-footer__made {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.site-footer__credit svg {
  color: #d65a64;
  filter: drop-shadow(0 0 4px rgba(214, 90, 100, .45));
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--gold-200);
}

.back-to-top svg {
  width: 16px;
  height: 16px;
}

@media (hover: hover) {
  .back-to-top:hover {
    background: rgba(220, 192, 132, .12);
  }
}

/* ==========================================================================
   Tombol musik
   ========================================================================== */
.music {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.music-toggle {
  --focus: var(--gold-300);
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1.5px solid var(--gold-400);
  border-radius: 50%;
  color: var(--gold-300);
  background: rgba(15, 42, 32, .94);
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .5);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .25s var(--ease-out), background-color .25s ease, color .25s ease;
}

.music-toggle:active {
  transform: scale(.94);
}

.music-toggle svg {
  width: 24px;
  height: 24px;
}

.music-toggle[aria-pressed="true"] {
  color: var(--green-900);
  background: linear-gradient(180deg, #f0dfb2, #d8b878);
  border-color: #f3e6c4;
}

.music-toggle[aria-pressed="true"]::after {
  /* cincin lembut saat musik aktif */
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(220, 192, 132, .6);
  border-radius: 50%;
  animation: ring 2.4s ease-out infinite;
}

.music-toggle .icon-on,
.music-toggle[aria-pressed="true"] .icon-off {
  display: none;
}

.music-toggle[aria-pressed="true"] .icon-on {
  display: block;
}

.icon-on rect {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: eq 1s ease-in-out infinite alternate;
}

.icon-on rect:nth-child(2) { animation-delay: -.35s; }
.icon-on rect:nth-child(3) { animation-delay: -.7s; }
.icon-on rect:nth-child(4) { animation-delay: -.15s; }

.music-hint {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--green-900);
  background: var(--ivory);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .45);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .5s ease, transform .5s var(--ease-out);
  pointer-events: none;
}

.music-hint.is-shown {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Reveal on scroll (hanya bila JavaScript aktif)
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: .25;
    transform: scale(.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes snowfall {
  0% {
    transform: translate3d(0, -2vh, 0);
  }
  50% {
    transform: translate3d(var(--dx, 24px), 50vh, 0);
  }
  100% {
    transform: translate3d(0, 104vh, 0);
  }
}

@keyframes swing {
  from { transform: rotate(-5deg); }
  to { transform: rotate(5deg); }
}

@keyframes breathe {
  0%, 100% {
    opacity: .75;
    transform: scale(.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes mote {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }
  15% { opacity: .9; }
  80% { opacity: .5; }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx, 16px), -520px, 0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes nudge {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(3px); }
}

@keyframes flicker {
  0% {
    opacity: .92;
    transform: scale(1, 1) rotate(-1.5deg);
  }
  50% {
    opacity: 1;
    transform: scale(.94, 1.08) rotate(1deg);
  }
  100% {
    opacity: .96;
    transform: scale(1.03, .95) rotate(-.5deg);
  }
}

@keyframes ring {
  from {
    opacity: .9;
    transform: scale(.92);
  }
  to {
    opacity: 0;
    transform: scale(1.25);
  }
}

@keyframes eq {
  from { transform: scaleY(.35); }
  to { transform: scaleY(1); }
}

/* ==========================================================================
   Responsive — tablet & desktop
   ========================================================================== */
@media (min-width: 600px) {
  :root {
    --gutter: 32px;
  }

  .info-list {
    grid-template-columns: 1fr 1fr;
  }

  .info-card--wide {
    grid-column: 1 / -1;
  }

  .details__actions .btn {
    width: auto;
    min-width: 320px;
  }

  .details__actions {
    text-align: center;
  }

  .letter {
    padding: 66px 48px 48px;
  }
}

@media (min-width: 900px) {
  .details {
    margin-top: -72px;
    padding-top: 96px;
    border-radius: 50% 50% 0 0 / 72px 72px 0 0;
  }

  .theme {
    padding-top: 110px;
    padding-bottom: 190px;
  }

  .message {
    padding-bottom: 120px;
    border-radius: 0 0 50% 50% / 0 0 72px 72px;
  }

  .closing {
    margin-top: -72px;
    padding-top: 160px;
  }

  .hero__star {
    width: 66px;
    height: 66px;
  }

  .details .container {
    max-width: 760px;
  }
}

/* Ponsel dengan layar pendek: rapatkan hero agar tombol tetap terlihat */
@media (max-height: 700px) and (max-width: 599px) {
  .hero {
    padding-top: calc(36px + env(safe-area-inset-top));
    padding-bottom: 104px;
  }

  .hero__star {
    width: 46px;
    height: 46px;
    margin-bottom: 12px;
  }

  .hero__title {
    margin: 10px 0 14px;
  }

  .hero__title-region {
    margin-top: 10px;
  }

  .hero__lead {
    font-size: .95rem;
    line-height: 1.6;
  }

  .hero__date {
    margin: 18px auto 20px;
  }

  .bauble::before {
    height: 34px;
  }
}

@media (max-height: 600px) and (max-width: 599px) {
  .hero {
    padding-top: calc(24px + env(safe-area-inset-top));
    padding-bottom: 76px;
  }

  .hero__star {
    width: 34px;
    height: 34px;
    margin-bottom: 6px;
  }

  .hero__title-main {
    font-size: 2.35rem;
  }

  .hero__title-family {
    font-size: 1.85rem;
  }

  .hero__lead {
    line-height: 1.5;
  }

  .hero__date {
    margin: 14px auto 16px;
  }

  .hero__date-full {
    font-size: 1.6rem;
  }
}

/* Layar landscape pendek (ponsel diputar) */
@media (orientation: landscape) and (max-height: 520px) {
  .hero {
    padding-top: 40px;
    padding-bottom: 72px;
  }
}

/* ==========================================================================
   Aksesibilitas — kurangi gerakan
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }

  .snow,
  .motes {
    display: none;
  }

  .js .reveal {
    transform: none;
  }

  .stars i,
  .sparkle {
    opacity: .7;
  }
}

/* Cetak: tampilkan semua konten apa adanya */
@media print {
  .music,
  .ambient,
  .skip-link {
    display: none !important;
  }

  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
