:root {
    /* Paleta unificada — un solo fondo, sin bloques claros/oscuros */
    --paper: #f3efe4;
    --paper-dim: #f3efe4;
    /* alias: ya no se usa para alternar secciones */
    --ink: #4a4844;
    --ink-soft: #7a776f;
    --sage: #8c9b8e;
    --sage-deep: #6e7d70;
    --sage-pale: rgba(140, 155, 142, 0.14);
    --line: #d9d3c4;

    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 48px;
    --space-6: 64px;
    --space-7: 96px;
    --space-8: 144px;

    --font-script: "Alex Brush", cursive;
    --font-serif: "Cormorant Garamond", serif;
    --font-body: "Jost", sans-serif;
    --ease: cubic-bezier(0.25, 0.7, 0.35, 1);
}

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

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.65;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

:focus-visible {
    outline: 2px solid var(--sage-deep);
    outline-offset: 4px;
    border-radius: 2px;
}

.eyebrow {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--sage-deep);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--space-3);
    position: relative;
}

/* Textura de papel/lino uniforme sobre TODA la página, sin cortes por sección */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(
            circle at 1px 1px,
            rgba(74, 72, 68, 0.07) 1px,
            transparent 0
        ),
        repeating-linear-gradient(
            45deg,
            rgba(74, 72, 68, 0.025) 0px,
            rgba(74, 72, 68, 0.025) 1px,
            transparent 1px,
            transparent 3px
        );
    background-size:
        14px 14px,
        6px 6px;
    opacity: 0.6;
}

/* Viñeta muy sutil para dar profundidad sin crear "bloques" de color */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse at 50% 0%,
            rgba(255, 255, 255, 0.25),
            transparent 60%
        ),
        radial-gradient(
            ellipse at 50% 100%,
            rgba(74, 72, 68, 0.05),
            transparent 55%
        );
}

.corner {
    position: absolute;
    width: 150px;
    height: 150px;
    opacity: 0.9;
    pointer-events: none;
    z-index: 1;
}

.corner svg {
    width: 100%;
    height: 100%;
}

.corner-tl {
    top: 0;
    left: 0;
}

.corner-tr {
    top: 0;
    right: 0;
    transform: scaleX(-1);
}

.corner-bl {
    bottom: 0;
    left: 0;
    transform: scaleY(-1);
}

.corner-br {
    bottom: 0;
    right: 0;
    transform: scale(-1, -1);
}

@media (max-width: 640px) {
    .corner {
        width: 96px;
        height: 96px;
    }
}

.ribbon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 56px;
    background: var(--paper);
    border-top: 1.5px solid var(--sage);
    border-bottom: 1.5px solid var(--sage);
    min-width: 260px;
}

.ribbon::before,
.ribbon::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 26px;
    border-top: 1.5px solid var(--sage);
    border-bottom: 1.5px solid var(--sage);
}

.ribbon::before {
    left: -24px;
    clip-path: polygon(0 0, 100% 0, 70% 50%, 100% 100%, 0 100%);
}

.ribbon::after {
    right: -24px;
    clip-path: polygon(100% 0, 0 0, 30% 50%, 0 100%, 100% 100%);
}

.ribbon span {
    font-family: var(--font-script);
    font-size: 36px;
    color: var(--sage-deep);
    line-height: 1;
}

.heart-divider {
    display: flex;
    justify-content: center;
    margin: var(--space-3) auto;
    color: var(--sage);
}

.heart-divider svg {
    width: 150px;
    height: 24px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: var(--space-2) 0;
    background: rgba(243, 239, 228, 0);
    transition:
        background 0.4s var(--ease),
        border-color 0.4s var(--ease);
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: rgba(243, 239, 228, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-3);
}

.nav-mark {
    font-family: var(--font-script);
    font-size: 24px;
    color: var(--sage-deep);
}

.nav-links {
    display: flex;
    gap: var(--space-4);
}

.nav-links a {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-weight: 500;
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: var(--sage-deep);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left;
}

@media (max-width: 720px) {
    .nav-links {
        display: none;
    }
}

.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-6) var(--space-3);
    overflow: hidden;
}

.hero-inner {
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: fadeUp 1s 0.3s var(--ease) forwards;
}
.hero-tree {
    position: relative;
    width: min(540px, 90vw);
    aspect-ratio: 600 / 680;
    margin: 1rem auto 0;
}

@media (max-width:640px) {

    .hero {
        min-height: auto;
        justify-content: flex-start;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .hero-countdown {
        margin-top: 2rem;
        padding-top: 1rem;
    }

    .hero-tree {
        width: 90vw;
        margin-top: 0;
    }

}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

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

.hero .ribbon {
    margin-bottom: var(--space-5);
}

.hero-names {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(40px, 8vw, 72px);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink);
}

.hero-names .amp {
    font-family: var(--font-script);
    font-size: 0.65em;
    color: var(--sage);
    text-transform: none;
    padding: 0 8px;
}

.hero-quote {
    max-width: 480px;
    margin: var(--space-4) auto 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 19px;
    color: var(--ink-soft);
    line-height: 1.7;
}

.hero-countdown {
    margin: var(--space-6) auto 0;
    max-width: 440px;
    padding-top: var(--space-4);
    border-top: 1px solid var(--line);
}

@media (max-width:640px) {
    .hero-countdown {
        margin-top: 2rem;
        padding-top: 1rem;
    }
}

.scroll-cue {
    position: absolute;
    bottom: var(--space-3);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--ink-soft);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
}

.scroll-cue .line {
    width: 1px;
    height: 36px;
    background: var(--sage);
    animation: scrollPulse 1.8s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%,
    100% {
        opacity: 0.25;
    }

    50% {
        opacity: 1;
    }
}

section {
    position: relative;
    z-index: 1;
}

/* Todas las secciones comparten el mismo fondo; se separan con una línea fina, no con color */
section.section-pad {
    border-top: 1px solid var(--line);
}

section.hero + section.section-pad {
    border-top: none;
}

.section-pad {
    padding: var(--space-7) 0;
}

.section-head {
    text-align: center;
    max-width: 560px;
    margin: 0 auto var(--space-5);
}

.section-title {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-top: var(--space-2);
}

.section-title em {
    font-family: var(--font-script);
    font-style: normal;
    text-transform: none;
    color: var(--sage-deep);
    font-size: 1.3em;
}

.section-sub {
    margin-top: var(--space-2);
    color: var(--ink-soft);
    font-size: 16px;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.8s var(--ease),
        transform 0.8s var(--ease);
}

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

/* Variante: entrada con leve escala, para tarjetas (evento, ubicación, RSVP) */
.reveal-scale {
    transform: translateY(18px) scale(0.97);
}

.reveal-scale.is-visible {
    transform: translateY(0) scale(1);
}

/* Variante: itinerario — cada paso entra alternando de lado, en cascada al hacer scroll */
.reveal-side {
    transition:
        opacity 0.7s var(--ease),
        transform 0.7s var(--ease);
}

.reveal-side:nth-child(odd) {
    transform: translateX(-22px);
}

.reveal-side:nth-child(even) {
    transform: translateX(22px);
}

.reveal-side.is-visible {
    transform: translateX(0);
}

/* Línea que "crece" bajo el eyebrow de cada sección al aparecer */
.section-head {
    position: relative;
}

.section-head::after {
    content: "";
    display: block;
    margin: var(--space-2) auto 0;
    height: 1px;
    width: 0;
    background: var(--sage);
    transition: width 0.9s 0.15s var(--ease);
}

.section-head.is-visible::after {
    width: 64px;
}

/* Pequeño "pop" en el punto del itinerario al revelarse */
.tl-item.reveal-side .tl-dot {
    transition: transform 0.5s 0.2s var(--ease);
    transform: scale(0);
}

.tl-item.reveal-side.is-visible .tl-dot {
    transform: scale(1);
}

.countdown-wrap {
    background: transparent;
}

.countdown {
    display: flex;
    align-items: stretch;
    justify-content: center;
    max-width: 560px;
    margin: 0 auto;
}

.count-cell {
    flex: 1;
    text-align: center;
    padding: 0 var(--space-2);
    position: relative;
}

.count-cell + .count-cell::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: var(--line);
}

.count-num {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(34px, 6vw, 54px);
    font-variant-numeric: tabular-nums;
    color: var(--sage-deep);
}

.count-label {
    margin-top: var(--space-1);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 80px;
    gap: var(--space-2);
}

.g-item {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    grid-column: span 3;
    grid-row: span 4;
    border: 1px solid var(--line);
}

.g-item:nth-child(1) {
    grid-column: span 4;
    grid-row: span 5;
}

.g-item:nth-child(2) {
    grid-column: span 2;
    grid-row: span 3;
}

.g-item:nth-child(3) {
    grid-column: span 2;
    grid-row: span 3;
}

.g-item:nth-child(4) {
    grid-column: span 3;
    grid-row: span 4;
}

.g-item:nth-child(5) {
    grid-column: span 3;
    grid-row: span 4;
}

.g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
    filter: saturate(0.9);
}

.g-item:hover img {
    transform: scale(1.07);
}

@media (max-width: 720px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 140px;
    }

    .g-item,
    .g-item:nth-child(1),
    .g-item:nth-child(2),
    .g-item:nth-child(3),
    .g-item:nth-child(4),
    .g-item:nth-child(5) {
        grid-column: span 1;
        grid-row: span 2;
    }
}

.event-card {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    padding: var(--space-5) var(--space-4);
    border: 1px solid var(--line);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 1px 0 rgba(74, 72, 68, 0.04);
}

.event-date-big {
    font-family: var(--font-script);
    font-size: 56px;
    color: var(--sage-deep);
    line-height: 1;
}

.event-day {
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-top: var(--space-2);
}

.event-time {
    font-size: 15px;
    letter-spacing: 0.05em;
    margin-top: var(--space-1);
}

.event-place {
    margin-top: var(--space-4);
    font-size: 15px;
    line-height: 1.7;
}

.event-place strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.calendar-alt {
    display: block;
    margin-top: var(--space-2);
    font-size: 12px;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.calendar-alt:hover {
    color: var(--sage-deep);
}

.location-card {
    max-width: 820px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 2px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.28);
}

.map-frame {
    width: 100%;
    height: 320px;
    border: 0;
    filter: grayscale(0.4) contrast(1.05) sepia(0.08);
    display: block;
}

.location-info {
    padding: var(--space-4) var(--space-5);
    text-align: center;
}

.location-info p {
    margin-top: var(--space-1);
    color: var(--ink-soft);
    font-size: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 13px 34px;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 500;
    border: 1px solid var(--sage-deep);
    border-radius: 2px;
    color: var(--sage-deep);
    transition:
        background 0.35s var(--ease),
        color 0.35s var(--ease);
    margin-top: var(--space-3);
}

.btn:hover {
    background: var(--sage-deep);
    color: var(--paper);
}

.btn-solid {
    background: var(--sage-deep);
    color: var(--paper);
}

.btn-solid:hover {
    background: var(--ink);
    border-color: var(--ink);
}

.rsvp-card {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: var(--space-5);
    background: rgba(255, 255, 255, 0.28);
}

.rsvp-card p {
    color: var(--ink-soft);
    font-size: 14px;
    margin-bottom: var(--space-2);
}

.qr-box {
    width: 150px;
    height: 150px;
    margin: var(--space-3) auto;
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 8px;
    background: #fff;
}

.qr-box img {
    width: 100%;
    height: 100%;
}

.confirm-phone {
    margin-top: var(--space-3);
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 18px;
    color: var(--sage-deep);
}

.rsvp-deadline {
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-top: var(--space-3);
}

footer {
    text-align: center;
    padding: var(--space-6) 0 var(--space-4);
    border-top: 1px solid var(--line);
}

footer .nav-mark {
    font-size: 30px;
}

footer p {
    margin-top: var(--space-2);
    font-size: 12px;
    color: var(--ink-soft);
    letter-spacing: 0.05em;
}

.rsvp-card-title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 26px;
    text-align: center;
    margin-top: 8px;
    color: var(--ink);
}

.rsvp-card-sub {
    font-size: 14.5px;
    color: var(--ink);
    opacity: 0.8;
    text-align: center;
    margin-top: 8px;
    margin-bottom: 0;
}

.rsvp-main-btn {
    display: flex;
    width: 100%;
    justify-content: center;
}

.rsvp-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: var(--space-4) 0;
}

.rsvp-divider::before,
.rsvp-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.rsvp-divider span {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-weight: 600;
}

.rsvp-alt-label {
    font-size: 13.5px;
    color: var(--ink);
    opacity: 0.8;
    margin-bottom: var(--space-1);
}

.qr-box-link {
    transition:
        transform 0.25s var(--ease),
        box-shadow 0.25s var(--ease);
    cursor: pointer;
}

.qr-box-link:hover,
.qr-box-link:active {
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.rsvp-alt-hint {
    font-size: 12px;
    color: var(--ink-soft);
    margin-top: var(--space-2);
    margin-bottom: 10px;
}

.rsvp-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-color: #25d366;
    color: #128c4a;
}

.rsvp-whatsapp-btn:hover {
    background: #25d366;
    color: #fff;
    border-color: #25d366;
}

.rsvp-whatsapp-btn svg {
    stroke: currentColor;
}

/* Mostrar el texto correcto según dispositivo */
.only-mobile {
    display: none;
}

.only-desktop {
    display: inline;
}

@media (max-width: 640px) {
    .only-mobile {
        display: inline;
    }

    .only-desktop {
        display: none;
    }
}

.rsvp-qr {
    width: 160px;
    height: 160px;
    display: block;
    margin: 0 auto;
}

.qr-box {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
}

.dresscode-grid {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 2.5rem;
    max-width: 760px;
    margin: 0 auto;
}

.dresscode-card {
    flex: 1;
    text-align: center;
    padding: 1.5rem 1rem;
}

.dresscode-swatch {
    display: inline-block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    margin-bottom: 14px;
    border: 1px solid var(--sage);
}

.dresscode-swatch--blanco {
    background: #FFFFFF;
}

.dresscode-swatch--beige {
    background: #D8C7A8;
}

.dresscode-label {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 10px;
}

.dresscode-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
    opacity: .85;
}

.dresscode-divider {
    width: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.dresscode-divider svg {
    width: 100%;
    height: 100px;
}

.dresscode-thanks {
    text-align: center;
    margin-top: 2.5rem;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--ink);
    opacity: .85;
}

@media (max-width: 640px) {
    .dresscode-grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .dresscode-divider {
        display: none;
    }
}