/* =========================================
   Variables & Reset
   ========================================= */
:root {
    /* Palette Colors */
    --color-bg: #f1e8da;
    /* Blanc crème */
    --color-blue: #6257e3;
    --color-lavender: #bea1f7;
    --color-violet: #bc3fde;
    --color-rose: #d72680;
    --color-text: #2c2c2c;
    --color-text-light: #5a5a5a;
    --color-white: #ffffff;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Playfair Display', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Transitions */
    --transition-base: all 0.3s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

/* =========================================
   Navigation
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: background 0.3s ease, padding 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    /* White content on transparent hero */
    z-index: 1001;
}

.navbar.scrolled .nav-brand {
    color: var(--color-text);
}

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

.nav-links a {
    color: var(--color-white);
    font-size: 1.1rem;
    position: relative;
}

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

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

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

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-white);
    margin: 5px 0;
    transition: all 0.3s ease;
}

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

/* Mobile Nav Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

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

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

    .nav-links a {
        color: var(--color-text);
        font-size: 1.5rem;
    }

    .nav-links a::after {
        background: var(--color-text);
    }

    /* Hamburger Animation */
    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
        background-color: var(--color-text);
    }

    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
        background-color: var(--color-text);
    }
}

/* =========================================
   Utility Classes
   ========================================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

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

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--color-rose);
    color: var(--color-white);
    border-radius: 50px;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(215, 38, 128, 0.3);
}

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

/* =========================================
   Hero Section
   ========================================= */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 44, 44, 0.4);
    /* Darken slightly for text readability */
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.5s ease-out forwards;
}

.hero-logo {
    max-width: 200px;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
}

/* =========================================
   Invitation Section
   ========================================= */
.invitation {
    background-color: var(--color-bg);
}

.invitation-text {
    max-width: 800px;
    margin: 0 auto;
}

.invitation-text h2 {
    font-size: 3rem;
    color: var(--color-blue);
    margin-bottom: var(--spacing-md);
}

.invitation-text p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
}

/* =========================================
   Practical Info Section
   ========================================= */
.practical-info {
    background-color: #ffffff;
    /* Slight contrast with cream bg */
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.info-card {
    text-align: center;
    padding: var(--spacing-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: var(--color-bg);
    border-radius: 8px;
    transition: var(--transition-base);
}

.info-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transform: translateY(-5px);
}

.info-icon {
    font-size: 2.5rem;
    color: var(--color-lavender);
    margin-bottom: var(--spacing-sm);
    display: block;
}

.info-card h3 {
    color: var(--color-violet);
    font-size: 1.5rem;
}

/* =========================================
   Gallery Section
   ========================================= */
.gallery {
    padding-bottom: 0;
}

.gallery h2 {
    font-size: 3rem;
    color: var(--color-blue);
    margin-bottom: var(--spacing-lg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    height: 300px;
}

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

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

/* =========================================
   Countdown Section
   ========================================= */
.countdown-section {
    background: linear-gradient(135deg, var(--color-blue), var(--color-violet));
    color: var(--color-white);
    text-align: center;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.time-unit {
    background: rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md);
    border-radius: 8px;
    min-width: 120px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.time-value {
    display: block;
    font-size: 3rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

.time-label {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* =========================================
   Footer
   ========================================= */
footer {
    background-color: var(--color-text);
    color: var(--color-bg);
    padding: var(--spacing-md) 0;
    text-align: center;
    font-size: 0.9rem;
}

footer p {
    opacity: 0.6;
}

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

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

.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .invitation-text h2 {
        font-size: 2rem;
    }

    .countdown-timer {
        gap: var(--spacing-sm);
    }

    .time-unit {
        min-width: 80px;
        padding: var(--spacing-sm);
    }

    .time-value {
        font-size: 2rem;
    }
}