/* ==========================================================================
   Undangan Digital — Elegant Redesign
   Tema: ivory paper + champagne gold foil + navy + burgundy + blush
   Gaya: editorial luxury, calligraphic, paper-pressed, romantic
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=Tangerine:wght@400;700&family=Italiana&family=Inter:wght@300;400;500;600;700&family=Great+Vibes&display=swap');

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
    /* Kunci warna ke light scheme — tidak dipengaruhi tema gelap bawaan browser */
    color-scheme: light only;

    /* Paper surfaces */
    --cream:        #f5ecd9;
    --ivory:        #faf3e2;
    --paper:        #fffaf0;
    --paper-soft:   #fcf5e4;
    --vellum:       #ede0c4;

    /* Ink */
    --ink:          #2a1f1c;
    --ink-soft:     #5e4a3f;
    --muted:        #a89683;

    /* Lines & glass */
    --line:         #e6d6b8;
    --line-strong:  #c9b48a;
    --glass:        rgba(255, 250, 235, .82);

    /* Brand gold */
    --gold:         #b08d57;
    --gold-2:       #8a6a35;
    --gold-3:       #d4b483;
    --gold-soft:    #efdfc4;
    --gold-foil:    linear-gradient(135deg, #d4b483 0%, #b08d57 25%, #efdfc4 50%, #b08d57 75%, #8a6a35 100%);

    /* Navy — primary accent */
    --navy:         #1a2744;
    --navy-2:       #243956;
    --navy-3:       #3d5278;
    --steel:        #4a5f8a;
    --steel-soft:   #6b7fa3;
    --mist:         #b8c4d9;
    --mist-soft:    #d8e0ec;
    --sky:          #e8eef6;
    --brass:        #c69b6d;
    --brass-soft:   #f0e0c8;

    /* Burgundy & accents */
    --burgundy:     #6e2c2c;
    --plum:         #4a2c3a;
    --sage:         #8b9d83;
    --sage-soft:    #c7d1bf;
    --rose:         #b8717c;
    --rose-soft:    #ecc7c2;
    --blush:        #f3dcd6;
    --blush-deep:   #d9a89e;
    --lavender:     #a298b8;
    --lavender-soft:#d9d3e6;
    --terracotta:   #c47660;
    --olive:        #9ba37e;

    /* Petals */
    --petal-1:      #f5c2c7;
    --petal-2:      #f9d4d8;
    --petal-3:      #ffe4e1;
    --petal-4:      #efdfc4;

    /* Gradient aksen untuk section/cards */
    --grad-navy:    linear-gradient(135deg, #d8e0ec 0%, #b8c4d9 50%, #6b7fa3 100%);
    --grad-royal:   linear-gradient(135deg, #2a3a5e 0%, #1a2744 50%, #3d5278 100%);
    --grad-aurora:  linear-gradient(135deg, #d8e0ec 0%, #efdfc4 50%, #b8c4d9 100%);
    --grad-dawn:    linear-gradient(135deg, #b8c4d9 0%, #c69b6d 50%, #b08d57 100%);
    --grad-brass:   linear-gradient(135deg, #efdfc4 0%, #c69b6d 50%, #8a6a35 100%);
    --grad-rose:    linear-gradient(135deg, #f3dcd6 0%, #d9a89e 50%, #b8717c 100%);

    /* Effects */
    --shadow-xs:    0 2px 8px -3px rgba(80, 50, 20, .12);
    --shadow-sm:    0 8px 22px -14px rgba(80, 50, 20, .22);
    --shadow:       0 24px 50px -28px rgba(60, 30, 10, .32);
    --shadow-lg:    0 50px 100px -40px rgba(40, 20, 10, .45);

    /* Radii */
    --r-xs:         6px;
    --r-sm:         10px;
    --r:            16px;
    --r-lg:         22px;
    --r-xl:         32px;
    --r-full:       999px;

    /* Layout */
    --maxw:         1100px;
    --maxw-narrow:  720px;

    /* Motion */
    --ease:         cubic-bezier(.22,.61,.36,1);
    --ease-out:     cubic-bezier(.16,1,.3,1);

    /* Type */
    --font-serif:   'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --font-display: 'Playfair Display', 'Cormorant Garamond', serif;
    --font-sans:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-script:  'Great Vibes', 'Tangerine', 'Brush Script MT', cursive;
    --font-italiana:'Italiana', 'Cormorant Garamond', serif;
    --font-arabic:  'Cormorant Garamond', 'Amiri', serif;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
*::selection { background: var(--gold-soft); color: var(--ink); }
html, body { margin: 0; padding: 0; color-scheme: light only; }
html {
    scroll-behavior: smooth;
    color-scheme: light only;
    background: var(--cream);
}
body {
    font-family: var(--font-sans);
    background: var(--cream);
    color: var(--ink);
    color-scheme: light only;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    /* Tekstur kertas halus */
    background-image:
        radial-gradient(circle at 20% 10%, rgba(255, 248, 232, .6) 0%, transparent 35%),
        radial-gradient(circle at 80% 80%, rgba(232, 220, 200, .35) 0%, transparent 35%);
}

img { max-width: 100%; display: block; }
a { color: var(--gold-2); text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--burgundy); }

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    color: var(--ink);
    margin: 0;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: -.005em;
}
p { margin: 0 0 14px; }

/* ==========================================================================
   Ornamen dekoratif
   ========================================================================== */
.ornament {
    position: absolute;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: .5;
    z-index: 1;
}

.ornament.top-left,
.ornament.top-right,
.ornament.bottom-left,
.ornament.bottom-right {
    width: 200px; height: 200px;
    opacity: .55;
}
.ornament.top-left {
    top: 18px; left: 18px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke='%23b08d57' stroke-width='.7' stroke-linecap='round'><path d='M2 50 C 2 22, 22 2, 50 2'/><path d='M2 60 C 2 80, 18 96, 38 96'/><path d='M14 14 C 22 8, 32 6, 42 8'/><path d='M14 14 C 8 22, 6 32, 8 42'/><circle cx='50' cy='2' r='2' fill='%23b08d57'/><circle cx='2' cy='50' r='2' fill='%23b08d57'/><path d='M30 30 Q 40 22, 50 30 Q 40 38, 30 30 Z' fill='%23d4b483' opacity='.4'/><path d='M18 18 Q 26 14, 30 22' stroke-width='.5'/><path d='M22 18 Q 26 24, 32 22' stroke-width='.5'/><path d='M40 40 Q 50 36, 58 42' stroke-width='.5'/><path d='M42 48 Q 52 44, 60 50' stroke-width='.5'/></g></svg>");
}
.ornament.top-right {
    top: 18px; right: 18px; transform: scaleX(-1);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke='%23b08d57' stroke-width='.7' stroke-linecap='round'><path d='M2 50 C 2 22, 22 2, 50 2'/><path d='M2 60 C 2 80, 18 96, 38 96'/><path d='M14 14 C 22 8, 32 6, 42 8'/><path d='M14 14 C 8 22, 6 32, 8 42'/><circle cx='50' cy='2' r='2' fill='%23b08d57'/><circle cx='2' cy='50' r='2' fill='%23b08d57'/><path d='M30 30 Q 40 22, 50 30 Q 40 38, 30 30 Z' fill='%23d4b483' opacity='.4'/><path d='M18 18 Q 26 14, 30 22' stroke-width='.5'/><path d='M22 18 Q 26 24, 32 22' stroke-width='.5'/></g></svg>");
}
.ornament.bottom-left {
    bottom: 18px; left: 18px; transform: scaleY(-1);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke='%23b08d57' stroke-width='.7' stroke-linecap='round'><path d='M2 50 C 2 22, 22 2, 50 2'/><path d='M2 60 C 2 80, 18 96, 38 96'/><path d='M14 14 C 22 8, 32 6, 42 8'/><path d='M14 14 C 8 22, 6 32, 8 42'/><path d='M30 30 Q 40 22, 50 30 Q 40 38, 30 30 Z' fill='%23d4b483' opacity='.4'/></g></svg>");
}
.ornament.bottom-right {
    bottom: 18px; right: 18px; transform: scale(-1,-1);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke='%23b08d57' stroke-width='.7' stroke-linecap='round'><path d='M2 50 C 2 22, 22 2, 50 2'/><path d='M2 60 C 2 80, 18 96, 38 96'/><path d='M14 14 C 22 8, 32 6, 42 8'/><path d='M14 14 C 8 22, 6 32, 8 42'/><path d='M30 30 Q 40 22, 50 30 Q 40 38, 30 30 Z' fill='%23d4b483' opacity='.4'/></g></svg>");
}

/* Section divider dengan diamond & flourish */
.section-divider {
    display: flex; align-items: center; justify-content: center;
    margin: -20px auto;
    height: 50px;
    position: relative;
    z-index: 2;
    color: var(--gold);
}
.section-divider svg { display: block; }
.section-divider .diamond {
    display: inline-block;
    width: 10px; height: 10px;
    background: var(--gold);
    transform: rotate(45deg);
    margin: 0 14px;
    box-shadow: 0 0 0 4px var(--cream), 0 0 0 5px var(--gold-soft);
}

/* Flourish garis dengan detail floral */
.flourish {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    margin: 22px auto; max-width: 360px; color: var(--gold);
}
.flourish::before, .flourish::after {
    content: ""; flex: 1; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
    opacity: .55;
}
.flourish svg { flex: 0 0 auto; }

/* ==========================================================================
   Container & layout
   ========================================================================== */
.container       { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.container.narrow{ max-width: var(--maxw-narrow); }
.center { text-align: center; }

/* Reveal animation */
.reveal { opacity: 1; transform: none; transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); will-change: opacity, transform; }
.js-anim .reveal:not(.is-visible) { opacity: 0; transform: translateY(28px); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }

/* ==========================================================================
   FLOATING PETALS — kelopak bunga melayang
   ========================================================================== */
.petals {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}
.petal {
    position: absolute;
    top: -40px;
    width: 18px; height: 18px;
    background: radial-gradient(ellipse at 30% 30%, var(--petal-1), var(--petal-2));
    border-radius: 60% 40% 60% 40%;
    opacity: .85;
    filter: drop-shadow(0 2px 4px rgba(180, 100, 110, .15));
    animation: petalFall linear infinite;
    transform-origin: center;
}
.petal.p2 { background: radial-gradient(ellipse at 30% 30%, var(--petal-2), var(--petal-3)); }
.petal.p3 { background: radial-gradient(ellipse at 30% 30%, var(--petal-3), var(--petal-1)); }
.petal.p4 { background: radial-gradient(ellipse at 30% 30%, var(--petal-4), var(--gold-soft)); width: 14px; height: 14px; opacity: .7; }

@keyframes petalFall {
    0%   { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
    10%  { opacity: .9; }
    50%  { transform: translate3d(60px, 55vh, 0) rotate(220deg); }
    100% { transform: translate3d(-40px, 110vh, 0) rotate(720deg); opacity: 0; }
}

/* ==========================================================================
   COVER / HERO
   ========================================================================== */
.cover-page, .cover, .hero {
    min-height: 100vh;
    display: grid; place-items: center;
    padding: 120px 24px 90px;
    position: relative;
    background:
        radial-gradient(ellipse at 50% 0%, #fff6e0 0%, transparent 55%),
        radial-gradient(ellipse at 50% 100%, #f5e7d0 0%, transparent 55%),
        linear-gradient(180deg, var(--ivory) 0%, var(--cream) 100%);
    overflow: hidden;
}

/* Tekstur kertas di cover */
.cover-page::before, .cover::before, .hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .7 0 0 0 0 .6 0 0 0 0 .45 0 0 0 .07 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: .55; mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 0;
}

/* Border gold-foil ganda */
.cover-page::after, .cover::after, .hero::after {
    content: ""; position: absolute; inset: 16px;
    border: 1px solid rgba(176, 137, 87, .35);
    border-radius: var(--r-lg);
    pointer-events: none;
    z-index: 1;
    box-shadow: inset 0 0 0 4px var(--cream), inset 0 0 0 5px rgba(176, 137, 87, .15);
}
.cover-inner, .hero-inner { max-width: 760px; text-align: center; position: relative; z-index: 3; }

/* Monogram dengan frame tipis */
.monogram {
    font-family: var(--font-script);
    font-size: clamp(72px, 10vw, 120px);
    line-height: 1;
    color: var(--gold-2);
    display: inline-flex; align-items: center; gap: 18px;
    margin-bottom: 6px;
    text-shadow: 0 1px 0 rgba(255,255,255,.6);
    font-weight: 400;
}
.monogram .amp {
    font-family: var(--font-display);
    font-size: .42em; color: var(--gold);
    font-style: italic; font-weight: 400;
    padding: 0 4px;
    display: inline-flex;
    align-self: center;
}

/* Kicker label */
.kicker {
    display: inline-block;
    letter-spacing: .42em; text-transform: uppercase;
    font-size: 11px; color: var(--gold-2);
    margin: 16px 0 12px; font-weight: 500;
}
.kicker.small { font-size: 10px; margin-bottom: 6px; letter-spacing: .35em; }

/* Nama pasangan - editorial */
.couple {
    font-family: var(--font-display);
    font-size: clamp(36px, 6.4vw, 72px);
    color: var(--ink);
    margin: 4px 0 14px;
    font-weight: 500;
    letter-spacing: -.015em;
    word-break: keep-all;
    overflow-wrap: break-word;
    line-height: 1.1;
}
.couple .amp {
    font-family: var(--font-script);
    color: var(--gold);
    font-weight: 400;
    padding: 0 12px;
    font-size: .85em;
    display: inline-block;
    transform: translateY(8px);
}

.env-letter .couple { font-size: clamp(22px, 4vw, 38px); }
.env-letter .monogram { font-size: clamp(52px, 7vw, 80px); gap: 12px; margin-bottom: 4px; }
.env-letter .kicker { margin: 8px 0 6px; }
.env-letter .date { margin-bottom: 14px; }
.env-letter .flourish { margin: 12px auto; }

/* Tanggal */
.date {
    color: var(--ink-soft);
    letter-spacing: .32em;
    text-transform: uppercase;
    font-size: 11px;
    margin-bottom: 28px;
    font-weight: 500;
}

/* Guest card - lebih lembut & premium */
.guest-card {
    display: block;
    width: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(253, 248, 235, .85));
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(176, 137, 87, .35);
    border-radius: var(--r);
    padding: 20px 24px;
    margin: 16px 0 22px;
    box-shadow: 0 14px 34px -16px rgba(80, 50, 20, .3), inset 0 1px 0 rgba(255,255,255,.8);
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}
.guest-card::before {
    content: ""; position: absolute;
    inset: 5px; border: 1px dashed rgba(176, 137, 87, .4);
    border-radius: calc(var(--r) - 6px);
    pointer-events: none;
}
.guest-name {
    font-family: var(--font-display);
    font-size: clamp(18px, 3vw, 24px);
    color: var(--ink);
    margin: 6px 0 4px;
    font-weight: 500;
    font-style: italic;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
    position: relative;
}
.slot {
    color: var(--ink-soft);
    font-size: 11px; margin: 0;
    letter-spacing: .18em; text-transform: uppercase;
    font-weight: 500;
}

/* ==========================================================================
   Buttons - lebih refined
   ========================================================================== */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: fit-content;
    padding: 16px 42px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 50%, var(--gold) 100%);
    background-size: 200% 100%;
    color: #fff; border: 0; cursor: pointer;
    font-family: var(--font-sans);
    font-size: 11px; letter-spacing: .36em; text-transform: uppercase; font-weight: 600;
    border-radius: var(--r-full);
    box-shadow: 0 14px 30px -12px rgba(138, 106, 53, .55), inset 0 1px 0 rgba(255,255,255,.3);
    transition: background-position .5s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
    position: relative;
}
.rsvp-form .btn-primary { width: 100%; }
.btn-primary:hover {
    background-position: 100% 0;
    transform: translateY(-3px);
    box-shadow: 0 22px 40px -14px rgba(110, 44, 44, .45), inset 0 1px 0 rgba(255,255,255,.4);
    color: #fff;
}
.btn-primary:active { transform: translateY(-1px); }

.btn-outline {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px;
    border: 1px solid var(--gold-2); color: var(--gold-2);
    background: rgba(255,255,255,.6); border-radius: var(--r-full);
    font-size: 11px; letter-spacing: .28em; text-transform: uppercase; font-weight: 600;
    transition: all .3s var(--ease); cursor: pointer;
    backdrop-filter: blur(4px);
}
.btn-outline:hover {
    background: var(--gold-2); color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -10px rgba(138, 106, 53, .5);
}

/* ==========================================================================
   ENVELOPE — dengan wax seal
   ========================================================================== */
.envelope-wrapper {
    position: relative;
    width: 100%;
    max-width: 440px;
    aspect-ratio: 3/4;
    margin: 0 auto 32px;
    box-shadow: var(--shadow-lg);
    perspective: 1400px;
    z-index: 2;
    transition: transform 1.2s var(--ease-out), opacity .9s var(--ease);
}
@media (max-width: 580px) {
    .envelope-wrapper { max-width: 340px; }
}

.env-back {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #d4b896 0%, #b8966d 50%, #a07a52 100%);
    border-radius: var(--r-sm);
    box-shadow: inset 0 0 60px rgba(60, 40, 20, .25), inset 0 0 0 1px rgba(255,255,255, .15);
}

.env-letter {
    position: absolute; inset: 12px;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 248, 232, .7) 0%, transparent 50%),
        linear-gradient(180deg, var(--ivory), var(--cream));
    border: 1px solid rgba(176, 137, 87, .4);
    border-radius: var(--r-sm);
    padding: 28px;
    z-index: 2;
    transition: transform 1.2s var(--ease-out);
    box-shadow: 0 8px 20px rgba(60, 40, 20, .1), inset 0 1px 0 rgba(255,255,255, .6);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.env-letter::before {
    content: ""; position: absolute; inset: 8px;
    border: 1px solid rgba(176, 137, 87, .25);
    border-radius: calc(var(--r-sm) - 4px);
    pointer-events: none;
}

.env-flaps {
    position: absolute; inset: 0;
    border-radius: var(--r-sm);
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

.env-flap { position: absolute; inset: 0; pointer-events: none; }
.env-flap.left {
    background: linear-gradient(110deg, #d6b48f, #c8a378);
    clip-path: polygon(0 0, 50% 50%, 0 100%);
    filter: drop-shadow(3px 0 4px rgba(60, 40, 20, .1));
}
.env-flap.right {
    background: linear-gradient(70deg, #d6b48f, #c8a378);
    clip-path: polygon(100% 0, 50% 50%, 100% 100%);
    filter: drop-shadow(-3px 0 4px rgba(60, 40, 20, .1));
}
.env-flap.bottom {
    background: linear-gradient(180deg, #e0c39b, #ceab7e);
    clip-path: polygon(0 100%, 50% 50%, 100% 100%);
    filter: drop-shadow(0 -3px 4px rgba(60, 40, 20, .1));
}

.envelope-wrapper > .env-flap.top {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, #ecd2b3 0%, #d6b48f 100%);
    clip-path: polygon(0 0, 50% 50%, 100% 0);
    transform-origin: top;
    transition: transform 1.1s var(--ease-out);
    z-index: 4;
    filter: drop-shadow(0 4px 8px rgba(60, 40, 20, .15));
    border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.envelope-wrapper > .env-flap.top::after {
    content: "";
    position: absolute;
    inset: 18px 22px auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(176, 137, 87, .6), transparent);
    opacity: .55;
}

/* WAX SEAL — stempel pada melang atas */
.wax-seal {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 64px; height: 64px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #d04a4a 0%, #a02828 50%, #6e1818 100%);
    box-shadow:
        0 6px 14px -4px rgba(110, 24, 24, .55),
        inset 0 2px 4px rgba(255, 200, 200, .35),
        inset 0 -3px 6px rgba(60, 0, 0, .35);
    display: grid; place-items: center;
    z-index: 5;
    pointer-events: none;
    transition: transform .9s var(--ease-out), opacity .6s var(--ease);
}
.wax-seal::before {
    content: "";
    position: absolute; inset: 6px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 220, 220, .45);
    pointer-events: none;
}
.wax-seal .seal-monogram {
    font-family: var(--font-display);
    color: rgba(255, 230, 230, .95);
    font-size: 28px;
    font-weight: 600;
    font-style: italic;
    line-height: 1;
    text-shadow: 0 1px 1px rgba(60, 0, 0, .5);
}
.envelope-wrapper.is-open .wax-seal {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.6);
}

/* Open animation states */
.envelope-wrapper.is-open .env-flap.top {
    transform: rotateX(180deg);
    z-index: 1;
}
.envelope-wrapper.is-open .env-letter {
    transform: translateY(-90px) scale(1.04);
    z-index: 5;
    box-shadow: 0 30px 50px rgba(60, 40, 20, .18);
}
.envelope-wrapper.is-open-full {
    transform: translateY(100vh) scale(.8);
    opacity: 0;
}

.btn-open-env { z-index: 10; transition: opacity .4s, transform .4s var(--ease); }
.btn-open-env.hide { opacity: 0; pointer-events: none; transform: translateY(20px); }

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section {
    padding: 100px 24px;
    position: relative;
    overflow: hidden;
}
.section + .section { border-top: 0; }

/* Varian background section */
.section.alt {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 248, 232, .5) 0%, transparent 60%),
        linear-gradient(180deg, var(--ivory), var(--cream));
}
.section.tint-sage {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(184, 196, 217, .35) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 100%, rgba(216, 224, 236, .3) 0%, transparent 55%),
        linear-gradient(180deg, #f4f6fa 0%, #ebeef4 100%);
}
.section.tint-rose {
    background:
        radial-gradient(ellipse at 30% 0%, rgba(184, 196, 217, .4) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 100%, rgba(216, 224, 236, .3) 0%, transparent 55%),
        linear-gradient(180deg, #f6f8fc 0%, #ebeef4 100%);
}
.section.tint-blush {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(244, 220, 214, .4) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(184, 196, 217, .25) 0%, transparent 60%),
        linear-gradient(180deg, #faf3ee 0%, #f0eae2 100%);
}
.section.tint-aurora {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(184, 196, 217, .4) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(239, 223, 196, .25) 0%, transparent 50%),
        linear-gradient(180deg, #f6f8fc 0%, #ebeef4 50%, #e8eef6 100%);
}
.section.dark {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(184, 196, 217, .12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(176, 137, 87, .18) 0%, transparent 50%),
        linear-gradient(135deg, #0f182d 0%, #1a2744 50%, #243956 100%);
    color: #e8e0d0;
    position: relative;
}
.section.dark::before {
    content: "";
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .03 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    pointer-events: none;
}
.section.dark > * { position: relative; z-index: 1; }

/* Eyebrow + title */
.eyebrow {
    display: block;
    text-align: center;
    letter-spacing: .42em; text-transform: uppercase;
    font-size: 11px; color: var(--gold-2);
    margin: 0 auto 10px;
    font-weight: 600;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 4.4vw, 48px);
    color: var(--ink);
    text-align: center; margin: 0;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -.01em;
}
.section-title .script {
    font-family: var(--font-script);
    font-weight: 400; color: var(--gold-2);
    font-size: 1.4em; display: block;
    line-height: 1; margin-bottom: 6px;
    letter-spacing: .01em;
}
.section.dark .section-title { color: var(--gold-3); }
.section.dark .eyebrow     { color: var(--gold-3); }
.section.dark .flourish    { color: var(--gold-3); }
.section.dark p { color: #e3d4be; }

.muted { color: var(--ink-soft); }
.section.dark .muted { color: #d8c8b3; }

/* ==========================================================================
   QUOTE / BISMILLAH
   ========================================================================== */
.section-quote {
    background:
        radial-gradient(ellipse at 30% 20%, rgba(184, 196, 217, .45) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 80%, rgba(216, 224, 236, .3) 0%, transparent 55%),
        linear-gradient(180deg, #f6f8fc 0%, #ebeef4 100%);
    text-align: center;
}
.section-quote .arab {
    font-family: var(--font-arabic);
    font-size: clamp(34px, 5.2vw, 48px);
    background: linear-gradient(135deg, #1a2744 0%, #3d5278 50%, #c69b6d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--gold-2);
    margin: 0 0 28px;
    line-height: 1.5;
    font-weight: 500;
    letter-spacing: .01em;
}
.quote-frame {
    max-width: 720px; margin: 0 auto;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 252, 244, .95) 0%, rgba(244, 246, 250, .85) 100%);
    padding: 50px 54px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
    position: relative;
    border: 1px solid rgba(74, 95, 138, .28);
}
.quote-frame::before {
    content: "\201C";
    position: absolute;
    top: 8px; left: 24px;
    font-family: var(--font-display);
    font-size: 96px;
    color: #4a5f8a;
    opacity: .25;
    line-height: 1;
}
.quote-frame::after {
    content: "\201D";
    position: absolute;
    bottom: -18px; right: 24px;
    font-family: var(--font-display);
    font-size: 96px;
    color: #4a5f8a;
    opacity: .25;
    line-height: 1;
}
.section-quote .quote {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(16px, 2.2vw, 19px);
    color: var(--ink);
    line-height: 1.95;
    margin: 0;
    position: relative;
    z-index: 1;
}
.section-quote .quote-src {
    display: inline-block;
    color: var(--gold-2);
    margin-top: 22px;
    font-size: 11px;
    letter-spacing: .28em;
    text-transform: uppercase;
    font-weight: 600;
    position: relative;
    padding-top: 18px;
}
.section-quote .quote-src::before {
    content: "";
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 40px; height: 1px;
    background: var(--gold);
    opacity: .5;
}

/* ==========================================================================
   COUPLE
   ========================================================================== */
.person {
    text-align: center;
    padding: 0 0 32px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 252, 244, .95) 0%, rgba(244, 246, 250, .85) 100%);
    border: 1px solid rgba(176, 137, 87, .28);
    border-radius: var(--r-lg);
    box-shadow: 0 12px 36px -16px rgba(120, 90, 60, .22), inset 0 1px 0 rgba(255,255,255,.8);
    position: relative;
    overflow: visible;
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.person:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px -18px rgba(120, 90, 60, .32), inset 0 1px 0 rgba(255,255,255,.9);
}
.person::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px dashed rgba(176, 137, 87, .3);
    border-radius: calc(var(--r-lg) - 4px);
    pointer-events: none;
    z-index: 0;
}
.person::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, rgba(176,137,87,.4), var(--gold-2), rgba(176,137,87,.4));
    border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.couple-photo {
    width: clamp(160px, 22vw, 210px);
    height: clamp(160px, 22vw, 210px);
    border-radius: 50%;
    margin: -60px auto 22px;
    background: linear-gradient(135deg, #f3e9dd, #efe1d0);
    border: 3px solid rgba(255,255,255,.9);
    outline: 1px solid rgba(176, 137, 87, .45);
    display: grid; place-items: center;
    position: relative;
    box-shadow: 0 16px 36px -12px rgba(120, 90, 60, .4), inset 0 1px 0 rgba(255,255,255, .5);
    overflow: hidden;
    z-index: 1;
}
.couple-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 96px;
}
.person .role {
    color: var(--gold-2);
    letter-spacing: .4em;
    text-transform: uppercase;
    font-size: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}
.person h3 {
    font-size: clamp(20px, 2.6vw, 28px);
    margin: 0 20px 10px;
    font-weight: 500;
    font-style: italic;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}
.person .parent {
    color: var(--ink);
    font-size: 13px;
    margin-bottom: 10px;
    font-style: italic;
    font-weight: 600;
    line-height: 1.6;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}
.person .address {
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.65;
    max-width: 240px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

.couple-photo span {
    font-family: var(--font-display);
    font-size: clamp(52px, 7vw, 76px);
    color: var(--gold-2);
    line-height: 1;
    position: relative;
    z-index: 1;
}
.section-couple { overflow: visible; }
.section-couple .container { overflow: visible; }
.couple-grid { overflow: visible; }

.couple-connector {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    justify-self: center;
}
.amp-big {
    font-family: var(--font-script);
    font-size: clamp(80px, 11vw, 120px);
    color: var(--gold);
    font-weight: 400;
    line-height: 1;
}
.connector-line {
    width: 1px; height: 44px;
    background: linear-gradient(180deg, transparent, var(--gold), transparent);
    opacity: .55;
}
.connector-ornament {
    color: var(--gold);
    opacity: .7;
}

@media (max-width: 720px) {
    .couple-grid { grid-template-columns: 1fr; gap: 60px; }
    .amp-big { font-size: 68px; }
    .person { padding: 0 0 28px; }
    .couple-connector { flex-direction: row; gap: 16px; }
}

/* ==========================================================================
   SAVE THE DATE — refined dengan date stamp
   ========================================================================== */
.std-wrap { display: flex; justify-content: center; margin-top: 56px; }
.std-card {
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 248, 232, .9) 0%, transparent 50%),
        radial-gradient(circle at 80% 90%, rgba(184, 196, 217, .25) 0%, transparent 50%),
        linear-gradient(160deg, #fffaf0 0%, #f5e8d4 60%, #ebeef4 100%);
    border: 1px solid var(--brass);
    border-radius: var(--r-lg);
    padding: 64px 56px 54px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    max-width: 580px;
    overflow: visible;
}
.std-card::before {
    content: "";
    position: absolute;
    top: 12px; left: 12px; bottom: 12px; right: 12px;
    border: 1px solid rgba(184, 113, 124, .35);
    border-radius: calc(var(--r-lg) - 8px);
    opacity: .35;
    pointer-events: none;
}
.std-card .save {
    background: linear-gradient(135deg, #1a2744 0%, #c69b6d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--gold-2);
    font-family: var(--font-script);
    font-size: clamp(36px, 6vw, 52px);
    line-height: 1.3;
    padding: 14px 8px 6px;
    margin: 0 0 4px;
    font-weight: 400;
    display: block;
    word-break: keep-all;
}
.std-card .date-big {
    font-family: var(--font-display);
    font-size: clamp(48px, 7vw, 76px);
    color: var(--ink);
    margin: 6px 0 4px;
    font-weight: 500;
    letter-spacing: .02em;
    line-height: 1.05;
}
.std-card .month {
    color: var(--ink-soft);
    letter-spacing: .42em;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    margin: 4px 0 0;
}
.std-card .year {
    color: var(--gold-2);
    letter-spacing: .42em;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    margin: 6px 0 0;
}

/* ==========================================================================
   COUNTDOWN
   ========================================================================== */
.section-countdown {
    background:
        radial-gradient(circle at 20% 20%, rgba(212,180,131, .18) 0%, transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(184,196,217, .14) 0%, transparent 45%),
        linear-gradient(135deg, #0f182d 0%, #1a2744 50%, #243956 100%);
    color: #e8e0d0;
    position: relative;
}
.section-countdown > .container {
    background: linear-gradient(180deg, rgba(255,255,255, .025), rgba(255,255,255, .01));
    border: 1px solid rgba(212, 180, 131, .32);
    border-radius: var(--r-lg);
    padding: 38px 34px 34px;
    max-width: 480px;
    position: relative;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255,255,255, .06);
}
.section-countdown > .container::before {
    content: "";
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    border: 1px solid rgba(212, 180, 131, .22);
    border-radius: calc(var(--r-lg) - 4px);
    pointer-events: none;
}
.section-countdown .side-ornament {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    color: var(--gold-3);
    opacity: .4;
    pointer-events: none;
    z-index: 1;
}
.section-countdown .side-ornament.left  { left: 5%; }
.section-countdown .side-ornament.right { right: 5%; transform: translateY(-50%) scaleX(-1); }
.section-countdown .section-title {
    font-size: clamp(22px, 2.6vw, 28px);
    font-style: italic;
}
.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 100%;
    margin: 28px auto 0;
    text-align: center;
}
.countdown > div {
    padding: 18px 6px;
    border: 1px solid rgba(212, 180, 131, .32);
    border-radius: var(--r-sm);
    background: rgba(255,255,255, .04);
    backdrop-filter: blur(10px);
    position: relative;
    transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
}
.countdown > div:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 180, 131, .55);
    background: rgba(255,255,255, .07);
}
.countdown > div::before {
    content: "";
    position: absolute;
    top: 10px; left: 50%; transform: translateX(-50%);
    width: 24px; height: 1px;
    background: var(--gold-3);
    opacity: .65;
}
.countdown > div::after {
    content: "";
    position: absolute;
    bottom: 10px; left: 50%; transform: translateX(-50%);
    width: 24px; height: 1px;
    background: var(--gold-3);
    opacity: .65;
}
.countdown .num {
    font-family: var(--font-display);
    font-size: clamp(32px, 4.4vw, 48px);
    color: var(--gold-3);
    display: block;
    line-height: 1;
    font-weight: 500;
    font-style: italic;
}
.countdown small {
    color: #d8c8b3;
    letter-spacing: .35em;
    text-transform: uppercase;
    font-size: 9px;
    margin-top: 8px;
    display: block;
    font-weight: 500;
}
@media (max-width: 520px) {
    .countdown { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 640px) {
    .section-countdown > .container { padding: 30px 24px 28px; max-width: 100%; }
    .section-countdown .side-ornament { display: none; }
}

/* ==========================================================================
   EVENT DETAILS — refined
   ========================================================================== */
.event-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 56px;
}
.event-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 28px 0 44px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
    position: relative;
    overflow: hidden;
}
.event-card::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--gold-foil);
    background-size: 200% 100%;
    transition: background-position .6s var(--ease);
}
.event-card.sage {
    background: linear-gradient(180deg, var(--paper) 0%, #ebeef4 100%);
    border-color: var(--mist);
}
.event-card.sage::before {
    background: linear-gradient(90deg, #d8e0ec, #3d5278, #d8e0ec);
    background-size: 200% 100%;
}
.event-card.sage .event-label { color: var(--navy-2); }
.event-card.sage:hover { box-shadow: 0 24px 50px -28px rgba(36, 57, 86, .45); }
.event-card.rose {
    background: linear-gradient(180deg, var(--paper) 0%, #faf2e6 100%);
    border-color: var(--gold-soft);
}
.event-card.rose::before {
    background: linear-gradient(90deg, #efdfc4, #c69b6d, #efdfc4);
    background-size: 200% 100%;
}
.event-card.rose .event-label { color: var(--brass); }
.event-card.rose:hover { box-shadow: 0 24px 50px -28px rgba(176, 137, 87, .55); }

.event-icon {
    width: 36px; height: 36px;
    margin: 30px auto 8px;
    opacity: .85;
    color: var(--gold-2);
}
.event-card.sage .event-icon { color: var(--navy); }
.event-card.rose .event-icon  { color: var(--gold-2); }
.event-card::after {
    content: "\2744";
    position: absolute;
    top: 18px; right: 22px;
    font-size: 14px;
    color: var(--gold);
    opacity: .5;
}
.event-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.event-card:hover::before { background-position: 100% 0; }

.event-card .event-label {
    color: var(--gold-2);
    letter-spacing: .42em;
    text-transform: uppercase;
    font-size: 10px;
    margin-bottom: 12px;
    font-weight: 600;
    display: block;
    padding-top: 4px;
}
.event-card h3 {
    font-size: 22px;
    margin: 8px 22px 8px;
    font-weight: 500;
    font-style: italic;
}
.event-card .time {
    color: var(--ink);
    font-weight: 500;
    margin-bottom: 22px;
    font-family: var(--font-display);
    font-size: 19px;
    font-style: italic;
}
.event-card .venue {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 15px;
}
.event-card .address {
    color: var(--ink-soft);
    font-size: 14px;
    margin-bottom: 28px;
    line-height: 1.65;
    padding: 0 16px;
}
@media (max-width: 720px) {
    .event-grid { grid-template-columns: 1fr; gap: 22px; }
    .event-card { padding: 0 0 36px; }
}

/* ==========================================================================
   GALLERY — dengan lightbox support
   ========================================================================== */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 50px;
}
.gallery .g-item.reveal { transition-delay: 0s; }
.gallery .g-item.reveal:nth-child(1) { transition-delay: .05s; }
.gallery .g-item.reveal:nth-child(2) { transition-delay: .15s; }
.gallery .g-item.reveal:nth-child(3) { transition-delay: .25s; }
.gallery .g-item.reveal:nth-child(4) { transition-delay: .35s; }
.gallery .g-item.reveal:nth-child(5) { transition-delay: .45s; }
.gallery .g-item.reveal:nth-child(6) { transition-delay: .55s; }
.gallery .g-item.reveal:nth-child(7) { transition-delay: .65s; }
.gallery .g-item.reveal:nth-child(8) { transition-delay: .75s; }

.gallery .g-item {
    border-radius: var(--r);
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 30%, #fbeed7 0%, transparent 60%),
        radial-gradient(circle at 70% 70%, #f5e1c0 0%, transparent 60%),
        linear-gradient(135deg, #f3e9dd, #efe1d0);
    aspect-ratio: 3 / 4;
    display: grid; place-items: center;
    box-shadow: var(--shadow-sm);
    transition: transform .55s var(--ease), box-shadow .55s var(--ease), border-color .55s var(--ease);
    position: relative;
    border: 1px solid var(--line);
    cursor: pointer;
    isolation: isolate;
}
.gallery .g-item img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform .7s var(--ease-out);
}
.gallery .g-item::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(115deg,
        transparent 30%,
        rgba(255, 255, 255, .55) 45%,
        rgba(255, 248, 224, .85) 50%,
        rgba(255, 255, 255, .55) 55%,
        transparent 70%);
    transform: translateX(-120%);
    transition: transform .9s var(--ease);
    pointer-events: none;
    z-index: 2;
}
.gallery .g-item::after {
    content: attr(data-label);
    position: absolute; inset: auto 0 0 0; padding: 18px 20px;
    background: linear-gradient(180deg, transparent, rgba(42, 33, 40, .92));
    color: var(--gold-3);
    font-size: 11px; letter-spacing: .28em;
    text-transform: uppercase; font-weight: 600;
    transform: translateY(100%);
    transition: transform .5s var(--ease);
    z-index: 3;
}
.gallery .g-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--gold-2);
    border-color: var(--gold-2);
}
.gallery .g-item:hover img { transform: scale(1.08); }
.gallery .g-item:hover::before { transform: translateX(120%); }
.gallery .g-item:hover::after  { transform: translateY(0); }

@keyframes galleryRise {
    from { opacity: 0; transform: translateY(36px) scale(.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.gallery .g-item.reveal.is-visible {
    animation: galleryRise .9s var(--ease-out) both;
}
.gallery .g-item span {
    font-family: var(--font-script);
    font-size: 56px;
    color: var(--gold-2);
    line-height: 1;
    transition: transform .6s var(--ease), color .45s var(--ease);
    z-index: 1;
}
.gallery .g-item:hover span { transform: scale(1.15) rotate(-2deg); color: var(--burgundy); }

@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 540px) {
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .gallery .g-item:hover { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
    .gallery .g-item,
    .gallery .g-item span,
    .gallery .g-item::before,
    .gallery .g-item::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   LIGHTBOX MODAL
   ========================================================================== */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(15, 24, 45, .94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 90;
    padding: 24px;
    animation: lightboxIn .35s var(--ease-out);
}
.lightbox.is-open { display: flex; }
@keyframes lightboxIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.lightbox-content {
    position: relative;
    max-width: min(95vw, 900px);
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--r);
    box-shadow: 0 30px 80px rgba(0,0,0, .5);
    animation: lightboxImgIn .5s var(--ease-out);
}
@keyframes lightboxImgIn {
    from { transform: scale(.94); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.lightbox-close {
    position: absolute;
    top: -8px; right: -8px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255, .12);
    color: #fff;
    border: 1px solid rgba(255,255,255, .25);
    cursor: pointer;
    display: grid; place-items: center;
    transition: background .25s var(--ease), transform .25s var(--ease);
    backdrop-filter: blur(10px);
}
.lightbox-close:hover { background: rgba(255,255,255, .22); transform: scale(1.08); }
.lightbox-close svg { width: 18px; height: 18px; }

.lightbox-nav {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255, .12);
    color: #fff;
    border: 1px solid rgba(255,255,255, .25);
    cursor: pointer;
    display: grid; place-items: center;
    transition: background .25s var(--ease), transform .25s var(--ease);
    backdrop-filter: blur(10px);
}
.lightbox-nav:hover { background: rgba(255,255,255, .22); }
.lightbox-nav.prev { left: -64px; }
.lightbox-nav.next { right: -64px; }
.lightbox-nav svg { width: 18px; height: 18px; }

.lightbox-caption {
    position: absolute;
    bottom: -36px;
    left: 0; right: 0;
    text-align: center;
    color: var(--gold-3);
    font-size: 11px;
    letter-spacing: .28em;
    text-transform: uppercase;
    font-weight: 600;
}
.lightbox-counter {
    position: absolute;
    top: -36px;
    right: 0;
    color: rgba(255,255,255, .6);
    font-size: 11px;
    letter-spacing: .2em;
    font-weight: 500;
}

@media (max-width: 720px) {
    .lightbox-nav.prev { left: 8px; }
    .lightbox-nav.next { right: 8px; }
    .lightbox-close { top: -52px; right: 0; }
    .lightbox-counter { top: -50px; }
    .lightbox-caption { bottom: -28px; }
}

/* ==========================================================================
   GIFT
   ========================================================================== */
.gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
    margin-top: 50px;
    max-width: 800px;
    margin-left: auto; margin-right: auto;
}
.gift-card {
    background: linear-gradient(180deg, var(--paper) 0%, var(--paper-soft) 100%);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 40px 30px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
    position: relative;
    overflow: hidden;
}
.gift-card::before {
    content: "";
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 70px; height: 4px;
    background: var(--gold-foil);
    background-size: 200% 100%;
}
.gift-card.sage {
    background: linear-gradient(180deg, var(--paper) 0%, #ebeef4 100%);
    border-color: var(--mist);
}
.gift-card.sage::before {
    background: linear-gradient(90deg, #d8e0ec, #3d5278, #d8e0ec);
    background-size: 200% 100%;
}
.gift-card.sage .gift-icon { color: var(--navy); }
.gift-card.sage .bank     { color: var(--navy-2); }
.gift-card.rose {
    background: linear-gradient(180deg, var(--paper) 0%, #faf2e6 100%);
    border-color: var(--gold-soft);
}
.gift-card.rose::before {
    background: linear-gradient(90deg, #efdfc4, #c69b6d, #efdfc4);
    background-size: 200% 100%;
}
.gift-card.rose .gift-icon { color: var(--gold-2); }
.gift-card.rose .bank     { color: var(--brass); }
.gift-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.gift-card .gift-icon {
    width: 46px; height: 46px;
    margin: 6px auto 16px;
    color: var(--gold-2);
}
.gift-card .bank {
    color: var(--gold-2);
    letter-spacing: .32em;
    text-transform: uppercase;
    font-size: 11px;
    margin-bottom: 8px;
    font-weight: 600;
}
.gift-card .account {
    font-family: var(--font-display);
    font-size: 28px;
    margin: 8px 0;
    letter-spacing: .04em;
    font-weight: 500;
}
.gift-card .holder {
    color: var(--ink-soft);
    font-size: 13px;
    margin-bottom: 18px;
    font-style: italic;
}
.gift-card .btn-outline { margin-top: 8px; }

/* ==========================================================================
   RSVP FORM
   ========================================================================== */
.rsvp-form {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 46px 44px;
    box-shadow: var(--shadow);
    margin: 50px auto 0;
    max-width: 680px;
    position: relative;
    overflow: hidden;
}
.rsvp-form::before {
    content: "";
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 100px; height: 4px;
    background: linear-gradient(90deg, #1a2744, #3d5278, #c69b6d, #3d5278, #1a2744);
    background-size: 200% 100%;
}
.rsvp-form .field {
    position: relative;
    margin-bottom: 24px;
}
.rsvp-form label {
    display: block;
    font-size: 11px;
    color: var(--gold-2);
    letter-spacing: .22em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}
.rsvp-form label > span {
    display: inline-block;
    background: var(--paper);
    padding-right: 8px;
}
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
    width: 100%;
    margin-top: 8px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-bottom: 2px solid var(--line);
    border-radius: var(--r-xs);
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--ink);
    background: var(--ivory);
    color-scheme: light only;
    text-transform: none;
    letter-spacing: 0;
    transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
    outline: none;
    border-color: var(--gold-soft);
    border-bottom-color: var(--gold);
    background: #fff;
    box-shadow: 0 6px 16px -10px rgba(176, 137, 87, .3);
}
.rsvp-form textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
    font-family: var(--font-sans);
}
.rsvp-form select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a6a35' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

/* ==========================================================================
   WISHES
   ========================================================================== */
.wishes-wrap { max-width: 760px; margin: 50px auto 0; }
.wishes {
    list-style: none; padding: 0; margin: 0;
    max-height: 600px; overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
}
.wishes::-webkit-scrollbar { width: 6px; }
.wishes::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }
.wish {
    background: linear-gradient(180deg, var(--paper) 0%, var(--paper-soft) 100%);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 24px 26px 22px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-xs);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
    position: relative;
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 18px;
}
.wish:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.wish::before {
    content: ""; position: absolute;
    top: 24px; left: -1px; width: 3px; height: 36px;
    background: linear-gradient(180deg, var(--gold), var(--gold-2));
    border-radius: 0 2px 2px 0;
}
.wish .avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-soft), var(--gold-3));
    color: #fff;
    display: grid; place-items: center;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255,255,255, .5);
}
.wishes li:nth-child(6n+1) .avatar { background: linear-gradient(135deg, #d8e0ec, #3d5278); }
.wishes li:nth-child(6n+2) .avatar { background: linear-gradient(135deg, #efdfc4, #c69b6d); }
.wishes li:nth-child(6n+3) .avatar { background: linear-gradient(135deg, var(--gold-soft), var(--gold-2)); }
.wishes li:nth-child(6n+4) .avatar { background: linear-gradient(135deg, #1a2744, #4a5f8a); }
.wishes li:nth-child(6n+5) .avatar { background: linear-gradient(135deg, #6b7fa3, #243956); }
.wishes li:nth-child(6n)   .avatar { background: linear-gradient(135deg, #8a6a35, #c69b6d); }
.wish-body { min-width: 0; }
.wish .who {
    font-weight: 500;
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 17px;
    font-style: italic;
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.wish .who .badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: 9px;
    letter-spacing: .15em;
    text-transform: uppercase;
    font-weight: 600;
    font-family: var(--font-sans);
    font-style: normal;
}
.wish .who .badge.hadir { background: #e6f1ea; color: #2f6f3f; }
.wish .who .badge.tidak { background: #f5e2e2; color: #b03030; }
.wish .msg {
    color: var(--ink);
    margin: 6px 0 10px;
    line-height: 1.75;
    font-size: 14px;
}
.wish .when {
    color: var(--muted);
    font-size: 11px;
    margin: 0;
    letter-spacing: .12em;
}
.wishes .empty {
    text-align: center;
    color: var(--muted);
    padding: 46px;
    background: var(--paper);
    border: 1px dashed var(--line);
    border-radius: var(--r);
    font-style: italic;
}

/* ==========================================================================
   CLOSING
   ========================================================================== */
.section-closing {
    text-align: center;
    padding: 120px 24px 130px;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(184, 196, 217, .45) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(198, 155, 109, .22) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(74, 95, 138, .15) 0%, transparent 60%),
        linear-gradient(180deg, #f6f8fc 0%, #ebeef4 50%, #e8eef6 100%);
}
.section-closing .closing {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(18px, 2.5vw, 22px);
    color: var(--ink-soft);
    max-width: 640px;
    margin: 16px auto 32px;
    line-height: 1.85;
}
.section-closing .sign {
    font-family: var(--font-script);
    font-size: clamp(56px, 8vw, 84px);
    color: var(--ink);
    font-weight: 400;
    margin: 12px 0 0;
    line-height: 1;
    background: linear-gradient(135deg, var(--ink) 0%, #1a2744 50%, #c69b6d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background: linear-gradient(180deg, #2a1f1c 0%, #211814 100%);
    color: #d8c8b3;
    text-align: center;
    padding: 36px 18px;
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.footer a {
    color: var(--gold-3);
    font-weight: 500;
    text-decoration: none;
    transition: color .25s var(--ease);
}
.footer a:hover { color: var(--gold-soft); }

/* ==========================================================================
   FLASH MESSAGES
   ========================================================================== */
.flash {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
    z-index: 100;
    padding: 14px 28px; border-radius: var(--r-full);
    box-shadow: var(--shadow);
    font-size: 14px;
    border: 1px solid;
    animation: slideDown .45s var(--ease-out);
}
.flash.success { background: #e6f1ea; color: #2f6f3f; border-color: #b9d8c1; }
.flash.error   { background: #f5e2e2; color: #b03030; border-color: #e8b9b9; }
@keyframes slideDown {
    from { transform: translate(-50%, -24px); opacity: 0; }
    to   { transform: translate(-50%, 0); opacity: 1; }
}

/* ==========================================================================
   MUSIC TOGGLE — vinyl floating button
   ========================================================================== */
.music-toggle {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 56px; height: 56px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center,
            var(--ink) 0%, var(--ink) 28%,
            transparent 28%, transparent 32%,
            var(--ink) 32%, var(--ink) 100%);
    border: 1px solid rgba(255,255,255, .15);
    box-shadow:
        0 16px 30px -10px rgba(0, 0, 0, .45),
        inset 0 0 0 2px rgba(212, 180, 131, .4);
    color: var(--gold-3);
    cursor: pointer;
    z-index: 80;
    display: grid; place-items: center;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
    backdrop-filter: blur(8px);
}
.music-toggle:hover { transform: scale(1.06); box-shadow: 0 22px 38px -10px rgba(0, 0, 0, .55); }
.music-toggle::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1px solid rgba(212, 180, 131, .2);
    pointer-events: none;
}
.music-toggle .vinyl-center {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 2px var(--ink);
    position: relative;
    z-index: 2;
}
.music-toggle.is-playing {
    animation: vinylSpin 4s linear infinite;
}
.music-toggle.is-playing .vinyl-center {
    background: var(--gold-3);
}
.music-toggle .vinyl-icon {
    position: absolute;
    top: 8px; right: 8px;
    width: 16px; height: 16px;
    color: var(--gold-3);
    z-index: 3;
    display: grid; place-items: center;
}
@keyframes vinylSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@media (max-width: 768px) {
    .music-toggle { width: 50px; height: 50px; bottom: 86px; right: 14px; }
}

/* ==========================================================================
   BOTTOM NAVBAR
   ========================================================================== */
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translate(-50%, 30px);
    z-index: 70;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(176, 137, 87, .3);
    border-radius: var(--r-full);
    box-shadow:
        0 22px 44px -16px rgba(60, 40, 20, .35),
        0 0 0 1px rgba(255,255,255, .5) inset;
    opacity: 0;
    pointer-events: none;
    transition: opacity .5s var(--ease), transform .6s var(--ease-out);
    max-width: calc(100vw - 28px);
    overflow-x: auto;
    scrollbar-width: none;
}
.bottom-nav::-webkit-scrollbar { display: none; }
body.nav-ready .bottom-nav {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}
.bn-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 60px;
    padding: 8px 12px;
    border-radius: var(--r-full);
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 10px;
    letter-spacing: .06em;
    font-weight: 500;
    transition: color .25s var(--ease), background .35s var(--ease), transform .25s var(--ease);
    position: relative;
}
.bn-item svg {
    width: 18px; height: 18px;
    flex: 0 0 auto;
    transition: transform .35s var(--ease-out), color .25s var(--ease);
}
.bn-item span { font-weight: 500; line-height: 1; white-space: nowrap; }
.bn-item:hover {
    color: var(--gold-2);
    background: rgba(176, 137, 87, .1);
}
.bn-item:hover svg { transform: translateY(-2px); }
.bn-item.active {
    color: #fff;
    background: linear-gradient(135deg, #1a2744 0%, #3d5278 50%, #c69b6d 100%);
    box-shadow: 0 10px 22px -8px rgba(26, 39, 68, .55), inset 0 1px 0 rgba(255,255,255, .3);
}
.bn-item.active svg { color: #fff; }
.bn-item.active::after {
    content: "";
    position: absolute;
    top: -5px; left: 50%;
    width: 4px; height: 4px;
    background: var(--gold-3);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 8px var(--gold-3);
}
body.nav-ready .content { padding-bottom: 110px; }
body:not(.nav-ready) .bottom-nav { display: none; }

@media (min-width: 769px) {
    .bottom-nav { display: none !important; }
    body.nav-ready .content { padding-bottom: 0; }
}
@media (max-width: 768px) {
    .bottom-nav { bottom: 10px; gap: 0; padding: 5px; max-width: calc(100vw - 18px); }
    .bn-item { min-width: 48px; padding: 7px 8px; font-size: 9px; }
    .bn-item svg { width: 16px; height: 16px; }
    body.nav-ready .content { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) {
    .bottom-nav { transition: opacity .001ms !important; transform: none !important; }
    .bn-item svg { transition: none !important; }
}
.btn-location svg { flex: 0 0 auto; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 720px) {
    .section { padding: 80px 18px; }
    .cover-page, .cover, .hero { padding: 90px 18px 70px; }
    .cover-page::after, .cover::after, .hero::after { inset: 12px; }
    .event-card { padding: 0 0 32px; }
    .rsvp-form { padding: 34px 24px; }
    .ornament.top-left, .ornament.top-right,
    .ornament.bottom-left, .ornament.bottom-right { width: 120px; height: 120px; }
    .quote-frame { padding: 36px 26px; }
    .quote-frame::before, .quote-frame::after { font-size: 68px; }
    .couple-photo { width: 168px; height: 168px; }
    .guest-card { padding: 18px 22px; }
    .wax-seal { width: 54px; height: 54px; }
    .wax-seal .seal-monogram { font-size: 22px; }
    .std-card { padding: 56px 26px 42px; }
    .std-card .save { font-size: 40px; padding: 12px 4px 4px; }
    .std-card .date-big { font-size: 60px; }
    .std-card .month { font-size: 12px; letter-spacing: .32em; }
    .std-card .year { font-size: 12px; letter-spacing: .32em; }
}
@media (max-width: 420px) {
    .couple { font-size: 38px; }
    .kicker { letter-spacing: .3em; }
    .monogram { font-size: 64px; }
    .btn-primary { padding: 14px 28px; font-size: 11px; letter-spacing: .26em; }
}

/* ==========================================================================
   Reduced motion global
   ========================================================================== */
/* Lock warna agar tidak dipengaruhi tema gelap browser */
:root { color-scheme: light only; }
html, body { color-scheme: light only; background-color: var(--cream); }
input, select, textarea, button { color-scheme: light only; }
@media (prefers-color-scheme: dark) {
    html, body { background: var(--cream); color: var(--ink); }
    .rsvp-form input, .rsvp-form select, .rsvp-form textarea {
        background-color: var(--ivory) !important; color: var(--ink) !important;
    }
    .rsvp-form input:-webkit-autofill {
        -webkit-text-fill-color: var(--ink) !important;
        -webkit-box-shadow: 0 0 0 1000px var(--ivory) inset !important;
    }
}
@media (forced-colors: active) { * { forced-color-adjust: none; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}
