@font-face {
    font-family: 'Parfumerie Script';
    src: url('parfumerie-script-text.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --olive: #6B705C;
    --olive-dark: #4A4E3D;
    --cream: #E9E5D6;
    --dark: #1A1C16;
    --white: #FFFFFF;
    --font-serif: 'Cormorant Garamond', serif;
    --font-script: 'Parfumerie Script', cursive;
    --font-sans: 'Inter', sans-serif;
}

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

html {
    /* Hide scrollbar only — no overflow hidden to preserve sticky */
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
    overflow-x: clip;
    max-width: 100%;
}

html::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body {
    background-color: var(--cream);
    color: var(--dark);
    font-family: var(--font-serif);
    line-height: 1.6;
    overflow-x: clip;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* Hard clip on all sections to prevent horizontal scroll on older iOS that don't support clip */
section:not(.wedding-details) {
    overflow-x: hidden;
}
.details-card {
    overflow-x: hidden;
}
@media (min-width: 501px) {
    body {
        max-width: 820px;
        margin: 0 auto;
        box-shadow: 0 0 100px rgba(0,0,0,0.1);
        position: relative;
        background: #fff;
    }
    html {
        background: #f0f0f0;
    }
}

body::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Canvas Texture Overlay */
.canvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
    z-index: 1000;
}

.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h2.serif-title {
    font-family: var(--font-serif);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

h2.serif-title.big {
    font-size: 3rem;
}

h2.script-title {
    font-family: var(--font-script);
    font-weight: 300;
    font-size: 5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

h2.script-title.white {
    color: var(--white);
}

/* 1. Hero Section */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--olive-dark);
}

.hero-bg-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    /* Adjust for desired texture visibility */
    mix-blend-mode: multiply;
    z-index: 1;
}

/* Music Button Sticker */
.music-btn {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s ease;
    mix-blend-mode: normal; /* In case any parent effects bleed */
}

.music-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

.music-btn:active {
    transform: scale(0.95);
}

@media (min-width: 501px) {
    .music-btn {
        right: calc(50% - 410px + 1.5rem);
    }
}

.music-icon {
    width: 85px; /* Premium sticker size - Increased to match user request */
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
    transition: all 0.4s ease;
}

/* When playing, the icon softly pulses with the music */
.music-btn.playing .music-icon {
    animation: gentlePulse 3s infinite ease-in-out;
}

.hero-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 80vh;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    position: absolute;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    opacity: 0;
    /* Starting state for animation */
}

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

.hero-left {
    top: 0;
    left: 5%;
    width: 220px;
    height: 300px;
    z-index: 3;
    animation: slideUpFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0s forwards;
}

.hero-right {
    bottom: 0;
    right: 0;
    width: 180px;
    height: 250px;
    z-index: 3;
    animation: slideUpFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.hero-main {
    width: 400px;
    height: 550px;
    z-index: 4;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUpFadeIn 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.names-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.names-overlay span {
    font-family: var(--font-script);
    color: var(--white);
    font-size: 15rem;
    /* Increased significantly */
    line-height: 1;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: absolute;
    white-space: nowrap;
    opacity: 0;
    /* Starting state for animation */
}

.name-olivia {
    left: 10%;
    top: 55%;
    z-index: 11;
    --rot: -10deg;
    --scl: 1;
    animation: nameReveal 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

.name-mark {
    right: 10%;
    top: 25%;
    z-index: 11;
    --rot: 5deg;
    --scl: 1;
    animation: nameReveal 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

/* Adjustments for smaller screens */
@media (max-width: 1024px) {
    .names-overlay span {
        font-size: 10rem;
    }

    .hero-main {
        width: 320px;
        height: 440px;
    }

    .hero-left {
        width: 180px;
        height: 240px;
    }

    .hero-right {
        width: 140px;
        height: 200px;
    }
}

/* 1.5. Date Display Section */
.date-display {
    position: relative;
    width: 100%;
    min-height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    clip-path: inset(0); /* Crucial for clipping the fixed background */
    z-index: 1;
}

.date-display::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg1.webp');
    background-size: cover;
    background-position: center;
    z-index: -1;
    pointer-events: none;
}

.date-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(40, 43, 34, 0.45);
    z-index: 1;
}

.date-text {
    position: relative;
    z-index: 2;
    font-family: var(--font-script);
    color: var(--white);
    font-size: 8rem;
    font-weight: normal;
    text-align: center;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    padding: 2rem;
    line-height: 1.2;
}

/* 2. Our Story Section (Revised) */
.story-new {
    background-color: #4a4d3f;
    /* Deepened base color to match velvet */
    background-image: url('bg.webp');
    /* The velvet texture */
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 8rem 2rem;
    position: relative;
}

.story-new-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 2;
}

.story-new-left {
    flex: 1;
}

.story-photo {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.story-new-right {
    flex: 1;
    position: relative;
}

.story-stamp {
    position: absolute;
    top: -60px; /* Moved much higher */
    right: 15px;
    width: 100px;
    /* Larger stamp */
    height: auto;
    opacity: 0.95;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
    transform-origin: center center;
    animation: stampRock 5s ease-in-out infinite;
    z-index: 1; /* Stamp goes under the text */
}

@keyframes stampRock {

    0%,
    100% {
        transform: rotate(-3deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

.story-maintitle {
    position: relative;
    z-index: 2; /* Text goes above the stamp */
    font-size: 5rem;
    font-weight: normal;
    margin-bottom: 0.5rem;
    font-family: var(--font-script);
    /* Signature font */
    letter-spacing: 0;
    line-height: 1;
}

.story-subtitle {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.story-text-columns {
    display: flex;
    flex-direction: column; /* Stacked text instead of parallel columns */
    gap: 0.5rem;
}

.story-col {
    flex: 1;
}

.story-col p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    margin-bottom: 1rem;
}

/* 2.5 Wedding Details Split-Screen Section */
.wedding-details {
    display: flex;
    width: 100%;
    position: relative;
    color: var(--white);
}

/* Letterpress / Debossed text effect */
.wedding-details h2,
.wedding-details h3,
.wedding-details p {
    color: rgba(235, 240, 225, 0.85);
    text-shadow: -1px -1px 2px rgba(0, 0, 0, 0.5), 1px 1px 1px rgba(255, 255, 255, 0.2);
}

.details-left-fixed {
    width: 50%;
    height: 100vh;
    position: sticky;
    top: 0;

    background-color: var(--olive-dark);
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    z-index: 1;
}

.details-title {
    font-family: var(--font-script);
    font-size: 5rem;
    /* Massive and uniform */
    font-weight: normal;
    margin-bottom: 0.5rem;
    line-height: 0.8; /* Reduced line spacing */
}

.details-subtitle {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    /* Massive and uniform body match */
    letter-spacing: 0.1em;
    line-height: 1.2; /* Reduced line spacing */
    color: rgba(255, 255, 255, 0.8);
}

.details-right-scroll {
    width: 50%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.details-card {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;

    background-color: var(--olive-dark);

    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
}

.details-card:first-child {
    border-top: none;
    box-shadow: none;
}

.card-content {
    text-align: center;
    padding: 4rem;
    width: 100%;
    position: relative;
    z-index: 10;
}

.details-card-stamp-only {
    width: 220px;
    /* Massively scaled up stamp globally */
    opacity: 0.95;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.25));
    transform: rotate(2deg);
}

.details-card h3 {
    font-family: var(--font-script);
    font-size: 5rem;
    /* Massive and uniform, matches details-title */
    font-weight: normal;
    margin-bottom: 1rem;
    line-height: 0.8; /* Reduced line spacing */
}

.card-content p {
    font-size: 1.3rem;
    /* Massive and uniform body match */
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.scroll-pulse {
    font-family: var(--font-sans);
    font-size: 0.75rem !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7) !important;
    margin-top: 2rem !important;
    animation: pulseOpacity 2s infinite ease-in-out;
}

@keyframes pulseOpacity {

    0%,
    100% {
        opacity: 0.3;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(5px);
    }
}

/* Card Icon Animations — positioned by JS spring physics */
.card-icon {
    position: absolute;
    width: 100px;
    height: auto;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.25));
    will-change: transform, opacity;
}

.card-icon-plane {
    width: 300px;
    top: 50%;
    right: -120px;
    transform: translate(0, -50%) rotate(0deg) scale(0.6);
}

.stamp-ceremony {
    top: 5%;
    right: 5%;
    left: auto;
    width: 350px;
    transform: scale(1.2) rotate(0deg);
}

.stamp-ceremony.animate-strike {
    animation: stampStrike 2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes stampStrike {
    0% {
        opacity: 0;
        transform: scale(1.8) rotate(-15deg);
        filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.3));
    }
    35% {
        opacity: 1;
        transform: scale(0.96) rotate(7deg);
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    }
    55% {
        transform: scale(1.03) rotate(7.5deg);
        filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.35));
    }
    75% {
        transform: scale(0.99) rotate(6.8deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(7deg);
        filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.4));
    }
}

.stamp-cherry {
    bottom: 5%;
    left: 5%;
    width: 250px;
    transform-origin: top center;
    opacity: 0;
}

.stamp-cherry.animate-sway {
    opacity: 1;
    animation: cherryEntrance 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards, cherrySwing 6s ease-in-out infinite 1.5s, cherryGleam 5s linear infinite 1.5s;
}

@keyframes cherryEntrance {
    0% {
        opacity: 0;
        transform: rotate(-5deg) scale(0.9);
        filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.1));
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
        filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.25));
    }
}

@keyframes cherrySwing {
    0%   { transform: rotate(0deg); }
    25%  { transform: rotate(3deg); }
    75%  { transform: rotate(-3deg); }
    100% { transform: rotate(0deg); }
}

@keyframes cherryGleam {
    0%, 80%, 100% { filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.25)) brightness(1) contrast(1); }
    90% { filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.25)) brightness(1.15) contrast(1.05); }
}

/* 3. RSVP Section */
.rsvp {
    padding: 10rem 2rem;
    background-color: var(--olive-dark);
    background-image: url('bg.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rsvp-frame {
    background: var(--white);
    padding: 4rem 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

.rsvp-frame .section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
}

.rsvp-frame p {
    font-size: 1.1rem;
    line-height: 1.5;
    /* Reduced from 1.8 for a more compact look */
    color: #444;
    margin-bottom: 2.5rem;
}

/* 4. Dress Code Section */
.dress-code {
    background-color: var(--cream);
    padding: 4rem 2rem 8rem;
    /* Reduced top padding from 8rem to 4rem */
    text-align: center;
}

.dress-code .script-title {
    font-size: 3rem;
    /* Further reduced from 3.5rem for a more delicate look */
    line-height: 0.7;
    /* Reduced from 0.8 to pull lines even closer */
}

.dress-code-wrapper {
    max-width: 700px;
}

.dress-code-text {
    font-size: 1.1rem;
    line-height: 1.5;
    /* Reduced from 1.8 for tighter text */
    color: var(--dark);
    margin-bottom: 3rem;
}

.color-stickers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.color-sticker {
    width: 60px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
    will-change: transform;
}

.sticker-pulse {
    animation: gentlePulse 3s infinite ease-in-out;
}

.delay-1 { animation-delay: 0s; }
.delay-2 { animation-delay: 0.6s; }
.delay-3 { animation-delay: 1.2s; }
.delay-4 { animation-delay: 1.8s; }

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.1)); }
}

.rsvp-link {
    display: inline-block;
    color: var(--dark);
    text-decoration: underline;
    text-underline-offset: 5px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

/* 4. Getting Here Section */
.travel {
    padding: 6rem 0;
    background-color: var(--cream);
}

.travel-list {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.travel-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.item-img-placeholder {
    width: 100px;
    height: 100px;
    background: #D8D4C5;
    flex-shrink: 0;
    border-radius: 4px;
}

.item-text h3 {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.item-text p {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.7;
}

/* 5. Hotels Section */
.hotels {
    background-color: var(--olive);
    padding: 6rem 2rem;
}

.hotels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.hotel-card {
    background-color: var(--cream);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hotel-card h3 {
    font-family: var(--font-serif);
    text-transform: lowercase;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.hotel-card p {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.hotel-card .walk-time {
    font-style: italic;
    opacity: 0.7;
    margin-bottom: 1.5rem;
}

.book-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: var(--olive);
    color: var(--white);
    text-decoration: none;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* 6. FAQ Section */
.faq {
    padding: 6rem 2rem;
    background-color: var(--cream);
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 800px;
    margin: 4rem auto 0;
}

.faq-item {
    margin-bottom: 2.5rem;
}

.faq-item h4 {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.faq-item p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
}

.color-palette {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.color-swatch {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.registry-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--dark);
    color: var(--white);
    text-decoration: none;
    font-size: 0.75rem;
    border-radius: 20px;
}

/* 7. Things to do Section */
.things-to-do {
    padding: 6rem 2rem;
    background-color: var(--white);
}

.things-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem 2rem;
    max-width: 700px;
    margin: 4rem auto 0;
}

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

.sq-placeholder {
    width: 80px;
    height: 80px;
    background: #E9E5D6;
    margin: 0 auto 1.5rem;
    border-radius: 4px;
}

.thing-item h4 {
    font-family: var(--font-script);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.thing-item p {
    font-size: 0.8rem;
    color: #777;
    line-height: 1.4;
}

/* 8. Contacts End Section */
.contacts-end {
    background-image: url('bg1.webp');
    background-size: cover;
    background-position: center;
    padding: 4rem 2rem 6rem;
    /* Reduced from 10rem to be more compact */
    display: flex;
    justify-content: center;
    align-items: center;
}

.contacts-frame {
    background-color: rgba(233, 229, 214, 0.85); /* Semi-transparent cream matching template aesthetics */
    padding: 4rem 1.5rem;
    /* Slightly increased from 1.25rem for more breathing room */
    width: 100%;
    max-width: 700px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.contacts-frame .script-title {
    margin-bottom: 1rem;
    color: var(--dark);
    font-size: 3.5rem;
    /* Reverted to a larger base size */
    line-height: 0.8;
}

.contact-info {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    line-height: 1.5;
    /* Reduced from 1.8 for tighter text */
    color: var(--dark);
}

.map-container {
    width: 100%;
    margin-top: 2rem;
    /* Added spacing before the map */
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Footer */
.template-footer {
    padding: 4rem 2rem 5rem;
    text-align: center;
    background-color: var(--olive-dark);
    background-image: url('bg.webp');
    background-size: cover;
    background-position: center;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
}

.footer-contact {
    color: rgba(235, 240, 225, 0.85);
    font-family: var(--font-serif);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.footer-contact .phone {
    font-size: 1.1rem;
    margin-top: 0.4rem;
    letter-spacing: 0.05em;
}

.template-footer .script-title {
    color: rgba(235, 240, 225, 0.85); /* Slightly muted white/cream to blend with olive bg */
    margin: 0;
    font-size: 8rem;
}

@media (max-width: 600px) {
    .template-footer .script-title {
        font-size: 5rem !important;
    }
}

.template-footer .final-sig {
    font-family: var(--font-script);
    font-size: 2rem;
    color: var(--dark);
}

/* Animations */
@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

@keyframes nameReveal {
    from {
        opacity: 0;
        transform: rotate(var(--rot)) translateY(30px) scale(calc(var(--scl) * 0.9));
    }

    to {
        opacity: 1;
        transform: rotate(var(--rot)) translateY(0) scale(var(--scl));
    }
}

.reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.reveal-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsiveness */
@media (max-width: 1024px) {
    .names-overlay span {
        font-size: 10rem;
    }

    .hero-main {
        width: 320px;
        height: 440px;
    }

    .hero-left {
        width: 180px;
        height: 240px;
    }

    .hero-right {
        width: 140px;
        height: 200px;
    }
}

@media (max-width: 600px) {
    .hero-container {
        height: 80vh;
    }

    .hero-main {
        width: 260px;
        /* Increased for better presence */
        height: 380px;
    }

    .hero-left {
        width: 120px;
        height: 160px;
        top: 0;
        left: 0%;
        opacity: 0.8;
    }

    .hero-right {
        width: 100px;
        height: 140px;
        bottom: 0;
        right: 0;
        top: auto;
        opacity: 0.8;
    }

    .music-btn {
        top: 20px;
        right: 20px;
    }
    
    .music-icon {
        width: 50px;
    }

    .names-overlay span {
        font-size: 7rem;
        /* Significantly increased for overlap */
        text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    }

    .name-olivia {
        left: 5%;
        top: 65%;
        --rot: -10deg;
        --scl: 1.2;
    }

    .name-mark {
        right: 5%;
        top: 30%;
        --rot: 5deg;
        --scl: 1.2;
    }

    .date-display {
        min-height: 50vh;
    }

    .date-text {
        font-size: 3rem;
        /* Scaled down slightly to fit */
        white-space: nowrap;
        /* Forces text to naturally stay on one line */
    }

    .story-new {
        padding: 5rem 1.5rem;
    }

    .story-new-container {
        flex-direction: column-reverse;
        /* Text on top, photo on bottom */
        gap: 2.5rem;
    }

    .story-new-right {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .story-text-columns {
        flex-direction: column;
        gap: 1.5rem;
    }

    .story-maintitle {
        font-size: 4rem;
        /* Slightly smaller title for mobile */
        display: inline-block;
        position: relative;
    }

    .script-title {
        /* Respecting global script-title settings */
        line-height: 1.1;
    }

    .dress-code .script-title {
        font-size: 4.5rem !important;
        /* Increased back to a more prominent size */
        line-height: 0.8 !important;
    }

    .contacts-frame .script-title {
        font-size: 3.5rem !important;
        /* Increased back for better impact */
        line-height: 0.8 !important;
    }

    .story-subtitle {
        font-size: 1.2rem;
    }

    .story-stamp {
        width: 80px;
        top: -15px;
        left: 160px;
        /* Sticks precisely to the right edge of 'Our Story' */
        right: auto;
    }

    /* Fallback to Desktop's perfect 100vh sticky functionality! */
    .wedding-details {
        flex-direction: row;
        /* Keep side-by-side */
    }

    .details-left-fixed {
        padding: 1rem 0.5rem;
        /* Reduced padding for narrow column */
    }

    .card-content {
        padding: 1rem 0.5rem;
    }

    .details-title {
        font-size: 3.5rem;
        /* Massive and uniform */
        line-height: 0.8;
        margin-bottom: 0.5rem;
    }

    .details-subtitle {
        font-size: 1.1rem;
        /* Massive and uniform body match */
        line-height: 1.2;
    }

    .details-card h3 {
        font-size: 3.5rem;
        /* Matches details-title exactly */
        line-height: 0.8;
        margin-bottom: 0.8rem;
    }

    .card-content p {
        font-size: 1.1rem;
        /* Matches details-subtitle exactly */
        line-height: 1.5;
        margin-bottom: 0;
    }

    .details-card-stamp-only {
        width: 180px;
        /* Extremely large to fill the space */
        max-width: 95%;
    }

    .stamp-ceremony {
        width: 190px;
        top: 15%;
        left: 0;
        right: 0;
        margin: 0 auto;
    }

    .card-icon-plane {
        width: 110px;
    }

    .stamp-cherry {
        width: 120px;
        bottom: 18%;
        left: 0;
        right: 0;
        margin: 0 auto;
    }

    .scroll-pulse {
        font-family: var(--font-sans);
        font-size: 0.65rem !important;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.7) !important;
        margin-top: 2rem !important;
        animation: pulseOpacity 2s infinite ease-in-out;
    }

    @keyframes pulseOpacity {

        0%,
        100% {
            opacity: 0.3;
            transform: translateY(0);
        }

        50% {
            opacity: 1;
            transform: translateY(5px);
        }
    }

    .faq-grid,
    .hotels-grid,
    .things-grid {
        grid-template-columns: 1fr;
    }

    .travel-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .names {
        font-size: 2.2rem !important;
    }

    /* Removed redundant small !important override to allow section-specific styles */
}

@media (min-width: 701px) {
    .music-btn {
        right: calc(50vw - 350px + 1.5rem);
    }
}