/* --- VARIABLES & DESIGN SYSTEM --- */
:root {
    --primary-color: #D4AF37; /* Metallic Gold */
    --primary-light: #F3E5AB; /* Vanilla/Light Gold */
    --text-main: #333333;
    --text-muted: #666666;
    --bg-main: #FAFAF7; /* Warm creamy white */
    --bg-light: #FFFFFF;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --font-accent: 'Pinyon Script', cursive;

    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
}

.text-center { text-align: center; }

h2.section-title {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-style: italic;
    font-family: var(--font-heading);
}

.decorative-line {
    width: 60px;
    height: 2px;
    background-color: var(--primary-color);
    margin: 1rem auto 3rem;
    position: relative;
}

.decorative-line::after {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    background: var(--bg-main);
    padding: 0 5px;
    color: var(--primary-color);
    font-size: 0.8rem;
}

/* --- LAYOUT UTILS --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 6rem 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-light .decorative-line::after {
    background-color: var(--bg-light);
}

/* --- BUTTONS --- */
.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--primary-color);
    color: #fff;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #b59226; /* Darker Gold */
    z-index: -1;
    transition: var(--transition-smooth);
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-primary:hover {
    color: #fff;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: transparent;
    color: var(--primary-color);
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    border: 1px solid var(--primary-color);
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    padding: 1.5rem 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow-soft);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    transition: var(--transition-smooth);
}

.navbar.scrolled .logo {
    color: var(--primary-color);
}

.logo span {
    font-family: var(--font-accent);
    font-size: 2.2rem;
    color: var(--primary-color);
    font-weight: 300;
    margin: 0 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: #fff;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-smooth);
    position: relative;
}

.navbar.scrolled .nav-links a {
    color: var(--text-main);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary-color);
    transition: var(--transition-smooth);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: #fff;
}

.navbar.scrolled .bar {
    background-color: var(--text-main);
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('couple.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    color: #fff;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.3));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-content .subtitle {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: var(--primary-light);
}

.hero-content .title {
    font-family: var(--font-accent);
    font-size: 6rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.hero-content .date {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 3px;
    margin-bottom: 3rem;
}

/* Countdown */
.countdown {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.cd-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cd-box span {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.cd-box small {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-light);
}

/* Scroll Arrow */
.btn-scroll {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: #fff;
    transition: var(--transition-smooth);
    animation: arrow-float 2.5s ease-in-out infinite;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(4px);
}

.btn-scroll:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

@keyframes arrow-float {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(6px); opacity: 1; }
}

/* --- DETAILS SECTION --- */
.event-card {
    background-color: var(--bg-light);
    max-width: 600px;
    margin: 0 auto;
    padding: 4rem 3rem;
    border-radius: 4px;
    box-shadow: var(--shadow-soft);
    position: relative;
    border-top: 4px solid var(--primary-color);
}

.card-icon {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.event-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.event-date {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.event-time {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.venue-info h4 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.venue-info p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.directions-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--font-body);
    font-weight: 700;
    margin-top: 1rem;
    padding: 0.65rem 1.5rem;
    border: 1px solid var(--primary-color);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.directions-link:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* --- GALLERY / CAROUSEL SECTION --- */
.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    max-width: 800px;
    margin: 0 auto;
    user-select: none;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
    min-width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Prev / Next Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: var(--transition-smooth);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.08);
}

.carousel-btn-prev { left: 0.75rem; }
.carousel-btn-next { right: 0.75rem; }

/* Dot Indicators */
.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 0;
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* --- WISHES / RSVP SECTION --- */
.wishes {
    background-color: var(--primary-light); /* Soft vanilla */
}

.wishes-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: var(--bg-light);
    padding: 4rem;
    border-radius: 4px;
    box-shadow: var(--shadow-soft);
}

.wishes-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

.wishes-form-container {
    position: relative;
}

.wish-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--text-main);
}

.form-group textarea {
    resize: none;
    height: 140px;
    min-height: 140px;
    max-height: 140px;
    overflow-y: auto;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: #fdfdfd;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.hidden {
    display: none !important;
}

.form-success {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--primary-color);
}

.form-success h3 {
    font-size: 2rem;
    margin: 1rem 0;
    color: var(--text-main);
}

.form-success p {
    color: var(--text-muted);
}

/* --- FOOTER --- */
.footer {
    background-color: #222;
    color: #fff;
    padding: 4rem 0;
    border-top: 5px solid var(--primary-color);
    position: relative;
}

.saf-signature {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.15);
    pointer-events: none;
    letter-spacing: 1px;
}

.footer-title {
    font-family: var(--font-accent);
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.footer-date {
    font-family: var(--font-heading);
    letter-spacing: 3px;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-heart {
    color: var(--primary-color);
}

/* --- ANIMATIONS (Intersection Observer) --- */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(4px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
    .wishes-wrapper {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
        background-position: 25% 20%;
    }

    .hero-content .title span {
        display: block;
        line-height: 1.1;
    }

    .hero-content .title .ampersand {
        font-size: 0.6em;
        margin: -5px 0;
    }

    .hamburger {
        display: block;
        z-index: 101;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        flex-direction: column;
        background: #fff;
        width: 100%;
        height: 100vh;
        justify-content: center;
        align-items: center;
        transition: 0.4s;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        color: var(--text-main);
        font-size: 1.5rem;
    }
    
    /* Toggle hamburger lines for light/dark mode nav */
    .bar {
        background-color: var(--text-main);
    }
    .hero .bar:not(.navbar.scrolled .bar) {
       background-color: #fff;
    }
    .nav-links.active ~ .hamburger .bar {
        background-color: var(--text-main) !important;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero-content .title {
        font-size: 4rem;
    }

    .countdown {
        gap: 1rem;
    }

    .cd-box span {
        font-size: 1.8rem;
    }

    .hero-content .subtitle {
        font-size: 0.8rem;
    }

    .event-card {
        padding: 3rem 1.5rem;
    }
}

/* --- MUSIC BUTTON --- */
.music-toggle {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255,255,255,0.4);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.music-toggle:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255,255,255,0.5);
}

.music-note-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Equalizer bars */
.eq-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
}

.eq-bar {
    width: 3px;
    border-radius: 2px;
    background: var(--primary-color);
    animation: eq-dance 0.8s ease-in-out infinite alternate;
}

.eq-bar:nth-child(1) { height: 6px;  animation-delay: 0s;    animation-duration: 0.6s; }
.eq-bar:nth-child(2) { height: 14px; animation-delay: 0.15s; animation-duration: 0.9s; }
.eq-bar:nth-child(3) { height: 9px;  animation-delay: 0.05s; animation-duration: 0.7s; }
.eq-bar:nth-child(4) { height: 12px; animation-delay: 0.2s;  animation-duration: 0.8s; }

@keyframes eq-dance {
    0%   { transform: scaleY(0.3); }
    100% { transform: scaleY(1); }
}

/* --- HERO ENTRANCE ANIMATIONS --- */
@keyframes hero-fade-up {
    from { opacity: 0; transform: translateY(20px); filter: blur(6px); }
    to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

@keyframes hero-line-in {
    from { opacity: 0; transform: scaleX(0); }
    to   { opacity: 1; transform: scaleX(1); }
}

@keyframes shimmer-text {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

/* Staggered hero content reveal */
.hero-content .subtitle {
    animation: hero-fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.1s;
}

.hero-content .title {
    animation: hero-fade-up 1s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.35s;
}

.hero-content .date {
    animation: hero-fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.6s;
}

.countdown {
    animation: hero-fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.8s;
}

.btn-scroll {
    animation: hero-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both, arrow-float 2.8s ease-in-out 1.5s infinite;
}

/* Shimmer on countdown numbers */
.cd-box span {
    background: linear-gradient(90deg, #fff 25%, var(--primary-light) 50%, #fff 75%);
    background-size: 400px 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-text 4s linear infinite;
}

/* Stagger section cards */
.fade-in-scroll:nth-child(1) { transition-delay: 0s; }
.fade-in-scroll:nth-child(2) { transition-delay: 0.1s; }
.fade-in-scroll:nth-child(3) { transition-delay: 0.2s; }
.fade-in-scroll:nth-child(4) { transition-delay: 0.3s; }
