/* ============================================================
   CUSTOM FONT FACES
   ============================================================ */
@font-face {
    font-family: 'Gemola';
    src: url('fonts/Gemola.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Aston Script';
    src: url('fonts/Aston Script.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
   GLOBAL STYLES & VARIABLES
   ============================================================ */
:root {
    --color-cream:      #fcfbf8;
    --color-light-cream:#f5f3eb;
    --color-olive:      #556b2f;
    --color-dark-olive: #3a4a31;
    --color-text:       #2c3e2d;
    --color-muted:      rgba(44, 62, 45, 0.65);

    --font-serif:  'Playfair Display', serif;
    --font-script: 'Great Vibes', cursive;
    --font-sans:   'Lato', sans-serif;
    --font-amp:    'Great Vibes', cursive;
    --font-daniele: 'Gemola', serif;
    --font-delia:   'Aston Script', cursive;

    --section-pad: 90px 20px;
    --radius: 8px;
    --transition: 0.3s ease;

    /* ↓ Change this to adjust all timeline card heights */
    --tl-card-height: 180px;
    --tl-active-card-scale: 1.1;
    --tl-active-icon-scale: 1.24;
    --tl-active-time-scale: 1.17;
    --tl-mobile-icon-size: 72px;
    --tl-item-gap: 1px;
    /* Countdown vertical padding (top & bottom). Can be overridden per breakpoint. */
    --countdown-vertical-pad: 60px;
    /* Save-the-Date: increase/decrease this value to move the white box up/down */
    --save-card-lift: 130px;
    /* Save-the-Date (desktop only): 1 = full width, lower = smaller video */
    --save-video-desktop-scale: 0.42;
    /* Save-the-Date: single control for romantic carousel size */
    --save-carousel-scale: 1.12;
    /* Save-the-Date: increase/decrease this value to resize the calendar heart */
    --save-heart-size: 65px;
    /* Location carousel edge fade: 0 = no fade, 1 = full fade */
    --location-carousel-fade-strength: 0.45;
    /* Our Story timeline width on desktop (reduce/increase this) */
    --story-timeline-width: 90vw;
    /* Our Story: vertical distance between timeline rows */
    --story-line-vertical-gap: 34px;
    /* Our Story desktop vertical overlap between alternating year cards */
    --story-desktop-overlap: 250px;
    /* Our Story carousel scrollbar: set to none/0px to hide, thin/8px to show */
    --story-carousel-scrollbar-width: none;
    --story-carousel-scrollbar-height: 0px;

    /* ============================================================
       TYPOGRAPHY: Fluid Font Sizing via clamp()
       ============================================================ */
    /* HERO SECTION */
    --fs-hero-pretitle: clamp(0.85rem, 2vw, 0.92rem);
    --fs-hero-names: clamp(1.5rem, 12vw, 4.6rem); /*First number: minimum size, second number: optimal size, third number: maximum size */
    --fs-hero-amp: clamp(1.3rem, 5vw, 3.6rem);
    --fs-hero-date: clamp(0.9rem, 3vw, 1.2rem);
    --fs-hero-location: clamp(0.75rem, 2.2vw, 0.82rem);

    /* NAVIGATION */
    --fs-nav-logo: clamp(1.3rem, 3.5vw, 1.5rem);
    --fs-nav-amp: clamp(0.98rem, 3vw, 1.3rem);
    --fs-nav-link: clamp(0.76rem, 2.2vw, 0.85rem);

    /* SECTION HEADINGS & TEXT */
    --fs-section-title: clamp(1.62rem, 7vw, 2.4rem);
    --fs-subtitle: clamp(0.92rem, 3.6vw, 1rem);
    --fs-body-text: clamp(0.95rem, 4vw, 1.08rem);
    --fs-small-label: clamp(0.64rem, 2.2vw, 0.68rem);

    /* COUNTDOWN */
    --fs-countdown-title: clamp(0.6rem, 20vw, 2.6rem);
    --fs-countdown-label: clamp(0.92rem, 4.2vw, 1.12rem);
    --fs-countdown-digit: clamp(1.2rem, 7vw, 2.8rem);
    --fs-countdown-unit: clamp(0.58rem, 2vw, 0.72rem);

    /* FOOTER */
    --fs-footer-script: clamp(0.6rem, 20vw, 2.6rem);
    --fs-footer-names: clamp(1.2rem, 3.8vw, 1.5rem);
    --fs-footer-date: clamp(0.75rem, 2.4vw, 0.9rem);
    --fs-footer-venue: clamp(0.7rem, 2.2vw, 0.8rem);

    /* TIMELINE */
    --fs-timeline-time: clamp(1.2rem, 6.8vw, 2.8rem);
    --fs-timeline-card-heading: clamp(0.6rem, 2.4vw, 0.77rem);
    --fs-timeline-card-text: clamp(0.8rem, 3.2vw, 0.95rem);

    /* BUTTONS & CONTROLS */
    --fs-button: clamp(0.72rem, 2.4vw, 0.85rem);
    --fs-button-small: clamp(0.64rem, 2vw, 0.76rem);
    --fs-scroll-down: clamp(0.95rem, 2.8vw, 1.4rem);

    /* SPOTIFY & MISC LABELS */
    --fs-spotify-label: clamp(0.95rem, 3.6vw, 1.1rem);

    /* LETTER SPACING */
    --ls-nav-logo: clamp(0.8px, 0.8vw, 2px);
    --ls-nav-link: clamp(0.9px, 1vw, 2px);
    --ls-nav-amp: 0px;
    --ls-hero-names: clamp(0.55px, 0.8vw, 3px);
    --ls-hero-location: clamp(2px, 0.5vw, 2.5px);
}

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

html {
    scroll-behavior: smooth;
    /* Prevent any element from causing horizontal scroll at document level.
       body { overflow-x: hidden } alone is ignored by iOS Safari. */
    overflow-x: hidden;
    overflow-y: scroll;
    max-width: 100%;
    /* Match footer so overscroll past the bottom shows dark olive, not white */
    background-color: var(--color-dark-olive);
}

body {
    background-color: var(--color-cream);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.7;
    max-width: 100%;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Offset anchor targets below the fixed nav. */
section[id], footer[id] {
    scroll-margin-top: 64px;
}

/* ============================================================
   SCROLL-REVEAL ANIMATION
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(34px) scale(0.97);
    filter: blur(3px);
    /* Exit (anti-animation): snappier so elements reset before re-entering */
    transition: opacity 0.38s ease,
                transform 0.38s cubic-bezier(0.4, 0, 1, 1),
                filter 0.38s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    /* Entrance: slow & elegant */
    transition: opacity 0.85s ease,
                transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.85s ease;
}

/* Hero children stagger in one by one */
.hero-overlay > * {
    opacity: 0;
    animation: heroFadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-overlay > *:nth-child(1) { animation-delay: 0.15s; } /* pre-title */
.hero-overlay > *:nth-child(2) { animation-delay: 0.42s; } /* names */
.hero-overlay > *:nth-child(3) { animation-delay: 0.68s; } /* date */
.hero-overlay > *:nth-child(4) { animation-delay: 0.88s; } /* location */
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    animation: navEntrance 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes navEntrance {
    from { opacity: 0; transform: translateY(-100%); }
    to   { opacity: 1; transform: translateY(0); }
}
.site-nav.scrolled {
    background-color: rgba(85, 107, 47, 0.97);
    border-bottom-color: rgba(252, 251, 248, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 16px rgba(26, 38, 24, 0.2);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-serif);
    font-size: var(--fs-nav-logo);
    line-height: 1;
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    letter-spacing: var(--ls-nav-logo);
    transition: color 0.4s ease;
}
.nav-monogram {
    width: 40px;
    height: 40px;
    display: block;
    color: rgba(255,255,255,0.92);
    transition: color 0.4s ease;
}
.site-nav.scrolled .nav-monogram { color: var(--color-cream); }
.site-nav.nav-open .nav-monogram { color: var(--color-dark-olive); }
.site-nav.scrolled.nav-open .nav-monogram { color: var(--color-dark-olive); }
.nav-amp {
    font-family: var(--font-script);
    font-size: var(--fs-nav-amp);
    color: rgba(255,255,255,0.92);
    transition: color 0.4s ease;
   /* Align ampersand with the baseline of the nav logo text */
    margin-top: +10px;   
   /* Right Spacing: negative value to tuck ampersand closer to the "D"s, adjust as needed */
    margin-right: 1.5px; 
}
/* Nav becomes olive once user scrolls past hero */
.site-nav.scrolled .nav-logo { color: var(--color-cream); }
.site-nav.scrolled .nav-amp  { color: rgba(255, 255, 255, 0.92); }

.nav-links {
    list-style: none;
    display: flex;
    gap: clamp(12px, 2vw, 30px);
    flex-wrap: nowrap;
    white-space: nowrap;
}
.nav-links a {
    font-family: var(--font-sans);
    font-size: var(--fs-nav-link);
    letter-spacing: var(--ls-nav-link);
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: color 0.4s ease;
    white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
    color: #fff;
}
/* Scrolled: light links */
.site-nav.scrolled .nav-links a         { color: rgba(255,255,255,0.9); }
.site-nav.scrolled .nav-links a:hover,
.site-nav.scrolled .nav-links a.active  { color: #fff; }

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-self: center;
    margin: 0;
    padding: 0;
    line-height: 1;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 8px;
    background: transparent;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: rgba(255,255,255,0.92);
    transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease;
}
.site-nav.scrolled .nav-toggle {
    border-color: rgba(255, 255, 255, 0.35);
}
.site-nav.scrolled .nav-toggle span {
    background: rgba(255, 255, 255, 0.92);
}
.nav-toggle:hover {
    background-color: rgba(252, 251, 248, 0.16);
}
.nav-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(85, 107, 47, 0.2);
}

.site-nav.nav-open {
    background-color: rgba(252, 251, 248, 0.98);
    border-bottom-color: rgba(85, 107, 47, 0.15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 16px rgba(58, 74, 49, 0.12);
}
.site-nav.nav-open .nav-logo { color: var(--color-dark-olive); }
.site-nav.nav-open .nav-amp  { color: var(--color-olive); }
.site-nav.nav-open .nav-toggle {
    border-color: rgba(58, 74, 49, 0.24);
    background-color: rgba(85, 107, 47, 0.06);
}
.site-nav.nav-open .nav-toggle span {
    background: var(--color-dark-olive);
}
.site-nav.nav-open .nav-links a { color: var(--color-text); }
.site-nav.nav-open .nav-links a:hover,
.site-nav.nav-open .nav-links a.active { color: var(--color-olive); }

/* Keep cream background while menu is open, even when scrolled */
.site-nav.scrolled.nav-open {
    background-color: rgba(252, 251, 248, 0.98);
    border-bottom-color: rgba(85, 107, 47, 0.15);
    box-shadow: 0 2px 16px rgba(58, 74, 49, 0.12);
}
.site-nav.scrolled.nav-open .nav-logo { color: var(--color-dark-olive); }
.site-nav.scrolled.nav-open .nav-amp { color: var(--color-olive); }
.site-nav.scrolled.nav-open .nav-links a { color: var(--color-text); }
.site-nav.scrolled.nav-open .nav-links a:hover,
.site-nav.scrolled.nav-open .nav-links a.active { color: var(--color-olive); }
.site-nav.scrolled.nav-open .nav-toggle { border-color: rgba(58, 74, 49, 0.24); }
.site-nav.scrolled.nav-open .nav-toggle span { background: var(--color-dark-olive); }

/* ============================================================
   REUSABLE COMPONENTS
   ============================================================ */
.section-title {
    font-family: var(--font-serif);
    font-size: var(--fs-section-title);
    font-weight: 400;
    color: var(--color-dark-olive);
    margin-bottom: 16px;
}

.divider {
    width: 0;
    height: 2px;
    background-color: var(--color-olive);
    margin: 0 auto 30px;
    opacity: 0.5;
    transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s;
}
.reveal.visible .divider,
.tl-header .divider { width: 60px; }
.divider-light {
    background-color: var(--color-cream);
    opacity: 0.4;
}

.body-text {
    font-size: var(--fs-body-text);
    margin-bottom: 20px;
    color: var(--color-text);
}

.subtitle {
    font-family: var(--font-sans);
    font-style: italic;
    font-size: var(--fs-subtitle);
    opacity: 0.85;
    margin-bottom: 50px;
}

.light-text { color: var(--color-cream) !important; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    background-color: var(--color-olive);
    color: var(--color-cream);
    padding: 15px 42px;
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: var(--fs-button);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: var(--radius);
    transition: background-color var(--transition), transform var(--transition),
                box-shadow var(--transition);
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 55%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.22), transparent);
    transform: skewX(-20deg) translateX(-200%);
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-primary:hover {
    background-color: var(--color-dark-olive);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(58,74,49,0.28);
}
.btn-primary:hover::after { transform: skewX(-20deg) translateX(400%); }
.btn-primary:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 8px rgba(58,74,49,0.16);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
    border: 1.5px solid var(--color-cream);
    color: var(--color-cream);
    padding: 12px 36px;
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: var(--fs-button);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: var(--radius);
    transition: background-color var(--transition), color var(--transition);
}
.btn-secondary:hover {
    background-color: var(--color-cream);
    color: var(--color-dark-olive);
}
.btn-secondary:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

.btn-with-icon .btn-icon {
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
}

.btn-with-icon--end .btn-icon {
    margin-left: 2px;
}

/* ============================================================
   [BLOCK 1: HERO]
   ============================================================ */
.block-hero {
    position: relative;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: url('INSPO/LOCATION.png') center center/cover no-repeat;
}
/* Gradient: dark at top (for nav) and toward center for text legibility */
.block-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(30, 40, 25, 0.45) 0%,
        rgba(30, 40, 25, 0.20) 40%,
        rgba(30, 40, 25, 0.35) 100%
    );
    z-index: 0;
}

.hero-overlay {
    position: relative;
    z-index: 1;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    max-width: 700px;
    width: 92%;
}

.pre-title {
    font-family: var(--font-sans);
    font-size: var(--fs-hero-pretitle);
    letter-spacing: 7px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.78);
    margin-bottom: 16px;
}

.names-title {
    position: relative;
    display: block;
    line-height: 1;
    padding: 0;
    /* overflow visible so the & can bleed outside the name spans' height */
    overflow: visible;
}
.names-amp {
    /* oversized script & sitting behind both names, bridging them diagonally */
    position: absolute;
    font-family: var(--font-delia);
    font-style: cursive;
    font-size: clamp(9rem, 35vw, 24rem);
    color: rgba(255,255,255,0.20);
    line-height: 1;
    /* & horizontal: increase → moves right */
    left: 50%;
    top: 50%;
    /* & vertical: more negative → moves up */
    transform: translate(-50%, -60%);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 0;
}
.names-first {
    display: block;
    font-family: var(--font-daniele);
    font-size: var(--fs-hero-names);
    font-weight: 400;
    font-style: normal;
    color: rgba(255,255,255,0.95);
    letter-spacing: var(--ls-hero-names);
    text-shadow: 0 2px 18px rgba(0,0,0,0.28);
    position: relative;
    z-index: 1;
    text-align: left;
    /* Daniele left indent */
    left: 2em;
    /* Daniele vertical position: negative → higher, does not affect other elements */
    top: -0.8em;
}
.names-second {
    display: block;
    font-family: var(--font-delia);
    font-size: clamp(2.4rem, 6vw, 5.5rem);
    font-weight: 400;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 2px 18px rgba(0,0,0,0.28);
    position: relative;
    z-index: 1;
    text-align: right;
    /* Delia right indent */
    right: 1.3em;
    /* Delia vertical overlap: negative → higher up AAAA*/
    top: -0.4em;
}

.date-script {
    font-family: var(--font-sans);
    font-size: var(--fs-hero-date);
    color: rgba(255,255,255,0.97);
    letter-spacing: 3px;
    opacity: 0.3;
    margin: 12px 0;
    text-shadow: 0 2px 14px rgba(0,0,0,0.22);
}

.location-text {
    font-family: var(--font-sans);
    font-size: var(--fs-hero-location);
    letter-spacing: var(--ls-hero-location);
    text-transform: uppercase;
    margin-bottom: 28px;
    color: rgba(255,255,255,0.72);
}

/* ============================================================
   SECTION LAYOUT
   ============================================================ */

.arch-page {
    background: #d9d4c7;
    position: relative;
}

/* ── Countdown Section ────────────────────────────── */
.block-countdown {
    background: var(--color-cream);
    padding: var(--countdown-vertical-pad) 24px;
    text-align: center;
    scroll-margin-top: 100px; /* increase → lands lower, decrease → lands higher */

}

.countdown-container {
    display: inline-block;
}
.countdown-title {
    font-family: var(--font-script);
    font-size: var(--fs-countdown-title);
    color: var(--color-dark-olive);
    font-weight: 400;
    margin-bottom: 4px;
    line-height: 1.2;
}
.countdown-label {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: var(--fs-countdown-label);
    color: var(--color-muted);
    margin-bottom: 18px;
}
.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
}
.countdown-cta {
    display: inline-block;
    margin-top: 28px;
}

/* --- Floating Back Arrow (bottom-left) --- */
.back-arrow {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1200;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 14px rgba(0,0,0,0.12);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    color: var(--color-olive);
    text-decoration: none;
    touch-action: manipulation;
    transition: opacity 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
    will-change: opacity, transform;
}
.back-arrow.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    animation: back-arrow-nudge 3s ease-in-out infinite;
}
/* pointer devices: hover reveal */
@media (hover: hover) and (pointer: fine) {
    .back-arrow.visible:hover,
    .back-arrow.visible:focus {
        opacity: 1;
        background: rgba(255,255,255,0.98);
        box-shadow: 0 4px 22px rgba(85,107,47,0.20);
        animation-play-state: paused;
        outline: none;
        transform: translateX(-3px);
    }
}
/* touch devices: when visible, slightly different default */
@media (hover: none) {
    .back-arrow.visible {
        opacity: 1;
        background: rgba(255,255,255,0.88);
    }
    .back-arrow.visible:active {
        opacity: 1;
        background: rgba(255,255,255,0.96);
        box-shadow: 0 4px 22px rgba(85,107,47,0.20);
        transform: translateX(-3px) scale(0.96);
        animation-play-state: paused;
    }
}
.back-arrow:focus-visible {
    opacity: 1;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 4px 22px rgba(85,107,47,0.20);
    outline: 2px solid var(--color-olive);
    outline-offset: 3px;
    animation-play-state: paused;
}
.back-arrow svg {
    width: 22px;
    height: 22px;
    display: block;
}
@keyframes back-arrow-nudge {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-6px); }
    55%  { transform: translateX(0); }
    100% { transform: translateX(0); }
}

/* Keep a translucent back arrow on secondary pages (e.g. our-story).
   It remains clickable and becomes fully opaque when the lightbox overlay opens. */
body.gift-page .back-arrow,
body.rsvp-page .back-arrow {
    opacity: 0.60;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.28s ease, background 0.28s ease;
    /* place at top-left on secondary pages */
    top: 20px;
    left: 20px;
    bottom: auto;
    right: auto;
}
body.gift-page .back-arrow.visible,
body.rsvp-page .back-arrow.visible {
    /* keep it subtle until an overlay appears */
    opacity: 0.9;
    animation: none;
}
body.gift-page.lightbox-open .back-arrow,
body.rsvp-page.lightbox-open .back-arrow {
    display: none;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
    background: #fff;
    border: 1px solid rgba(85,107,47,0.15);
    border-radius: 10px;
    padding: 18px 14px 12px;
    box-shadow: 0 2px 12px rgba(85,107,47,0.08);
}
.time-box span {
    font-family: var(--font-serif);
    font-size: var(--fs-countdown-digit);
    font-weight: 600;
    color: var(--color-olive);
    line-height: 1;
    will-change: transform, opacity, filter;
}
.time-box span.tick-down {
    animation: digitTickDown 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.time-box span.tick-up {
    animation: digitTickUp 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes digitTickDown {
    0%   { transform: translateY(-10px) scale(0.95); opacity: 0.45; filter: blur(1.1px); }
    60%  { opacity: 1; }
    100% { transform: translateY(0) scale(1);        opacity: 1;    filter: blur(0); }
}
@keyframes digitTickUp {
    0%   { transform: translateY(10px) scale(0.95); opacity: 0.45; filter: blur(1.1px); }
    60%  { opacity: 1; }
    100% { transform: translateY(0) scale(1);       opacity: 1;    filter: blur(0); }
}
.time-box small {
    font-family: var(--font-sans);
    font-size: var(--fs-countdown-unit);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-muted);
    margin-top: 7px;
}

.scroll-down {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scrollFloat 2.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
    z-index: 1;
}
@keyframes scrollFloat {
    0%   { transform: translateX(-50%) translateY(0);    opacity: 0.75; }
    50%  { transform: translateX(-50%) translateY(9px);  opacity: 0.35; }
    100% { transform: translateX(-50%) translateY(0);    opacity: 0.75; }
}

/* ============================================================
   [BLOCK 2: WELCOME]
   ============================================================ */
.block-welcome {
    padding: var(--section-pad);
    display: flex;
    justify-content: center;
    text-align: center;
    background-color: var(--color-dark-olive);
}
.welcome-content { max-width: 780px; }

.spotify-card {
    background-color: rgba(252,251,248,0.05);
    border: 1px solid rgba(252,251,248,0.12);
    margin: 24px auto 0;
    padding: 10px 10px;
    max-width: 680px;
    width: 100%;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: 0 4px 30px rgba(0,0,0,0.20);
    transition: box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.spotify-card:hover {
    box-shadow: 0 16px 56px rgba(0,0,0,0.32);
    transform: translateY(-4px);
}

.spotify-label {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: var(--fs-spotify-label);
    color: var(--color-olive);
    margin: 12px 0 12px;
}
.spotify-embed {
    max-width: 100%;
    margin: 0;
}
.spotify-story-cta {
    display: inline-block;
    margin-top: 20px;
}
/* Dark welcome overrides */
.block-welcome .section-title { color: var(--color-cream); }
.block-welcome .divider       { background-color: var(--color-cream); opacity: 0.35; }
.block-welcome .body-text     { color: rgba(252,251,248,0.72); }
.block-welcome .spotify-label { color: rgba(252,251,248,0.80); }

/* ============================================================
   [BLOCK 3: TIMELINE]
   ============================================================ */
.block-timeline {
    background-color: var(--color-cream);
    padding: 0;
    text-align: center;
    position: relative;
}

/* Dark text overrides for light timeline background */
.block-timeline .section-title { color: var(--color-text); }
.block-timeline .subtitle       { color: var(--color-muted); }
.block-timeline .divider        { background-color: var(--color-olive); opacity: 0.5; }
.block-timeline .tl-time        { color: var(--color-olive); }
.block-timeline .tl-caption h3  { color: var(--color-text); }
.block-timeline .tl-caption p   { color: var(--color-muted); }
.block-timeline .tl-item.tl-active .tl-time        { color: var(--color-dark-olive); }
.block-timeline .tl-item.tl-active .tl-caption h3  { color: var(--color-text); }
.block-timeline .tl-item.tl-active .tl-caption p   { color: var(--color-muted); }

.tl-wave { display: none; }

.tl-header { padding: 80px 20px 28px; }

/* ── Track: centered vertical timeline ── */
.timeline-track {
    max-width: 980px;
    margin: 0 auto;
    padding: 6px 24px 110px;
    display: flex;
    flex-direction: column;
    gap: var(--tl-item-gap);
    position: relative;
    isolation: isolate;
}
.timeline-track::before {
    content: '';
    position: absolute;
    top: 24px;
    bottom: 130px;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        rgba(85,107,47,0.10) 0%,
        rgba(85,107,47,0.42) 12%,
        rgba(85,107,47,0.42) 88%,
        rgba(85,107,47,0.10) 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* The SVG canvas injected by JS */
.tl-curve-svg {
    display: none;
}
@keyframes tlCurveFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.tl-curve-svg .tl-curve-path {
    fill: none;
    stroke: rgba(85,107,47,0.38);
    stroke-width: 2.5px;
    stroke-dasharray: 5 5;
}
.tl-curve-svg .tl-curve-dot {
    fill: rgba(85,107,47,0.28);
    stroke: rgba(85,107,47,0.5);
    stroke-width: 2px;
    transition: fill 0.4s ease, r 0.4s ease;
}
.tl-curve-svg .tl-curve-dot.active {
    fill: var(--color-olive);
    stroke: var(--color-olive);
}

/* ── Item ── */
.tl-item {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    min-height: 180px;
    position: relative;
    z-index: 1;
}
.tl-item.tl-active { z-index: 3; }
.tl-item.tl-right { justify-content: flex-end; }

.tl-item::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42px;
    height: 1px;
    background: rgba(85,107,47,0.18);
    transform: translateY(-50%);
    z-index: 0;
}
.tl-item.tl-left::after  { left: calc(50% - 42px); }
.tl-item.tl-right::after { left: 50%; }

/* ── Dot on the centre line ── */
.tl-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-cream);
    border: 2px solid rgba(85,107,47,0.55);
    box-shadow: 0 0 0 8px rgba(252,251,248,0.95);
    z-index: 2;
    transition: background-color 0.35s ease, border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
.tl-dot::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: rgba(85,107,47,0.18);
    transition: background-color 0.35s ease;
}
.tl-item.tl-active .tl-dot {
    border-color: var(--color-olive);
    box-shadow: 0 0 0 10px rgba(252,251,248,0.98), 0 10px 24px rgba(85,107,47,0.18);
    transform: translate(-50%, -50%) scale(1.06);
}
.tl-item.tl-active .tl-dot::after { background: var(--color-olive); }

/* ── Card ── */
.tl-card {
    width: calc(50% - 54px);
    min-height: var(--tl-card-height);
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 14px 18px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    transition: transform 0.35s ease;
}
.tl-item.tl-active .tl-card {
    transform: translateY(-4px) scale(var(--tl-active-card-scale));
}
/* tl-left: text on the left, image on the right */
.tl-item.tl-left  .tl-card { flex-direction: row-reverse; text-align: right; }
/* tl-right: text on the right, image on the left */
.tl-item.tl-right .tl-card { flex-direction: row; text-align: left; }

/* ── Card image ── */
.tl-card-img {
    margin: 0;
    flex: 0 0 108px;
    height: 108px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    background: transparent;
    border-radius: 0;
}
.tl-card-img img {
    width: 76%;
    height: auto;
    object-fit: contain;
    display: block;
    filter: grayscale(20%) brightness(0.55);
    transform: scale(1);
    transition: filter    0.55s ease,
                transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.tl-item.tl-active .tl-card-img img {
    filter: grayscale(0%) brightness(0.88);
    transform: scale(var(--tl-active-icon-scale));
}

/* ── Card text body ── */
.tl-card-body {
    flex: 0 1 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6px 4px;
    overflow: visible;
    position: relative;
    z-index: 1;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

/* ── Time ── */
.tl-time {
    display: block;
    font-family: var(--font-script);
    font-size: 2.7rem;
    color: rgba(85,107,47,0.45);
    line-height: 1;
    margin-bottom: 6px;
    transition: color 0.45s ease;
}
.tl-item.tl-active .tl-time { color: var(--color-olive); }
.tl-item.tl-active .tl-time { transform: scale(var(--tl-active-time-scale)); transform-origin: center; }

/* ── Event title ── */
.tl-card h3 {
    font-family: var(--font-sans);
    font-size: 0.70rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: rgba(44,62,45,0.35);
    margin-bottom: 8px;
    transition: color 0.45s ease;
}
.tl-item.tl-active .tl-card h3 { color: var(--color-text); }

/* ── Description ── */
.tl-card p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.90rem;
    color: rgba(44,62,45,0.35);
    line-height: 1.65;
    margin: 0;
    transition: color 0.45s ease;
}
.tl-item.tl-active .tl-card p { color: rgba(44,62,45,0.72); }

/* ── Slide-in reveal animations ── */
/* Exit (anti-animation): fast reset */
.tl-left  { opacity: 0; transform: translateX(-38px); transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.4, 0, 1, 1); }
.tl-right { opacity: 0; transform: translateX( 38px); transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.4, 0, 1, 1); }
/* Entrance: slow & directional */
.tl-left.visible  { opacity: 1; transform: translateX(0); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.tl-right.visible { opacity: 1; transform: translateX(0); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }

/* Staggered entrance */
.tl-item:nth-child(1) { transition-delay: 0s;    }
.tl-item:nth-child(2) { transition-delay: 0.10s; }
.tl-item:nth-child(3) { transition-delay: 0.20s; }
.tl-item:nth-child(4) { transition-delay: 0.30s; }
.tl-item:nth-child(5) { transition-delay: 0.40s; }
.tl-item:nth-child(6) { transition-delay: 0.50s; }
.tl-item:nth-child(7) { transition-delay: 0.60s; }
.tl-item:nth-child(8) { transition-delay: 0.70s; }

/* ============================================================
   [BLOCK 4: RSVP]
   ============================================================ */
.block-rsvp {
    padding: var(--section-pad);
    text-align: center;
    background-color: var(--color-dark-olive);
}
.rsvp-content {
    max-width: 680px;
    margin: 0 auto;
}
.small-text { font-size: 0.9rem; }
.block-rsvp .section-title  { color: var(--color-cream); }
.block-rsvp .divider        { background-color: var(--color-cream); opacity: 0.35; }
.block-rsvp .body-text      { color: rgba(252,251,248,0.72); }
.block-rsvp .small-text     { color: rgba(252,251,248,0.55); margin-bottom: 32px; }
/* btn-primary is already cream-on-olive which reads well on dark-olive */

/* ============================================================
   [BLOCK 5: LOCATION]
   ============================================================ */
.block-location {
    background-color: var(--color-cream);
    padding: var(--section-pad);
    text-align: center;
}
.location-content {
    max-width: min(1600px, 96vw);
    margin: 0 auto;
}
/* Tighter spacing for the location header: keep subtitle size but reduce gaps */
.block-location .subtitle { margin-top: 0; margin-bottom: 8px; }
.block-location .section-title { margin-top: 0; margin-bottom: 10px; }
.block-location .divider { margin: 0 auto 18px; }
.location-carousel {
    position: relative;
    overflow: hidden;
    margin: 30px 0 34px;
    padding: 14px 0;
}
.location-carousel::before,
.location-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 70px;
    z-index: 2;
    pointer-events: none;
}
.location-carousel::before {
    left: 0;
    background: linear-gradient(to right, rgba(252, 251, 248, var(--location-carousel-fade-strength)), rgba(252, 251, 248, 0));
}
.location-carousel::after {
    right: 0;
    background: linear-gradient(to left, rgba(252, 251, 248, var(--location-carousel-fade-strength)), rgba(252, 251, 248, 0));
}
.location-carousel-track {
    display: flex;
    width: max-content;
    animation: locationCarouselScroll 52s linear infinite;
    will-change: transform;
}
.location-carousel-group {
    display: flex;
    gap: 14px;
    flex-shrink: 0;
    padding-right: 14px;
}
.location-slide {
    width: clamp(420px, 56vw, 980px);
    height: clamp(260px, 36vw, 560px);
    margin: 0;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(58, 74, 49, 0.14);
    background: #fff;
    opacity: 1;
    transform: none;
    position: relative;
}
.location-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
@keyframes locationCarouselScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.map-container {
    border-radius: var(--radius);
    overflow: hidden;
}

/* ============================================================
   [BLOCK 6: REGALO]
   ============================================================ */
.block-regalo {
    background-color: var(--color-olive);
    padding: 56px 24px 64px;
    text-align: center;
    position: relative;
    isolation: isolate;
}
.regalo-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Paper-plane journey trails — decorative background */
.regalo-planes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.regalo-plane {
    position: absolute;
    width: 28px;
    height: 28px;
    color: #fcfbf8;
    opacity: 0;
    will-change: transform, opacity;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
    transform-origin: center;
}
.regalo-plane svg {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    z-index: 1;
}
.regalo-trail {
    position: absolute;
    top: 50%;
    right: 95%;
    width: 110px;
    height: 1.4px;
    background: linear-gradient(to right, rgba(252,251,248,0) 0%, rgba(252,251,248,0.45) 100%);
    transform: translateY(-50%);
    border-radius: 1px;
    pointer-events: none;
}

.regalo-plane--1  { top: 8%;  left: -10%; animation: planeFlyA 26s linear infinite; animation-delay: 0s; }
.regalo-plane--2  { top: 22%; left: -12%; width: 22px; height: 22px; animation: planeFlyA 34s linear infinite; animation-delay: -9s; }
.regalo-plane--3  { top: 40%; left: -14%; width: 32px; height: 32px; animation: planeFlyA 30s linear infinite; animation-delay: -17s; }
.regalo-plane--4  { top: 58%; left: -10%; width: 24px; height: 24px; animation: planeFlyA 28s linear infinite; animation-delay: -4s; }
.regalo-plane--5  { top: 76%; left: -12%; animation: planeFlyA 32s linear infinite; animation-delay: -21s; }
.regalo-plane--6  { top: 90%; left: -14%; width: 22px; height: 22px; animation: planeFlyA 24s linear infinite; animation-delay: -11s; }
.regalo-plane--7  { top: 14%; left: -12%; width: 26px; height: 26px; animation: planeFlyA 36s linear infinite; animation-delay: -26s; }
.regalo-plane--8  { top: 32%; left: -10%; width: 20px; height: 20px; animation: planeFlyA 22s linear infinite; animation-delay: -6s; }
.regalo-plane--9  { top: 50%; left: -14%; animation: planeFlyA 30s linear infinite; animation-delay: -19s; }
.regalo-plane--10 { top: 66%; left: -12%; width: 22px; height: 22px; animation: planeFlyA 26s linear infinite; animation-delay: -13s; }
.regalo-plane--11 { top: 82%; left: -10%; width: 26px; height: 26px; animation: planeFlyA 34s linear infinite; animation-delay: -7s; }
.regalo-plane--12 { top: 4%;  left: -14%; width: 24px; height: 24px; animation: planeFlyA 28s linear infinite; animation-delay: -22s; }
.regalo-plane--13 { top: 46%; left: -12%; width: 20px; height: 20px; animation: planeFlyA 24s linear infinite; animation-delay: -15s; }
.regalo-plane--14 { top: 72%; left: -10%; width: 28px; height: 28px; animation: planeFlyA 32s linear infinite; animation-delay: -2s; }

@keyframes planeFlyA {
    0%   { transform: translate(0, 0) rotate(-30deg); opacity: 0; }
    8%   { opacity: 0.85; }
    50%  { transform: translate(60vw, -22px) rotate(-14deg); }
    92%  { opacity: 0.75; }
    100% { transform: translate(125vw, -44px) rotate(-14deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .regalo-plane { animation: none !important; opacity: 0; }
}
.regalo-box {
    background-color: var(--color-olive);
    background-image: linear-gradient(rgba(255,255,255,0.07), rgba(255,255,255,0.07));
    border: 1px solid rgba(252,251,248,0.18);
    border-radius: 16px;
    padding: 52px 40px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    position: relative;
}
.regalo-icon {
    font-size: 2.8rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: giftPulse 3.5s ease-in-out infinite;
}
@keyframes giftPulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-6px) scale(1.10); }
}
.regalo-title {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    font-weight: 400;
    color: var(--color-cream);
    margin: 0 0 16px;
    letter-spacing: 0.5px;
}
.regalo-text {
    font-family: var(--font-sans);
    font-size: clamp(0.92rem, 2.5vw, 1.02rem);
    color: rgba(252,251,248,0.78);
    line-height: 1.75;
    margin: 0 0 32px;
}
.regalo-actions {
    display: flex;
    justify-content: center;
}
.btn-regalo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    border: 1.5px solid var(--color-cream);
    color: var(--color-olive);
    background: var(--color-cream);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radius);
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-regalo:hover {
    background-color: transparent;
    color: var(--color-cream);
    border-color: rgba(252,251,248,0.65);
}

/* Dedicated regalo page */
.gift-page {
    background: var(--color-light-cream);
    min-height: 100vh;
}

.gift-hero {
    position: relative;
    min-height: 56vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 96px 20px 120px;
    text-align: center;
    color: var(--color-cream);
}

.gift-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('STORIA/COPERTINA/Copertina-1.jpg') center/cover no-repeat;
}

/* Page-specific override for Gift page header background */
.gift-page .gift-hero::before {
    background: url('REGALO/CARIBBEAN-1024x640.jpeg') center/cover no-repeat;
}

/* Page-specific override for Save-the-Date header background */
.save-page .gift-hero::before {
    background: url('SAVETHEDATE/beach.png') center/cover no-repeat;
}

/* Save-the-Date page layout tweaks */
.save-page .gift-main { max-width: 920px; margin: calc(-1 * var(--save-card-lift)) auto 72px; }
.save-page .gift-card { padding: 24px 20px 12px; }
.save-page .gift-card .section-title { margin: 6px 0 2px; }
.save-video .video-wrap { max-width: 920px; margin: 18px auto; overflow: hidden; border-radius: 8px; }
.save-video video { display: block; width: 100%; height: auto; }
.save-page .gift-card .save-video { margin-bottom: 4px; }
.save-page .save-video .video-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 8px;
}
.save-page .gift-card .divider { margin: 0 auto 0; }
.save-video .divider { margin-bottom: 12px; }
.save-video .body-text { margin-bottom: 10px; }

.save-romantic-carousel {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin: 14px calc(50% - 50vw) 16px;
    padding: 14px 0;
    overflow: hidden;
    background: linear-gradient(to bottom, rgba(245, 243, 235, 0.3), rgba(245, 243, 235, 0.55), rgba(245, 243, 235, 0.3));
}
.save-romantic-carousel::before,
.save-romantic-carousel::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 70px;
    z-index: 2;
    pointer-events: none;
}
.save-romantic-carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--color-light-cream), rgba(245, 243, 235, 0));
}
.save-romantic-carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--color-light-cream), rgba(245, 243, 235, 0));
}
.save-romantic-track {
    display: flex;
    width: max-content;
    animation: saveRomanticScroll 52s linear infinite;
    will-change: transform;
}
.save-romantic-group {
    display: flex;
    gap: 14px;
    padding-right: 14px;
}
.save-romantic-slide {
    margin: 0;
    width: clamp(
        calc(160px * var(--save-carousel-scale)),
        calc(20vw * var(--save-carousel-scale)),
        calc(250px * var(--save-carousel-scale))
    );
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(58, 74, 49, 0.16);
}
.save-romantic-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(1.05) contrast(1.02);
}
@keyframes saveRomanticScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.save-calendar {
    text-align: center;
    margin-top: 8px;
    background: rgba(252, 251, 248, 0.92);
    border: 1px solid rgba(85, 107, 47, 0.2);
    border-radius: 14px;
    padding: 24px 16px 22px;
    box-shadow: 0 10px 26px rgba(58, 74, 49, 0.1);
}
.save-calendar .section-title {
    font-size: clamp(2rem, 6vw, 2.8rem);
    line-height: 1.2;
    margin-bottom: 10px;
    color: var(--color-dark-olive);
}
.cal-break { display: none; }  /* hidden on desktop; shown on mobile via media query */
.save-calendar .divider { margin: 0 auto 16px; opacity: 0.4; }
.stc-calendar {
    max-width: 420px;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 8px auto 4px;
}
.stc-calendar th {
    padding: 8px 0;
    font-weight: 700;
    color: var(--color-dark-olive);
    letter-spacing: 0.4px;
    text-align: center;
}
.stc-calendar td {
    width:14.285%;
    height:50px;
    text-align:center;
    vertical-align:middle;
    padding: 4px 0;
}
.stc-day {
    display:flex;
    align-items: center;
    justify-content: center;
    width:36px;
    height:36px;
    line-height:1;
    border-radius:50%;
    position: relative;
    margin: 0 auto;
}
.stc-heart-target {
    color: var(--color-text);
    font-weight: 700;
}
.stc-heart-target::after {
    content: '♡';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.55);
    transform-origin: center;
    color: var(--color-text);
    font-size: var(--save-heart-size);
    line-height: 1;
    opacity: 0;
    pointer-events: none;
}
.save-calendar.is-visible .stc-heart-target::after {
    opacity: 1;
    transform: scale(1);
}
.save-calendar.heart-animate .stc-heart-target::after {
    animation: stcHeartReveal 1300ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes stcHeartReveal {
    0% { opacity: 0; transform: scale(0.2) rotate(-12deg); }
    58% { opacity: 1; transform: scale(1.2) rotate(4deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
.save-calendar .body-text {
    margin: 14px 0 12px;
    color: var(--color-text);
    font-size: 1rem;
}
.centered-actions { display:flex; gap:12px; justify-content:center; align-items:center; flex-wrap:wrap; margin-top:16px; }
.save-page .centered-actions {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
}
.save-page .centered-actions .btn-primary,
.save-page .centered-actions .btn-secondary {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
    max-width: calc(50% - 5px);
    text-align: center;
    padding: 14px 10px;
    font-size: clamp(0.68rem, 2vw, 0.85rem);
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
}
.save-page .centered-actions .btn-ghost {
    flex: 0 0 100%;
    text-align: center;
}
.save-page .centered-actions .btn-secondary {
    border-color: var(--color-olive);
    color: var(--color-olive);
}
.save-page .centered-actions .btn-secondary:hover {
    background-color: var(--color-olive);
    color: var(--color-cream);
}
.btn-ghost { background:transparent; border:1px solid rgba(85,107,47,0.12); color:var(--color-text); padding:10px 16px; border-radius:6px; text-decoration:none; }

@media (max-width:640px) {
    .save-page .gift-main { margin: calc(-1 * var(--save-card-lift)) 12px 48px; }
    .gift-card { padding: 20px; }
    .save-page .gift-card { padding: 16px 14px 10px; }
    .save-page .gift-card .section-title { margin: 4px 0 2px; }
    .save-page .gift-card .save-video { margin-bottom: 2px; }
    .save-page .gift-card .divider { margin: 0 auto 0; }
    .location-carousel {
        padding: 10px 0;
    }
    .location-carousel::before,
    .location-carousel::after {
        width: 42px;
    }
    .save-romantic-carousel {
        margin: 10px calc(50% - 50vw) 12px;
        padding: 10px 0;
    }
    .save-romantic-carousel::before,
    .save-romantic-carousel::after {
        width: 42px;
    }
    .save-romantic-group {
        gap: 10px;
        padding-right: 10px;
    }
    .location-carousel-group {
        gap: 10px;
        padding-right: 10px;
    }
    .location-carousel-track { animation-duration: 42s; }
    .save-romantic-slide {
        width: clamp(
            calc(125px * var(--save-carousel-scale)),
            calc(34vw * var(--save-carousel-scale)),
            calc(180px * var(--save-carousel-scale))
        );
        border-radius: 10px;
    }
    .save-romantic-track { animation-duration: 42s; }
    .save-calendar {
        padding: 20px 10px 18px;
        border-radius: 12px;
    }
    .save-calendar .section-title { font-size: clamp(1.8rem, 10vw, 2.4rem); }
    .cal-dash  { display: none; }
    .cal-break { display: inline; }
    .gift-hero { padding: 72px 12px 88px; }
    .stc-calendar td { height:44px; }
    .stc-day { width:32px; height:32px; line-height:32px; }
    .stc-heart-target::after { font-size: calc(var(--save-heart-size) - 6px); }
}

@media (prefers-reduced-motion: reduce) {
    .location-carousel-track { animation: none; }
    .save-romantic-track { animation: none; }

    /* Hero */
    .block-hero::before { animation: none; }
    .hero-overlay > * { animation: none; opacity: 1; transform: none; }
    .scroll-down { animation: none; }

    /* Scroll-reveal: instant appearance */
    .reveal, .tl-left, .tl-right {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }

    /* Countdown & time boxes */
    .block-countdown::before { animation: none; }
    .time-box { transition: none; }
    .countdown-container.visible .time-box { animation: none; opacity: 1; transform: none; }

    /* Timeline dot */
    .tl-item.tl-active .tl-dot { animation: none; }

    /* Ambient shimmers & overlays */
    .block-rsvp::before    { animation: none; }
    .regalo-box::before    { animation: none; }

    /* Floating particles */
    .floating-particle { animation: none; display: none; }

    /* Gift emoji */
    .regalo-icon { animation: none; }

    /* Back-to-top nudge */
    .back-arrow.visible { animation: none; }

    /* Carousel arrow float */
    .carousel-btn { animation: none; }
}

/* Click-to-play overlay for save-the-date video */
.save-video .video-wrap { position: relative; cursor: pointer; }
.save-video .video-wrap.paused::after {
    content: "►";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    width: 72px;
    height: 72px;
    line-height: 72px;
    text-align: center;
    border-radius: 50%;
    font-size: 34px;
    pointer-events: none;
}
.save-video .video-wrap.paused::before {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    border-radius: 8px;
    pointer-events: none;
}
.save-video video { display:block; }

/* Desktop: make save-the-date video fill most of the viewport without scrolling */
@media (min-width:900px) {
    .save-page .gift-card {
        width: calc(100% * var(--save-video-desktop-scale));
        margin-left: auto;
        margin-right: auto;
    }
    .save-page .gift-card .save-video {
        width: 100%;
        margin: 0 auto 4px;
    }
    .save-page .video-wrap {
        height: auto;
        max-height: none;
        margin: 0 auto;
        border-radius: 8px;
        overflow: hidden;
        display: block;
        background: transparent;
    }
    .save-page .video-wrap video {
        width: 100%;
        height: auto;
        max-width: 100%;
        object-fit: contain;
        background: transparent;
        display: block;
    }
}

/* Mobile: keep full video visible without cropping, with a defined max height */
@media (max-width:899px) {
    .save-page .video-wrap {
        height: auto;
        max-height: none;
        margin: 0 auto;
        border-radius: 8px;
        overflow: hidden;
        display:block;
        background:transparent;
        box-shadow: none;
        border: none;
    }
    .save-page .video-wrap video {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
        background: transparent;
    }
}

.gift-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(26, 38, 24, 0.5), rgba(26, 38, 24, 0.62));
}

.gift-hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.gift-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 4.8vw, 3.2rem);
    font-weight: 400;
    line-height: 1.16;
}

.gift-hero-text {
    margin-top: 12px;
    font-size: 1.03rem;
    color: rgba(252, 251, 248, 0.92);
}

.gift-main {
    max-width: 900px;
    margin: -56px auto 72px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.gift-card {
    background: var(--color-cream);
    border: 1px solid rgba(85, 107, 47, 0.16);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(58, 74, 49, 0.14);
    padding: 34px 26px;
    text-align: center;
}

.gift-photo {
    margin: 24px 0 30px;
}

.gift-photo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius);
}

@media (min-width: 900px) {
    .gift-photo img {
        max-width: 100%;
        max-height: 700px;
        object-fit: contain;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
}

.gift-info {
    margin-top: 14px;
    font-size: 1rem;
    color: var(--color-text);
}

.gift-details {
    margin-top: 8px;
}

.gift-details-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    padding: 11px 20px;
    border: 1px solid rgba(85, 107, 47, 0.22);
    border-radius: 999px;
    background: rgba(252, 251, 248, 0.92);
    color: var(--color-dark-olive);
    font-family: var(--font-sans);
    font-size: var(--fs-button-small);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(58, 74, 49, 0.08);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.gift-details-toggle:hover {
    background: var(--color-cream);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(58, 74, 49, 0.12);
}

.gift-details-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(85, 107, 47, 0.18), 0 6px 18px rgba(58, 74, 49, 0.12);
}

.gift-info {
    filter: blur(7px);
    opacity: 0.82;
    transition: filter 0.28s ease, opacity 0.28s ease;
    user-select: none;
}

.gift-info.is-revealed {
    filter: none;
    opacity: 1;
    user-select: text;
}

.gift-info p + p {
    margin-top: 8px;
}

.gift-iban {
    margin-top: 14px;
    font-family: var(--font-sans);
    font-size: 1.02rem;
    letter-spacing: 0.5px;
}

.gift-actions {
    margin-top: 26px;
    display: flex;
    justify-content: center;
}

/* Dedicated RSVP page */
.rsvp-page {
    background: var(--color-light-cream);
    min-height: 100vh;
}

.rsvp-hero {
    position: relative;
    min-height: 46vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 96px 20px 108px;
    text-align: center;
    color: var(--color-cream);
}

.rsvp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('RSVP/la-morra-mangialonga.jpg') center/cover no-repeat;
}

.rsvp-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(26, 38, 24, 0.5), rgba(26, 38, 24, 0.62));
}

.rsvp-hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.rsvp-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 4.8vw, 3.2rem);
    font-weight: 400;
    line-height: 1.16;
}

.rsvp-hero-text {
    margin-top: 12px;
    font-size: 1.03rem;
    color: rgba(252, 251, 248, 0.92);
}

.rsvp-main {
    max-width: 900px;
    margin: -52px auto 74px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.rsvp-card {
    background: var(--color-cream);
    border: 1px solid rgba(85, 107, 47, 0.16);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(58, 74, 49, 0.14);
    padding: 34px 26px;
    text-align: center;
}

.rsvp-form {
    margin-top: 14px;
    text-align: left;
}

.form-row {
    margin-bottom: 16px;
}

.form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.92rem;
    color: var(--color-dark-olive);
    letter-spacing: 0.3px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
    color: var(--color-dark-olive);
    letter-spacing: 0.3px;
}

.form-row input:not([type="checkbox"]),
.form-row select,
.form-row textarea {
    width: 100%;
    border: 1px solid rgba(85, 107, 47, 0.26);
    border-radius: 6px;
    padding: 11px 12px;
    font-family: var(--font-sans);
    font-size: 0.97rem;
    color: var(--color-text);
    background-color: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-row input:not([type="checkbox"]):focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--color-olive);
    box-shadow: 0 0 0 3px rgba(85, 107, 47, 0.12);
}

.attendance-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.attendance-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.attendance-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    width: 100%;
    padding: 9px 14px;
    border: 1px solid rgba(85, 107, 47, 0.26);
    border-radius: 999px;
    background: rgba(255,255,255,0.85);
    color: var(--color-dark-olive);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition), transform var(--transition), color var(--transition);
}

.form-row label.attendance-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    text-align: center;
    line-height: 1.2;
}

.attendance-option:hover {
    border-color: var(--color-olive);
    box-shadow: 0 6px 14px rgba(58, 74, 49, 0.12);
    transform: translateY(-1px);
}

.attendance-mark {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid rgba(85, 107, 47, 0.36);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition), background-color var(--transition), transform var(--transition);
}

.attendance-mark::after {
    content: "";
    width: 8px;
    height: 4px;
    border-left: 2px solid transparent;
    border-bottom: 2px solid transparent;
    transform: rotate(-45deg) translateY(-1px);
    transition: border-color var(--transition);
}

.attendance-input:focus-visible + .attendance-mark {
    box-shadow: 0 0 0 3px rgba(85, 107, 47, 0.18);
}

.attendance-input:checked + .attendance-mark {
    border-color: var(--color-olive);
    background: var(--color-olive);
}

.attendance-input:checked + .attendance-mark::after {
    border-left-color: var(--color-cream);
    border-bottom-color: var(--color-cream);
}

.attendance-option:has(.attendance-input:checked) {
    border-color: var(--color-olive);
    background: rgba(85, 107, 47, 0.08);
    color: var(--color-dark-olive);
}

.attendance-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.attendance-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: inline-block;
}

.form-help {
    margin-top: 6px;
    font-size: 0.84rem;
    color: rgba(44, 62, 45, 0.72);
}

.conditional-group {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid rgba(85, 107, 47, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
}

.conditional-group.nested {
    margin-top: 10px;
    background: rgba(245, 243, 235, 0.7);
}

.checkbox-row {
    margin-bottom: 4px;
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--color-dark-olive);
    cursor: pointer;
}

.inline-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--color-olive);
}

.no-allergy-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--color-olive);
    cursor: pointer;
    font-weight: 600;
}

.no-allergy-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--color-olive);
    cursor: pointer;
}

textarea.allergy-none {
    color: var(--color-olive);
    font-style: italic;
    opacity: 0.7;
    cursor: not-allowed;
}

.children-count-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.children-count-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.children-count-btn {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--color-olive);
    border-radius: 50%;
    background: transparent;
    color: var(--color-olive);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, color 0.18s;
    padding: 0;
}

.children-count-btn:hover {
    background: var(--color-olive);
    color: #fcfbf8;
}

.children-count-display {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-dark-olive);
    min-width: 20px;
    text-align: center;
}

.child-block {
    border-top: 1px solid rgba(85, 107, 47, 0.15);
    padding-top: 12px;
    margin-top: 12px;
}

.child-block:first-child {
    border-top: none;
    margin-top: 8px;
    padding-top: 0;
}

.child-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-olive);
    margin: 0 0 8px;
}

.rsvp-form-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.rsvp-form-actions .btn-primary,
.rsvp-form-actions .btn-secondary {
    min-width: 210px;
    padding: 13px 28px;
    margin-top: 0;
    text-align: center;
}

.rsvp-form-actions .btn-primary {
    box-shadow: 0 6px 18px rgba(58, 74, 49, 0.20);
}

.rsvp-form-actions .btn-primary:hover {
    box-shadow: 0 10px 24px rgba(58, 74, 49, 0.28);
}

.rsvp-back {
    border-color: var(--color-olive);
    color: var(--color-olive);
    background-color: transparent;
}

.rsvp-back:hover {
    background-color: var(--color-olive);
    color: var(--color-cream);
}

.rsvp-feedback {
    margin-top: 14px;
    min-height: 24px;
    text-align: center;
    color: var(--color-olive);
    font-size: 0.92rem;
}

.rsvp-feedback.is-error {
    color: #8a2f2f;
}

/* Guest photos page */
.photo-page-card {
    text-align: center;
}

.photo-upload {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.photo-upload-btn {
    min-width: 210px;
}

.photo-refresh-btn {
    min-width: 210px;
    margin-top: 0;
}

.photo-feedback {
    margin-top: 12px;
    min-height: 24px;
    font-size: 0.92rem;
    color: var(--color-olive);
}

.photo-feedback.is-error {
    color: #8a2f2f;
}

.photo-zoom-controls {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.photo-zoom-preset {
    border: 1px solid rgba(85, 107, 47, 0.28);
    background: #fff;
    color: var(--color-dark-olive);
    border-radius: 999px;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: border-color var(--transition), background-color var(--transition), color var(--transition), opacity var(--transition);
}

.photo-zoom-presets {
    display: flex;
    align-items: center;
    gap: 6px;
}

.photo-zoom-preset {
    min-width: 48px;
    padding: 7px 12px;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.photo-zoom-step:hover,
.photo-zoom-preset:hover {
    border-color: var(--color-olive);
}

.photo-zoom-preset.active {
    background: var(--color-olive);
    border-color: var(--color-olive);
    color: var(--color-cream);
}

.photo-zoom-preset:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.photo-grid {
    --gallery-columns: 4;
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(var(--gallery-columns), minmax(0, 1fr));
    gap: 12px;
    transition: grid-template-columns 0.2s ease, gap 0.2s ease;
}

.photo-item {
    margin: 0;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(85, 107, 47, 0.18);
    box-shadow: 0 6px 18px rgba(58, 74, 49, 0.12);
    background: #fff;
    aspect-ratio: 1 / 1;
    cursor: zoom-in;
    content-visibility: auto;
    contain-intrinsic-size: 280px 280px;
}

.photo-item.is-video::after {
    content: '▶';
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(15, 18, 12, 0.72);
    color: #fff;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.photo-item-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(15, 18, 12, 0.72);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.7px;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-empty {
    grid-column: 1 / -1;
    font-size: 0.95rem;
    color: rgba(44, 62, 45, 0.7);
    padding: 10px 0;
}

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(15, 18, 12, 0.92);
    display: flex;
    flex-direction: column;
}

.photo-lightbox[hidden] {
    display: none;
}

.photo-lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(252, 251, 248, 0.45);
    border-radius: 50%;
    background: rgba(252, 251, 248, 0.1);
    color: var(--color-cream);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.photo-lightbox-close {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3010;
    transition: background 0.2s ease;
}
.photo-lightbox-close:hover {
    background: rgba(252, 251, 248, 0.22);
}

.photo-lightbox-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 12px 58px;
    overflow: auto;
    touch-action: pinch-zoom;
    -webkit-overflow-scrolling: touch;
}

.photo-lightbox-inner img {
    width: auto;
    height: auto;
    max-width: 96vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
}

.photo-lightbox-inner video {
    width: auto;
    height: auto;
    max-width: 96vw;
    max-height: 82vh;
    border-radius: 8px;
    background: #000;
}

.photo-lightbox-inner iframe {
    width: min(96vw, 1080px);
    height: min(82vh, 620px);
    border: 0;
    border-radius: 8px;
    background: #000;
}

.photo-lightbox-hint {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    color: rgba(252, 251, 248, 0.82);
    font-size: 0.82rem;
    letter-spacing: 0.5px;
}

.photo-lightbox-status {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 68px;
    width: auto;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(15, 18, 12, 0.88);
    color: rgba(252, 251, 248, 0.98);
    font-size: 0.9rem;
    line-height: 1.25;
    font-weight: 700;
    text-align: left;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.photo-lightbox-status a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.photo-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(252, 251, 248, 0.45);
    background: rgba(252, 251, 248, 0.1);
    color: var(--color-cream);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3010;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.photo-lightbox-nav:hover {
    background: rgba(252, 251, 248, 0.22);
}
.photo-lightbox-nav.prev { left: 14px; }
.photo-lightbox-nav.next { right: 14px; }
.photo-lightbox-nav.is-disabled {
    opacity: 0.25;
    pointer-events: none;
}

.photo-lightbox-counter {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(252, 251, 248, 0.75);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    pointer-events: none;
}

.story-photo {
    cursor: zoom-in;
}

/* ============================================================
   [BLOCK 7: FOOTER]
   ============================================================ */
.block-footer {
    background-color: var(--color-dark-olive);
    color: var(--color-cream);
    text-align: center;
    padding: 80px 20px 60px;
    position: relative;
    z-index: 8;
}
@media (max-width: 640px) {
    .block-footer {
        padding-top: 72px;
    }
}
.footer-monogram {
    margin-bottom: 20px;
}
.footer-monogram svg {
    width: 64px;
    height: 64px;
}
.footer-script {
    font-family: var(--font-script);
    font-size: var(--fs-footer-script);
    white-space: nowrap;
    line-height: 1.12;
    margin-bottom: 10px;
}
.footer-names {
    font-size: var(--fs-footer-names);
    letter-spacing: 3px;
}
.footer-name-daniele {
    font-family: var(--font-daniele);
}
.footer-name-amp,
.footer-name-delia {
    font-family: var(--font-delia);
}
.footer-date {
    font-family: var(--font-sans);
    font-size: var(--fs-footer-date);
    letter-spacing: 3px;
    margin-top: 10px;
    opacity: 0.6;
}
.footer-venue {
    font-family: var(--font-sans);
    font-size: var(--fs-footer-venue);
    letter-spacing: 1.5px;
    margin-top: 8px;
    opacity: 0.45;
    text-transform: uppercase;
}

/* ============================================================
   MOBILE RESPONSIVENESS
   ============================================================ */
@media (max-width: 768px) {
    .block-timeline { --tl-card-height: auto; }

    .block-hero {
        /* dvh tracks the viewport dynamically as browser chrome shows/hides,
           preventing a gap below the hero when the address bar disappears. */
        height: 100dvh;
        min-height: 0;
    }


    .block-hero::before {
        /* Stronger dark band at top so nav logo + hamburger bars are always readable */
        background: linear-gradient(
            to bottom,
            rgba(20, 30, 18, 0.72) 0%,
            rgba(20, 30, 18, 0.38) 18%,
            rgba(20, 30, 18, 0.15) 50%,
            rgba(20, 30, 18, 0.40) 100%
        );
    }

    .hero-overlay {
        width: min(92%, 560px);
        padding: 12px 10px 8px;
    }

    .names-first,
    .names-second {
        letter-spacing: 1.3px;
    }



    .date-script {
        line-height: 1.04;
    }

    .scroll-down {
        bottom: 10px;
    }

    .nav-inner {
        /* Explicitly constrain to the viewport — prevents shrink-wrap on some engines */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 14px;
        min-height: 48px;
        align-items: center;
        /* Reset column-gap — space-between handles the logo↔toggle spacing */
        column-gap: 0;
        row-gap: 0;
        flex-wrap: wrap;
    }
    .nav-logo {
        letter-spacing: 1.1px;
        white-space: nowrap;
        /* Prevent logo from growing and squeezing the toggle off-screen */
        flex-shrink: 0;
    }

    .nav-toggle {
        display: inline-flex;
        /* Do NOT also use margin-left: auto — justify-content: space-between
           already places the toggle at the right edge. Double-pushing causes overflow. */
        margin-left: 0;
        flex-shrink: 0;
    }

    .site-nav.nav-open .nav-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .site-nav.nav-open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }
    .site-nav.nav-open .nav-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-links {
        display: flex;
        width: 100%;
        margin-top: 0;
        padding: 0;
        border: 0;
        border-radius: 12px;
        background: rgba(252, 251, 248, 0.94);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        flex-direction: column;
        gap: 2px;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transform: translateY(-6px);
        transition: max-height 0.32s ease, opacity 0.22s ease, transform 0.28s ease;
    }
    .site-nav.nav-open .nav-links {
        margin-top: 6px;
        padding: 8px;
        border: 1px solid rgba(85, 107, 47, 0.18);
        max-height: 360px;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .nav-links li + li {
        border-top: 1px solid rgba(85, 107, 47, 0.12);
    }
    .nav-links li a {
        display: block;
        padding: 10px 12px;
        border-radius: 8px;
        letter-spacing: 1px;
        line-height: 1.3;
        color: var(--color-text);
        transition: background-color 0.2s ease, color 0.2s ease;
    }
    .nav-links li a:hover,
    .nav-links li a.active {
        background-color: rgba(85, 107, 47, 0.1);
        color: var(--color-dark-olive);
    }

    .section-title {
        line-height: 1.2;
    }

    .subtitle {
        margin-bottom: 34px;
    }

    .body-text {
        line-height: 1.75;
    }

    .countdown-timer { gap: 10px; }
    .countdown-title {
        margin-bottom: 8px;
    }
    .countdown-label {
        margin-bottom: 16px;
    }
    .time-box small  { letter-spacing: 1.3px; }
    .time-box        { min-width: 56px; padding: 14px 10px 10px; }

    .btn-primary,
    .btn-secondary {
        letter-spacing: 1.6px;
    }

    .regalo-box   { padding: 36px 22px; }

    .gift-hero {
        min-height: 48vh;
        padding: 84px 16px 96px;
    }
    .gift-main {
        margin: -48px auto 56px;
        padding: 0 14px;
    }
    .gift-card {
        padding: 28px 18px;
    }
    .rsvp-hero {
        min-height: 42vh;
        padding: 82px 16px 92px;
    }
    .rsvp-main {
        margin: -44px auto 56px;
        padding: 0 14px;
    }
    .rsvp-card {
        padding: 28px 18px;
    }
    .rsvp-form-actions {
        flex-direction: column;
    }
    .rsvp-form-actions .btn-primary,
    .rsvp-form-actions .btn-secondary {
        width: 100%;
        min-width: 0;
    }
    .attendance-options {
        gap: 14px;
    }

    .photo-grid {
        --gallery-columns: 8;
        grid-template-columns: repeat(var(--gallery-columns), minmax(0, 1fr));
        gap: 8px;
    }

    .photo-item {
        border-radius: 8px;
    }

    .photo-zoom-controls {
        gap: 6px;
    }

    .photo-zoom-preset {
        min-width: 44px;
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .photo-lightbox-inner {
        padding: 52px 8px 52px;
    }

    .photo-lightbox-status {
        top: 12px;
        left: 10px;
        right: 60px;
        padding: 8px 10px;
        font-size: 0.8rem;
        border-radius: 9px;
    }

    .photo-lightbox-inner img {
        max-width: 100%;
        max-height: 84vh;
    }

    .location-carousel {
        margin: 24px 0 28px;
    }
    .location-carousel::before,
    .location-carousel::after {
        width: 28px;
    }
    .location-carousel-group {
        gap: 10px;
        padding-right: 10px;
    }
    .location-slide {
        width: 86vw;
        height: 56vw;
        border-radius: 6px;
    }

    /* Timeline: mobile-first single-column with clear connectors */
    .timeline-track {
        padding: 0 12px 44px;
        gap: 12px;
    }
    .timeline-track::before {
        left: 32px;
        top: 14px;
        bottom: 48px;
        width: 2px;
        transform: none;
        background: linear-gradient(
            to bottom,
            rgba(85,107,47,0.18) 0%,
            rgba(85,107,47,0.45) 10%,
            rgba(85,107,47,0.45) 90%,
            rgba(85,107,47,0.18) 100%
        );
    }

    .tl-item,
    .tl-item.tl-right {
        justify-content: flex-start;
        min-height: 120px;
        margin-bottom: 0;
        padding-top: 0;
    }
    .tl-item.tl-active { min-height: 126px; }

    .tl-item::after,
    .tl-item.tl-left::after,
    .tl-item.tl-right::after {
        display: block;
        left: 20px;  /* spine right-edge from .tl-item: 32px spine − 12px track-padding */
        width: 32px; /* bridges spine to card (card at 52px) */
        background: rgba(85,107,47,0.26);
    }

    .tl-dot {
        top: 50%;
        left: 21px; /* spine center from .tl-item: 33px − 12px track-padding */
        width: 14px;
        height: 14px;
        box-shadow: 0 0 0 5px rgba(252,251,248,0.96);
    }
    .tl-dot::after { inset: 3px; }
    .tl-item.tl-active .tl-dot {
        box-shadow: 0 0 0 6px rgba(252,251,248,0.98), 0 6px 18px rgba(85,107,47,0.16);
    }

    /* Hide decorative SVG path on mobile, keep spine connectors only */
    #tl-svg-curve {
        display: none;
    }

    .tl-card,
    .tl-item.tl-left .tl-card,
    .tl-item.tl-right .tl-card {
        width: calc(100% - 52px);
        height: auto;
        min-height: 0;
        margin: 0 0 0 52px !important;
        padding: 10px 10px 10px 0;
        gap: 14px;
        border-radius: 18px;
        flex-direction: row !important;
        text-align: left !important;
    }

    .tl-card-img {
        flex: 0 0 var(--tl-mobile-icon-size);
        width: var(--tl-mobile-icon-size);
        height: var(--tl-mobile-icon-size);
        margin: 0;
        border-radius: 14px;
    }
    .tl-card-img img { width: 82%; height: auto; }
    .tl-card-body,
    .tl-item.tl-right .tl-card-body {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0;
        align-items: flex-start;
    }

    .tl-time { font-size: 2rem; margin-bottom: 4px; }
    .tl-card h3 { font-size: 0.68rem; letter-spacing: 2px; margin-bottom: 6px; }
    .tl-card p  { font-size: 0.9rem; line-height: 1.5; }

}

@media (max-width: 430px) {
    .nav-inner {
        padding: 4px 12px;
    }

    .hero-overlay {
        width: 94%;
        padding: 8px 6px 4px;
    }

    .names-first,
    .names-second {
        letter-spacing: 0.85px;
    }

    .date-script {
        margin-top: 4px;
    }

    .scroll-down {
        bottom: 6px;
    }

    .block-timeline {
        --tl-active-card-scale: 1.02;
        --tl-active-icon-scale: 1.08;
        --tl-active-time-scale: 1.06;
        --tl-mobile-icon-size: 56px;
    }

    .timeline-track {
        padding: 0 10px 38px;
    }

    .timeline-track::before {
        left: 28px;
        top: 14px;
        bottom: 42px;
    }

    #tl-svg-curve {
        display: none;
    }

    .tl-item,
    .tl-item.tl-right {
        justify-content: flex-start;
        min-height: 112px;
    }

    .tl-item.tl-active {
        min-height: 112px;
    }

    .tl-item::after,
    .tl-item.tl-left::after,
    .tl-item.tl-right::after {
        left: 18px;  /* spine right-edge from .tl-item: 28px − 10px track-padding */
        width: 22px; /* bridges spine to card (card at 40px) */
    }

    .tl-dot {
        left: 19px; /* spine center from .tl-item: 29px − 10px track-padding */
        width: 12px;
        height: 12px;
    }

    .tl-dot::after {
        inset: 2px;
    }

    .tl-card,
    .tl-item.tl-left .tl-card,
    .tl-item.tl-right .tl-card {
        width: calc(100% - 40px);
        margin-left: 40px !important;
        padding: 8px 8px 8px 0;
        gap: 15px;
        flex-direction: row !important;
        text-align: left !important;
    }

    .tl-item.tl-active .tl-card {
        transform: translateY(-2px) scale(var(--tl-active-card-scale));
    }

    .tl-card-body,
    .tl-item.tl-right .tl-card-body {
        flex: 1 1 auto;
        min-width: 0;
        align-items: flex-start;
    }

    .tl-time {
        font-size: 1.8rem;
        margin-bottom: 2px;
    }

    .tl-card h3 {
        font-size: 0.62rem;
        letter-spacing: 1.7px;
        margin-bottom: 4px;
        color: rgba(44,62,45,0.6);
    }

    .tl-card p {
        font-size: 0.84rem;
        line-height: 1.45;
        color: rgba(44,62,45,0.62);
    }
}

@media (max-width: 375px) {
    .nav-inner {
        padding: 4px 10px;
    }

    .nav-links li a {
        padding: 9px 10px;
        letter-spacing: 0.9px;
    }

    .hero-overlay {
        width: 95%;
        padding: 6px 4px 2px;
    }

    .names-title {
        line-height: 1.05;
    }

    .date-script {
        margin-top: 8px;
    }

    .subtitle {
        margin-bottom: 26px;
    }

    .countdown-label {
        margin-bottom: 12px;
    }

    .countdown-timer {
        gap: 6px;
    }

    .time-box {
        padding: 12px 6px 9px;
        border-radius: 9px;
    }

    .time-box small {
        letter-spacing: 0.95px;
        margin-top: 6px;
    }

    .countdown-cta {
        margin-top: 22px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 24px;
        letter-spacing: 1.4px;
    }
}

@media (max-width: 360px) {
    .nav-inner {
        padding: 4px 10px;
    }

    .hero-overlay {
        width: 95%;
        padding: 6px 4px 4px;
    }

    .names-first,
    .names-second {
        letter-spacing: 0.7px;
    }

    .block-timeline {
        --tl-mobile-icon-size: 48px;
        --tl-active-card-scale: 1;
    }

    .timeline-track {
        padding: 0 8px 34px;
    }

    .timeline-track::before {
        left: 22px;
    }

    .tl-item::after,
    .tl-item.tl-left::after,
    .tl-item.tl-right::after {
        left: 14px;  /* spine right-edge from .tl-item: 22px − 8px track-padding */
        width: 26px; /* bridges spine to card (card at 40px) */
    }

    .tl-dot {
        left: 15px; /* spine center from .tl-item: 23px − 8px track-padding */
    }

    .tl-card,
    .tl-item.tl-left .tl-card,
    .tl-item.tl-right .tl-card {
        width: calc(100% - 40px);
        margin-left: 40px !important;
        padding: 7px 6px 7px 0;
        gap: 5px;
    }

    .tl-item,
    .tl-item.tl-right,
    .tl-item.tl-active {
        min-height: 104px;
    }

    .tl-time {
        font-size: 1.66rem;
        margin-bottom: 1px;
    }

    .tl-card h3 {
        font-size: 0.60rem;
        letter-spacing: 1.45px;
        margin-bottom: 3px;
    }

    .tl-card p {
        font-size: 0.81rem;
        line-height: 1.4;
    }
}

@media (max-width: 320px) {
    .nav-inner {
        padding: 4px 8px;
    }

    .nav-logo {
        letter-spacing: 0.8px;
    }

    .nav-toggle {
        width: 40px;
        height: 40px;
    }

    .hero-overlay {
        width: 96%;
        padding: 4px 2px 0;
    }

    .names-first,
    .names-second {
        letter-spacing: 0.55px;
    }

    .block-countdown {
        --countdown-vertical-pad: 44px;
        padding: var(--countdown-vertical-pad) 12px;
    }

    .countdown-label {
        margin-bottom: 10px;
    }

    .countdown-timer {
        gap: 5px;
    }

    .time-box {
        padding: 11px 5px 8px;
    }

    .time-box small {
        letter-spacing: 0.8px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 280px;
        padding: 11px 16px;
        letter-spacing: 1.1px;
    }
}

/* Mobile countdown spacing */
@media (max-width: 520px) {
    .block-countdown {
        --countdown-vertical-pad: 58px;
        padding: var(--countdown-vertical-pad) 18px;
    }

    .countdown-container {
        display: block;
        width: 100%;
        max-width: 460px;
        margin: 0 auto;
        padding-top: 0;
        padding-bottom: 2px;
    }

    .countdown-title { margin-bottom: 8px; }
    .countdown-label { margin-bottom: 14px; }

    .countdown-timer {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .time-box {
        width: 100%;
        min-width: 0;
        padding: 15px 8px 11px;
    }

    .time-box small {
        letter-spacing: 1.15px;
    }
}

/* ============================================================
   STORY PAGE — CHAPTER TIMELINE
   ============================================================ */

.timeline-gallery {
    position: relative;
    width: min(100vw, var(--story-timeline-width));
    max-width: min(100vw, var(--story-timeline-width));
    margin: 52px 0 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 0 48px;
}

.timeline-intro {
    max-width: 680px;
    margin: 0 auto 52px;
    text-align: center;
    padding: 0 20px;
}

.timeline-intro .subtitle  { margin-bottom: 10px; color: var(--color-muted); }
.timeline-intro .body-text { max-width: 580px; margin: 0 auto; }

/* ── Track ── */
.story-timeline-track {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0 0;
    max-width: min(100%, var(--story-timeline-width));
    margin: 0 auto;
}

/* Vertical centre line */
.story-timeline-track::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(85,107,47,0.22) 6%,
        rgba(85,107,47,0.22) 94%,
        transparent
    );
    transform: translateX(-50%);
    pointer-events: none;
}

.story-timeline-track .chapter:last-child {
    padding-bottom: 0;
}

/* ── Chapter entry ── */
.chapter {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 56px;
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.chapter.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered entrance */
.chapter:nth-child(1)    { transition-delay: 0s;    }
.chapter:nth-child(2)    { transition-delay: 0.07s; }
.chapter:nth-child(3)    { transition-delay: 0.14s; }
.chapter:nth-child(4)    { transition-delay: 0.21s; }
.chapter:nth-child(5)    { transition-delay: 0.28s; }
.chapter:nth-child(6)    { transition-delay: 0.35s; }
.chapter:nth-child(7)    { transition-delay: 0.42s; }
.chapter:nth-child(8)    { transition-delay: 0.49s; }
.chapter:nth-child(9)    { transition-delay: 0.56s; }
.chapter:nth-child(10)   { transition-delay: 0.63s; }
.chapter:nth-child(n+11) { transition-delay: 0.70s; }

/* ── Node: icon circle on the line ── */
.chapter-node {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--color-cream);
    border: 1.5px solid rgba(85,107,47,0.28);
    /* "halo" that masks the line behind the circle */
    box-shadow: 0 0 0 10px var(--color-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    margin-bottom: 22px;
    flex-shrink: 0;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.chapter-node img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
}

.chapter.chapter--active .chapter-node {
    border-color: rgba(85,107,47,0.55);
    box-shadow: 0 0 0 10px var(--color-cream), 0 0 0 13px rgba(85,107,47,0.10);
    transform: scale(1.06);
}

/* ── Chapter header ── */
.chapter-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 clamp(16px, 7vw, 44px) 20px;
    gap: 6px;
    width: 100%;
    max-width: 560px;
}

/* Script label for named chapters (e.g. "Trieste") */
.chapter-label {
    font-family: var(--font-script);
    font-size: clamp(2.6rem, 10vw, 4.4rem);
    color: var(--color-dark-olive);
    line-height: 1.05;
    display: block;
    margin: 0;
}

/* Serif italic for pure numeric years */
.chapter-label--year {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(2.2rem, 9vw, 3.8rem);
    color: var(--color-olive);
    letter-spacing: 0.01em;
}

.chapter-kicker {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--color-muted);
    margin: 4px 0 0;
}

.chapter-desc {
    font-size: 0.93rem;
    line-height: 1.74;
    color: var(--color-muted);
    max-width: 34ch;
    margin: 4px auto 0;
}

/* ── Gallery: swipeable snap carousel ── */
.chapter-gallery {
    position: relative;
    width: 100%;
    max-width: 640px;
}

/* Soft edge fade to hint at overflow */
.chapter-gallery::before,
.chapter-gallery::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 18px;
    width: 28px;
    z-index: 1;
    pointer-events: none;
}
.chapter-gallery::before {
    left: 0;
    background: linear-gradient(to right, var(--color-cream), transparent);
}
.chapter-gallery::after {
    right: 0;
    background: linear-gradient(to left, var(--color-cream), transparent);
}

.chapter-gallery-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 24px 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
}

.chapter-gallery-track.dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.chapter-gallery-track::-webkit-scrollbar { display: none; }

/* ── Story photo card ── */
.story-photo {
    position: relative;
    flex: 0 0 min(82vw, 310px);
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    overflow: hidden;
    scroll-snap-align: center;
    cursor: zoom-in;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    box-shadow: 0 4px 16px rgba(58,74,49,0.10);
}

.story-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.45s ease;
}

@media (hover: hover) {
    .story-photo:hover {
        transform: translateY(-5px) scale(1.01);
        box-shadow: 0 18px 40px rgba(58,74,49,0.18);
    }
    .story-photo:hover img { transform: scale(1.06); }
}

/* ── Dot indicators (pill-style active dot) ── */
.chapter-gallery-dots {
    display: flex;
    gap: 7px;
    justify-content: center;
    padding: 2px 0 0;
    min-height: 18px;
}

.chapter-gallery-dots .cdot {
    height: 5px;
    width: 5px;
    border-radius: 3px;
    background: rgba(85,107,47,0.18);
    transition: width 0.28s cubic-bezier(0.22,1,0.36,1), background 0.28s ease;
    cursor: pointer;
}

.chapter-gallery-dots .cdot.active {
    width: 20px;
    background: var(--color-olive);
}

/* ── Empty placeholder ── */
.chapter-no-photos {
    padding: 0 24px;
    color: var(--color-muted);
    font-size: 0.87rem;
    font-style: italic;
    text-align: center;
}

/* ── Desktop: flex halves + absolutely-centred node ──
   The node is taken OUT of the flex flow and pinned with
   position:absolute + left:50% so both circles always land on
   the exact same vertical axis as the ::before timeline line,
   regardless of content or rounding differences.               */
@media (min-width: 1025px) {
    .timeline-gallery {
        margin: 72px 0 112px;
    }

    .story-timeline-track {
        padding: 40px clamp(28px, 3.4vw, 72px) 0;
    }

    .story-timeline-track .chapter:last-child {
        padding-bottom: 0;
    }

    /* Chapter: flex row + position:relative as anchor for the absolute node */
    .chapter {
        display: flex;
        flex-direction: row;
        align-items: center;
        position: relative;
        /* Exclude inter-chapter spacer from axis math so node centers on row content. */
        --chapter-row-gap: clamp(88px, 8vw, 132px);
        --chapter-axis-top: calc((100% - var(--chapter-row-gap)) / 2);
        padding-bottom: var(--chapter-row-gap);
        max-width: min(100%, var(--story-timeline-width));
        opacity: 1;
        transform: none;
        transition: none;
    }

    .chapter.visible { opacity: 1; transform: none; }

    /* Node: absolute, always at 50% of its chapter — guaranteed to match the line.
       translateX(-50%) is kept in BOTH states so the scale pop doesn't drift. */
    .chapter-node {
        position: absolute;
        left: 50%;
        top: var(--chapter-axis-top);
        transform: translate(-50%, -50%) scale(0.72);
        flex: none;
        margin: 0;
        z-index: 3;
        opacity: 0;
        transition: opacity 0.5s ease, transform 0.65s cubic-bezier(0.34, 1.4, 0.64, 1);
    }

    .chapter.visible .chapter-node {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    /* Each half takes exactly 50% of the chapter; min-width:0 prevents
       the scroll-overflow track from blowing past the boundary */
    .chapter-header,
    .chapter-gallery {
        flex: 0 0 50%;
        min-width: 0;
        max-width: none;
        width: auto;
    }

    /* ── Odd: text LEFT, gallery RIGHT ── */
    .chapter:nth-child(odd) .chapter-header {
        order: 1;
        position: relative;
        text-align: right;
        align-items: flex-end;
        /* 48px right padding keeps text clear of the absolutely-positioned node */
        padding: 20px clamp(56px, 5.4vw, 90px) 20px 20px;
        opacity: 0;
        transform: translateX(-30px);
        transition: opacity 0.65s ease 0.10s, transform 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.10s;
    }

    /* Connector ticks anchored to the chapter centerline for perfect node alignment */
    .chapter:nth-child(odd)::after,
    .chapter:nth-child(even)::before {
        content: '';
        position: absolute;
        top: var(--chapter-axis-top);
        width: clamp(48px, 5vw, 84px);
        height: 1px;
        pointer-events: none;
        transform: translateY(-50%);
        z-index: 2;
    }

    .chapter:nth-child(odd)::after {
        left: calc(50% - clamp(48px, 5vw, 84px));
        background: linear-gradient(to right, rgba(85,107,47,0.22), transparent);
    }

    .chapter:nth-child(odd) .chapter-gallery {
        order: 2;
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.65s ease 0.20s, transform 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.20s;
    }

    /* ── Even: gallery LEFT, text RIGHT ── */
    .chapter:nth-child(even) .chapter-gallery {
        order: 1;
        opacity: 0;
        transform: translateX(-30px);
        transition: opacity 0.65s ease 0.10s, transform 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.10s;
    }

    .chapter:nth-child(even) .chapter-header {
        order: 2;
        position: relative;
        text-align: left;
        align-items: flex-start;
        /* 48px left padding keeps text clear of the absolutely-positioned node */
        padding: 20px 20px 20px clamp(56px, 5.4vw, 90px);
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.65s ease 0.20s, transform 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.20s;
    }

    .chapter:nth-child(even)::before {
        left: 50%;
        background: linear-gradient(to left, rgba(85,107,47,0.22), transparent);
    }

    /* Animate all children to rest when .visible is added */
    .chapter.visible .chapter-header,
    .chapter.visible .chapter-gallery {
        opacity: 1;
        transform: none;
    }

    /* ── Photos: ~2.5 visible at once ── */
    .story-photo {
        flex: 0 0 min(27vw, 320px);
    }

    /* ── No scrollbar on desktop (drag + dots handle navigation) ── */
    .chapter-gallery-track {
        scrollbar-width: none;
        padding-bottom: 20px;
    }

    .chapter-gallery-track::-webkit-scrollbar { display: none; }

    .chapter-gallery::before,
    .chapter-gallery::after { width: 20px; }

    /* ── Typography ── */
    .chapter-label       { font-size: clamp(3rem, 4.2vw, 5.2rem); }
    .chapter-label--year { font-size: clamp(2.6rem, 3.8vw, 4.6rem); }
    .chapter-desc        { max-width: 40ch; margin: 4px 0 0; }

    .chapter:nth-child(odd) .chapter-gallery-track,
    .chapter:nth-child(even) .chapter-gallery-track {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .timeline-gallery { margin-top: 28px; padding-bottom: 24px; }
    .timeline-intro   { margin-bottom: 36px; }
    .chapter          { padding-bottom: 44px; }
    .story-timeline-track::before { display: none; }
}

@media (max-width: 480px) {
    .story-photo { flex: 0 0 min(84vw, 310px); }
    .chapter-label      { font-size: clamp(2.2rem, 11vw, 3.4rem); }
    .chapter-label--year { font-size: clamp(2rem, 10vw, 3rem); }
}

/* ============================================================
   SECTION-STAGE DIRECTIONAL ENTRANCE VARIANTS
   Classes used in HTML alongside .reveal to give each block
   its own entrance direction instead of the default translateY
   ============================================================ */
.reveal.section-stage--left  {
    transform: translateX(-65px) scale(0.98);
    filter: blur(2px);
}
.reveal.section-stage--right {
    transform: translateX(65px) scale(0.98);
    filter: blur(2px);
}
.reveal.section-stage--up    {
    transform: translateY(72px) scale(0.96);
    filter: blur(3px);
}
.reveal.section-stage--zoom {
    transform: scale(0.94);
    filter: blur(3px);
}
/* Reset all directional variants on reveal */
.reveal.visible.section-stage--left,
.reveal.visible.section-stage--right,
.reveal.visible.section-stage--up,
.reveal.visible.section-stage--zoom {
    transform: none;
    filter: blur(0);
}

/* ============================================================
   STAGGERED CHILDREN — children of a .reveal-stagger container
   fade/slide in one by one once the parent becomes visible.
   JS assigns --stagger-index to each direct child.
   ============================================================ */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(2px);
    transition: opacity 0.7s ease,
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.7s ease;
    transition-delay: calc(var(--stagger-index, 0) * 110ms + 120ms);
}
.reveal-stagger.visible > * {
    opacity: 1;
    transform: none;
    filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-stagger > * {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }
}

/* ============================================================
   FLOATING PARTICLES
   Tiny petals/leaves that drift upward in dark sections.
   JS injects .floating-particle <span> elements; CSS animates them.
   ============================================================ */
.floating-particle {
    position: absolute;
    border-radius: 50% 0 50% 0;
    background-color: rgba(252, 251, 248, 0.10);
    pointer-events: none;
    animation: floatParticle var(--fp-dur, 9s) ease-in-out infinite var(--fp-delay, 0s);
    will-change: transform, opacity;
    z-index: 0;
}
@keyframes floatParticle {
    0%   { transform: translateY(0)      rotate(0deg)   scale(1);   opacity: 0; }
    12%  { opacity: 0.9; }
    88%  { opacity: 0.6; }
    100% { transform: translateY(-110px) rotate(195deg) scale(0.5); opacity: 0; }
}

/* ============================================================
   COUNTDOWN: Radial ambient glow that breathes behind the timer
   ============================================================ */
.block-countdown {
    position: relative;
}
.block-countdown::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 580px;
    height: 580px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(85,107,47,0.08) 0%, transparent 65%);
    animation: countdownGlow 5s ease-in-out infinite alternate;
    pointer-events: none;
    border-radius: 50%;
    will-change: transform, opacity;
}
@keyframes countdownGlow {
    from { transform: translate(-50%, -50%) scale(0.82); opacity: 0.45; }
    to   { transform: translate(-50%, -50%) scale(1.18); opacity: 1;    }
}
/* Subtle lift on individual time boxes */
.time-box {
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.32s ease;
    cursor: default;
}
.time-box:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 28px rgba(85,107,47,0.14);
}

/* Staggered cascade when the countdown container reveals */
.countdown-container.visible .time-box {
    animation: timeBoxCascade 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.countdown-container.visible .time-box:nth-child(1) { animation-delay: 0.38s; }
.countdown-container.visible .time-box:nth-child(2) { animation-delay: 0.50s; }
.countdown-container.visible .time-box:nth-child(3) { animation-delay: 0.62s; }
.countdown-container.visible .time-box:nth-child(4) { animation-delay: 0.74s; }
@keyframes timeBoxCascade {
    from { opacity: 0; transform: translateY(18px) scale(0.93); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ============================================================
   WELCOME: Moving diagonal shimmer + particle host
   ============================================================ */
.block-welcome {
    position: relative;
}
.welcome-content {
    position: relative;
    z-index: 1;
}


/* ============================================================
   TIMELINE: Pulsing glow ring on the active dot
   ============================================================ */
.tl-item.tl-active .tl-dot {
    animation: dotGlowPulse 2.6s ease-in-out infinite;
}
@keyframes dotGlowPulse {
    0%, 100% {
        box-shadow: 0 0 0 10px rgba(252,251,248,0.98),
                    0 0 0 13px rgba(85,107,47,0.18),
                    0 8px 24px rgba(85,107,47,0.18);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(252,251,248,0.98),
                    0 0 0 18px rgba(85,107,47,0.09),
                    0 14px 36px rgba(85,107,47,0.26);
    }
}

/* ============================================================
   RSVP: Diagonal shimmer sweep + particle host
   ============================================================ */
.block-rsvp {
    position: relative;
}
.block-rsvp::before {
    content: '';
    clip-path: inset(0);
    position: absolute;
    top: -60%;
    left: -60%;
    width: 220%;
    height: 220%;
    background: linear-gradient(
        135deg,
        transparent 30%,
        rgba(252, 251, 248, 0.03) 44%,
        rgba(252, 251, 248, 0.06) 50%,
        rgba(252, 251, 248, 0.03) 56%,
        transparent 70%
    );
    animation: rsvpShimmer 9s ease-in-out infinite alternate;
    pointer-events: none;
    will-change: transform;
}
.rsvp-content {
    position: relative;
    z-index: 1;
}
@keyframes rsvpShimmer {
    from { transform: rotate(-10deg) translate(-8%, -8%); }
    to   { transform: rotate(-10deg) translate(8%, 8%);  }
}

/* ============================================================
   REGALO: Enhanced gift float
   ============================================================ */
.regalo-box {
    position: relative;
    overflow: hidden;
}
/* More romantic float for the gift emoji */
@keyframes giftPulse {
    0%,  100% { transform: translateY(0)   scale(1)    rotate(0deg);  }
    30%        { transform: translateY(-9px) scale(1.10) rotate(-4deg); }
    65%        { transform: translateY(-5px) scale(1.06) rotate(2deg);  }
}

/* ============================================================
   FOOTER: Soft top-edge highlight + ambient top glow
   ============================================================ */
.block-footer {
    position: relative;
}
.block-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 70%;
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(
        to right,
        transparent,
        rgba(252, 251, 248, 0.22),
        transparent
    );
    pointer-events: none;
}
.block-footer::after {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    width: 520px;
    height: 520px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(85,107,47,0.22) 0%, transparent 68%);
    pointer-events: none;
    border-radius: 50%;
}
.footer-inner {
    position: relative;
    z-index: 1;
}

/* ============================================================
   MODERN LAYOUT: SECTION TRANSITIONS
   ============================================================ */


/* ── Fix border-top removed from location previously ── */
.block-location { border-top: none; }

/* ── WELCOME: split-screen layout (text left · Spotify right) ── */
.block-welcome {
    text-align: left;
}
.block-welcome .section-title { text-align: left; }
.block-welcome .divider       { margin-left: 0; margin-right: 0; }

.welcome-content {
    max-width: 1120px;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 72px;
    text-align: left;
}
.welcome-text    { flex: 0 0 320px; }
.welcome-spotify { flex: 1; min-width: 0; }
.welcome-spotify .spotify-card { margin: 0; max-width: 100%; }

/* ============================================================
   SVG WAVE DIVIDERS  (.wd)
   Each .wd sits between two sections. The background colour
   matches the NEXT section; the SVG fill matches the PREVIOUS
   section — creating an organic edge rather than a flat cut.
   Every divider has a unique shape for visual variety.
   ============================================================ */
.wd {
    display: block;
    width: 100%;
    line-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Seal sub-pixel seams on both edges */
    margin-top: -1px;
    margin-bottom: -1px;
}
.wd svg {
    display: block;
    width: 100%;
    /* Height drives how deep the wave cuts — tune per shape */
}

/* Background colours */
.wd--into-dark  { background-color: var(--color-dark-olive); }
.wd--into-cream { background-color: var(--color-cream); }

/*
 * Shape 1 — CREST (countdown cream → welcome dark)
 * A single gentle S-curve biased toward the right.
 * Reads as the cream section "pouring" into the dark.
 */
.wd--crest svg      { height: 72px; }

/*
 * Shape 2 — VALLEY (welcome dark → location cream)
 * A deep symmetric concave arc, lowest in the centre.
 * The dark section scoops down, cream emerges below.
 */
.wd--valley svg     { height: 80px; }

/*
 * Shape 3 — TRIPLE WAVE (timeline cream → rsvp dark)
 * Three equal peaks — evokes ocean waves.
 * More energetic; suits the transition to the party section.
 */
.wd--triple svg     { height: 68px; }

/* Background for olive-coloured wave dividers */
.wd--into-olive { background-color: var(--color-olive); }

/*
 * Shape — CREST-R (location cream → map olive)
 */
.wd--crest-r svg    { height: 72px; }

/*
 * Shape — VALLEY-R (map olive → timeline cream)
 */
.wd--valley-r svg   { height: 80px; }

/*
 * Shape — CREST-R2 (rsvp dark → regalo olive)
 */
.wd--crest-r2 svg   { height: 72px; }

/*
 * Shape — VALLEY-R2 (regalo olive → footer dark)
 */
.wd--valley-r2 svg  { height: 72px; }

/* ============================================================
   [BLOCK 3B: MAP]
   ============================================================ */
.block-map {
    background-color: var(--color-olive);
    padding: 56px 24px 64px;
    text-align: center;
    position: relative;
    isolation: isolate;
}
.map-content {
    max-width: min(860px, 96vw);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Drifting olive leaves — decorative background */
.map-leaves {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.map-leaf {
    position: absolute;
    width: 32px;
    height: 48px;
    color: #3a4a31;
    opacity: 0;
    will-change: transform, opacity;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15));
}
.map-leaf--1  { top: 8%;  left: 6%;  animation: mapLeafDriftA 12s ease-in-out infinite; animation-delay: 0s; }
.map-leaf--2  { top: 18%; left: 88%; width: 26px; height: 39px; animation: mapLeafDriftB 15s ease-in-out infinite; animation-delay: -4s; }
.map-leaf--3  { top: 62%; left: 4%;  width: 38px; height: 57px; animation: mapLeafDriftA 14s ease-in-out infinite; animation-delay: -7s; }
.map-leaf--4  { top: 78%; left: 82%; animation: mapLeafDriftB 13s ease-in-out infinite; animation-delay: -2s; }
.map-leaf--5  { top: 42%; left: 92%; width: 22px; height: 33px; animation: mapLeafDriftA 16s ease-in-out infinite; animation-delay: -9s; }
.map-leaf--6  { top: 50%; left: 2%;  width: 24px; height: 36px; animation: mapLeafDriftB 17s ease-in-out infinite; animation-delay: -5s; }
.map-leaf--7  { top: 90%; left: 46%; width: 28px; height: 42px; animation: mapLeafDriftA 13s ease-in-out infinite; animation-delay: -11s; }
.map-leaf--8  { top: 4%;  left: 38%; width: 26px; height: 39px; animation: mapLeafDriftB 14s ease-in-out infinite; animation-delay: -3s; }
.map-leaf--9  { top: 30%; left: 14%; width: 20px; height: 30px; animation: mapLeafDriftA 11s ease-in-out infinite; animation-delay: -6s; }
.map-leaf--10 { top: 70%; left: 72%; width: 30px; height: 45px; animation: mapLeafDriftB 16s ease-in-out infinite; animation-delay: -10s; }
.map-leaf--11 { top: 12%; left: 68%; width: 22px; height: 33px; animation: mapLeafDriftA 15s ease-in-out infinite; animation-delay: -8s; }
.map-leaf--12 { top: 86%; left: 22%; width: 24px; height: 36px; animation: mapLeafDriftB 12s ease-in-out infinite; animation-delay: -1s; }
.map-leaf--13 { top: 2%;  left: 24%; width: 20px; height: 30px; animation: mapLeafDriftA 13s ease-in-out infinite; animation-delay: -4s; }
.map-leaf--14 { top: 6%;  left: 56%; width: 28px; height: 42px; animation: mapLeafDriftB 16s ease-in-out infinite; animation-delay: -7s; }
.map-leaf--15 { top: 14%; left: 78%; width: 22px; height: 33px; animation: mapLeafDriftA 12s ease-in-out infinite; animation-delay: -2s; }
.map-leaf--16 { top: 22%; left: 32%; width: 26px; height: 39px; animation: mapLeafDriftB 14s ease-in-out infinite; animation-delay: -10s; }
.map-leaf--17 { top: 26%; left: 60%; width: 20px; height: 30px; animation: mapLeafDriftA 15s ease-in-out infinite; animation-delay: -5s; }
.map-leaf--18 { top: 34%; left: 4%;  width: 28px; height: 42px; animation: mapLeafDriftB 13s ease-in-out infinite; animation-delay: -8s; }
.map-leaf--19 { top: 36%; left: 48%; width: 22px; height: 33px; animation: mapLeafDriftA 17s ease-in-out infinite; animation-delay: -3s; }
.map-leaf--20 { top: 44%; left: 24%; width: 24px; height: 36px; animation: mapLeafDriftB 11s ease-in-out infinite; animation-delay: -12s; }
.map-leaf--21 { top: 48%; left: 64%; width: 26px; height: 39px; animation: mapLeafDriftA 14s ease-in-out infinite; animation-delay: -6s; }
.map-leaf--22 { top: 54%; left: 40%; width: 20px; height: 30px; animation: mapLeafDriftB 15s ease-in-out infinite; animation-delay: -9s; }
.map-leaf--23 { top: 58%; left: 86%; width: 22px; height: 33px; animation: mapLeafDriftA 12s ease-in-out infinite; animation-delay: -1s; }
.map-leaf--24 { top: 66%; left: 18%; width: 28px; height: 42px; animation: mapLeafDriftB 16s ease-in-out infinite; animation-delay: -11s; }
.map-leaf--25 { top: 70%; left: 54%; width: 20px; height: 30px; animation: mapLeafDriftA 13s ease-in-out infinite; animation-delay: -4s; }
.map-leaf--26 { top: 74%; left: 34%; width: 24px; height: 36px; animation: mapLeafDriftB 14s ease-in-out infinite; animation-delay: -7s; }
.map-leaf--27 { top: 82%; left: 62%; width: 22px; height: 33px; animation: mapLeafDriftA 11s ease-in-out infinite; animation-delay: -2s; }
.map-leaf--28 { top: 88%; left: 8%;  width: 26px; height: 39px; animation: mapLeafDriftB 15s ease-in-out infinite; animation-delay: -10s; }
.map-leaf--29 { top: 92%; left: 68%; width: 20px; height: 30px; animation: mapLeafDriftA 12s ease-in-out infinite; animation-delay: -5s; }
.map-leaf--30 { top: 96%; left: 36%; width: 22px; height: 33px; animation: mapLeafDriftB 13s ease-in-out infinite; animation-delay: -8s; }

@keyframes mapLeafDriftA {
    0%   { transform: translate(0, 0) rotate(-10deg); opacity: 0; }
    15%  { opacity: 0.28; }
    50%  { transform: translate(18px, -22px) rotate(18deg); opacity: 0.32; }
    85%  { opacity: 0.22; }
    100% { transform: translate(-6px, 12px) rotate(-14deg); opacity: 0; }
}
@keyframes mapLeafDriftB {
    0%   { transform: translate(0, 0) rotate(12deg); opacity: 0; }
    18%  { opacity: 0.25; }
    50%  { transform: translate(-22px, 20px) rotate(-16deg); opacity: 0.3; }
    82%  { opacity: 0.2; }
    100% { transform: translate(10px, -10px) rotate(20deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .map-leaf { animation: none !important; opacity: 0.15; }
}

/* Header */
.map-header { margin-bottom: 32px; }
.map-title {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    font-weight: 400;
    color: var(--color-cream);
    margin: 0 0 16px;
    letter-spacing: 0.5px;
}
.map-divider {
    width: 48px;
    height: 1.5px;
    background-color: rgba(252,251,248,0.45);
    margin: 0 auto 22px;
}
.map-details {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    padding: 0 16px;
}
.map-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(252,251,248,0.10);
    border: 1px solid rgba(252,251,248,0.22);
    color: rgba(252,251,248,0.88);
    font-family: var(--font-sans);
    font-size: clamp(0.62rem, 1.8vw, 0.78rem);
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 7px 14px;
    border-radius: 999px;
    white-space: nowrap;
}
.map-pill svg { flex-shrink: 0; opacity: 0.75; }

/* Map frame */
.map-frame { margin-bottom: 24px; }
.block-map .map-container {
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(252,251,248,0.18);
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

/* Button */
.map-actions { display: flex; justify-content: center; }
.btn-map {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    border: 1.5px solid var(--color-cream);
    color: var(--color-olive);
    background: var(--color-cream);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radius);
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-map:hover {
    background-color: transparent;
    color: var(--color-cream);
    border-color: rgba(252,251,248,0.65);
}

/*
 * Shape 4 — SCALLOP (regalo dark → footer dark)
 * A single soft upward dome. Within the same dark zone it
 * acts as a subtle visual separator without a colour change.
 */
.wd--scallop svg    { height: 40px; }

/* ============================================================
   MOBILE ADJUSTMENTS
   ============================================================ */
@media (max-width: 768px) {
    .block-countdown {
        margin-top: 0;
        border-radius: 0;
        padding-top: var(--countdown-vertical-pad);
        box-shadow: none;
    }
    .block-welcome {
        text-align: center;
    }
    .block-welcome .section-title { text-align: center; }
    .block-welcome .divider       { margin-left: auto; margin-right: auto; }
    .welcome-content {
        flex-direction: column;
        gap: 36px;
        text-align: center;
    }
    .welcome-text { flex: none; width: 100%; }

    /* Shorter waves on small screens */
    .wd--crest svg  { height: 44px; }
    .wd--valley svg { height: 48px; }
    .wd--triple svg { height: 40px; }
    .wd--scallop svg{ height: 24px; }
}


/* Regalo page specific hero background */
.regalo-hero::before {
    background: url('INVITO/photo_2026-05-05_19-07-55.jpg') center/cover no-repeat !important;
}
