/* =========================================
   TOKENS & RESET
========================================= */
:root {
    --bg-deep:    #090e1a;
    --bg-mid:     #0d1629;
    --bg-card:    rgba(255,255,255,0.04);
    --gold:       #e6c568;
    --gold-dim:   #a88a3a;
    --gold-glow:  rgba(230,197,104,0.25);
    --white:      #ffffff;
    --muted:      rgba(255,255,255,0.55);
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans:  'Plus Jakarta Sans', system-ui, sans-serif;
    --font-script:'Great Vibes', cursive;
    --max-w:      480px;
    --radius-lg:  28px;
    --radius-xl:  40px;
    --trans:      cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg-deep);
    color: var(--white);
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   WRAPPER (MOBILE-FIRST, CENTERED DESKTOP)
========================================= */
.cover, .main {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    position: relative;
}

/* =========================================
   COVER
========================================= */
.cover {
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: linear-gradient(160deg, #060c1a 0%, #0e1f3d 50%, #091225 100%);
    overflow-y: auto;   /* boleh scroll jika konten melebihi layar */
    overflow-x: hidden;
    transition: transform 1.2s cubic-bezier(0.86,0,0.07,1), opacity 1s ease;
}

.cover.hide {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* Particle canvas */
#particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cover-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 2rem 1.8rem 3.5rem; /* padding bawah besar agar tombol tidak terpotong */
    width: 100%;
    max-width: var(--max-w);
}

/* Ornaments */
.ornament { width: 90%; max-width: 280px; margin: 0 auto; }
.ornament svg { width: 100%; height: auto; }

.cover-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0.8rem 0;
    opacity: 0.85;
}

/* Photo Ring */
.cover-photo-ring {
    position: relative;
    width: 200px;          /* sedikit lebih kecil agar muat layar kecil */
    margin: 0.4rem auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--gold-dim);
    animation: spin linear infinite;
    opacity: 0.4;
    /* ukuran diatur via width/height di ring-1 & ring-2 */
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.ring-1 {
    width: 200px;
    height: 200px;
    border-style: dashed;
    animation-duration: 20s;
}
.ring-2 {
    width: 230px;
    height: 230px;
    border-style: dotted;
    animation-duration: 35s;
    animation-direction: reverse;
    opacity: 0.2;
}

/* Wrap tidak lagi clip, hanya jadi centering container */
.cover-photo-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.cover-photo {
    width: 100%;
    max-width: 200px;
    height: auto;
    object-fit: contain;
    object-position: bottom center;
    display: block;
    filter: drop-shadow(0 10px 40px rgba(13,65,140,0.9)) drop-shadow(0 0 20px rgba(230,197,104,0.1));
    animation: floatY 6s ease-in-out infinite;
}

/* Guest */
.cover-guest {
    text-align: center;
    width: 100%;
    margin: 0.8rem 0;
}
.cover-kepada {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}
.cover-name-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(230,197,104,0.4);
    border-radius: 14px;
    padding: 0.9rem 1.2rem;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
#guest-name {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.03em;
}
.cover-apology {
    font-size: 0.6rem;
    color: var(--muted);
    margin-top: 0.4rem;
    opacity: 0.7;
}

/* Title Block */
.cover-title-block {
    text-align: center;
    margin: 0.8rem 0;
}
.tanggal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(230,197,104,0.1);
    border: 1px solid rgba(230,197,104,0.3);
    border-radius: 50px;
    padding: 5px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
}
.tanggal-badge .sep { opacity: 0.4; }

.cover-name {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 7vw, 2.2rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: 0.05em;
    color: var(--white);
    text-shadow: 0 0 40px rgba(230,197,104,0.2);
}

.cover-parents {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.5rem;
    line-height: 1.6;
}

/* Open Button */
.btn-open {
    margin-top: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--gold) 0%, #c4a028 100%);
    color: #000;
    border: none;
    padding: 14px 30px;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 30px var(--gold-glow), 0 8px 20px rgba(0,0,0,0.4);
    transition: transform 0.3s var(--trans), box-shadow 0.3s var(--trans);
    animation: pulseCTA 2.5s ease-in-out infinite;
}
.btn-open:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 0 50px var(--gold-glow), 0 12px 28px rgba(0,0,0,0.5);
}
.btn-icon { font-size: 1rem; }

/* =========================================
   MAIN
========================================= */
.main {
    min-height: 100dvh;
    background: linear-gradient(180deg, #0e1f3d 0%, var(--bg-deep) 100%);
    box-shadow: 0 0 80px rgba(0,0,0,0.8);
    padding-bottom: 3rem;
}
.main.hidden { display: none; }

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.9s var(--trans), transform 0.9s var(--trans);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   HERO SECTION
========================================= */
.section-hero {
    min-height: 70dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem 2rem 3rem;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(42,75,124,0.6) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(230,197,104,0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.tag-label {
    font-size: 1.5rem;
    color: var(--gold);
    opacity: 0.8;
    display: block;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px var(--gold-glow);
}

.hero-sub {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
}

.hero-name {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 12vw, 4.5rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--white);
    margin-bottom: 0.5rem;
}
.hero-name span {
    font-style: italic;
    color: var(--gold);
}

.hero-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.5rem auto;
    max-width: 200px;
}
.hero-divider span {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold-dim));
}
.hero-divider span:last-child {
    background: linear-gradient(to left, transparent, var(--gold-dim));
}
.hero-divider i {
    color: var(--gold);
    font-size: 1.1rem;
}

.hero-parents { font-size: 0.75rem; color: var(--muted); }
.hero-parents-name {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    line-height: 1.5;
    margin-top: 4px;
}
.hero-parents-name em {
    color: var(--gold);
    font-style: normal;
    font-size: 1.5rem;
}

/* =========================================
   FAMILY SECTION
========================================= */
.section-family {
    padding: 1rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.family-frame {
    width: 100%;
    max-width: 380px;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(160deg, #122145 0%, #0d1629 100%);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
}

.family-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 0%, rgba(42,75,124,0.4) 0%, transparent 60%);
    z-index: 1;
}

.family-img {
    width: 100%;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 10px 25px rgba(0,0,0,0.4));
    position: relative;
    z-index: 2;
    animation: floatY 8s ease-in-out infinite;
}

.family-caption {
    text-align: center;
    max-width: 300px;
    position: relative;
}
.quote-icon {
    color: var(--gold);
    font-size: 1.5rem;
    opacity: 0.4;
    margin-bottom: 0.6rem;
}
.family-caption p {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--muted);
    line-height: 1.7;
}

/* =========================================
   DETAIL CARD
========================================= */
.section-detail { padding: 0.5rem 1.2rem 1.5rem; }

.detail-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-xl);
    padding: 2.2rem 1.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}

.detail-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    border-radius: 2px 2px 0 0;
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
}
.detail-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.6;
}
.detail-tag {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--gold);
    opacity: 0.8;
}

/* Event Date */
.event-date-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.event-day {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--muted);
}
.date-circle-big {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e4080 0%, #122145 100%);
    border: 2px solid rgba(230,197,104,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--white);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 20px rgba(230,197,104,0.1);
    flex-shrink: 0;
}
.event-month-year {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.event-month-year .month {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    line-height: 1;
}
.event-month-year .year {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Info Grid */
.event-info-grid {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.info-item {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 1.2rem;
}
.info-divider {
    width: 1px;
    background: rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.info-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: rgba(230,197,104,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.info-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.info-val {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Countdown */
.countdown-wrap {
    text-align: center;
    margin-bottom: 2rem;
}
.countdown-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.countdown-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.cd-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 12px 14px;
    min-width: 60px;
}
.cd-val {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.cd-unit {
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--muted);
    text-transform: uppercase;
    margin-top: 4px;
}
.cd-sep {
    font-size: 1.5rem;
    color: var(--gold-dim);
    padding: 0 2px;
    margin-bottom: 12px;
}

/* Maps & QR → Embedded Map Section */
.map-section {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.map-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.8;
}

.map-frame-wrap {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(230,197,104,0.2);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.05),
        0 8px 32px rgba(0,0,0,0.4),
        0 0 20px rgba(230,197,104,0.05);
    height: 180px;
}

.map-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    filter: saturate(0.7) brightness(0.85);
    transition: filter 0.3s ease;
}
.map-frame-wrap:hover .map-iframe {
    filter: saturate(1) brightness(1);
}

/* Badge overlay di atas map */
.map-overlay-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(6, 13, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(230,197,104,0.3);
    border-radius: 12px;
    padding: 8px 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    pointer-events: none;
}
.map-overlay-badge i {
    color: var(--gold);
    font-size: 1rem;
    flex-shrink: 0;
}
.map-overlay-badge div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.map-overlay-badge strong {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}
.map-overlay-badge span {
    font-size: 0.65rem;
    color: var(--muted);
}

/* Tombol Navigasi Full Width */
.btn-maps-full {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--gold) 0%, #c4a028 100%);
    color: #000;
    text-decoration: none;
    border-radius: 16px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(230,197,104,0.3);
    transition: transform 0.3s var(--trans), box-shadow 0.3s var(--trans);
    position: relative;
    overflow: hidden;
}
.btn-maps-full::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    border-radius: inherit;
}
.btn-maps-full:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(230,197,104,0.4);
}
.btn-maps-full span { flex: 1; }
.btn-arrow {
    font-size: 0.75rem;
    opacity: 0.7;
    transition: transform 0.3s;
}
.btn-maps-full:hover .btn-arrow { transform: translateX(4px); }

/* =========================================
   CLOSING
========================================= */
.section-closing {
    text-align: center;
    padding: 2.5rem 2rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}
.closing-ornament { width: 220px; }
.closing-ornament svg { width: 100%; }
.closing-hormat {
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.1em;
}
.closing-name {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}
.closing-name em {
    color: var(--gold);
    font-style: normal;
    font-size: 1.8rem;
}
.closing-sub {
    font-size: 0.75rem;
    color: var(--muted);
}
.closing-footer {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--gold-dim);
    margin-top: 0.5rem;
    text-transform: uppercase;
}

/* =========================================
   AUDIO BUTTON
========================================= */
.btn-audio {
    position: fixed;
    bottom: 24px;
    right: max(24px, calc(50% - 216px));
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--gold);
    font-size: 1rem;
    cursor: pointer;
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    transition: transform 0.3s var(--trans), background 0.3s;
}
.btn-audio:hover { transform: scale(1.15); background: rgba(255,255,255,0.2); }
.btn-audio.hidden { display: none; }
.btn-audio.playing i { animation: spin 3s linear infinite; }

/* =========================================
   KEYFRAMES
========================================= */
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-14px); }
}

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

@keyframes pulseCTA {
    0%, 100% { box-shadow: 0 0 30px var(--gold-glow), 0 8px 20px rgba(0,0,0,0.4); }
    50%       { box-shadow: 0 0 50px rgba(230,197,104,0.4), 0 8px 20px rgba(0,0,0,0.4); }
}

/* =========================================
   DESKTOP FRAME
========================================= */
@media (min-width: 520px) {
    body {
        background: radial-gradient(ellipse at center, #0e1f3d 0%, #04080f 100%);
    }
    .cover, .main {
        border-left: 1px solid rgba(255,255,255,0.06);
        border-right: 1px solid rgba(255,255,255,0.06);
        box-shadow: 0 0 80px rgba(0,0,0,0.6);
    }
}
