/* Reset & Base Styles */
:root {
    --font-serif: 'Cormorant Infant', serif;
    --font-sans: 'Inter', sans-serif;
    --color-bg: #fff6f6;
    --color-text: #1a1a1a;
    --color-text-light: #666;
    --color-accent: #c5a059;
    /* Muted Gold */
    --color-white: #ffffff;
    --nav-height: 80px;
    --spacing-section: 120px;
    --border-radius-sm: 8px;
    --border-radius-lg: 30px;
}

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

html {
    /* scroll-behavior: smooth; - Removed to handle via Lenis JS for premium effect */
}

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

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-serif);
    font-weight: 200;
    /* Using 200 as requested */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--spacing-section) 0;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 20px;
    color: #680000;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background-color: var(--color-accent);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 16px 32px;
    background-color: var(--color-text);
    color: var(--color-white);
    font-family: var(--font-sans);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: 1px solid var(--color-white);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
}

/* Specific override for Hero button based on request: White button, gray text */
.hero .btn-primary {
    background-color: #1a1212;
    color: #333;
    border-color: var(--color-white);
}

.hero .btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.scroll-indicator {
    margin-top: 40px;
    color: var(--color-white);
    display: inline-block;
    cursor: pointer;
    opacity: 0;
    transition: transform 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateY(5px);
}

.chevron-down {
    width: 40px;
    height: 40px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-brand {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 200;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 300;
}

.nav-links a:hover {
    color: var(--color-accent);
}

.btn-rsvp {
    color: var(--color-accent) !important;
    font-weight: 500;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Push content to bottom */
    text-align: center;
    position: relative;
    background-color: var(--color-white);
    color: var(--color-white);
    overflow: hidden;
}

/* Background Image Element with Animation */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url('hero.webp');
    /* Gradient fades to dark at bottom for text readability */
    background-size: auto, contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #1a1212;
    opacity: 1;
    z-index: 1;
    animation: heroPulse 8s ease-in-out infinite;
}

/* Old animation trigger removed as it is now creating conflict */
body.loaded .hero::before {
    /* animation: fadeFromWhite 2.5s ease-out forwards, heroPulse 4s ease-in-out infinite; */
}

.white-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-white);
    z-index: 2;
    pointer-events: none;
}

body.loaded .white-overlay {
    animation: fadeOutWhite 2.5s ease-out forwards;
}



.hero-content {
    z-index: 2;
    padding: 0 20px;
    padding-bottom: 15vh;
    /* Ensure it doesn't touch the very bottom */
    width: 100%;
    opacity: 0;
}

body.loaded .hero-content {
    animation: fadeInUp 1.2s ease-out 0.5s forwards;
}

body.loaded .scroll-indicator {
    animation: fadeLoop 2s ease-in-out infinite 2s;
    /* Starts after main content loads */
}

.hero-title {
    font-size: 5rem;
    margin-bottom: 20px;
    line-height: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.name-part {
    display: block;
}

.ampersand {
    font-size: 2em;
    /* Double the font size */
    font-weight: 200;
    /* Keep it light */
    line-height: 0;
    margin: 10px 0;
}

.hero-date {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0px;
}

.hero-venue {
    font-size: 1rem;
    color: var(--color-white);
    margin-bottom: 40px;
}

.hero-greeting {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 50px;
    opacity: 0.9;
}

/* Story Section */
.story-section {
    background-color: var(--color-white);
}

.story-timeline {
    max-width: 800px;
    margin: 0 auto;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    padding-left: 40px;
}

.story-item {
    margin-bottom: 60px;
    position: relative;
}

.story-item::before {
    content: '';
    position: absolute;
    left: -45px;
    top: 0;
    width: 10px;
    height: 10px;
    background-color: var(--color-accent);
    border-radius: 50%;
}

.story-year {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: 10px;
}

/* Wedding Section */
.wedding-section {
    background: linear-gradient(135deg, #fdfbf7 0%, #f4f0e6 100%);
}

.itinerary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: center;
}

.event-card {
    background: var(--color-white);
    padding: 40px;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
}

.event-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.event-card .time {
    font-weight: 500;
    margin-bottom: 5px;
}

.event-card .location {
    color: var(--color-text-light);
}

/* RSVP Section */
.rsvp-section {
    text-align: center;
    background-color: var(--color-white);
}

.rsvp-text {
    margin-bottom: 40px;
    font-size: 1.2rem;
}

/* Google Form iframe container */
.rsvp-iframe-container {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    overflow: hidden;
}

.rsvp-iframe-container iframe {
    width: 100%;
    min-height: 900px;
    border: none;
    display: block;
}

@media (max-width: 1023px) {
    .rsvp-iframe-container iframe {
        min-height: 1100px;
    }
}

@media (max-width: 767px) {
    .rsvp-iframe-container iframe {
        min-height: 1400px;
    }
}

/* Footer */
.footer {
    padding: 40px;
    text-align: center;
    background-color: #1a1a1a;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeOutWhite {
    to {
        opacity: 0;
    }
}

@keyframes heroPulse {

    0%,
    100% {
        filter: brightness(1) contrast(1);
        transform: scale(1);
    }

    50% {
        filter: brightness(1.3) contrast(1.2);
        transform: scale(1.02);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeLoop {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    50% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* In a real app, hamburger menu */
    }

    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }
}

/* Loader Styles */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-white);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
    text-align: center;
}

.loader-content {
    margin-bottom: 40px;
}

.loader-title {
    font-family: var(--font-serif);
    font-size: 5rem;
    font-weight: 200;
    color: var(--color-text);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    line-height: 1;
}

.loader-date {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text);
    margin-bottom: 0px;
}

.loader-venue {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 40px;
}

.loader-message {
    margin-top: 30px;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--color-text-light);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-accent);
    animation: spin 1s ease-in-out infinite;
}

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

/* Visual design overrides */
.countdown {
    justify-content: center;
    padding: 20px 0;
    display: flex;
}

.hero-credits {
    color: #fff;
}

.hero-credits-label {
    opacity: 1;
}

.story-title {
    color: #680000;
}

.story-finale {
    color: #FFCECE;
}

.story-finale p,
.story-finale h2,
.story-finale h3,
.story-finale span {
    color: #FFCECE;
}

.photo-grid {
    grid-template-columns: repeat(4, 1fr);
}