:root {
    --accent: #8C1C20;
    --accent-deep: #6e1419;
    --ink: #1a1614;
    --cream: #f9f6f1;
    --muted: #8a8076;
    --paper-white: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: 'Baskerville', sans-serif;
    color: var(--ink);
    background-color: var(--paper-white);
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent);
    color: #fff;
}

img {
    max-width: 100%;
}

a {
    text-decoration: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

@keyframes floaty {

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

    50% {
        transform: translateY(-9px);
    }
}

@keyframes scrolldot {
    0% {
        opacity: 0;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
    }

    80%,
    100% {
        opacity: 0;
        transform: translateY(14px);
    }
}

@keyframes sheen {
    0% {
        background-position: -120% 0;
    }

    100% {
        background-position: 220% 0;
    }
}


@font-face {
    font-family: 'Baskerville';
    src: url('../fonts/Baskerville.ttc') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'BigCaslon';
    src: url('../fonts/BigCaslon.ttf') format('truetype');
    font-display: swap;
}


.historia-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding: 1rem 0;
    scrollbar-width: none;
}

.historia-slider::-webkit-scrollbar {
    display: none;
}

.historia-item {
    flex: 0 0 100%;
    scroll-snap-align: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .historia-item {
        flex: 0 0 calc(20% - 1.2rem);
    }
}

.historia-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

/* Extracted Inline Styles */
.navbar-glass {
    background: rgba(244, 239, 230, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(33, 28, 26, .1);
    padding: .6rem 0;
}

.nav-brand {
    font-family: 'BigCaslon', serif;
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: .16em;
    color: var(--ink);
}

.nav-brand-amp {
    color: var(--accent);
    font-family: 'Pinyon Script', cursive;
    font-weight: 400;
}

.nav-list {
    gap: .2rem;
}

.nav-link-item {
    font-size: 1rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink);
    padding: .5rem .85rem;
}

.nav-cta-link {
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent);
    padding: .5rem 1.15rem;
    border-radius: 2px;
}

.hero-section {
    scroll-margin-top: 84px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
    padding: 80px 1rem 6rem;
}

@media (min-width: 768px) {
    .hero-section {
        min-height: 100svh;
        padding: 100px 1rem 8rem;
    }
}

.hero-bg-deco {
    position: absolute;
    top: 40%;
    left: 60%;
    transform: translate(-50%, -50%);
    width: 70%;
    max-width: 650px;
    height: auto;
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
}

.hero-frame-wrapper {
    position: relative;
    width: 90%;
    max-width: 640px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.hero-photo-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    z-index: 1;
}

.hero-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-floral-frame {
    width: 100%;
    height: auto;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.hero-name-band {
    position: absolute;
    bottom: 28%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background-color: #8C1C20;
    padding: 1.4rem 0;
    text-align: center;
    z-index: 3;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.hero-name-title {
    font-family: 'BigCaslon', serif;
    font-size: clamp(2.8rem, 6.5vw, 5rem);
    color: #fff;
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.story-section {
    scroll-margin-top: 84px;
    padding: 5rem 0;
    position: relative;
    background: #ffffff url('../fotos/fondo_01.webp') center/cover no-repeat;
}

@media (min-width: 768px) {
    .story-section {
        padding: 7rem 0;
    }
}

.story-inner {
    position: relative;
    z-index: 2;
}

.story-heading {
    font-family: 'BigCaslon', serif;
    font-size: clamp(4.5rem, 13vw, 9.5rem);
    font-weight: 400;
    color: #fae4dd;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2rem;
    line-height: 0.95;
}

.story-text-wrap {
    margin-top: 3rem;
    padding: 0 1rem;
}

.story-text {
    font-family: 'BigCaslon', serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 400;
    color: var(--ink);
    line-height: 1.5;
    margin: 0;
}

.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    padding: 0;
}

.gallery-modal-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.countdown-section {
    background: #ffffff;
    padding: 3.5rem 0;
    position: relative;
    overflow: hidden;
}

.countdown-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.5rem, 3vw, 3rem);
}

.countdown-floral {
    width: clamp(60px, 20vw, 210px);
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.countdown-center {
    flex: 0 1 auto;
    text-align: center;
}

.countdown-label {
    font-family: 'BigCaslon', serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 3vw, 1.8rem);
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.countdown-timer {
    font-family: 'BigCaslon', serif;
    font-weight: 400;
    font-size: clamp(2.6rem, 8vw, 6rem);
    line-height: 1;
    color: #8C1C20;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.music-section {
    padding: 5rem 0;
    overflow: hidden;
    background-color: #f9f6f1;
    background-image: url('../img/paper.jpg');
    background-size: 520px auto;
    background-repeat: repeat;
}

@media (min-width: 768px) {
    .music-section {
        padding: 7rem 0;
    }
}

.music-text-col {
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .music-text-col {
        padding-left: 3rem;
        padding-right: 1rem;
    }
}

.music-heading {
    font-family: 'BigCaslon', serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: var(--ink);
    margin-bottom: 2.5rem;
}

.music-controls {
    gap: 1.5rem;
}

.music-play-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: #8C1C20;
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(140, 28, 32, 0.3);
    transition: transform 0.2s;
}

.music-photo {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.venue-section {
    scroll-margin-top: 84px;
    padding: 5rem 0;
    background-color: #ffffff;
}

@media (min-width: 768px) {
    .venue-section {
        padding: 7rem 0;
    }
}

.venue-address-card {
    background-color: #8C1C20;
    padding: 3rem 2rem;
    text-align: center;
    color: #fff;
    border-radius: 4px;
}

@media (min-width: 768px) {
    .venue-address-card {
        padding: 4rem 3rem;
    }
}

.venue-icon {
    width: 100px;
    height: auto;
    margin-bottom: 1.5rem;
}

.venue-name {
    font-family: 'BigCaslon', serif;
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.venue-address-text {
    font-family: 'BigCaslon', serif;
    font-size: 1.4rem;
    line-height: 1.3;
    margin: 0;
}

.venue-date {
    font-family: 'BigCaslon', serif;
    font-weight: 700;
    font-size: 2.2rem;
    color: #8C1C20;
    margin-bottom: 0.2rem;
    letter-spacing: 0.05em;
}

.venue-date-sep {
    font-weight: 300;
    margin: 0 0.5rem;
}

.venue-time {
    font-family: 'BigCaslon', serif;
    font-weight: 700;
    font-size: 2.2rem;
    color: #8C1C20;
    margin-bottom: 3.5rem;
    letter-spacing: 0.05em;
}

.venue-btn-wrap {
    position: relative;
    display: inline-block;
}

.venue-btn-deco {
    position: absolute;
    left: -100px;
    bottom: -25px;
    width: 140px;
    height: auto;
    z-index: 3;
    pointer-events: none;
}

.venue-map-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'BigCaslon', serif;
    font-size: 1.4rem;
    color: #fff;
    background-color: #8C1C20;
    padding: 1rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(140, 28, 32, 0.3);
    transition: transform 0.2s;
}

.dresscode-section {
    scroll-margin-top: 84px;
    background: #ffffff url('../fotos/fondo_01.webp') center/cover no-repeat;
    padding: 5rem 0;
}

@media (min-width: 768px) {
    .dresscode-section {
        padding: 7rem 0;
    }
}

/* Foto del dress code con borde recortado (efecto rasgado del mockup) */
.dresscode-couple-img {
    width: 100%;
    max-width: 420px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.15));
}

.dresscode-heading {
    font-family: 'BigCaslon', serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 5.5vw, 4rem);
    color: #8C1C20;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dresscode-subtitle {
    font-family: 'BigCaslon', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 2.5rem;
}

.dresscode-illustration {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: contain;
}

.photos-section {
    scroll-margin-top: 84px;
    background: #f9f6f1 url('../img/paper.jpg') center/520px auto repeat;
    padding: 5rem 0;
}

@media (min-width: 768px) {
    .photos-section {
        padding: 7rem 0;
    }
}

.photos-heading {
    font-family: 'BigCaslon', serif;
    font-weight: 400;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    color: var(--ink);
    margin-bottom: 2.5rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.photos-upload-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

.photos-upload-deco {
    position: absolute;
    left: -80px;
    top: -10px;
    width: 130px;
    height: auto;
    z-index: 3;
    pointer-events: none;
}

.photos-file-input {
    display: none;
}

.photos-upload-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'BigCaslon', serif;
    font-size: 1.4rem;
    color: #fff;
    background-color: #8C1C20;
    border: none;
    padding: 0.9rem 3rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(140, 28, 32, 0.3);
    transition: transform 0.2s;
}

.photos-status-msg {
    font-family: 'Baskerville', sans-serif;
    font-size: .9rem;
    color: #8C1C20;
    margin-top: 1rem;
    position: absolute;
    width: 100%;
    left: 0;
}

.photos-placeholder-sq {
    background-color: #222;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 2px;
}

.photos-placeholder-wide {
    background-color: #222;
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 2px;
}

.gift-section {
    background: #ffffff;
    padding: 5rem 0;
}

@media (min-width: 768px) {
    .gift-section {
        padding: 7rem 0;
    }
}

.gift-card {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.gift-card-left {
    background-color: #8C1C20;
    padding: 3.5rem 2rem;
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media (min-width: 768px) {
    .gift-card-left {
        padding: 4.5rem 3.5rem;
    }
}

.gift-card-icon {
    width: 90px;
    height: auto;
    margin-bottom: 1.5rem;
}

.gift-card-text {
    font-family: 'BigCaslon', serif;
    font-size: 1.6rem;
    line-height: 1.4;
    margin: 0;
    font-weight: 400;
}

.gift-card-right {
    background-color: #ffffff;
    padding: 2.5rem 1.5rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 768px) {
    .gift-card-right {
        padding: 3rem 2.5rem;
    }
}

.gift-account-img {
    width: 100%;
    max-width: 450px;
    height: auto;
    cursor: pointer;
    transition: transform 0.2s;
}

.rsvp-section {
    scroll-margin-top: 84px;
    background-color: #f5f2ec;
    background-image: url('../img/recurso_23.webp');
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: 100% auto;
    padding: 5rem 0 28rem;
}

@media (min-width: 768px) {
    .rsvp-section {
        padding: 7rem 0 32rem;
    }
}

@media (min-width: 1200px) {
    .rsvp-section {
        padding: 7rem 0 36rem;
    }
}

.rsvp-header {
    margin-bottom: 3rem;
    padding: 0 0.5rem;
}

.rsvp-eyebrow {
    font-family: 'Baskerville', sans-serif;
    font-size: .76rem;
    letter-spacing: .34em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    display: none; /* El mockup no muestra este eyebrow encima del heading */
}

/* El heading del RSVP en el mockup es sans-serif, muy bold y grande */
.rsvp-heading {
    font-family: 'Arial Black', 'Helvetica Neue', sans-serif;
    font-weight: 900;
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 0;
    line-height: 1;
}

.rsvp-label {
    font-family: 'Baskerville', sans-serif;
    font-size: 1.1rem;
    color: var(--ink);
    display: block;
    margin-bottom: .5rem;
}

.rsvp-input {
    width: 100%;
    font-family: 'Baskerville', sans-serif;
    font-size: 1.3rem;
    color: var(--ink);
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(33, 28, 26, .28);
    padding: .6rem .1rem;
    outline: none;
}

.rsvp-form-footer {
    gap: 1.4rem;
    margin-top: 2.4rem;
}

.rsvp-privacy-note {
    font-family: 'Baskerville', sans-serif;
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
    max-width: 24rem;
    margin: 0;
}

.rsvp-submit-btn {
    flex: 0 0 auto;
    font-family: 'Baskerville', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #fff;
    background: #1a1614;
    border: none;
    padding: 1rem 2.4rem;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.rsvp-success-wrap {
    display: none;
    text-align: center;
    padding: 1rem 0;
}

.rsvp-success-icon {
    font-family: 'Pinyon Script', cursive;
    font-size: 3.4rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: .8rem;
}

.rsvp-success-msg {
    font-family: 'BigCaslon', serif;
    font-size: 1.5rem;
    color: var(--ink);
    margin: 0;
}

.site-footer {
    background: var(--ink);
    color: #cfc6bb;
    padding: 3.5rem 1rem;
    text-align: center;
}

.footer-tagline {
    font-family: 'BigCaslon', serif;
    font-size: 1.6rem;
    color: #f4efe6;
    margin-bottom: 0.5rem;
}

.footer-link {
    font-family: 'Baskerville', sans-serif;
    font-size: 1.1rem;
    letter-spacing: .1em;
    color: #8C1C20;
    text-decoration: none;
    font-weight: 500;
}

.rsvp-submit-btn:hover {
    background: #8C1C20 !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(140, 28, 32, 0.3);
}

/* Premium Animations */
@keyframes floatAnimation {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-12px) rotate(1.5deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 4px 15px rgba(140, 28, 32, 0.3), 0 0 0 0 rgba(140, 28, 32, 0.4);
    }

    70% {
        box-shadow: 0 4px 15px rgba(140, 28, 32, 0.3), 0 0 0 15px rgba(140, 28, 32, 0);
    }

    100% {
        box-shadow: 0 4px 15px rgba(140, 28, 32, 0.3), 0 0 0 0 rgba(140, 28, 32, 0);
    }
}

@keyframes slowPan {
    0% {
        background-position: center top;
    }

    50% {
        background-position: center bottom;
    }

    100% {
        background-position: center top;
    }
}

/* Add floating to images that are absolutely positioned decorations */
img[src*="recurso_17"],
img[src*="recurso_18"],
img[src*="recurso_15"],
img[src*="recurso_16"] {
    animation: floatAnimation 7s ease-in-out infinite;
}

/* Pulsing buttons */
a[href*="maps"],
button#photo-btn,
img[src*="recurso_20"] {
    animation: pulseGlow 2.5s infinite;
}

a[href*="maps"]:hover,
button#photo-btn:hover {
    transform: scale(1.05) translateY(-3px) !important;
}

/* Parallax effect enhancement for intersection observer */
[data-reveal] {
    transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1), transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

img {
    max-width: 100%;
    height: auto;
}

/* =============================================
   INTRO: SOBRE ANIMADO
   ============================================= */

#intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    overflow: hidden;
    pointer-events: all;
}

/* Mitad superior e inferior del sobre */
#intro-top,
#intro-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    overflow: hidden;
    transition: transform 0.85s cubic-bezier(0.76, 0, 0.24, 1);
}

#intro-top {
    top: 0;
}

#intro-bottom {
    bottom: 0;
}

/* Textura de papel en cada mitad */
#intro-top-inner,
#intro-bottom-inner {
    position: absolute;
    left: 0;
    width: 100%;
    height: 200%;
    /* doble alto para que la textura cubra al abrir */
    background: url('../img/paper.jpg') repeat;
    background-size: 420px auto;
}

#intro-top-inner {
    top: 0;
}

#intro-bottom-inner {
    bottom: 0;
}

/* Borde tenue entre mitades */
#intro-top::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    right: 5%;
    height: 1px;
    background: rgba(140, 28, 32, 0.25);
}

/* Sello centrado */
#intro-seal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#intro-seal-img {
    width: clamp(150px, 28vw, 240px);
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 18px rgba(140, 28, 32, 0.35));
    animation: sealPulse 2.2s ease-in-out infinite;
}

#intro-hint {
    font-family: 'Baskerville', sans-serif;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #8C1C20;
    margin-top: 1rem;
    opacity: 0.8;
    animation: hintBlink 2.2s ease-in-out infinite;
}

/* El sello desaparece al tocar */
#intro-overlay.is-opening #intro-seal {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
    pointer-events: none;
}

/* Las cortinas se abren */
#intro-overlay.is-opening #intro-top {
    transform: translateY(-100%);
}

#intro-overlay.is-opening #intro-bottom {
    transform: translateY(100%);
}

/* Cuando ya terminó, sacar el overlay del flujo */
#intro-overlay.is-done {
    display: none;
}

@keyframes sealPulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 4px 18px rgba(140, 28, 32, 0.35));
    }

    50% {
        transform: scale(1.06);
        filter: drop-shadow(0 6px 26px rgba(140, 28, 32, 0.55));
    }
}

@keyframes hintBlink {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.3;
    }
}

/* Cursor de mano sobre todo el overlay */
#intro-overlay {
    cursor: pointer;
}