/* ===== CSS RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

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

/* ===== CUSTOM PROPERTIES ===== */
:root {
    /* Colors - Classic/Elegant */
    --cream: #FDF8F3;
    --ivory: #FFFEF9;
    --gold: #C5A572;
    --gold-light: #D4C4A8;
    --gold-dark: #8B7355;
    --charcoal: #36454F;
    --warm-gray: #6B6B6B;
    --border-color: rgba(197, 165, 114, 0.3);

    /* Typography */
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Lora', Georgia, serif;
    --font-script: 'Great Vibes', cursive;

    /* Spacing */
    --section-padding: 2.5rem 1.5rem;
    --container-max: 900px;
}

/* ===== BASE STYLES ===== */
body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--charcoal);
    background-color: var(--cream);
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(253, 248, 243, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
}

.nav__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1.5rem;
    list-style: none;
    padding: 0.5rem 1rem;
}

.nav__link {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--charcoal);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.4rem 0.5rem;
    transition: color 0.3s ease;
}

.nav__link:hover,
.nav__link:focus {
    color: var(--gold);
}

.nav__link--active {
    color: var(--gold);
}

.nav__item--hidden {
    display: none;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../images/hero-bg.jpeg');
    background-size: cover;
    background-position: center;
    background-color: var(--charcoal);
    text-align: center;
    color: white;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(54, 69, 79, 0.55),
            rgba(54, 69, 79, 0.7));
}

.hero__content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    max-width: 600px;
}

.hero__prelude {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-style: italic;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero__names {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero__name {
    display: block;
}

.hero__ampersand {
    font-family: var(--font-script);
    font-size: 0.6em;
    color: var(--gold-light);
    display: block;
    margin: 0.3em 0;
}

.hero__subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    font-style: italic;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.hero__divider {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
    margin: 1.5rem auto;
}

.hero__date {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2rem;
}

/* ===== COUNTDOWN ===== */
.countdown {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.countdown__item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    min-width: 65px;
}

.countdown__number {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    display: block;
    line-height: 1.2;
}

.countdown__label {
    font-family: var(--font-body);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.countdown__message {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
}

/* ===== HERO CTA BUTTON ===== */
.hero__cta {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: white;
    background: transparent;
    border: 2px solid var(--gold-light);
    padding: 1rem 2.5rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.hero__cta:hover,
.hero__cta:focus {
    background: var(--gold);
    border-color: var(--gold);
    color: white;
}

/* ===== SECTION STYLES ===== */
.section {
    padding: var(--section-padding);
    background-color: var(--cream);
}

/* Alternating section backgrounds */
.section:nth-of-type(even) {
    background-color: var(--ivory);
}

.section__container {
    position: relative;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
}

/* Decorative corner borders */
.section__container::before,
.section__container::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--border-color);
}

.section__container::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.section__container::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.section__header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section__chapter {
    font-family: var(--font-script);
    font-size: 1.5rem;
    color: var(--gold);
    display: block;
    margin-bottom: 0.25rem;
}

.section__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.section__divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 1rem auto 0;
}

/* ===== LOCATION SECTION ===== */
.location__content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.location__info {
    text-align: center;
}

.location__venue {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.location__address {
    font-family: var(--font-body);
    color: var(--warm-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.location__datetime {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--charcoal);
    margin-bottom: 1rem;
}

.location__note {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-style: italic;
    color: var(--warm-gray);
}

.location__map {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.location__map iframe {
    display: block;
    height: 250px;
}

/* ===== RSVP SECTION ===== */
.rsvp {
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.rsvp .section__container {
    width: 100%;
}

.rsvp__content {
    text-align: center;
}

.rsvp__message {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.rsvp__deadline {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--warm-gray);
    margin-bottom: 2rem;
}

.rsvp__button {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: white;
    background: var(--gold);
    border: 2px solid var(--gold);
    padding: 1rem 3rem;
    min-height: 44px;
    transition: all 0.3s ease;
}

.rsvp__button:hover,
.rsvp__button:focus {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--cream);
    border: 2px solid var(--gold);
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background 0.3s ease;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top--visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover,
.scroll-top:focus {
    background: var(--gold);
}

.scroll-top:hover .scroll-top__arrow,
.scroll-top:focus .scroll-top__arrow {
    border-color: white;
}

.scroll-top__arrow {
    width: 10px;
    height: 10px;
    border-left: 2px solid var(--gold);
    border-top: 2px solid var(--gold);
    transform: rotate(45deg);
    margin-top: 4px;
    transition: border-color 0.3s ease;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 3rem 1.5rem;
    background-color: var(--charcoal);
    color: white;
}

.footer__names {
    font-family: var(--font-script);
    font-size: 2rem;
    color: var(--gold-light);
    margin-bottom: 0.5rem;
}

.footer__date {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    opacity: 0.8;
}

/* ===== RESPONSIVE STYLES ===== */

/* Tablet and up */
@media (min-width: 768px) {
    :root {
        --section-padding: 3.5rem 2rem;
    }

    .nav__list {
        gap: 0.5rem 2rem;
        padding: 1rem;
    }

    .countdown {
        gap: 1.5rem;
    }

    .countdown__item {
        padding: 1rem 1.5rem;
        min-width: 90px;
    }

    .countdown__number {
        font-size: 2.5rem;
    }

    .countdown__label {
        font-size: 0.75rem;
    }

    .section__container {
        padding: 2rem 2rem;
    }

    .section__container::before,
    .section__container::after {
        width: 40px;
        height: 40px;
    }

    .location__content {
        flex-direction: row;
        align-items: flex-start;
        gap: 3rem;
    }

    .location__info {
        flex: 1;
        text-align: left;
    }

    .location__map {
        flex: 1;
    }

    .location__map iframe {
        height: 300px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .countdown__item {
        padding: 1.25rem 2rem;
        min-width: 100px;
    }

    .countdown__number {
        font-size: 3rem;
    }

    .location__map iframe {
        height: 350px;
    }
}

/* ===== ACCESSIBILITY ===== */
.nav__link:focus,
.hero__cta:focus,
.rsvp__button:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .nav__link,
    .hero__cta,
    .rsvp__button {
        transition: none;
    }
}

/* Print styles */
@media print {

    .nav,
    .hero__cta,
    .rsvp__button,
    .location__map {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: 2rem;
        background: none;
        color: var(--charcoal);
    }

    .hero__overlay {
        display: none;
    }

    .section {
        break-inside: avoid;
    }
}