@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,700&family=Montserrat:wght@200;400;600;800&family=Great+Vibes&family=Amiri&display=swap');

/* ========================================
   ROYAL NAVY & GOLD — Smooth Scroll Edition
   Wedding Invitation: Azmi & Lenny
   ======================================== */

:root {
    --gold: #c9a84c;
    --gold-light: #e8d5a3;
    --gold-glow: rgba(201, 168, 76, 0.35);
    --navy: #0a1628;
    --navy-mid: #111d35;
    --navy-card: rgba(15, 25, 50, 0.88);
    --white: #f0ece2;
    --white-dim: rgba(240, 236, 226, 0.55);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--navy);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ═══════════════════════════════════
   LOADER
   ═══════════════════════════════════ */
#loader {
    position: fixed; inset: 0;
    background: #050a14;
    z-index: 99999;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    transition: opacity 1s ease, visibility 1s;
}
#loader.hide {
    opacity: 0; visibility: hidden;
}

.loader-ring {
    width: 80px; height: 80px;
    border: 2px solid transparent;
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin-bottom: 1.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader-initials {
    font-family: 'Great Vibes', cursive;
    font-size: 3.5rem;
    color: var(--gold);
}
.loader-sub {
    margin-top: 0.8rem;
    font-size: 0.6rem;
    letter-spacing: 5px;
    color: var(--gold-light);
    text-transform: uppercase;
}

/* ═══════════════════════════════════
   FALLING PETALS
   ═══════════════════════════════════ */
.petals {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}
.petal {
    position: absolute;
    top: -20px;
    opacity: 0;
    animation: fall linear infinite;
}
@keyframes fall {
    0%   { opacity: 0; transform: translateY(0) rotate(0deg) translateX(0); }
    10%  { opacity: 0.7; }
    100% { opacity: 0; transform: translateY(100vh) rotate(720deg) translateX(80px); }
}

/* ═══════════════════════════════════
   PAGE SECTIONS
   ═══════════════════════════════════ */
.page {
    min-height: 100dvh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5rem 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Alternating subtle gradient BG */
.page:nth-child(odd) {
    background: linear-gradient(170deg, var(--navy) 0%, var(--navy-mid) 100%);
}
.page:nth-child(even), .page-alt {
    background: linear-gradient(170deg, var(--navy-mid) 0%, #0d1a30 100%);
}

/* Soft radial glow behind content */
.page::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.06;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 3;
}

/* ═══════════════════════════════════
   COVER PAGE
   ═══════════════════════════════════ */
.page-cover {
    position: relative;
}
.cover-bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
}
.overlay {
    position: absolute; inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 22, 40, 0.55) 0%,
        rgba(10, 22, 40, 0.85) 100%
    );
    z-index: 1;
}
.cover-inner {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 400px;
}
.cover-title {
    font-family: 'Great Vibes', cursive;
    font-size: 3.8rem;
    color: var(--gold);
    line-height: 1;
    text-shadow: 0 4px 30px rgba(201, 168, 76, 0.3);
}
.cover-date {
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: var(--gold-light);
    margin-top: 0.8rem;
}
.ornament-svg {
    width: 140px;
    margin: 0.6rem 0;
}
.guest-box {
    margin-top: 2rem;
    padding: 1.2rem 2rem;
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: 1rem;
    backdrop-filter: blur(8px);
    background: rgba(0,0,0,0.2);
}
.guest-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
    margin-top: 0.2rem;
}

/* ═══════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════ */
.label {
    font-size: 0.6rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 0.8rem;
}
.body-text {
    font-size: 0.85rem;
    line-height: 1.9;
    color: var(--white-dim);
    font-weight: 300;
    max-width: 380px;
}
.script-name {
    font-family: 'Great Vibes', cursive;
    font-size: 2.5rem;
    color: var(--gold);
    line-height: 1.1;
}
.serif-heading {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* ═══════════════════════════════════
   DECORATIVE ELEMENTS
   ═══════════════════════════════════ */
.gold-line {
    width: 50px; height: 1px;
    background: var(--gold);
    margin: 1rem auto;
}
.gold-dot {
    width: 6px; height: 6px;
    background: var(--gold);
    border-radius: 50%;
    margin: 0.5rem auto;
}

/* ═══════════════════════════════════
   PHOTO ARCH
   ═══════════════════════════════════ */
.photo-arch {
    width: 200px;
    height: 280px;
    border-radius: 100px 100px 16px 16px;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    border: 2px solid var(--gold);
    box-shadow:
        0 0 0 4px var(--navy),
        0 0 0 6px rgba(201,168,76,0.3),
        0 15px 40px rgba(0,0,0,0.5);
    position: relative;
}
.photo-arch img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* ═══════════════════════════════════
   QURAN SECTION
   ═══════════════════════════════════ */
.quran-box {
    width: 100%;
    margin: 1.5rem 0;
}
.quran-marquee {
    width: 100%;
    overflow: hidden;
    border-top: 1px solid rgba(201,168,76,0.15);
    border-bottom: 1px solid rgba(201,168,76,0.15);
    padding: 0.8rem 0;
}
.quran-marquee .track {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
    font-family: 'Amiri', serif;
    font-size: 1.3rem;
    color: var(--gold-light);
    padding-left: 100%;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

/* ═══════════════════════════════════
   EVENT CARDS
   ═══════════════════════════════════ */
.event-card {
    background: var(--navy-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(201,168,76,0.12);
    border-radius: 1.5rem;
    padding: 2.5rem 1.5rem 2rem;
    width: 100%;
    max-width: 360px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.event-badge {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--navy);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 3px;
    padding: 4px 20px;
    border-radius: 0 0 10px 10px;
}
.event-date {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 0.3rem;
}
.event-time {
    font-size: 0.8rem;
    color: var(--white-dim);
    margin-bottom: 0.8rem;
}
.event-divider {
    width: 40px; height: 1px;
    background: rgba(201,168,76,0.25);
    margin: 0 auto 0.8rem;
}
.event-venue {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}
.event-address {
    font-size: 0.75rem;
    color: var(--white-dim);
    line-height: 1.6;
}

/* ═══════════════════════════════════
   COUNTDOWN
   ═══════════════════════════════════ */
.countdown {
    display: flex; gap: 0.8rem;
    justify-content: center;
    margin-top: 1.5rem;
}
.cd-box {
    background: rgba(201,168,76,0.08);
    border: 1px solid rgba(201,168,76,0.2);
    border-radius: 1rem;
    padding: 1rem 0;
    width: 65px;
    text-align: center;
}
.cd-val {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
}
.cd-lbl {
    display: block;
    font-size: 0.5rem;
    letter-spacing: 1px;
    color: var(--white-dim);
    margin-top: 0.2rem;
    text-transform: uppercase;
}

/* ═══════════════════════════════════
   GALLERY
   ═══════════════════════════════════ */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    width: 100%;
    max-width: 320px;
    margin: 0.5rem auto 0;
}
.gallery-item {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(201,168,76,0.15);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    aspect-ratio: 1;
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}
.gallery-item:hover img {
    transform: scale(1.08);
}

/* ═══════════════════════════════════
   FORM / RSVP
   ═══════════════════════════════════ */
.form-card {
    background: var(--navy-card);
    border: 1px solid rgba(201,168,76,0.1);
    border-radius: 1.5rem;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.form-group { margin-bottom: 1rem; text-align: left; }
.form-group label {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--gold-light);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(201,168,76,0.15);
    border-radius: 0.6rem;
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input:focus,
.form-group select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}
.form-group select option {
    background: var(--navy);
    color: var(--white);
}

/* ═══════════════════════════════════
   GIFT
   ═══════════════════════════════════ */
.gift-box {
    border: 1px dashed rgba(201,168,76,0.35);
    border-radius: 1.2rem;
    padding: 1.8rem;
    margin-top: 1.2rem;
    width: 100%;
    max-width: 360px;
    background: rgba(201,168,76,0.03);
}
.gift-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 2px;
    margin: 0.5rem 0;
}

/* ═══════════════════════════════════
   BUTTONS
   ═══════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 360px;
    padding: 0.9rem 1.5rem;
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: 3rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 4px 20px var(--gold-glow);
    margin-top: 1.2rem;
}
.btn:active { transform: scale(0.96); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    box-shadow: none;
}
.btn-glow {
    animation: glow-pulse 2.5s infinite;
}
@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 4px 20px var(--gold-glow); }
    50% { box-shadow: 0 4px 40px rgba(201,168,76,0.6); }
}

/* ═══════════════════════════════════
   FIXED CONTROLS
   ═══════════════════════════════════ */
.ctrl {
    position: fixed;
    right: 1rem;
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    z-index: 8000;
    cursor: pointer;
    font-size: 0.9rem;
    border: 1px solid var(--gold);
    transition: 0.3s;
}
.ctrl-music {
    top: 1rem;
    background: var(--gold);
    color: var(--navy);
}
.ctrl-scroll {
    top: 4rem;
    background: var(--navy-card);
    color: var(--gold);
}
.ctrl-scroll.on {
    background: var(--gold);
    color: var(--navy);
}

/* ═══════════════════════════════════
   BOTTOM NAV
   ═══════════════════════════════════ */
.bnav {
    position: fixed;
    bottom: 1rem;
    left: 50%; transform: translateX(-50%);
    display: flex; gap: 1rem;
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(12px);
    padding: 0.6rem 1.4rem;
    border-radius: 3rem;
    border: 1px solid rgba(201,168,76,0.15);
    z-index: 8000;
}
.bnav-item {
    color: rgba(201,168,76,0.35);
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    padding: 0.3rem;
    text-decoration: none;
}
.bnav-item.on, .bnav-item:hover {
    color: var(--gold);
    transform: scale(1.15);
}

/* ═══════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════ */
@media (max-width: 380px) {
    .page { padding: 4rem 1rem; }
    .cover-title { font-size: 3rem; }
    .script-name { font-size: 2rem; }
    .photo-arch { width: 170px; height: 240px; }
    .cd-box { width: 55px; }
}
