:root {
    /* PJ & Abbigail -- black and rose gold, elegant and classic. */
    --bg-ivory:    #F8F5F3;   /* warm off-white page ground */
    --text-dark:   #1A1717;   /* near-black body text */
    --gold:        #B76E79;   /* rose gold -- headings and accents */
    --sage:        #9E5C66;   /* deeper rose, for hovers */
    --pink:        #D9A7A7;   /* soft rose */
    --beige-dark:  #E8DCD8;   /* muted rose-grey panels */
    --border-light: rgba(26, 23, 23, 0.12);
    --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-dark);
    background-color: var(--bg-ivory);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}


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

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; }

/* Mask reveal */
.mask-container { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 15px; margin-bottom: -15px; }
.mask-text { display: inline-block; transform: translateY(120%); transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.active .mask-text { transform: translateY(0); }

/* FAB */
.fab-rsvp {
    position: fixed;
    bottom: 40px; right: 40px;
    width: 70px; height: 70px;
    border-radius: 50%;
    background: rgba(38, 51, 31, 0.65);
    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;
}
.fab-rsvp:hover { transform: translateY(-8px) scale(1.05); box-shadow: 0 20px 40px rgba(90,112,64,0.3); }

/* 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(245, 239, 227, 0.96);
    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(--gold); }
.nav-links { display: flex; gap: 30px; }
.nav-links a {
    font-size: 0.8rem;
    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 { width: 100%; }
.hamburger { display: none; }

.nav-light .nav-logo,
.nav-light .nav-links a { color: #fff; text-shadow: 1px 1px 5px rgba(0,0,0,0.8); }
.nav-light.scrolled .nav-logo,
.nav-light.scrolled .nav-links a { color: var(--gold); text-shadow: none; }

/* Layout */
.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(--pink); margin-bottom: 20px;
    display: block;
}
.page-title { font-size: 4rem; margin-bottom: 30px; }
.gold-text { color: var(--gold); }

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

/* Buttons */
.btn-outline {
    display: inline-block; padding: 15px 40px;
    border: 1px solid var(--pink);
    color: var(--pink);
    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(--pink); color: var(--bg-ivory); }
.btn-solid {
    display: block; width: 100%; padding: 18px;
    background: var(--gold); color: var(--bg-ivory);
    border: 1px solid var(--gold);
    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(--pink); border-color: var(--pink); color: #fff; }

/* 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;
    background: rgba(38, 51, 31, 0.45); z-index: 1;
}
.hero-gradient {
    background: linear-gradient(160deg, #3D5A30 0%, #4C6B3E 45%, #C77D96 100%) !important;
}
.hero-gradient::before { background: rgba(0,0,0,0.2); }
.hero-content {
    position: relative; z-index: 3;
    text-align: center; margin-top: 80px; padding: 0 20px;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: 8rem; color: #fff;
    margin-bottom: 15px; font-weight: 300;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.hero-date {
    font-family: var(--font-body);
    font-size: 1.4rem; letter-spacing: 12px;
    color: #fff; text-transform: uppercase;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}
.hero-venue {
    font-family: var(--font-heading);
    font-size: 1.1rem; letter-spacing: 4px;
    color: rgba(255,255,255,0.75);
    margin-top: 12px; font-style: italic;
}

/* Countdown */
.countdown-editorial { display: flex; justify-content: center; gap: 40px; margin: 30px 0; }
.countdown-editorial .cd-item { display: flex; flex-direction: column; align-items: center; }
.countdown-editorial .large-text {
    font-family: var(--font-heading);
    font-size: 3.5rem; color: var(--beige-dark);
    line-height: 1;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}
.countdown-editorial .cd-item span { color: #fff; display: block; margin-bottom: 5px; }
.countdown-editorial .cd-item p {
    font-size: 0.75rem; text-transform: uppercase;
    letter-spacing: 2px; margin: 0; color: rgba(255,255,255,0.8);
}

/* Story Grid */
.story-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 80px; align-items: center;
    margin-top: 100px; position: relative;
}
.story-text { max-width: 800px; margin: 0 auto 20px auto; font-size: 1.05rem; line-height: 1.9; }

/* Polaroid */
.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;
}
.polaroid img {
    width: 280px; height: 340px;
    object-fit: cover; display: block;
}
.photo-placeholder-sm {
    width: 280px; height: 340px;
    background: linear-gradient(135deg, var(--beige-dark) 0%, var(--bg-ivory) 100%);
    display: flex; align-items: center; justify-content: center;
}
.polaroid:hover { z-index: 10 !important; transform: scale(1.05) rotate(0deg) !important; box-shadow: 0 25px 50px rgba(0,0,0,0.25); }
.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; }

/* Timeline */
.program-timeline { max-width: 800px; margin: 0 auto 100px auto; }
.timeline-container { margin-top: 50px; }
.timeline-item { display: flex; margin-bottom: 40px; align-items: flex-start; }
.timeline-item .time {
    width: 120px; font-family: var(--font-heading);
    font-size: 2rem; 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; }

/* FAQ */
.faq-section { margin-top: 60px; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 30px; margin-top: 40px; }
.faq-item {
    padding: 30px; border: 1px solid var(--border-light);
    background: #fff; transition: var(--transition);
}
.faq-item:hover { border-color: var(--gold); transform: translateY(-5px); }
.faq-item h4 {
    color: var(--gold); margin-bottom: 15px;
    font-size: 1rem; letter-spacing: 1px; text-transform: uppercase;
}

/* FAQ accordion */
.faq-accordion { display: flex; flex-direction: column; gap: 16px; margin-top: 40px; }
.faq-accordion .faq-item { padding: 0; transform: none !important; }
.faq-accordion .faq-item summary {
    padding: 24px 30px;
    color: var(--gold); font-size: 1rem; letter-spacing: 1px; text-transform: uppercase;
    cursor: pointer; list-style: none;
    display: flex; align-items: center; justify-content: space-between;
}
.faq-accordion .faq-item summary::-webkit-details-marker { display: none; }
.faq-accordion .faq-item summary::after {
    content: '+';
    font-family: var(--font-heading); font-size: 1.4rem; color: var(--pink);
    transition: transform 0.3s ease;
}
.faq-accordion .faq-item[open] summary::after { content: '\2212'; }
.faq-accordion .faq-item p {
    padding: 0 30px 24px; line-height: 1.7; color: var(--text-dark);
}

/* Banner */
.banner-break {
    width: 100%; height: 380px;
    position: relative; display: flex;
    align-items: center; justify-content: center;
    margin-top: 80px;
    background-size: cover; background-position: center;
    background-attachment: fixed;
}
.banner-break::before {
    content: '';
    position: absolute; inset: 0;
    background: rgba(38, 51, 31, 0.5);
}
.banner-overlay { position: relative; z-index: 1; }
.banner-gradient {
    background: linear-gradient(135deg, #3D5A30 0%, #4C6B3E 50%, #C77D96 100%) !important;
}
.banner-overlay {
    background: rgba(0,0,0,0.3);
    padding: 40px 80px;
    border: 1px solid var(--gold);
}
.banner-overlay h2 {
    color: #fff; font-size: 2.5rem;
    font-style: italic; letter-spacing: 2px; text-align: center;
}

/* Venue */
.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: 15px; }
.venue-text .note { font-style: italic; color: var(--gold); }
.venue-map-elegant { width: 100%; min-height: 500px; background: #e0e0e0; }

/* Gallery */
.gallery-placeholder-notice {
    text-align: center; padding: 20px;
    color: var(--gold); margin-bottom: 20px;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    font-style: italic; font-size: 1rem;
}
.editorial-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 420px; gap: 10px;
}
.ed-item { position: relative; border-radius: 2px; overflow: hidden; cursor: pointer; }
.ed-item img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform 0.6s ease; }
.ed-item:hover img { transform: scale(1.04); }
.ed-item.span-full { grid-column: 1 / -1; grid-row: span 2; }

/* Photo carousel */
.photo-carousel { position: relative; width: 100%; }
.carousel-track {
    display: flex; align-items: flex-start; width: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
    scroll-behavior: smooth; -webkit-overflow-scrolling: touch; transition: height 0.3s ease;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
    flex: 0 0 100%; width: 100%; height: auto;
    scroll-snap-align: start; border-radius: 2px; overflow: hidden; position: relative;
    background: var(--bg-ivory);
}
.carousel-slide img { width: 100%; height: auto; display: block; object-fit: unset; object-position: unset; }
.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px;
    border-radius: 50%; border: none; background: rgba(255,255,255,0.85); font-size: 1.7rem; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--gold); transition: var(--transition); z-index: 2; box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.carousel-btn:hover { background: var(--gold); color: #fff; }
.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }

@media (max-width: 900px) {
    .carousel-btn { width: 42px; height: 42px; font-size: 1.4rem; }
}

/* RSVP + Gifts split */
.rsvp-gifts-row {
    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: 2rem; line-height: 1.4;
    font-style: italic; margin: 30px 0; color: var(--text-dark);
}
.rsvp-note { margin-bottom: 30px; font-size: 1rem; line-height: 1.7; }

/* Forms */
.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-dark); transition: var(--transition);
    resize: vertical;
}
.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; }

/* Guestbook */
.guestbook-wrapper { margin-top: 100px; }
.guestbook-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-top: 50px; }
.guestbook-layout-solo { grid-template-columns: 1fr; max-width: 600px; margin-left: auto; margin-right: auto; }
.guestbook-layout-solo .guestbook-form-col { padding-right: 0; border-right: none; }
.guestbook-form-col { padding-right: 40px; border-right: 1px solid var(--border-light); }
.guestbook-messages-col { display: flex; flex-direction: column; gap: 24px; max-height: 600px; overflow-y: auto; padding-right: 10px; }
.message-card {
    background: #fff; border: 1px solid var(--border-light);
    padding: 24px; transition: var(--transition);
}
.message-card:hover { border-color: var(--gold); }
.message-card .mc-name {
    font-family: var(--font-heading); font-size: 1.1rem;
    color: var(--gold); margin-bottom: 8px;
}
.message-card .mc-date { font-size: 0.75rem; color: #999; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.message-card .mc-text { font-size: 0.95rem; line-height: 1.7; color: var(--text-dark); }
.loading-messages { color: #aaa; font-style: italic; font-size: 0.9rem; }
.no-messages { text-align: center; color: #aaa; font-style: italic; padding: 40px 0; }

/* Scrollbar for messages */
.guestbook-messages-col::-webkit-scrollbar { width: 4px; }
.guestbook-messages-col::-webkit-scrollbar-track { background: var(--bg-ivory); }
.guestbook-messages-col::-webkit-scrollbar-thumb { background: var(--beige-dark); border-radius: 2px; }

/* Responsive */
@media (max-width: 900px) {
    body.editorial-body::before { box-shadow: none; }
    .page-title { font-size: 2.5rem !important; }
    .hero-title { font-size: 3.5rem; }
    .hero-date { font-size: 1rem; letter-spacing: 6px; }
    .hero-venue { font-size: 0.9rem; }

    .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(--gold); transition: all 0.3s ease; }
    .nav-light .hamburger span { background-color: #fff; }
    .nav-light.scrolled .hamburger span { background-color: var(--gold); }
    .nav-links {
        position: fixed; top: 0; right: -100%;
        width: 100vw; height: 100vh;
        background: rgba(245, 239, 227, 0.98); backdrop-filter: blur(10px);
        flex-direction: column; justify-content: center; align-items: center;
        transition: right 0.4s ease; z-index: 100;
    }
    .nav-links.active { right: 0; }
    .nav-links a { color: var(--gold) !important; font-size: 1.5rem; margin: 15px 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); }

    .countdown-editorial { gap: 15px; flex-wrap: wrap; }
    .countdown-editorial .large-text { font-size: 2.5rem; }

    .story-grid { grid-template-columns: 1fr; margin-top: 60px; }
    .polaroid-collage { height: 400px; margin-top: 30px; }
    .photo-placeholder-sm { width: 180px; height: 220px; }
    .polaroid img { width: 180px; height: 220px; }
    .p-1 { left: 0; top: 0; }
    .p-2 { right: 0; top: 60px; }
    .p-3 { left: 30px; bottom: 0; }

    /* Mobile hero: desktop hero.jpeg is landscape and crops badly in a tall
       viewport, so use a portrait shot. Was 34.jpeg, a fouriefees photo that
       404s on this site and left phones with no hero image at all. */
    .hero-fullscreen {
        background-image: url('../assets/photos/story-3.jpeg') !important;
        background-position: center !important;
    }

    .ed-item.span-full { grid-row: span 1; }

    .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 { grid-template-columns: 1fr; gap: 20px; }

    .banner-overlay { padding: 20px 30px; }
    .banner-overlay h2 { font-size: 1.5rem; }

    .venue-editorial { grid-template-columns: 1fr; }
    .venue-map-elegant { height: 350px; }

    .editorial-gallery { grid-template-columns: 1fr; }

    .rsvp-gifts-row { grid-template-columns: 1fr; gap: 60px; }
    .gifts-editorial { padding-right: 0; border-right: none; border-bottom: 1px solid var(--border-light); padding-bottom: 60px; }

    .guestbook-layout { grid-template-columns: 1fr; gap: 50px; }
    .guestbook-form-col { padding-right: 0; border-right: none; border-bottom: 1px solid var(--border-light); padding-bottom: 50px; }
    .guestbook-messages-col { max-height: none; }
}

/* Standalone polaroid, outside .polaroid-collage.
   The base .polaroid is position:absolute for the collage layout, which makes a
   lone one escape normal flow and overlap whatever follows it. This keeps the
   same framed look but in flow, and lets the image scale on narrow screens. */
.polaroid-solo {
    position: relative;
    display: inline-block;
    max-width: 100%;
    transform: none;
}
.polaroid-solo img {
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 280 / 340;
    object-fit: cover;
}
.polaroid-solo:hover { transform: scale(1.02) !important; }
