/* =========================================================================
   UNDANGAN PERNIKAHAN DIGITAL — "Nocturne Garden"
   Palet malam indigo + garis emas antik + aksen sage, terinspirasi taman
   di waktu senja dengan kunang-kunang. Dibuat khusus, bukan template umum.
   ========================================================================= */

:root {
    --ink: #0F1428;
    --ink-2: #1A2148;
    --ink-3: #262F5C;
    --gold: #C9A24B;
    --gold-pale: #E9D9A8;
    --ivory: #F6F1E4;
    --sage: #7E9273;
    --line: color-mix(in srgb, var(--gold) 22%, transparent);
    --shadow: rgba(6, 8, 20, 0.45);

    --font-display: 'Fraunces', serif;
    --font-body: 'Jost', sans-serif;
    --font-mono: 'Space Mono', monospace;

    --ease: cubic-bezier(.22, 1, .36, 1);
}

/* =========================================================================
   10 VARIAN TEMA — pilih tema aktif lewat fungsi tema_aktif() di
   includes/functions.php. Setiap tema hanya menimpa 7 variabel warna
   di atas; seluruh layout, animasi, dan komponen tetap sama persis.
   ========================================================================= */

/* 2. Ivory Sage — krem hangat + hijau hutan + emas pudar (terang, botanikal) */
[data-theme="ivory-sage"] {
    --ink: #F7F2E6;
    --ink-2: #EEE5D0;
    --ink-3: #E2D5B8;
    --gold: #A9843F;
    --gold-pale: #7C5E2A;
    --ivory: #2E3626;
    --sage: #4B6350;
    --shadow: rgba(60, 50, 20, 0.14);
}

/* 3. Terracotta Dusk — tanah liat hangat + krem + coklat tua */
[data-theme="terracotta-dusk"] {
    --ink: #F3E7DA;
    --ink-2: #EAD7C1;
    --ink-3: #DEC3A5;
    --gold: #B8642E;
    --gold-pale: #8A4520;
    --ivory: #3A2A1E;
    --sage: #7A6B4F;
    --shadow: rgba(80, 45, 20, 0.16);
}

/* 4. Emerald Noir — hijau zamrud pekat + emas + blush lembut */
[data-theme="emerald-noir"] {
    --ink: #0B1F17;
    --ink-2: #123227;
    --ink-3: #1B4636;
    --gold: #D4AF6A;
    --gold-pale: #EBD9AE;
    --ivory: #EFEDE4;
    --sage: #C98F82;
    --shadow: rgba(3, 12, 8, 0.5);
}

/* 5. Lavender Mist — lavender lembut + plum + silver (terang, feminin) */
[data-theme="lavender-mist"] {
    --ink: #F3EFF6;
    --ink-2: #E7DFEE;
    --ink-3: #D8CBE6;
    --gold: #8D6FA8;
    --gold-pale: #6B4E88;
    --ivory: #322A3D;
    --sage: #8AA08F;
    --shadow: rgba(60, 40, 80, 0.12);
}

/* 6. Burgundy Royale — merah anggur gelap + emas + krem, mewah & formal */
[data-theme="burgundy-royale"] {
    --ink: #250C14;
    --ink-2: #3A121D;
    --ink-3: #4F1A29;
    --gold: #CBA355;
    --gold-pale: #E9D3A0;
    --ivory: #F3E9E2;
    --sage: #C98B8B;
    --shadow: rgba(10, 2, 5, 0.5);
}

/* 7. Ocean Slate — biru slate malam + pasir + terracotta lembut */
[data-theme="ocean-slate"] {
    --ink: #101E28;
    --ink-2: #17303F;
    --ink-3: #204359;
    --gold: #D9A066;
    --gold-pale: #F0C899;
    --ivory: #EAF1F2;
    --sage: #6FA3A0;
    --shadow: rgba(4, 10, 15, 0.45);
}

/* 8. Blush Petal — blush pink lembut + rose gold + sage, terang & romantis */
[data-theme="blush-petal"] {
    --ink: #FBF0EE;
    --ink-2: #F5E1DD;
    --ink-3: #EBCAC3;
    --gold: #B97A6B;
    --gold-pale: #8F5245;
    --ivory: #3E2C29;
    --sage: #7C9078;
    --shadow: rgba(90, 40, 30, 0.12);
}

/* 9. Mustard Earth — mustard/ochre + olive + krem, hangat & boho */
[data-theme="mustard-earth"] {
    --ink: #F6EFDD;
    --ink-2: #ECE0BE;
    --ink-3: #DDC98E;
    --gold: #A9762B;
    --gold-pale: #7C551D;
    --ivory: #362C1A;
    --sage: #6B7A45;
    --shadow: rgba(70, 55, 15, 0.16);
}

/* 10. Monochrome Noir — hitam pekat + silver/putih, minimalis & modern */
[data-theme="monochrome-noir"] {
    --ink: #0A0A0B;
    --ink-2: #171718;
    --ink-3: #232324;
    --gold: #C7C7C7;
    --gold-pale: #EDEDED;
    --ivory: #F2F2F0;
    --sage: #8C8C8C;
    --shadow: rgba(0, 0, 0, 0.55);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    background: var(--ink);
    color: var(--ivory);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body { min-height: 100vh; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }

.app {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--ink);
    overflow: hidden;
    box-shadow: 0 0 60px var(--shadow);
}

@media (min-width: 481px) {
    body { background: #05070f; }
    .app { min-height: 100vh; }
}

/* ---------- Kunang-kunang ambient (signature motion) ---------- */
.fireflies {
    position: fixed;
    inset: 0;
    max-width: 480px;
    margin: 0 auto;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.firefly {
    position: absolute;
    bottom: -10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold-pale);
    box-shadow: 0 0 6px 2px color-mix(in srgb, var(--gold-pale) 80%, transparent);
    opacity: 0;
    animation: rise 9s linear infinite;
}

@keyframes rise {
    0%   { opacity: 0; transform: translate(0, 0) scale(.6); }
    10%  { opacity: .9; }
    50%  { transform: translate(14px, -55vh) scale(1); }
    90%  { opacity: .5; }
    100% { opacity: 0; transform: translate(-8px, -100vh) scale(.5); }
}

@media (prefers-reduced-motion: reduce) {
    .firefly { animation: none; display: none; }
}

/* ---------- Ornamen garis daun (SVG signature) ---------- */
.sprig { stroke: var(--gold); fill: none; stroke-width: 1.4; }
.sprig-draw path, .sprig-draw ellipse {
    stroke-dasharray: 340;
    stroke-dashoffset: 340;
    animation: draw 2.4s var(--ease) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* =========================================================================
   INTRO / COVER
   ========================================================================= */

.intro {
    position: fixed;
    inset: 0;
    z-index: 50;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 32px;
    background:
        radial-gradient(circle at 50% 18%, rgba(126, 146, 115, .18), transparent 55%),
        linear-gradient(180deg, #0B0F22 0%, #141A38 55%, #0B0F22 100%);
    transition: clip-path 1.1s var(--ease), opacity .9s ease .2s;
}

.intro.opened {
    clip-path: circle(0% at 50% 92%);
    opacity: 0;
    pointer-events: none;
}

.intro__eyebrow {
    font-family: var(--font-mono);
    letter-spacing: .28em;
    font-size: 11px;
    color: var(--gold-pale);
    text-transform: uppercase;
    opacity: .85;
    margin-bottom: 18px;
}

.intro__monogram {
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
}

.intro__names {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: 30px;
    line-height: 1.25;
    color: var(--ivory);
}

.intro__amp {
    display: block;
    color: var(--gold);
    font-size: 20px;
    margin: 2px 0;
}

.intro__divider {
    width: 46px;
    height: 1px;
    background: var(--line);
    margin: 22px 0;
}

.intro__kepada {
    font-size: 13px;
    color: rgba(246, 241, 228, .65);
    margin-bottom: 6px;
}

.intro__tamu {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    color: var(--gold-pale);
    margin-bottom: 34px;
    word-break: break-word;
}

.btn-buka {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-pale);
    transition: background .35s var(--ease), color .35s var(--ease), transform .2s ease;
    animation: pulse-ring 2.6s ease-in-out infinite;
}
.btn-buka:active { transform: scale(.96); }
.btn-buka svg { width: 14px; height: 14px; }

@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 35%, transparent); }
    50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--gold) 0%, transparent); }
}

.intro__footnote {
    margin-top: 22px;
    font-size: 11px;
    color: color-mix(in srgb, var(--ivory) 40%, transparent);
}

/* =========================================================================
   SHELL / NAV
   ========================================================================= */

.shell { position: relative; z-index: 3; padding-bottom: 92px; min-height: 100vh; }

.section {
    display: none;
    padding: 64px 26px 40px;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s var(--ease), transform .5s var(--ease);
}

.section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 10px;
    display: block;
}

.h-section {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 28px;
    color: var(--ivory);
    margin-bottom: 6px;
}

.h-section em { color: var(--gold); font-style: italic; }

.sub-section {
    font-size: 14px;
    color: color-mix(in srgb, var(--ivory) 60%, transparent);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 440px;
    display: flex;
    justify-content: space-between;
    background: rgba(26, 33, 72, .78);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 10px 6px;
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity .6s ease .3s;
}
.bottom-nav.visible { opacity: 1; pointer-events: auto; }

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 2px;
    border-radius: 14px;
    color: color-mix(in srgb, var(--ivory) 45%, transparent);
    transition: color .3s ease;
}
.nav-item svg { width: 18px; height: 18px; }
.nav-item span { font-family: var(--font-mono); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.nav-item.active { color: var(--gold-pale); }
.nav-item.active svg { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--gold) 50%, transparent)); }

/* Music toggle */
.music-toggle {
    position: fixed;
    right: 18px;
    bottom: 100px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--ink-3);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 41;
    opacity: 0;
    pointer-events: none;
    transition: opacity .6s ease .3s;
}
.music-toggle.visible { opacity: 1; pointer-events: auto; }
.music-toggle svg { width: 16px; height: 16px; color: var(--gold-pale); }
.music-toggle.playing svg { animation: spin 3.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================================
   HOME
   ========================================================================= */

.couple {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 26px;
}

.couple__photo {
    width: 118px;
    height: 148px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px var(--shadow);
}

.couple__amp {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 26px;
    color: var(--gold);
}

.person-card { text-align: center; margin-bottom: 30px; }
.person-card + .person-card { margin-top: -6px; }

.person-card__name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
    color: var(--ivory);
    margin-bottom: 6px;
}

.person-card__meta {
    font-size: 13px;
    color: color-mix(in srgb, var(--ivory) 60%, transparent);
    line-height: 1.6;
}

.person-card__ig {
    display: inline-block;
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--sage);
    letter-spacing: .04em;
}

.divider-orn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
    color: var(--gold);
}
.divider-orn::before, .divider-orn::after {
    content: '';
    height: 1px;
    flex: 1;
    background: var(--line);
}

.quote-block {
    position: relative;
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px 22px;
    text-align: center;
}
.quote-block__mark {
    font-family: var(--font-display);
    font-size: 42px;
    color: var(--gold);
    line-height: 0;
    display: block;
    margin-bottom: 6px;
}
.quote-block__text {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 15px;
    line-height: 1.75;
    color: var(--ivory);
}
.quote-block__source {
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--sage);
    letter-spacing: .06em;
}

/* =========================================================================
   ACARA / COUNTDOWN
   ========================================================================= */

.countdown {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 34px;
}
.countdown__box {
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 14px;
    width: 68px;
    padding: 12px 0;
    text-align: center;
}
.countdown__num {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 20px;
    color: var(--gold-pale);
}
.countdown__label {
    font-family: var(--font-mono);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: color-mix(in srgb, var(--ivory) 50%, transparent);
    margin-top: 4px;
}

.event-card {
    background: linear-gradient(160deg, var(--ink-2), var(--ink));
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 26px 22px;
    margin-bottom: 20px;
}
.event-card__name {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 22px;
    color: var(--gold-pale);
    margin-bottom: 14px;
}
.event-card__row {
    display: flex;
    gap: 12px;
    font-size: 13.5px;
    color: color-mix(in srgb, var(--ivory) 80%, transparent);
    margin-bottom: 10px;
    line-height: 1.5;
}
.event-card__row svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--sage); }
.event-card__actions { display: flex; gap: 10px; margin-top: 16px; }

.btn-outline {
    flex: 1;
    text-align: center;
    padding: 11px 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 12px;
    font-family: var(--font-mono);
    letter-spacing: .04em;
    color: var(--gold-pale);
    transition: border-color .3s, background .3s;
}
.btn-outline:active { background: var(--ink-3); border-color: var(--gold); }

/* =========================================================================
   GALERI
   ========================================================================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.gallery-grid > a:nth-child(3n+1) { grid-row: span 2; }
.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--line);
}
.gallery-grid > a:nth-child(3n+1) img { aspect-ratio: 1/2.05; }
.gallery-grid > a:not(:nth-child(3n+1)) img { aspect-ratio: 1/1; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(8, 10, 22, .94);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lightbox.open { display: flex; animation: fade-in .3s ease; }
.lightbox img {
    max-width: 100%;
    max-height: 82vh;
    border-radius: 10px;
    animation: pop-in .35s var(--ease);
}
.lightbox__close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ink-2);
    color: var(--ivory);
    display: flex;
    align-items: center;
    justify-content: center;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

/* =========================================================================
   KADO / REKENING
   ========================================================================= */

.rekening-card {
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.rekening-card__bank {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .08em;
    color: var(--sage);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.rekening-card__nomor {
    font-family: var(--font-mono);
    font-size: 19px;
    color: var(--gold-pale);
    letter-spacing: .03em;
}
.rekening-card__nama {
    font-size: 13px;
    color: color-mix(in srgb, var(--ivory) 65%, transparent);
    margin-top: 6px;
}
.btn-copy {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-pale);
    transition: background .3s;
}
.btn-copy svg { width: 15px; height: 15px; }
.btn-copy.copied { background: var(--sage); color: var(--ink); border-color: var(--sage); }

.alamat-box {
    margin-top: 26px;
    border-left: 2px solid var(--gold);
    padding-left: 16px;
}
.alamat-box__label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .08em;
    color: var(--sage);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.alamat-box__text { font-size: 13.5px; line-height: 1.6; color: color-mix(in srgb, var(--ivory) 80%, transparent); }

/* =========================================================================
   UCAPAN / PESAN & KESAN
   ========================================================================= */

.form-ucapan { margin-bottom: 38px; }
.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 8px;
}
.field input, .field textarea {
    width: 100%;
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px 14px;
    color: var(--ivory);
    font-family: var(--font-body);
    font-size: 14px;
    resize: vertical;
    transition: border-color .3s;
}
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.pill-group { display: flex; gap: 8px; }
.pill-radio { flex: 1; }
.pill-radio input { display: none; }
.pill-radio span {
    display: block;
    text-align: center;
    padding: 11px 4px;
    border-radius: 12px;
    border: 1px solid var(--line);
    font-size: 12px;
    color: color-mix(in srgb, var(--ivory) 60%, transparent);
    transition: all .25s;
}
.pill-radio input:checked + span {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
    font-weight: 600;
}

.btn-submit {
    width: 100%;
    padding: 15px 0;
    border-radius: 14px;
    background: var(--gold);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 700;
    transition: transform .2s ease, opacity .2s ease;
}
.btn-submit:active { transform: scale(.98); }
.btn-submit[disabled] { opacity: .5; }

.ucapan-list { display: flex; flex-direction: column; gap: 14px; }
.ucapan-item {
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 20px;
    animation: slide-up .4s var(--ease);
}
@keyframes slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.ucapan-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.ucapan-item__nama {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--ivory);
}
.badge {
    font-family: var(--font-mono);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 4px 9px;
    border-radius: 999px;
}
.badge.hadir { background: color-mix(in srgb, var(--sage) 20%, transparent); color: var(--sage); }
.badge.ragu { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold-pale); }
.badge.tidak { background: rgba(199,90,90,.16); color: #d98c8c; }

.ucapan-item__pesan {
    font-size: 13.5px;
    color: color-mix(in srgb, var(--ivory) 78%, transparent);
    line-height: 1.6;
}

.empty-state {
    text-align: center;
    padding: 30px 0;
    color: color-mix(in srgb, var(--ivory) 40%, transparent);
    font-size: 13px;
}

/* Footer kecil */
.foot-note {
    text-align: center;
    margin-top: 40px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .08em;
    color: color-mix(in srgb, var(--ivory) 30%, transparent);
    text-transform: uppercase;
}
