/* ==========================================================================
   WEDDING INVITATION - CONSOLIDATED MOBILE-FIRST DESIGN SYSTEM
   ========================================================================== */

/* 1. Global Reset & Typography Tokens */
html {
    font-size: 16px;
    background-color: #e9ece6; /* Premium Muted Sage Mist outside the mobile container */
}

:root {
    --primary: #5d6d58; /* Sage Green */
    --secondary: #8c857a; /* Taupe */
    --accent: #b8976b; /* Warm Muted Gold (embossed foil print look) */
    --bg: #ffffff; /* Clean pure white background */
    --text: #3a3a3a; /* Deep warm charcoal */
    --serif: 'Tinos', serif;
    --sans: 'Arimo', sans-serif;
    --script: 'Pinyon Script', cursive;
}

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

body {
    font-family: var(--sans);
    background: #e9ece6;
    color: var(--text);
    overflow-x: hidden;
    overflow-y: auto;
    font-size: 1rem;
    max-width: 480px; /* Force mobile app-like container width */
    margin: 0 auto; /* Center perfectly on desktop screens */
    min-height: 100vh;
    padding: 0.5rem;
}

/* Cotton textured-paper overlay */
.paper-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5; /* Behind content but over backgrounds */
    pointer-events: none;
    opacity: 0.08;
    filter: url(#paper-noise);
    mix-blend-mode: multiply;
}

/* ==========================================================================
   2. Layout Containers & Screen Structures
   ========================================================================== */

.hero-watercolor, .date-section, .locations-section {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden; /* Lock in splatters & elements */
    z-index: 10;
    margin: 0;
    box-sizing: border-box;
}

.hero-watercolor {
    min-height: auto; /* Shrink-wrap to fit mobile fold perfectly */
    padding: 0;
}

.date-section, .locations-section {
    min-height: 100vh;
    border-top: none; /* Seamless vertical section stitching */
}

/* Double Luxury Gilded Frames inside each section */
.hero-watercolor::before, .date-section::before, .locations-section::before {
    content: '';
    position: absolute;
    inset: 0.5rem;
    border: 1px solid rgba(93, 109, 88, 0.22) !important; /* Outer Sage line */
    outline: 1px solid rgba(184, 151, 107, 0.35) !important; /* Inner Gold line */
    outline-offset: -4px;
    pointer-events: none;
    z-index: 10;
    border-radius: 4px;
}

.date-split-container, .locations-split-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
}

/* ==========================================================================
   3. Photos & Cursive Card Labels
   ========================================================================== */

/* Stack photos on top of sections */
.hero-photo-container, .date-right-photo, .locations-left-photo {
    width: 100%;
    height: 450px; /* Perfectly balanced viewport weight */
    position: relative;
    order: 1;
    margin-bottom: 0;
}

/* Curved dome mask on parent containers to keep scroll stable and smooth */
.hero-photo-container, .date-photo-container, .locations-photo-container {
    clip-path: ellipse(150% 100% at 50% 0%) !important;
    overflow: hidden;
    position: relative;
    z-index: 400;
}

.date-photo-container, .locations-photo-container {
    height: 100%;
}

.hero-photo-container img, .date-photo-container img, .locations-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: none !important; /* Reset child clipping to allow nested parallax translation */
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* Elegant Gold Cursive Overlay Labels on Photo Prints */
.hero-photo-container::after {
    content: 'with love';
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--script);
    font-size: 2rem;
    color: var(--accent); /* Warm gold cursive */
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    pointer-events: none;
    white-space: nowrap;
}

.date-photo-container::after {
    content: 'save the date';
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--script);
    font-size: 2rem;
    color: var(--accent);
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    pointer-events: none;
    white-space: nowrap;
}

.locations-photo-container::after {
    content: 'our wedding day';
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--script);
    font-size: 2rem;
    color: var(--accent);
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    pointer-events: none;
    white-space: nowrap;
}

.photo-overlay-glass {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    background: linear-gradient(to top, rgba(255,255,255,0.15), transparent);
}

/* ==========================================================================
   4. Content Areas & Typography
   ========================================================================== */

/* Consolidated content container spacing */
.hero-content-area, .date-left-content, .locations-right-content {
    width: 100%;
    padding: 2rem 1.5rem 2.5rem 1.5rem;
    flex: none;
    order: 2;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    position: relative;
    background: transparent;
    z-index: 5;
}

/* Faint Interlocking Monogram Watermark behind all content sections */
.hero-content-area::after, .date-left-content::after, .locations-right-content::after {
    content: 'T&M';
    position: absolute;
    font-family: var(--script);
    font-size: 15rem;
    color: var(--primary);
    opacity: 0.04; /* Extremely subtle watermark stamp */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

/* Typography elements */
.save-the-date, .date-badge, .loc-badge {
    font-family: var(--sans);
    font-size: 0.8rem;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    color: var(--accent); /* Gold foil print look */
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.names-script {
    font-family: var(--script);
    font-size: clamp(2.8rem, 14vw, 4.5rem) !important; /* Scale dynamically to prevent horizontal scroll */
    color: var(--primary);
    line-height: 0.8;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    margin-bottom: 1rem !important;
    align-items: center;
}

.name-first {
    transform: none; /* Align inline for mobile screens */
}

.name-second {
    margin-top: 0;
}

.event-date {
    font-family: var(--serif);
    font-size: 1.8rem;
    letter-spacing: 0.25rem;
    color: var(--text);
    margin-bottom: 1rem !important;
    text-transform: uppercase;
}

.hero-divider-line {
    width: 9.375rem;
    height: 1px;
    background: rgba(93, 109, 88, 0.2);
    margin: 0 auto 1rem auto !important;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--secondary);
    max-width: 100%;
}

.date-section {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.section-title, .date-section .section-title, .locations-section .section-title {
    font-family: var(--script);
    font-size: 3rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 1.25rem;
}

/* ==========================================================================
   5. Interactive Date Circle (Save the Date)
   ========================================================================== */

.date-artistic-container {
    width: 100%;
    height: 16rem; /* Perfect viewport scale */
    transform: scale(0.8);
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-watercolor-stain {
    position: absolute;
    width: 22rem;
    height: 22rem;
    background: radial-gradient(circle, rgba(93, 109, 88, 0.15) 0%, transparent 75%);
    border-radius: 50%;
    filter: blur(20px);
    z-index: 1;
}

.date-circle-svg {
    position: absolute;
    width: 20rem;
    height: 20rem;
    z-index: 2;
    animation: rotateDateCircle 20s linear infinite;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

@keyframes rotateDateCircle {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.date-main-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.date-month {
    font-family: var(--serif);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.8rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    padding-left: 0.8rem; /* Center lettering offset */
}

.date-day {
    font-family: var(--serif);
    font-size: 8rem;
    line-height: 1;
    color: var(--primary);
    margin: 0.5rem 0;
}

.date-year {
    font-family: var(--sans);
    font-size: 1rem;
    letter-spacing: 0.4rem;
    color: var(--secondary);
    opacity: 0.6;
    padding-left: 0.4rem;
}

.date-note {
    margin-top: 1.5rem;
    text-align: center;
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--secondary);
    font-style: italic;
    line-height: 1.6;
}

/* ==========================================================================
   6. Custom Wedding Journey & Roadmap (Timeline)
   ========================================================================== */

.roadmap-v-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.75rem; /* Compressed for comfortable scroll layout */
    align-items: flex-start;
    text-align: left;
    padding-left: 0.5rem;
    width: 100%;
}

.roadmap-v-line {
    position: absolute;
    left: 1.3rem; /* Shifted right to prevent viewport clipping */
    transform: translateX(-50%);
    top: 2.2rem; /* Start below the first badge */
    bottom: 2.2rem; /* End above the last badge */
    width: 0;
    border-left: 2px dashed rgba(93, 109, 88, 0.35); /* Trail dashed path */
}

.roadmap-v-item {
    display: flex;
    flex-direction: column; /* Vertical alignment on narrow screens */
    align-items: flex-start;
    gap: 0.25rem;
    width: 100%;
    padding-left: 3.5rem; /* Clear of the dashed line & badges */
    position: relative;
}

.dot-circle {
    position: absolute;
    left: 1.3rem; /* Perfectly centered on the dashed timeline */
    top: 0.3rem; /* Vertical baseline align */
    transform: translateX(-50%);
    width: 2.2rem; /* Spacious interactive circular badge */
    height: 2.2rem;
    border-radius: 50%;
    border: 1px solid rgba(93, 109, 88, 0.25) !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2;
    margin: 0;
    box-shadow: 0 4px 10px rgba(93, 109, 88, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dot-circle .icon-svg {
    width: 1.05rem;
    height: 1.05rem;
    stroke: var(--secondary);
    fill: none;
    transition: stroke 0.4s ease, transform 0.4s ease;
}

/* Dynamic Active State triggered on scroll trigger entry */
.roadmap-v-item.active .dot-circle {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    transform: translateX(-50%) scale(1.15);
    box-shadow: 0 4px 15px rgba(93, 109, 88, 0.35);
}

.roadmap-v-item.active .dot-circle .icon-svg {
    stroke: #ffffff !important;
}

.icon-map-svg {
    width: 0.95rem;
    height: 0.95rem;
    stroke: currentColor;
    fill: none;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.25rem;
    margin-top: -2px;
}

.time-box {
    display: flex !important;
    width: auto !important;
    flex-direction: row !important; /* Inline display of times */
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.4rem !important;
    margin-bottom: 0.2rem;
    font-family: var(--serif);
    line-height: 1.2;
}

.time-box .start {
    font-size: 1rem !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}

.time-box .end {
    font-size: 0.85rem !important;
    color: var(--secondary) !important;
    opacity: 0.8 !important;
}

.time-box .end::before {
    content: '- ' !important;
}

.roadmap-v-text {
    padding-left: 0 !important;
    flex: 1;
    text-align: left;
}

.roadmap-v-text h3 {
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--text);
    text-transform: uppercase;
    margin-bottom: 0.2rem;
    letter-spacing: 0.1rem;
}

.roadmap-v-text p {
    font-family: var(--sans);
    font-size: 0.95rem;
    color: var(--secondary);
    opacity: 0.8;
    line-height: 1.6;
}

/* ==========================================================================
   7. Map Action Links & Watercolor Backdrops
   ========================================================================== */

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--accent); /* Gold links */
    text-decoration: none;
    margin-top: 0.5rem;
    font-weight: 600;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.map-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.map-link i {
    font-size: 0.95rem;
}

/* Dreamy Soft Watercolor Splatters background wash */
.watercolor-splatter {
    display: block !important;
    position: absolute;
    width: 15rem;
    height: 15rem;
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}

.splatter-top-right {
    top: -3rem;
    right: -3rem;
    background: radial-gradient(circle, rgba(93, 109, 88, 0.18) 0%, transparent 70%) !important;
}

.splatter-bottom-left {
    bottom: -3rem;
    left: -3rem;
    background: radial-gradient(circle, rgba(184, 151, 107, 0.15) 0%, transparent 70%) !important;
}

/* ==========================================================================
   8. Premium Floating Language Switcher
   ========================================================================== */
.lang-switcher {
    position: fixed;
    top: 1.5rem;
    right: calc(50% - 240px + 1.5rem); /* Align perfectly with right margin of the 480px card on desktop */
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1.1rem;
    background: rgba(255, 255, 255, 0.82); /* Frosted clean white */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 151, 107, 0.25); /* Gold frame */
    border-radius: 30px;
    box-shadow: 0 6px 20px rgba(93, 109, 88, 0.08);
    transition: all 0.3s ease;
}

@media (max-width: 480px) {
    .lang-switcher {
        right: 1.5rem; /* Align to viewport margin on pure mobile */
    }
}

.lang-btn {
    font-family: var(--sans);
    font-size: 0.88rem; /* Comfortably large, highly legible and premium size */
    font-weight: 600;
    letter-spacing: 0.1rem;
    color: var(--secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.55;
    padding: 0.1rem 0.2rem;
}

.lang-btn.active {
    color: var(--primary) !important;
    opacity: 1 !important;
    text-shadow: 0 0 1px rgba(93, 109, 88, 0.2);
}

.lang-divider {
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--accent);
    opacity: 0.5;
}

/* ==========================================================================
   9. Elegant Ambient Leaf Canvas Overlay
   ========================================================================== */
#ambient-canvas {
    position: fixed;
    top: 0;
    left: calc(50% - 240px); /* Lock exact coordinate align with centered 480px column */
    width: 480px;
    height: 100vh;
    pointer-events: none; /* Passes clicks straight to links behind it */
    z-index: 450; /* Floats over the white sections, but behind the language switcher (1000) */
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

@media (max-width: 480px) {
    #ambient-canvas {
        left: 0;
        width: 100%;
    }
}

/* ==========================================================================
   8. Purge Obsolete Assets
   ========================================================================== */
.euca-decor, .loc-decor-euca, .date-decor-leaf, .watercolor-decor, .watercolor-stain, .social-sidebar {
    display: none !important;
}

/* ==========================================================================
   10. Premium Luxury Preloader
   ========================================================================== */
#preloader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg); /* Warm Ivory textured-paper */
    z-index: 9999; /* Over language switcher and everything */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: all;
    max-width: 480px; /* Lock exactly to mobile card viewport */
    margin: 0 auto;
    box-shadow: 0 0 50px rgba(0,0,0,0.15);
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.preloader-monogram {
    font-family: var(--script);
    font-size: 5rem;
    color: var(--primary); /* Sage Green */
    animation: pulseSoft 2.5s ease-in-out infinite;
}

.preloader-heart {
    width: 24px;
    height: 24px;
    color: var(--accent); /* Warm Gold */
    animation: heartBeat 1.5s ease-in-out infinite;
    margin-top: -0.5rem;
}

.preloader-heart svg {
    width: 100%;
    height: 100%;
    stroke: var(--accent);
    fill: rgba(184, 151, 107, 0.05);
}

.preloader-line-wrapper {
    width: 120px;
    height: 1px;
    background: rgba(93, 109, 88, 0.15);
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
    border-radius: 2px;
}

.preloader-line {
    position: absolute;
    height: 100%;
    width: 40px;
    background: var(--accent); /* Gold loader line */
    left: -40px;
    animation: loadingBar 2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes pulseSoft {
    0%, 100% { opacity: 0.7; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1.02); }
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.18); }
    30% { transform: scale(1); }
    45% { transform: scale(1.12); }
    60% { transform: scale(1); }
}

@keyframes loadingBar {
    0% { left: -40px; }
    100% { left: 120px; }
}

/* Premium GPU-Accelerated CSS Text Reveals (IntersectionObserver Sync) */
.reveal-text {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1.2s cubic-bezier(0.215, 0.61, 0.355, 1), transform 1.2s cubic-bezier(0.215, 0.61, 0.355, 1);
    will-change: opacity, transform;
}

.reveal-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Page-Load Animations (Native, hardware-accelerated, zero-lag) */
.hero-photo-container {
    opacity: 0;
    transform: translateY(15px);
    animation: heroEntrance 1.2s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
    animation-delay: 0.5s;
    will-change: opacity, transform;
}

.hero-content-area {
    opacity: 0;
    transform: translateY(15px);
    animation: heroEntrance 1.2s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
    animation-delay: 0.8s;
    will-change: opacity, transform;
}

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