/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Playfair Display', 'Georgia', serif;
    line-height: 1.8;
    color: #2c2c2c;
    background: #faf7f2;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(201, 168, 130, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(201, 168, 130, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    border: 12px solid #c9a882;
    box-shadow: 
        inset 0 0 0 2px #f5f0eb, 
        inset 0 0 0 3px #c9a882,
        inset 0 0 100px rgba(201, 168, 130, 0.08);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3CfeColorMatrix values='0 0 0 0 0, 0 0 0 0 0, 0 0 0 0 0, 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)'/%3E%3C/svg%3E"),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(201,168,130,.025) 2px, rgba(201,168,130,.025) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,.015) 2px, rgba(0,0,0,.015) 4px);
    pointer-events: none;
    opacity: 0.6;
    z-index: 1;
}

body > *:not(.corner-ornament) {
    position: relative;
    z-index: 2;
}

::selection {
    background-color: #c9a882;
    color: #fff;
}

/* Hero Section */
.hero {
    position: relative;
    width: calc(100% - 10px);
    height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px;
}

.header-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: sepia(0.15) saturate(1.1);
}

.hero-text {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    padding: 2rem;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    margin: 0.5rem 0;
    font-variant: small-caps;
}

.ampersand {
    font-size: 3rem;
    font-style: italic;
    margin: 1.5rem 0;
    font-weight: 300;
    opacity: 0.9;
}

.wedding-date {
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 300;
    margin-top: 2rem;
    font-variant-numeric: oldstyle-nums;
}

.wedding-date sup {
    font-size: 0.7em;
    font-variant-numeric: normal;
}

/* Main Content */
main {
    max-width: 700px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.welcome {
    text-align: center;
    padding: 0 1rem;
}

.welcome h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: #2c2c2c;
    letter-spacing: 0.05em;
    font-variant: small-caps;
}

.welcome p {
    font-size: 1.15rem;
    color: #6a6a6a;
    line-height: 1.8;
}

/* Events Section */
.events {
    margin-top: 4rem;
    text-align: center;
    padding: 0 1rem;
}

.events h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 3rem;
    color: #2c2c2c;
    letter-spacing: 0.05em;
    font-variant: small-caps;
}

.event {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #c9a882;
}

.event:last-child {
    border-bottom: none;
}

.event h3 {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    color: #2c2c2c;
    letter-spacing: 0.03em;
}

.event-date {
    font-size: 1.1rem;
    color: #6a6a6a;
    margin: 0.5rem 0;
    font-variant-numeric: oldstyle-nums;
}

.event-date sup {
    font-size: 0.7em;
    font-variant-numeric: normal;
}

.event-time {
    font-size: 1rem;
    color: #8a8a8a;
    font-style: italic;
    margin: 0.3rem 0;
}

.event-location {
    font-size: 1rem;
    color: #6a6a6a;
    margin: 0.5rem 0;
}

.event-attire {
    font-size: 1rem;
    color: #8a8a8a;
    font-style: italic;
    margin: 0.8rem 0 0 0;
}

.event-description {
    font-size: 1rem;
    color: #6a6a6a;
    margin-top: 0.5rem;
}

/* RSVP Section */
.rsvp {
    margin-top: 4rem;
    text-align: center;
    padding: 0 1rem;
}

.rsvp h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: #2c2c2c;
    letter-spacing: 0.05em;
    font-variant: small-caps;
}

.rsvp-intro {
    font-size: 1.15rem;
    color: #6a6a6a;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.rsvp-button {
    display: inline-block;
    padding: 1rem 3rem;
    background-color: #c9a882;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 300;
    border: 2px solid #c9a882;
    transition: all 0.3s ease;
    font-variant: small-caps;
}

.rsvp-button:hover {
    background-color: transparent;
    color: #c9a882;
}

/* Registry Section */
.registry {
    margin-top: 4rem;
    text-align: center;
    padding: 0 1rem;
}

.registry h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: #2c2c2c;
    letter-spacing: 0.05em;
    font-variant: small-caps;
}

.registry-intro {
    font-size: 1.15rem;
    color: #6a6a6a;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.registry-button {
    display: inline-block;
    padding: 1rem 3rem;
    background-color: transparent;
    color: #c9a882;
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 300;
    border: 2px solid #c9a882;
    transition: all 0.3s ease;
    font-variant: small-caps;
}

.registry-button:hover {
    background-color: #c9a882;
    color: #fff;
}

/* Footer */
footer {
    background-color: transparent;
    text-align: center;
    padding: 3rem 2.5rem;
    color: #999;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
}

/* Fade-in Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    body {
        border-width: 8px;
    }
    
    .hero {
        height: 400px;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .ampersand {
        font-size: 2.2rem;
    }
    
    .wedding-date {
        font-size: 0.9rem;
    }
    
    main {
        padding: 3rem 1.5rem;
    }
    
    .welcome,
    .events {
        padding: 0 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
