/* ===================================
   WD-004 - Wedding Template
   Refactored with Tailwind CSS + GSAP ScrollTrigger
   Flowgreen Theme
   =================================== */

/* ===== CSS Variables ===== */
:root {
    /* Primary Colors - Flowgreen theme */
    --primary-color: #6c725e;
    --primary-light: #8b9172;
    --primary-dark: #4a5040;

    /* Accent Colors */
    --accent-gold: #c9a73f;
    --accent-cream: #f5f0e1;

    /* Text Colors */
    --text-dark: #3a3a3a;
    --text-light: #6b6b6b;
    --text-white: #ffffff;

    /* Background */
    --bg-light: #ffffff;
    --bg-cream: #faf8f3;
    --bg-section-alt: #f5f0e1;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-script: 'Great Vibes', cursive;
    --font-body: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Lato', sans-serif;

    /* Shadows */
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ===== Base Styles ===== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Loader ===== */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--primary-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== Cover Section ===== */
#cover-overlay-main {
    z-index: 100;
}

/* ===== Fixed Background Slides ===== */
#bg-slides {
    pointer-events: none;
}

#bg-slides::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.2) 40%,
            rgba(0, 0, 0, 0.3) 70%,
            rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
}

#bg-slides .slides-container {
    display: flex;
    height: 100%;
}

#bg-slides .slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
}

#bg-slides .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Hero Section Quote Styling ===== */
#hero {
    position: relative;
    z-index: 10;
}

.divider-light {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    margin: 1rem auto;
}

/* ===== Typography ===== */
.font-display {
    font-family: var(--font-display);
}

.font-script {
    font-family: var(--font-script);
}

.font-body {
    font-family: var(--font-body);
}

.font-sans {
    font-family: var(--font-sans);
}

/* ===== Section Styling ===== */
.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Divider */
.divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 1rem auto;
}

/* ===== Couple Cards ===== */
.couple-card {
    text-align: center;
}

.couple-photo-frame {
    width: 160px;
    height: 160px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: var(--shadow-soft);
}

.couple-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.couple-name {
    font-family: var(--font-script);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.couple-fullname {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-dark);
}

.couple-parents {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== Event Cards ===== */
.event-card {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.event-card-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

/* ===== Countdown ===== */
.countdown-wrapper {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.countdown-item {
    text-align: center;
    min-width: 50px;
}

.countdown-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--primary-color);
    font-weight: 500;
}

.countdown-label {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
}

/* ===== Gallery ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 114, 94, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

/* ===== Wishes Section ===== */
.wishes-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(108, 114, 94, 0.3);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--bg-light);
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Wishes Chat Container */
.wishes-chat-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-cream);
    border-radius: 12px;
}

/* ===== Gift Section ===== */
.gift-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.gift-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--primary-color);
}

/* ===== GSAP Animation Helpers ===== */
/* Only hide elements inside main-content, not cover */
#main-content [data-anim] {
    opacity: 0;
    will-change: transform, opacity;
}

.anim-ready #main-content [data-anim] {
    opacity: 1;
}

/* ===== Responsive ===== */
@media (min-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .couple-photo-frame {
        width: 200px;
        height: 200px;
    }

    .couple-name {
        font-size: 2.5rem;
    }
}