:root {
    --bg-ivory: #FAF9F6;
    --text-navy: #0A192F;
    --gold: #C5A059;
    --border-light: rgba(10, 25, 47, 0.1);
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.5s ease-out;
}

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

body.editorial-body {
    font-family: var(--font-body);
    color: var(--text-navy);
    background-color: var(--bg-ivory);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Invitation Frame */
body.editorial-body::before {
    content: '';
    position: fixed;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 1px solid var(--gold);
    box-shadow: 0 0 0 15px var(--text-navy);
    z-index: 9998;
    pointer-events: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--text-navy);
}

em {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 300;
}

.drop-cap {
    float: left;
    font-size: 4.5rem;
    line-height: 0.8;
    padding-top: 4px;
    padding-right: 8px;
    padding-left: 3px;
    font-family: var(--font-heading);
    color: var(--gold);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.2s; }
.stagger-2 { transition-delay: 0.4s; }
.stagger-3 { transition-delay: 0.6s; }

/* Visual X-Factor: Mask Reveal Typography */
.mask-container {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 15px; /* Prevent clipping of descenders */
    margin-bottom: -15px;
}

.mask-text {
    display: inline-block;
    transform: translateY(120%);
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.page-title.active .mask-text {
    transform: translateY(0);
}

/* Visual X-Factor: Gold Foil Accents */
.page-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C5A059' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22c4-4 8-9 8-14a8 8 0 0 0-16 0c0 5 4 10 8 14z'%3E%3C/path%3E%3Cpath d='M12 22V12'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
}

/* Visual X-Factor: Glassmorphic FAB */
.fab-rsvp {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(10, 25, 47, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--gold);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-style: italic;
    z-index: 9900;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, color 0.4s ease;
}

.fab-rsvp:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(197, 160, 89, 0.3);
    color: var(--bg-ivory);
}

/* Page Transitions */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-ivory);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

body.is-transitioning .page-transition {
    opacity: 1;
    pointer-events: all;
}

/* Navigation */
.luxury-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 30px 0;
    background: transparent;
    z-index: 100;
    transition: padding 0.4s ease, background 0.4s ease;
}

.luxury-nav.scrolled {
    padding: 15px 0;
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
}

.nav-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--text-navy);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 5px;
}

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

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

.hamburger {
    display: none;
}

/* Home Page specific nav colors before scroll */
.nav-light .nav-logo,
.nav-light .nav-links a {
    color: var(--bg-ivory);
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8), 0 0 15px rgba(0,0,0,0.6);
}

.nav-light.scrolled .nav-logo,
.nav-light.scrolled .nav-links a {
    color: var(--text-navy);
    text-shadow: none;
}

/* Layout Utilities */
.page-content {
    padding-top: 150px;
    padding-bottom: 120px;
}

.home-content {
    padding-top: 50px;
    padding-bottom: 120px;
}

.content-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

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

.subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--gold);
    margin-bottom: 20px;
}

.page-title {
    font-size: 4rem;
    margin-bottom: 30px;
}

.thin-divider {
    height: 2px;
    width: 60px;
    background: linear-gradient(90deg, var(--text-navy), var(--gold));
    margin: 30px 0;
}

.thin-divider.center {
    margin: 30px auto;
}

/* Buttons */
.btn-outline {
    display: inline-block;
    padding: 15px 40px;
    border: 1px solid var(--text-navy);
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-outline:hover {
    background: var(--text-navy);
    color: var(--bg-ivory);
}

.btn-solid {
    display: block;
    width: 100%;
    padding: 18px;
    background: var(--text-navy);
    color: var(--bg-ivory);
    border: 1px solid var(--text-navy);
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-solid:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--text-navy);
}

/* Home / Hero (index.html) */
/* Majestic Full-Screen Hero */
.hero-fullscreen {
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-fullscreen::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    background: rgba(10, 25, 47, 0.6); /* Dark overlay */
    z-index: 1;
}

.hero-fullscreen::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: inherit;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2;
}

.hero-overlay {
    display: none; /* Replaced by the ::before blur overlay */
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    margin-top: 100px; /* offset for nav */
    padding: 0;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 8rem;
    color: var(--bg-ivory);
    margin-bottom: 15px;
    font-weight: 300;
    text-shadow: 0 4px 20px rgba(10, 25, 47, 0.8);
}

.hero-title.active .mask-text {
    transform: translateY(0);
}

.hero-date {
    font-family: var(--font-body);
    font-size: 1.5rem;
    letter-spacing: 12px;
    color: var(--bg-ivory);
    text-transform: uppercase;
    text-shadow: 4px 4px 10px rgba(0,0,0,0.9), 0px 0px 30px rgba(0,0,0,1);
}

/* Story Grid & Polaroid Collage */
.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-top: 60px;
    position: relative;
}

.story-grid::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C5A059' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22c4-4 8-9 8-14a8 8 0 0 0-16 0c0 5 4 10 8 14z'%3E%3C/path%3E%3Cpath d='M12 22V12'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
}

.polaroid-collage {
    position: relative;
    width: 100%;
    height: 600px;
}

.polaroid {
    background: white;
    padding: 15px 15px 50px 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    position: absolute;
    border: 1px solid var(--border-light);
    transition: transform 0.4s ease, z-index 0s;
}

.polaroid img {
    width: 280px;
    height: 340px;
    object-fit: cover;
}

.polaroid:hover {
    z-index: 10 !important;
    transform: scale(1.05) rotate(0deg) !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.p-1 {
    top: 0;
    left: 0;
    transform: rotate(-6deg);
    z-index: 3;
}

.p-2 {
    top: 100px;
    right: 0;
    transform: rotate(8deg);
    z-index: 2;
}

.p-3 {
    bottom: 20px;
    left: 60px;
    transform: rotate(-3deg);
    z-index: 4;
}

.countdown-editorial {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
}

.countdown-editorial .cd-item {
    display: flex;
    flex-direction: column;
}

.countdown-editorial .large-text {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--gold);
    line-height: 1;
}

.countdown-editorial .cd-item span {
    font-size: 3rem;
    font-weight: 500;
    color: var(--bg-ivory);
    display: block;
    margin-bottom: 5px;
    text-shadow: 4px 4px 10px rgba(0,0,0,0.9), 0px 0px 30px rgba(0,0,0,1);
}

.countdown-editorial .cd-item p {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    color: var(--bg-ivory);
    text-shadow: 4px 4px 10px rgba(0,0,0,0.9), 0px 0px 30px rgba(0,0,0,1);
}

.story-text {
    max-width: 800px;
    margin: 0 auto 20px auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Program Timeline */
.program-timeline {
    max-width: 800px;
    margin: 0 auto 100px auto;
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
    align-items: flex-start;
}

.timeline-item .time {
    width: 120px;
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--gold);
    flex-shrink: 0;
    text-align: right;
    padding-right: 30px;
    border-right: 1px solid var(--gold);
}

.timeline-item .event {
    padding-left: 30px;
    padding-top: 5px;
}

.timeline-item .event h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

/* Banner Break */
.banner-break {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center 30%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-attachment: fixed;
}

.banner-overlay {
    background: rgba(10, 25, 47, 0.6);
    padding: 40px 80px;
    border: 1px solid var(--gold);
}

.banner-overlay h2 {
    color: var(--bg-ivory);
    font-size: 3rem;
    font-style: italic;
    letter-spacing: 2px;
}

/* FAQ & Accomodation */
.faq-grid, .acc-grid {
    display: grid;
    gap: 40px;
    margin-bottom: 60px;
}

.faq-grid {
    grid-template-columns: 1fr; /* Stack vertically on desktop */
}

.acc-grid {
    grid-template-columns: 1fr 1fr 1fr;
}

.faq-item, .acc-card {
    padding: 30px;
    border: 1px solid var(--border-light);
    background: #fff;
    transition: var(--transition);
}

.faq-item:hover, .acc-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
}

.faq-item h4, .acc-card h4 {
    color: var(--gold);
    margin-bottom: 15px;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.venue-editorial {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    border: 1px solid var(--border-light);
}

.venue-text {
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.venue-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.venue-text .note {
    margin: 30px 0;
    font-style: italic;
    color: var(--gold);
}

.venue-map-elegant {
    width: 100%;
    min-height: 500px;
    background: #e0e0e0;
}

/* Gallery Page */
.editorial-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 300px;
    gap: 10px;
}

.ed-item {
    position: relative;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}

.ed-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: grayscale(20%) contrast(1.1);
}

.ed-item:hover img {
    transform: scale(1.05);
    filter: grayscale(0%) contrast(1.1);
}

.tall { grid-row: span 2; }
.wide { grid-column: span 2; }
.large { grid-column: span 2; grid-row: span 2; }

/* RSVP Page */
.rsvp-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    margin-top: 50px;
}

.gifts-editorial {
    padding-right: 40px;
    border-right: 1px solid var(--border-light);
}

.gifts-editorial .quote {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    line-height: 1.3;
    font-style: italic;
    margin: 40px 0;
}

.rsvp-note {
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.editorial-form .form-group {
    margin-bottom: 30px;
}

.editorial-form label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.editorial-form input, 
.editorial-form select, 
.editorial-form textarea {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-light);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-navy);
    transition: var(--transition);
}

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

.message {
    margin-top: 20px;
    padding: 15px;
    text-align: center;
    border: 1px solid var(--gold);
    color: var(--gold);
}

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 900px) {
    /* Remove heavy blue border on mobile, leaving only the gold frame with a margin */
    body.editorial-body::before {
        box-shadow: none;
    }
    
    .page-title { font-size: 2.5rem !important; }
    .hero-title { font-size: 4rem; }
    
    .hero-fullscreen {
        height: auto;
        padding-top: 66.6vw; /* Exact space for uncropped image */
        background-size: 100% auto;
        background-repeat: no-repeat;
        background-position: top center;
        background-color: var(--bg-ivory);
        display: block;
        overflow: visible;
    }
    
    .hero-fullscreen::before,
    .hero-fullscreen::after {
        display: none; /* Disable cinematic blur effect on mobile */
    }
    
    .hero-overlay {
        display: none;
    }
    
    .hero-content {
        margin-top: 0;
        padding: 40px 10px;
        width: 100%;
        text-align: center;
    }
    
    .hero-title {
        color: var(--text-navy);
        font-size: 3.5rem;
        margin-bottom: 20px;
        text-shadow: none; /* No shadow needed on solid ivory background */
    }
    
    .countdown-editorial {
        gap: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .cd-item .large-text {
        font-size: 2.5rem; /* Prevent edge overflow */
        color: var(--text-navy);
        text-shadow: none;
    }
    
    .cd-item p {
        color: var(--text-navy);
        text-shadow: none;
    }
    
    .hero-date {
        text-shadow: none;
        color: var(--text-navy);
        font-size: 1.2rem;
        letter-spacing: 8px;
        margin-top: 20px;
    }
    
    .nav-container { justify-content: space-between; }
    
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 101;
    }
    
    .hamburger span {
        width: 25px;
        height: 2px;
        background-color: var(--text-navy);
        transition: all 0.3s ease;
    }
    
    .nav-light .hamburger span { background-color: var(--bg-ivory); }
    .nav-light.scrolled .hamburger span { background-color: var(--text-navy); }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100vw;
        height: 100vh;
        background: rgba(250, 249, 246, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        box-shadow: none;
        z-index: 100;
    }
    
    .nav-links.active { right: 0; }
    
    .nav-links a {
        color: var(--text-navy) !important;
        font-size: 1.8rem;
        margin: 20px 0;
    }
    
    .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .story-grid { grid-template-columns: 1fr; }
    .polaroid-collage { height: 500px; margin-top: 40px; }
    .polaroid img { width: 200px; height: 240px; }
    .p-1 { left: 0; top: 0; }
    .p-2 { right: 0; top: 80px; }
    .p-3 { left: 40px; bottom: 0; }
    
    .timeline-item { flex-direction: column; text-align: center; align-items: center; }
    .timeline-item .time { width: 100%; text-align: center; border-right: none; border-bottom: 1px solid var(--gold); padding: 0 0 10px 0; margin-bottom: 15px; }
    .timeline-item .event { padding-left: 0; }
    
    .faq-grid, .acc-grid { grid-template-columns: 1fr; gap: 30px; }
    .banner-overlay { padding: 20px 40px; }
    .banner-overlay h2 { font-size: 2rem; }
    
    .venue-editorial { grid-template-columns: 1fr; }
    .venue-map-elegant { height: 400px; }
    
    .wide, .large { grid-column: span 1; }
    .large { grid-row: span 1; }
    
    .rsvp-split { grid-template-columns: 1fr; gap: 60px; }
    .gifts-editorial { padding-right: 0; border-right: none; border-bottom: 1px solid var(--border-light); padding-bottom: 60px; }
}
