/* ============================================================
   Wedding Invitation - Hendra & Juliani
   Style: Chinese Elegant Premium (merah / gold / cream)
   Animation system adapted from viding.co: data-anim + .has-animate
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --crimson:        #8B1A1A;
  --crimson-deep:   #5C0F0F;
  --gold:           #C9A24B;
  --gold-bright:    #E6C97A;
  --gold-dark:      #A8802F;
  --gold-border:    #D4B87A;
  --cream:          #FAF6EE;
  --cream-2:        #F2EAD8;
  --cream-on-red:   #F5E6C8;
  --ink:            #2A1A12;
  --tea:            #6B5848;
  --white:          #FFFFFF;

  --ff-heading:  'Playfair Display', Georgia, serif;
  --ff-body:     'Cormorant Garamond', Georgia, serif;
  --ff-script:   'Great Vibes', cursive;
  --ff-cn:       'Noto Serif SC', serif;
  --ff-ui:       'Inter', system-ui, sans-serif;

  --container:   640px;
  --container-wide: 1080px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --anim-dur:    1600ms;
  --anim-ease:   ease-in-out;

  --gold-foil: 0 0 0.5px rgba(201,162,75,0.5), 0 1px 8px rgba(201,162,75,0.25);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  font-size: clamp(1rem, 2.6vw, 1.125rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* Body lock before opening */
body.locked { overflow: hidden; height: 100vh; }

/* ---------- Container ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 560px; }
@media (min-width: 768px) { .container { padding: 0 40px; } }

/* ============================================================
   PROGRESS BAR (viding.co pattern)
   ============================================================ */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 1200; background: transparent;
  pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0); transform-origin: 0 50%;
  will-change: transform;
}

/* ============================================================
   LOADER
   ============================================================ */
.loader {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 18px;
  transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}
.loader.hide { opacity: 0; visibility: hidden; }
.loader-ring {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid rgba(201,162,75,0.2);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}
.loader-xi {
  font-family: var(--ff-cn); font-weight: 700;
  font-size: 2rem; color: var(--gold);
  text-shadow: var(--gold-foil);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.5; transform: scale(0.92); } }

/* ============================================================
   COVER (Section 1) - viding.co envelope-open pattern
   position:fixed; slide up translateY(-100%) on .cover-opened
   ============================================================ */
.cover {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: transform 1s var(--ease), opacity 1s var(--ease);
  will-change: transform;
}
.cover.cover-opened {
  transform: translateY(-100%);
  pointer-events: none;
}
.cover-bg-pattern {
  position: absolute; inset: 0;
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 30% 20%, rgba(139,26,26,0.04), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(201,162,75,0.06), transparent 50%);
}
/* moromoroit cover texture overlay: subtle huiwen pattern over solid bg
   gives "premium printed card" feel without a photo asset */
.cover-bg-texture {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><g fill='none' stroke='%23C9A24B' stroke-width='0.5' opacity='0.5'><path d='M40 10 C 30 18 30 30 40 40 C 50 30 50 18 40 10 Z'/><path d='M40 40 C 18 30 18 50 40 40 C 30 62 50 62 40 40 Z'/><path d='M40 40 C 50 50 62 50 62 40 C 50 30 50 18 40 40 Z'/><path d='M40 40 C 30 50 30 62 40 72 C 50 62 50 50 40 40 Z'/></g></svg>");
  background-size: 80px 80px;
  opacity: 0.10;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.cover-ornaments { position: absolute; inset: 0; pointer-events: none; }
.cover-orn {
  position: absolute; color: var(--gold); opacity: 0.45;
  width: clamp(120px, 22vw, 220px); height: auto;
}
.cover-orn-dragon { left: 2%; top: 18%; transform: rotate(-8deg); }
.cover-orn-phoenix { right: 2%; top: 18%; transform: rotate(8deg) scaleX(-1); }
.cover-orn-cloud-tl { left: -4%; top: -4%; width: clamp(140px, 28vw, 260px); opacity: 0.3; }
.cover-orn-cloud-br { right: -4%; bottom: -4%; width: clamp(140px, 28vw, 260px); opacity: 0.3; transform: rotate(180deg); }

/* Frame corner ornaments on cover */
.cover-frame { position: absolute; inset: 18px; pointer-events: none; }
.cover-frame span { position: absolute; width: clamp(40px, 9vw, 70px); height: clamp(40px, 9vw, 70px); color: var(--gold); }
.cover-frame svg { width: 100%; height: 100%; }
.cover-frame-tl { top: 0; left: 0; }
.cover-frame-tr { top: 0; right: 0; transform: scaleX(-1); }
.cover-frame-bl { bottom: 0; left: 0; transform: scaleY(-1); }
.cover-frame-br { bottom: 0; right: 0; transform: scale(-1); }

.cover-inner {
  position: relative; z-index: 2;
  text-align: center;
  padding: 24px;
  max-width: 560px;
}
.cover-deco {
  font-family: var(--ff-cn); font-weight: 700;
  font-size: clamp(3.5rem, 12vw, 6rem);
  color: var(--gold);
  text-shadow: var(--gold-foil);
  line-height: 1; margin-bottom: 18px;
}
.cover-names {
  font-family: var(--ff-heading); font-weight: 500;
  font-size: clamp(2.2rem, 8vw, 3.8rem);
  color: var(--crimson);
  letter-spacing: 0.02em; line-height: 1.05;
  display: flex; flex-direction: column; align-items: center; gap: 0.1em;
}
.cover-amp {
  font-family: var(--ff-script);
  font-size: clamp(1.8rem, 6vw, 3rem);
  color: var(--gold);
  line-height: 1; transform: translateY(-0.1em);
}
.cover-tagline {
  font-family: var(--ff-script);
  font-size: clamp(1.4rem, 4.2vw, 2.2rem);
  color: var(--crimson);
  margin: 18px 0 14px; line-height: 1.3;
}
.cover-subtitle {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin-bottom: 12px;
}
.cover-subtitle span:first-child {
  font-family: var(--ff-ui); font-weight: 500;
  font-size: clamp(0.7rem, 2vw, 0.85rem);
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold-dark);
}
.cover-subtitle-cn {
  font-family: var(--ff-cn); font-weight: 500;
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--gold);
}
.cover-date {
  font-family: var(--ff-body); font-size: clamp(1rem, 3vw, 1.2rem);
  color: var(--tea); margin-bottom: 28px;
  letter-spacing: 0.04em;
}
.cover-btn-wrap { margin: 0 auto 28px; }
.btn-open {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 36px;
  background: var(--crimson);
  color: var(--cream-on-red);
  font-family: var(--ff-ui); font-weight: 500;
  font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.4s var(--ease);
  box-shadow: 0 6px 20px rgba(139,26,26,0.25);
  z-index: 1;
  min-height: 48px;
}
.btn-open:hover, .btn-open:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 28px rgba(139,26,26,0.35);
  background: var(--crimson-deep);
  outline: none;
}
.btn-open:active { transform: translateY(0) scale(0.99); }
.btn-open-ring {
  position: absolute; inset: -6px; border-radius: 999px;
  border: 1px solid var(--gold);
  opacity: 0; animation: btnRing 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes btnRing {
  0% { opacity: 0.6; transform: scale(0.96); }
  100% { opacity: 0; transform: scale(1.18); }
}
/* moromoroit shake: subtle attention pulse on the CTA. Stops on hover/focus. */
.btn-open:not(:hover):not(:focus-visible) {
  animation: btnShake 2.4s ease-in-out infinite;
  animation-delay: 1.8s;
}
@keyframes btnShake {
  0%, 100% { transform: translateY(0); }
  20% { transform: translateY(-3px); }
  40% { transform: translateY(2px); }
  60% { transform: translateY(-2px); }
  80% { transform: translateY(1px); }
}

/* mouse scroll indicator (viding.co pattern) */
.cover-mouse {
  display: flex; justify-content: center;
  opacity: 0.7;
}
.mouse {
  width: 22px; height: 36px; border-radius: 12px;
  border: 1.5px solid var(--gold);
  position: relative; display: block;
}
.wheel {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 7px; border-radius: 2px;
  background: var(--gold);
  animation: mouseWheel 1.6s ease-in-out infinite;
}
@keyframes mouseWheel {
  0% { opacity: 0; top: 5px; }
  40% { opacity: 1; }
  100% { opacity: 0; top: 18px; }
}

/* ============================================================
   MAIN APP (hidden until opened)
   ============================================================ */
.main-app {
  position: relative; z-index: 1;
  background: var(--cream);
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}
.main-app.opened { opacity: 1; }

/* ============================================================
   SECTION BASE
   ============================================================ */
.section {
  position: relative;
  padding: clamp(60px, 12vw, 110px) 0;
  overflow: hidden;
}
/* kekondangan-inspired: bolder huiwen (key-fret) pattern tile, visible at 0.18 opacity.
   stroke-width 1.2 + double spiral = bolder than previous cloud motif (0.12). */
.section-bg-pattern {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><g fill='none' stroke='%23C9A24B' stroke-width='1.2' stroke-linecap='square' stroke-linejoin='miter' opacity='0.85'><path d='M10 10 L90 10 L90 90 L10 90 L10 24 L76 24 L76 76 L24 76 L24 38 L62 38 L62 62 L38 62 L38 50 L50 50'/><path d='M50 50 L50 50'/><circle cx='50' cy='50' r='2' fill='%23C9A24B' stroke='none'/></g></svg>");
  background-size: 100px 100px;
  opacity: 0.18;
  pointer-events: none; z-index: 0;
}
/* Dark sections (pembukaan, countdown, footer) use gold-tinted pattern, slightly stronger */
.section-pembukaan .section-bg-pattern,
.section-countdown .section-bg-pattern,
.section-footer .section-bg-pattern {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><g fill='none' stroke='%23E6C97A' stroke-width='1.3' stroke-linecap='square' stroke-linejoin='miter' opacity='0.9'><path d='M10 10 L90 10 L90 90 L10 90 L10 24 L76 24 L76 76 L24 76 L24 38 L62 38 L62 62 L38 62 L38 50 L50 50'/><circle cx='50' cy='50' r='2.5' fill='%23E6C97A' stroke='none'/></g></svg>");
  opacity: 0.16;
}
.section > .container { position: relative; z-index: 2; }

/* ============================================================
   ORNAMENT FILLERS (kekondangan-inspired: every section non-empty)
   corner ornaments at section corners, side ornaments, divider accents.
   ============================================================ */
.section-corners {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
}
.section-corners span {
  position: absolute; width: clamp(34px, 7vw, 52px); height: clamp(34px, 7vw, 52px);
  color: var(--gold); opacity: 0.5;
}
.section-corners svg { width: 100%; height: 100%; }
.section-corners .sc-tl { top: 14px; left: 14px; }
.section-corners .sc-tr { top: 14px; right: 14px; transform: scaleX(-1); }
.section-corners .sc-bl { bottom: 14px; left: 14px; transform: scaleY(-1); }
.section-corners .sc-br { bottom: 14px; right: 14px; transform: scale(-1); }
/* On dark sections, ornaments use brighter gold */
.section-pembukaan .section-corners span,
.section-countdown .section-corners span,
.section-footer .section-corners span { color: var(--gold-bright); opacity: 0.55; }

/* Side ornament fillers (vertical, left/right edge mid-section) */
.section-side-orn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: clamp(60px, 12vw, 90px); color: var(--gold);
  opacity: 0.28; pointer-events: none; z-index: 1;
}
.section-side-orn svg { width: 100%; height: auto; }
.section-side-orn-left { left: 6px; }
.section-side-orn-right { right: 6px; transform: translateY(-50%) scaleX(-1); }
.section-pembukaan .section-side-orn,
.section-countdown .section-side-orn,
.section-footer .section-side-orn { color: var(--gold-bright); opacity: 0.32; }

/* kekondangan-inspired: stronger hierarchy contrast.
   deco bigger (was 2.5-4rem -> 3-4.6rem), title holds, deco opacity full.
   Creates clear 3-layer: deco CN char (big) > title serif (med) > body (sm). */
.section-deco {
  font-family: var(--ff-cn); font-weight: 700;
  font-size: clamp(3rem, 8.5vw, 4.6rem);
  color: var(--gold);
  text-shadow: var(--gold-foil);
  text-align: center; line-height: 1; margin-bottom: 12px;
  opacity: 1;
}
.section-title {
  font-family: var(--ff-heading); font-weight: 500;
  font-size: clamp(1.9rem, 5.4vw, 2.8rem);
  color: var(--crimson);
  text-align: center; letter-spacing: 0.02em;
  line-height: 1.2;
}
.section-title-sm {
  font-family: var(--ff-heading); font-weight: 500;
  font-size: clamp(1.25rem, 3.6vw, 1.6rem);
  color: var(--crimson);
  text-align: center; letter-spacing: 0.02em; margin-bottom: 14px;
}
.section-title-light { color: var(--gold-bright); }
.section-deco-light { color: var(--gold-bright); }

/* Dividers - kekondangan pattern: 20% relative width centered, thin */
.divider { display: flex; align-items: center; justify-content: center; margin: 16px auto 26px; width: 22%; min-width: 90px; max-width: 240px; }
.divider-gold span {
  display: block; height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
}
.divider-gold-light span {
  display: block; height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, rgba(245,230,200,0.55), transparent);
}
.divider-cloud { color: var(--gold); width: 120px; height: 36px; margin: 16px auto 0; opacity: 0.75; }
.divider-cloud svg { width: 100%; height: 100%; }

/* ============================================================
   Section 2: Pembukaan (Buddha) - dark red panel
   ============================================================ */
.section-pembukaan {
  background: var(--crimson-deep);
  color: var(--cream-on-red);
}
/* pembukaan uses the dark-section huiwen pattern (defined in .section-bg-pattern
   dark override above) + subtle gold radial glow layered on top via ::after */
.section-pembukaan::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(201,162,75,0.1), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(201,162,75,0.08), transparent 45%);
}
.pembukaan-orn {
  position: absolute; left: 50%; transform: translateX(-50%);
  color: var(--gold); width: clamp(70px, 16vw, 110px);
  opacity: 0.6; z-index: 1;
}
.pembukaan-orn-top { top: clamp(20px, 5vw, 40px); }
.pembukaan-orn-bottom { bottom: clamp(20px, 5vw, 40px); transform: translateX(-50%) rotate(180deg); }
.pembukaan-quote p {
  font-family: var(--ff-body); font-style: italic; font-weight: 500;
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  color: var(--cream-on-red);
  text-align: center; line-height: 1.45;
  margin: 6px 0 20px;
}
.pembukaan-translate {
  text-align: center; font-size: clamp(1.05rem, 3vw, 1.2rem);
  color: var(--gold-bright); margin-bottom: 18px;
  font-style: italic;
}
.pembukaan-body {
  text-align: center; max-width: 460px; margin: 0 auto;
  color: rgba(245,230,200,0.85); line-height: 1.85;
}

/* ============================================================
   Section 3: Greeting card
   ============================================================ */
.section-greeting { background: var(--cream-2); padding: clamp(50px, 10vw, 80px) 0; }
.greeting-card {
  background: var(--white);
  border: 1px solid var(--gold-border);
  padding: clamp(28px, 6vw, 44px) clamp(20px, 5vw, 36px);
  text-align: center;
  box-shadow: 0 12px 40px rgba(92,15,15,0.08);
  position: relative;
}
.greeting-card::before, .greeting-card::after {
  content: ''; position: absolute; width: 30px; height: 30px;
  border: 1px solid var(--gold);
}
.greeting-card::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.greeting-card::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.greeting-line { font-size: clamp(1rem, 3vw, 1.15rem); color: var(--tea); margin: 2px 0; }
.greeting-name {
  font-family: var(--ff-heading); font-weight: 500;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  color: var(--crimson); margin: 12px 0 8px;
  word-break: break-word;
}

/* ============================================================
   Section 4: Couple
   ============================================================ */
.section-couple { background: var(--cream); }
/* moromoroit falling petals canvas overlay */
.petal-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}
.couple-grid {
  display: grid; grid-template-columns: 1fr; gap: 36px;
  margin-top: 30px; align-items: start; position: relative;
}
@media (min-width: 720px) {
  .couple-grid { grid-template-columns: 1fr auto 1fr; gap: 24px; }
}
.couple-card { position: relative; text-align: center; padding: 20px 8px; }
.couple-orn {
  position: absolute; top: -10px; width: clamp(70px, 18vw, 120px);
  color: var(--gold); opacity: 0.55; pointer-events: none;
}
.couple-orn-dragon { left: -6px; transform: rotate(-10deg); }
.couple-orn-phoenix { right: -6px; transform: rotate(10deg) scaleX(-1); }
.couple-frame {
  position: relative; width: clamp(120px, 30vw, 160px); aspect-ratio: 3/4;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-deep));
  border: 2px solid var(--gold);
  box-shadow: 0 8px 24px rgba(92,15,15,0.2), inset 0 0 0 6px var(--cream);
  display: flex; align-items: center; justify-content: center;
}
.couple-frame-corner { position: absolute; width: 24px; height: 24px; color: var(--gold-bright); }
.couple-frame-corner.tl { top: -2px; left: -2px; }
.couple-frame-corner.tr { top: -2px; right: -2px; transform: scaleX(-1); }
.couple-frame-corner.bl { bottom: -2px; left: -2px; transform: scaleY(-1); }
.couple-frame-corner.br { bottom: -2px; right: -2px; transform: scale(-1); }
.couple-frame-corner svg { width: 100%; height: 100%; }
.couple-monogram {
  font-family: var(--ff-heading); font-weight: 600;
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  color: var(--gold-bright);
  text-shadow: var(--gold-foil);
}
.couple-label {
  font-family: var(--ff-ui); font-weight: 500;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: 4px;
}
.couple-name {
  font-family: var(--ff-heading); font-weight: 500;
  font-size: clamp(1.8rem, 5.5vw, 2.4rem);
  color: var(--crimson); line-height: 1.15; margin-bottom: 2px;
}
.couple-nickname {
  font-family: var(--ff-body); font-style: italic;
  color: var(--tea); font-size: 1.1rem; margin-bottom: 8px;
}
.couple-desc { color: var(--ink); line-height: 1.6; font-size: 1rem; }
.couple-amp {
  display: flex; align-items: center; justify-content: center;
  min-height: 60px;
}
.couple-amp-cn {
  font-family: var(--ff-cn); font-weight: 700;
  font-size: clamp(2.5rem, 9vw, 4rem);
  color: var(--gold); text-shadow: var(--gold-foil);
}
@media (max-width: 719px) {
  .couple-amp { order: 2; }
  .couple-card:first-of-type { order: 1; }
  .couple-card:last-of-type { order: 3; }
}

/* ============================================================
   Section 5: Ucapan
   ============================================================ */
.section-ucapan { background: var(--cream-2); }
.ucapan-orn {
  position: absolute; top: 8%; right: -10px;
  width: clamp(140px, 30vw, 220px); color: var(--gold);
  opacity: 0.35; pointer-events: none; z-index: 1;
  transform: rotate(12deg);
}
.ucapan-body { max-width: 540px; margin: 0 auto; }
.ucapan-body p {
  margin-bottom: 18px; line-height: 1.85;
  text-align: justify; color: var(--ink);
}
.ucapan-body p:last-child { margin-bottom: 0; }
.ucapan-signature {
  font-family: var(--ff-script);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--gold-dark);
  text-align: center; margin-top: 24px;
}

/* ============================================================
   Section 6: Acara
   ============================================================ */
.section-acara { background: var(--cream); }
.acara-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px;
  margin-top: 28px;
}
@media (min-width: 720px) { .acara-grid { grid-template-columns: 1fr 1fr; } }
.acara-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gold-border);
  padding: clamp(28px, 6vw, 40px) clamp(20px, 5vw, 32px) clamp(24px, 5vw, 32px);
  text-align: center;
  box-shadow: 0 10px 32px rgba(92,15,15,0.07);
  border-radius: 8px;
}
.acara-lantern {
  width: clamp(54px, 14vw, 78px); color: var(--crimson);
  margin: 0 auto 14px; opacity: 0.85;
  transform-origin: top center;
}
.acara-title {
  font-family: var(--ff-heading); font-weight: 500;
  font-size: clamp(1.4rem, 4.5vw, 1.8rem);
  color: var(--crimson); margin-bottom: 18px;
  position: relative; padding-bottom: 14px;
}
.acara-title::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 50px; height: 1px; background: var(--gold);
}
.acara-list { text-align: left; }
.acara-list div { padding: 8px 0; border-bottom: 1px dashed rgba(201,162,75,0.3); }
.acara-list div:last-child { border-bottom: 0; }
.acara-list dt {
  font-family: var(--ff-ui); font-weight: 500; font-size: 0.7rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: 3px;
}
.acara-list dd { color: var(--ink); line-height: 1.55; }
.acara-btn-wrap { text-align: center; margin-top: 30px; }

/* ---------- Button link / submit ---------- */
.btn-link {
  display: inline-block; padding: 12px 30px;
  background: var(--crimson); color: var(--cream-on-red);
  font-family: var(--ff-ui); font-weight: 500;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1.5px solid var(--gold); border-radius: 999px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.4s var(--ease);
  box-shadow: 0 5px 16px rgba(139,26,26,0.2);
  min-height: 46px; line-height: 1.4;
}
.btn-link:hover, .btn-link:focus-visible {
  transform: translateY(-2px); background: var(--crimson-deep);
  box-shadow: 0 9px 24px rgba(139,26,26,0.3); outline: none;
}

/* ============================================================
   Section 7: Countdown (dark red panel)
   ============================================================ */
.section-countdown {
  background: var(--crimson-deep); color: var(--cream-on-red);
  text-align: center;
}
.countdown-clouds { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cloud {
  position: absolute; color: var(--gold);
  width: clamp(120px, 24vw, 200px); opacity: 0.18;
}
.cloud-1 { top: 12%; left: -4%; }
.cloud-2 { bottom: 12%; right: -4%; transform: rotate(180deg); }
.countdown-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 2vw, 16px); margin: 30px auto 0;
  max-width: 520px;
}
.count-cell {
  /* kekondangan-inspired: translucent bg 0.12 alpha (was 0.06), bolder border */
  background: rgba(245,230,200,0.12);
  border: 1.5px solid rgba(201,162,75,0.5);
  border-radius: 8px;
  padding: clamp(14px, 3vw, 22px) 4px;
  text-align: center;
  backdrop-filter: blur(2px);
}
.count-num {
  display: block;
  font-family: var(--ff-heading); font-weight: 500;
  font-size: clamp(1.8rem, 7vw, 2.8rem);
  color: var(--gold-bright);
  line-height: 1; letter-spacing: 0.02em;
  text-shadow: var(--gold-foil);
  transition: transform 0.3s var(--ease);
  position: relative; overflow: hidden;
  min-height: 1em;
}
.count-num.tick { animation: tickAnim 0.4s ease-out; }
@keyframes tickAnim {
  0% { transform: translateY(-6px); opacity: 0.5; }
  100% { transform: translateY(0); opacity: 1; }
}
/* moromoroit rolling countdown: old digit slides out, new slides in */
.count-num .roll-old {
  display: inline-block;
  animation: rollOut 0.4s ease-in-out forwards;
}
.count-num .roll-new {
  display: inline-block;
  position: absolute; left: 0; right: 0; top: 0;
  animation: rollIn 0.4s ease-in-out forwards;
}
@keyframes rollOut {
  0%   { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(60%); opacity: 0; }
}
@keyframes rollIn {
  0%   { transform: translateX(-60%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
.count-label {
  display: block;
  font-family: var(--ff-ui); font-weight: 500; font-size: 0.65rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(245,230,200,0.7); margin-top: 8px;
}
.countdown-ended {
  margin-top: 24px; font-style: italic;
  color: var(--gold-bright); max-width: 460px; margin-left: auto; margin-right: auto;
}

/* ============================================================
   Section 8: Gallery (masonry)
   ============================================================ */
.section-gallery { background: var(--cream-2); }
.gallery-masonry {
  column-count: 1; column-gap: 14px;
  margin-top: 28px;
}
@media (min-width: 600px) { .gallery-masonry { column-count: 2; } }
@media (min-width: 980px) { .gallery-masonry { column-count: 3; } }
.g-item {
  position: relative; break-inside: avoid;
  margin-bottom: 14px; cursor: zoom-in;
  border: 2px solid var(--gold);
  padding: 6px; background: var(--white);
  box-shadow: 0 6px 18px rgba(92,15,15,0.08);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.g-item:hover { transform: translateY(-4px) scale(1.015); box-shadow: 0 12px 28px rgba(92,15,15,0.16); }
.g-item img {
  width: 100%; display: block;
  filter: sepia(0.12) saturate(1.05) brightness(1.02) contrast(0.98);
  transition: filter 0.5s var(--ease);
}
.g-item:hover img { filter: sepia(0) saturate(1.1) brightness(1.05); }
.g-frame-corner {
  position: absolute; width: 16px; height: 16px;
  border: 1.5px solid var(--gold-bright); z-index: 2; pointer-events: none;
}
.g-frame-corner.tl { top: 2px; left: 2px; border-right: 0; border-bottom: 0; }
.g-frame-corner.tr { top: 2px; right: 2px; border-left: 0; border-bottom: 0; }
.g-frame-corner.bl { bottom: 2px; left: 2px; border-right: 0; border-top: 0; }
.g-frame-corner.br { bottom: 2px; right: 2px; border-left: 0; border-top: 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(42,26,18,0.94);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; transition: opacity 0.3s var(--ease);
  backdrop-filter: blur(4px);
}
.lightbox[hidden] { display: none; }
.lightbox.show { opacity: 1; }
.lightbox-figure { max-width: 92vw; max-height: 86vh; }
.lightbox-figure img {
  max-width: 100%; max-height: 86vh;
  border: 2px solid var(--gold); padding: 6px; background: var(--cream);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.94); transition: transform 0.35s var(--ease);
}
.lightbox.show .lightbox-figure img { transform: scale(1); }
.lightbox-close, .lightbox-nav {
  position: absolute; color: var(--cream-on-red);
  background: rgba(139,26,26,0.5); border: 1px solid var(--gold);
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; line-height: 1;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.lightbox-close:hover, .lightbox-nav:hover { background: var(--crimson); transform: scale(1.08); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover, .lightbox-next:hover { transform: translateY(-50%) scale(1.08); }

/* ============================================================
   Section 9 & 10: Forms (RSVP + Wish)
   ============================================================ */
.section-rsvp { background: var(--cream); }
.section-wish { background: var(--cream-2); }
.wish-orn {
  position: absolute; top: 8%; left: -10px;
  width: clamp(140px, 30vw, 220px); color: var(--gold);
  opacity: 0.32; pointer-events: none; z-index: 1;
  transform: rotate(-12deg) scaleX(-1);
}
.rsvp-sub {
  text-align: center; max-width: 480px; margin: 0 auto 24px;
  color: var(--tea); font-style: italic;
}
.rsvp-form, .wish-form {
  background: var(--white);
  border: 1px solid var(--gold-border);
  padding: clamp(22px, 5vw, 36px);
  box-shadow: 0 10px 32px rgba(92,15,15,0.07);
  border-radius: 8px;
  max-width: 520px; margin: 0 auto;
  position: relative;
}
.field { margin-bottom: 18px; }
.field label, .field legend {
  display: block;
  font-family: var(--ff-ui); font-weight: 500; font-size: 0.72rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: 7px;
}
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px;
  background: var(--cream);
  border: 1px solid var(--gold-border);
  border-radius: 4px; color: var(--ink);
  font-family: var(--ff-body); font-size: 1.05rem;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,75,0.18);
}
.field textarea { resize: vertical; min-height: 80px; }
fieldset.field { border: 0; }
.radio {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 6px;
  background: var(--cream); border: 1px solid var(--gold-border);
  border-radius: 4px; cursor: pointer;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.radio:hover { border-color: var(--gold); }
.radio input { width: auto; accent-color: var(--crimson); }
.radio span { font-size: 1rem; }
.btn-submit {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 14px;
  background: var(--crimson); color: var(--cream-on-red);
  font-family: var(--ff-ui); font-weight: 500;
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1.5px solid var(--gold); border-radius: 999px;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
  min-height: 50px;
}
.btn-submit:hover, .btn-submit:focus-visible {
  transform: translateY(-2px); background: var(--crimson-deep);
  box-shadow: 0 8px 22px rgba(139,26,26,0.3); outline: none;
}
.btn-submit:disabled { opacity: 0.7; cursor: wait; }
.btn-submit-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(245,230,200,0.3);
  border-top-color: var(--cream-on-red);
  animation: spin 0.8s linear infinite;
}
.form-success {
  margin-top: 16px; padding: 14px; text-align: center;
  background: rgba(201,162,75,0.1); border: 1px solid var(--gold);
  border-radius: 4px; color: var(--crimson-deep); font-style: italic;
}

/* ---------- Wish list ---------- */
.wish-list {
  margin-top: 28px; max-width: 520px; margin-left: auto; margin-right: auto;
  max-height: 420px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
  padding-right: 4px;
}
.wish-list::-webkit-scrollbar { width: 5px; }
.wish-list::-webkit-scrollbar-thumb { background: var(--gold-border); border-radius: 3px; }
.wish-empty { text-align: center; color: var(--tea); font-style: italic; padding: 20px; }
.wish-card {
  background: var(--white); border: 1px solid var(--gold-border);
  padding: 14px 16px; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(92,15,15,0.05);
}
.wish-card-name {
  font-family: var(--ff-heading); font-weight: 500;
  color: var(--crimson); font-size: 1.1rem; margin-bottom: 4px;
}
.wish-card-msg { color: var(--ink); line-height: 1.6; font-size: 1rem; }
.wish-card-time {
  font-family: var(--ff-ui); font-size: 0.7rem; color: var(--tea);
  margin-top: 6px; letter-spacing: 0.05em;
}

/* ============================================================
   Section 11: Maps
   ============================================================ */
.section-lokasi { background: var(--cream); }
.lokasi-addr {
  text-align: center; max-width: 460px; margin: 0 auto 22px;
  color: var(--ink); line-height: 1.7;
}
.map-wrap {
  position: relative; max-width: 640px; margin: 0 auto 24px;
  border: 2px solid var(--gold); padding: 6px; background: var(--white);
  border-radius: 4px; overflow: hidden;
  height: clamp(280px, 50vw, 400px);
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-skeleton {
  position: absolute; inset: 6px;
  background: linear-gradient(90deg, var(--cream-2) 0%, var(--cream) 50%, var(--cream-2) 100%);
  background-size: 200% 100%; animation: shimmer 1.5s linear infinite;
  z-index: 1;
}
.map-skeleton.hide { display: none; }
@keyframes shimmer { to { background-position: -200% 0; } }
.map-btn { display: block; text-align: center; margin: 0 auto; max-width: 320px; }

/* ============================================================
   Section 12: Footer (dark red panel, dramatic)
   ============================================================ */
.section-footer {
  background: var(--crimson-deep); color: var(--cream-on-red);
  text-align: center; padding: clamp(70px, 14vw, 120px) 0;
  position: relative; overflow: hidden;
}
.footer-bg-pattern {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 50% 30%, rgba(201,162,75,0.1), transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(0,0,0,0.3), transparent 60%);
  pointer-events: none;
}
.footer-ornaments { position: absolute; inset: 0; pointer-events: none; }
.footer-orn {
  position: absolute; bottom: -8%; color: var(--gold);
  width: clamp(110px, 24vw, 200px); opacity: 0.4;
}
.footer-dragon { left: 2%; transform: rotate(-6deg); }
.footer-phoenix { right: 2%; transform: rotate(6deg) scaleX(-1); }
.footer-deco {
  font-family: var(--ff-cn); font-weight: 700;
  font-size: clamp(3rem, 10vw, 5rem);
  color: var(--gold); text-shadow: var(--gold-foil);
  line-height: 1; margin-bottom: 24px;
  position: relative; z-index: 2;
}
.footer-body {
  max-width: 460px; margin: 0 auto 24px;
  color: rgba(245,230,200,0.85); line-height: 1.85;
  position: relative; z-index: 2;
}
.footer-signature {
  font-family: var(--ff-script);
  font-size: clamp(2.4rem, 7vw, 3.4rem);
  color: var(--gold-bright); margin-bottom: 10px;
  text-shadow: var(--gold-foil);
  position: relative; z-index: 2;
}
.footer-date {
  color: var(--cream-on-red); letter-spacing: 0.04em;
  font-size: clamp(1rem, 3vw, 1.15rem);
  position: relative; z-index: 2;
}

/* ============================================================
   MUSIC PLAYER (moromoroit vinyl record pattern)
   ============================================================ */
.music-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 1100;
  width: 56px; height: 56px; border-radius: 50%;
  background: transparent;
  border: 0;
  display: none; align-items: center; justify-content: center;
  transition: transform 0.3s var(--ease);
  padding: 0;
}
.music-btn.show { display: flex; }
.music-btn:hover { transform: scale(1.08); }
.music-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.music-vinyl { position: relative; width: 56px; height: 56px; display: block; }
.vinyl-disc { width: 100%; height: 100%; display: block; }
/* disc spins while playing (moromoroit gambarPiringan spin 4s) */
.music-btn.playing .vinyl-disc { animation: vinylSpin 4s linear infinite; }
@keyframes vinylSpin { to { transform: rotate(360deg); } }
/* subtle outer gold ring glow when playing */
.music-btn::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--gold); opacity: 0; pointer-events: none;
}
.music-btn.playing::after {
  opacity: 0.6; animation: vinylRing 2s ease-out infinite;
}
@keyframes vinylRing {
  0% { opacity: 0.6; transform: scale(0.92); }
  100% { opacity: 0; transform: scale(1.25); }
}

/* ============================================================
   DOT NAV
   ============================================================ */
.dot-nav {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%);
  z-index: 900; display: none; flex-direction: column; gap: 10px;
}
@media (min-width: 880px) { .dot-nav.show { display: flex; } }
.dot-nav button {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(201,162,75,0.35); border: 1px solid var(--gold-dark);
  padding: 0; transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.dot-nav button.active { background: var(--gold); transform: scale(1.3); }
.dot-nav button:hover { background: var(--gold-bright); }

/* ============================================================
   ANIMATION SYSTEM: data-anim (viding.co pattern)
   ============================================================ */
[data-anim] { will-change: transform, opacity; }
[data-anim].animation-invisible { visibility: hidden; }
[data-anim].has-animate {
  animation-duration: var(--anim-dur);
  animation-timing-function: var(--anim-ease);
  animation-fill-mode: both;
}
[data-anim].anim-loop {
  animation-duration: 4000ms;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-fill-mode: both;
}
[data-anim].anim-paused { animation-play-state: paused; }

[data-anim="fade"].has-animate { animation-name: fadeAnim; }
[data-anim="fade-up"].has-animate { animation-name: fadeUp; }
[data-anim="fade-down"].has-animate { animation-name: fadeDown; }
[data-anim="fade-left"].has-animate { animation-name: fadeLeft; }
[data-anim="fade-right"].has-animate { animation-name: fadeRight; }
[data-anim="zoom-in"].has-animate { animation-name: zoomIn; }
[data-anim="zoom-out"].has-animate { animation-name: zoomOut; }
[data-anim="scale-x"].has-animate { animation-name: scaleX; }

@keyframes fadeAnim { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp    { from { transform: translate3d(0, 60px, 0); opacity: 0; } to { transform: translate3d(0,0,0); opacity: 1; } }
@keyframes fadeDown  { from { transform: translate3d(0, -60px, 0); opacity: 0; } to { transform: translate3d(0,0,0); opacity: 1; } }
@keyframes fadeLeft  { from { transform: translate3d(60px, 0, 0); opacity: 0; } to { transform: translate3d(0,0,0); opacity: 1; } }
@keyframes fadeRight { from { transform: translate3d(-60px, 0, 0); opacity: 0; } to { transform: translate3d(0,0,0); opacity: 1; } }
@keyframes zoomIn    { from { transform: scale3d(0.6, 0.6, 0.6); opacity: 0; } to { transform: scale3d(1,1,1); opacity: 1; } }
@keyframes zoomOut   { from { transform: scale3d(1.5, 1.5, 1.5); opacity: 0; } to { transform: scale3d(1,1,1); opacity: 1; } }
@keyframes scaleX    { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Ornamen loop animations (data-anim-loop) */
[data-anim-loop] { animation-duration: 5000ms; animation-iteration-count: infinite; animation-direction: alternate; animation-timing-function: ease-in-out; }
.cover-orn-dragon[data-anim-loop]   { animation-name: floatY; }
.cover-orn-phoenix[data-anim-loop]  { animation-name: floatY; animation-delay: -1.2s; }
.cover-orn-cloud-tl[data-anim-loop] { animation-name: floatSlow; }
.cover-orn-cloud-br[data-anim-loop] { animation-name: floatSlow; animation-delay: -2s; }
.pembukaan-orn[data-anim-loop]      { animation-name: breath; }
.couple-orn[data-anim-loop]         { animation-name: floatY; }
.couple-amp[data-anim-loop]         { animation-name: breath; }
.acara-lantern[data-anim-loop]      { animation-name: hangingSway; transform-origin: top center; }
.cloud[data-anim-loop]              { animation-name: floatSlow; }
.footer-orn[data-anim-loop]         { animation-name: floatY; }
.ucapan-orn[data-anim-loop]         { animation-name: floatSlow; }
.wish-orn[data-anim-loop]           { animation-name: floatSlow; }
.section-side-orn[data-anim-loop]   { animation-name: floatSide; }
.section-corners span[data-anim-loop] { animation-name: breath; }
@keyframes floatY    { from { transform: translateY(0); } to { transform: translateY(-12px); } }
@keyframes floatSlow { from { transform: translate(0, 0); } to { transform: translate(8px, -8px); } }
@keyframes breath    { from { transform: scale(1); } to { transform: scale(1.06); } }
/* side ornaments: preserve translateY(-50%) centering, drift horizontally only */
@keyframes floatSide { from { transform: translateY(-50%) translateX(0); } to { transform: translateY(-50%) translateX(6px); } }
.section-side-orn-right[data-anim-loop] { animation-name: floatSideRight; }
@keyframes floatSideRight { from { transform: translateY(-50%) scaleX(-1) translateX(0); } to { transform: translateY(-50%) scaleX(-1) translateX(6px); } }
/* moromoroit hanging sway: lantern swings from top-center pivot */
@keyframes hangingSway {
  0%, 100% { transform: rotate(-4deg); }
  25%, 75% { transform: rotate(0deg); }
  50%      { transform: rotate(4deg); }
}
/* moromoroit wobble entrance (rotasiPatah) for key decorative chars */
@keyframes wobble {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(5deg); }
  50%  { transform: rotate(-5deg); }
  75%  { transform: rotate(5deg); }
  100% { transform: rotate(0deg); }
}
/* moromoroit wobble entrance (rotasiPatah) layered on top of base reveal
   for the big decorative 囍 characters. Runs zoom/opacity reveal + a
   one-shot rotate wobble together (comma-separated animations). */
.cover-deco.has-animate,
.footer-deco.has-animate {
  animation-name: zoomIn, wobble;
  animation-iteration-count: 1, 1;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-anim] { will-change: auto; }
  [data-anim].animation-invisible { visibility: visible; }
  .cover { transition: none; }
  .cover.cover-opened { transform: none; opacity: 0; visibility: hidden; }
  /* moromoroit-derived effects: disable canvas, vinyl spin, shake, rolling */
  .petal-canvas { display: none; }
  .music-btn.playing .vinyl-disc { animation: none; }
  .music-btn.playing::after { animation: none; opacity: 0; }
  .btn-open { animation: none; }
  .count-num .roll-old, .count-num .roll-new { animation: none; }
}
