*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --cream: #f5f3ee;
    --cream-dark: #ede9e0;
    --dark: #2a2a2a;
    --mid: #666;
    --accent: #8c7b6b;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background: var(--cream);
    color: var(--dark);
    overflow-x: hidden;
}

/* ── Navbar ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    background: var(--cream);
    box-shadow: 0 1px 12px rgba(0, 0, 0, .06);
    transition: padding .3s, background .3s;
}

nav.scrolled {
    padding: 12px 24px;
    background: rgba(245, 243, 238, .98);
}

nav.scrolled .nav-links {
    display: none;
}

nav.scrolled .burger {
    display: flex;
}

.nav-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    font-family: var(--serif);
    font-size: 2.2rem;
    font-weight: 500;
    letter-spacing: .12em;
    color: var(--dark);
    text-decoration: none;
    transition: color .3s;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-family: var(--sans);
    font-size: .85rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--dark);
    text-decoration: none;
    transition: color .2s;
}

.nav-links a:hover {
    color: var(--accent);
}

.burger {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: background .3s;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .burger {
        display: flex;
        top: 32px;
    }

    nav {
        justify-content: center;
        padding: 12px 24px;
    }

    .nav-logo {
        font-size: 1.8rem;
    }
}

/* ── Drawer ── */
.drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    pointer-events: none;
}

.drawer.open {
    pointer-events: all;
}

.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    opacity: 0;
    transition: opacity .35s;
}

.drawer.open .drawer-overlay {
    opacity: 1;
}

.drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 85vw);
    background: #fff;
    padding: 32px 40px;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
}

.drawer.open .drawer-panel {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.drawer-header span {
    font-family: var(--sans);
    font-size: .8rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--mid);
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--dark);
    line-height: 1;
}

.drawer-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-nav a {
    display: block;
    font-family: var(--sans);
    font-size: .75rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--dark);
    text-decoration: none;
    padding: 18px 0;
    border-bottom: 1px solid #eee;
    transition: color .2s;
}

.drawer-nav a:hover {
    color: var(--accent);
}

.drawer-nav a.active {
    border-bottom-color: var(--dark);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ── Pages ── */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* ── Hero ── */
#hero {
    position: relative;
    width: 100%;
    margin-top: 60px;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    transition: opacity 0.5s ease;
}

.hero-image-wrapper.hidden-hero {
    opacity: 0;
    pointer-events: none;
}

.hero-img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: cover;
    display: block;
}

.hero-img-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    padding: 0 20px;
    transition: opacity 0.5s ease;
}

.hero-img-overlay.hidden-hero {
    opacity: 0;
    pointer-events: none;
}

.hero-names {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 8vw, 6.5rem);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: .04em;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .45);
    white-space: nowrap;
    animation: fadeUp .9s ease both;
}

@media (max-width: 480px) {
    .hero-names {
        font-size: clamp(1.8rem, 6.5vw, 3rem);
    }
}

/* ── Hero Details ── */
#hero-details {
    position: relative;
    width: 100%;
    background: url('../img/201_home.png') center/cover no-repeat;
    padding: 80px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-date-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: fadeUp .9s .2s ease both;
}

.hero-pre {
    font-size: clamp(1.1rem, 3vw, 1.8rem);
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--dark);
    font-weight: 500;
}

.hero-date {
    font-family: var(--serif);
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 500;
    letter-spacing: .08em;
    color: var(--dark);
}

.hero-location {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--dark);
    font-weight: 500;
}

.hero-cta {
    margin-top: 48px;
    animation: fadeUp .9s .4s ease both;
}

.hero-cta .btn {
    font-size: clamp(.8rem, 2vw, 1.1rem);
    padding: 18px 48px;
    border-width: 2px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ── Buttons ── */
.btn {
    display: inline-block;
    font-family: var(--sans);
    font-size: .7rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-weight: 500;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .75);
    padding: 14px 32px;
    text-decoration: none;
    transition: background .25s, border-color .25s, color .25s;
    border-radius: 1px;
    cursor: pointer;
}

.btn:hover {
    background: #fff;
    color: var(--dark);
    border-color: #fff;
}

.btn.dark {
    color: var(--dark);
    border-color: var(--dark);
    background: transparent;
}

.btn.dark:hover {
    background: var(--dark);
    color: #fff;
}

/* ── Welcome ── */
.welcome-wrap {
    background: var(--cream);
    padding: 120px 24px;
    display: flex;
    justify-content: center;
}

.welcome {
    max-width: 800px;
    text-align: center;
}

.welcome h2 {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 300;
    margin-bottom: 40px;
    line-height: 1.2;
}

.welcome p {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    line-height: 1.9;
    color: var(--mid);
    margin-bottom: 24px;
    font-weight: 300;
}

.botanical-center {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

/* ── Photo Band ── */
.photo-band {
    width: 100%;
    height: 320px;
    background: url('../img/manos-anillos.jpg') center/cover no-repeat;
}

/* ── Confirma page ── */
#page-confirma {
    padding-top: 60px;
}

.confirma-wrap {
    background: var(--cream);
    padding: 60px 24px;
    display: flex;
    justify-content: center;
}

.confirma-inner {
    max-width: 640px;
    width: 100%;
    text-align: center;
}

.section-botanical {
    width: 140px;
    margin: 0 auto 28px;
    opacity: .55;
}

.confirma-inner h1 {
    font-family: var(--sans);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.confirma-inner .intro-text {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    line-height: 1.9;
    color: var(--mid);
    margin-bottom: 48px;
    font-weight: 300;
}

.hr-thin {
    border: none;
    border-top: 1px solid #d5cfc6;
    margin: 40px auto;
    width: 220px;
}

/* Payment card */
.payment-card {
    background: #fff;
    border: 1px solid #e2ddd6;
    border-radius: 4px;
    padding: 40px 32px;
    text-align: left;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.8;
}

.payment-card h3 {
    font-family: var(--sans);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}

.payment-subtitle {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    color: var(--mid);
    margin-bottom: 20px;
}

.iban {
    font-weight: 600;
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    color: var(--dark);
    margin: 16px 0;
    letter-spacing: .05em;
}

.prices-qr {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.price-table {
    flex: 1;
}

.price-table strong {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: underline;
    display: block;
    margin-bottom: 12px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--mid);
    padding: 4px 0;
    max-width: 200px;
}

.qr-box {
    width: 150px;
    height: 150px;
    border: 1px solid #ddd;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.qr-box img {
    width: 100%;
    height: 100%;
    display: block;
}

.payment-note {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    color: var(--mid);
    line-height: 1.7;
    margin-top: 20px;
}

/* RSVP Form */
.rsvp-form {
    margin-top: 48px;
    text-align: left;
}

.rsvp-form h3 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 28px;
    text-align: center;
}

.form-submit {
    text-align: center;
    margin-top: 32px;
}

.btn-submit {
    background: var(--dark);
    color: #fff;
    border: none;
    font-family: var(--sans);
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-weight: 500;
    padding: 16px 48px;
    cursor: pointer;
    transition: background .2s;
    border-radius: 2px;
}

.btn-submit:hover {
    background: var(--accent);
}

/* ── Footer ── */
footer {
    background: var(--cream);
    border-top: 1px solid #d5cfc6;
    padding: 48px 24px 32px;
    text-align: center;
}

.footer-names {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 6px;
}

.footer-date {
    font-size: .75rem;
    color: var(--mid);
    letter-spacing: .1em;
    margin-bottom: 32px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.footer-links a {
    font-size: .78rem;
    color: var(--mid);
    text-decoration: none;
    transition: color .2s;
    cursor: pointer;
}

.footer-links a:hover {
    color: var(--dark);
}

.footer-credit {
    font-size: .7rem;
    color: #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.footer-credit svg {
    width: 14px;
    fill: #e91e63;
}

/* ── Fade-in ── */
.fade-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .6s ease, transform .6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: none;
}

/* ── Floating Heart ── */
.floating-heart {
    position: fixed;
    bottom: 32px;
    left: 32px;
    width: 120px;
    height: 120px;
    background-image: url('../img/bg_j_m.jpg');
    background-size: cover;
    background-position: center;
    clip-path: path('M60 30C60 30 40 -10 10 16C-20 42 30 84 60 110C90 84 140 42 110 16C80 -10 60 30 60 30Z');
    z-index: 90;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    animation: heartbeat 2s infinite ease-in-out;
}

.floating-heart.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    10% {
        transform: scale(1.15);
    }

    20% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.15);
    }

    40% {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .floating-heart {
        bottom: 24px;
        left: 24px;
        width: 100px;
        height: 100px;
        clip-path: path('M50 25C50 25 33.2 -8.2 8.2 13.2C-16.6 35 25 70 50 91.6C75 70 116.6 35 91.6 13.2C66.6 -8.2 50 25 50 25Z');
    }
}