:root {
    --bg:        #F8F4EC;
    --bg-deep:   #EDE6D6;
    --forest:    #3A4A38;
    --olive:     #4a5c3f;
    --sage:      #8a9a7a;
    --gold:      #9caa8a;
    --text:      #1e2a1c;
    --text-sec:  #6b7a62;
    --line:      rgba(156,170,138,0.32);

    --section-spacing: 64px;
    --container-max:   860px;
    --pad:             28px;

    --T:  'Cormorant Garamond', serif;
    --SC: 'Cormorant SC', serif;

    --paper-bg:
        radial-gradient(ellipse at 12% 10%, rgba(196,168,130,.14) 0%, transparent 50%),
        radial-gradient(ellipse at 88% 90%, rgba(58,74,56,.09) 0%, transparent 46%),
        radial-gradient(ellipse at 50% 50%, #FAF7F0 0%, #EDE6D6 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    background-image: var(--paper-bg);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--T);
    font-size: 18px;
    line-height: 1.65;
    overflow-x: hidden;
}

/* ─── Reveal animation ─────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 800ms ease, transform 900ms cubic-bezier(.2,.8,.2,1);
    transition-delay: var(--d, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ─── Typography ───────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: var(--SC);
    font-weight: 300;
    color: var(--forest);
    letter-spacing: .1em;
}
h2 {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: .28em;
}
h3 {
    font-size: .95rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: .35rem;
    color: var(--olive);
}
p  { margin-bottom: .9rem; color: var(--text-sec); font-family: var(--T); }
a  { color: var(--text); text-decoration: none; transition: color .3s; }
a:hover { color: var(--olive); }

/* ─── Layout ───────────────────────────────────────── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--pad);
    position: relative;
    z-index: 1;
}
section { margin-bottom: var(--section-spacing); }

/* ─── Button ───────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 9px 24px;
    border: 1px solid var(--gold);
    background: transparent;
    color: var(--olive);
    font-family: var(--SC);
    font-size: .75rem;
    letter-spacing: .18em;
    font-weight: 300;
    cursor: pointer;
    transition: background .3s, color .3s, border-color .3s;
}
.btn:hover { background: var(--olive); color: white; border-color: var(--olive); }
.btn:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

/* ─── Card ─────────────────────────────────────────── */
.card {
    background: rgba(250,247,240,0.72);
    border: 1px solid var(--line);
    padding: 2rem;
    position: relative;
    backdrop-filter: blur(2px);
}
.card::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(156,170,138,.17);
    pointer-events: none;
}
/* Corner bracket nubs */
.card .ck {
    position: absolute;
    width: 16px; height: 16px;
    border-color: var(--sage);
    border-style: solid;
    opacity: .38;
}
.card .ck.tl { top: 0; left: 0; border-width: 1px 0 0 1px; }
.card .ck.tr { top: 0; right: 0; border-width: 1px 1px 0 0; }
.card .ck.bl { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.card .ck.br { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

/* ─── Hero ─────────────────────────────────────────── */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem 2.5rem;
}
.hero-inner {
    position: relative;
    text-align: center;
    padding: 3.6rem 3.2rem;
    max-width: 520px;
    width: 100%;
}
.hero-logo {
    width: 108px; height: 108px;
    object-fit: contain;
    margin: 0 auto 1.4rem;
    display: block;
    opacity: .92;
}
.hero-names {
    font-family: var(--T);
    font-size: clamp(2rem, 5vw, 2.9rem);
    font-weight: 300;
    font-style: italic;
    color: var(--forest);
    letter-spacing: .03em;
    margin-bottom: .25rem;
}
.hero-date {
    font-family: var(--SC);
    font-size: .82rem;
    letter-spacing: .26em;
    color: var(--sage);
    font-weight: 300;
    margin-bottom: 1.1rem;
    display: block;
}
.hero-orn {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin: .7rem 0 1rem;
    opacity: .6;
}
.hero-orn-line { width: 34px; height: 1px; background: var(--gold); }
.hero-quote {
    font-family: var(--T);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-sec);
    margin-bottom: 1.8rem;
    line-height: 1.5;
    font-weight: 300;
}
.hero-ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ─── Separator ────────────────────────────────────── */
.separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 2.5rem 0;
    opacity: .55;
}
.sep-line-l { flex: 1; max-width: 120px; height: 1px; background: linear-gradient(to right, transparent, var(--gold)); }
.sep-line-r { flex: 1; max-width: 120px; height: 1px; background: linear-gradient(to left, transparent, var(--gold)); }

/* ─── Details grid ─────────────────────────────────── */
.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}
.detail-card { text-align: center; padding: 1.8rem 1rem; }
.detail-icon {
    display: block;
    margin: 0 auto 1rem;
    width: 30px; height: 30px;
    color: var(--gold);
    opacity: .75;
}
.detail-card p { font-size: .95rem; color: var(--text-sec); margin: 0; line-height: 1.5; }

/* ─── Timeline ─────────────────────────────────────── */
.timeline { max-width: 680px; margin: 0 auto; }
.timeline-intro,
.timeline-note {
    text-align: center;
    max-width: 560px;
    margin-left: auto; margin-right: auto;
    font-size: .95rem;
    color: var(--text-sec);
}
.timeline-intro { margin-bottom: 1rem; }
.timeline-note { margin-top: 1rem; font-style: italic; }
.timeline-item {
    display: flex;
    gap: 1.2rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid rgba(156,170,138,.22);
    align-items: baseline;
}
.timeline-item:last-of-type { border-bottom: none; }
.timeline-dot {
    width: 5px; height: 5px;
    background: var(--gold);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: .65rem;
    opacity: .8;
}
.timeline-time {
    font-family: var(--SC);
    color: var(--sage);
    width: 52px;
    flex-shrink: 0;
    font-size: .82rem;
    letter-spacing: .05em;
    font-weight: 300;
}
.timeline-content h4 {
    font-family: var(--SC);
    font-size: .86rem;
    letter-spacing: .1em;
    color: var(--forest);
    font-weight: 300;
    margin-bottom: .15rem;
    text-transform: uppercase;
}
.timeline-content p { font-size: .92rem; color: var(--text-sec); margin: 0; }

/* ─── Location ─────────────────────────────────────── */
.location-content { text-align: center; margin-bottom: 1.8rem; }
.location-content h3 { color: var(--forest); margin-bottom: .4rem; }
.location-content p { margin: 0 0 .3rem; }
.location-content .btn { margin-top: 1rem; }
.map-container {
    height: 280px; width: 100%;
    border: 1px solid var(--line);
    overflow: hidden;
}
.map-container iframe { width: 100%; height: 100%; border: 0; }

/* ─── Gallery ──────────────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .9rem;
}
.gallery-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border: 1px solid var(--line);
    position: relative;
}
/* <a> de GLightbox ocupa todo el contenedor */
.gallery-item a {
    position: absolute;
    inset: 0;
    display: block;
    cursor: zoom-in;
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2,.7,.2,1);
    filter: sepia(6%) brightness(.98);
    display: block;
}
.gallery-item:hover img { transform: scale(1.04); }

/* ─── RSVP ─────────────────────────────────────────── */
.rsvp-section { text-align: center; max-width: 580px; margin: 0 auto; }
.rsvp-deadline {
    font-size: 1rem;
    color: var(--forest);
    margin-bottom: 2rem;
    font-style: italic;
    opacity: .85;
}
.rsvp-buttons { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }

/* ─── Footer ───────────────────────────────────────── */
footer {
    text-align: center;
    padding: 3rem 0 4rem;
    border-top: 1px solid var(--line);
    margin-top: 2rem;
}
footer p {
    font-family: var(--SC);
    font-size: .85rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--sage);
    margin: 0 0 .4rem;
}
footer .footer-names {
    font-family: var(--T);
    font-size: 1.9rem;
    font-weight: 300;
    font-style: italic;
    color: var(--forest);
    display: block;
    margin-top: .3rem;
}

/* ─── Countdown ────────────────────────────────────── */
.hero-countdown {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    margin: 1.1rem 0 1.5rem;
}
.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
}
.countdown-num {
    font-family: var(--SC);
    font-size: 1.75rem;
    font-weight: 300;
    color: var(--forest);
    letter-spacing: .04em;
    line-height: 1;
    min-width: 2ch;
    text-align: center;
}
.countdown-label {
    font-family: var(--SC);
    font-size: .58rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--sage);
    font-weight: 300;
}
.countdown-sep {
    color: var(--gold);
    opacity: .55;
    font-size: 1.1rem;
    padding-bottom: 1.1rem;
    line-height: 1;
    user-select: none;
}
.countdown-done {
    font-family: var(--SC);
    font-size: .82rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--sage);
    margin: 1.1rem 0 1.5rem;
}

/* ─── Responsive ───────────────────────────────────── */
@media (max-width: 820px) {
    body { background-attachment: scroll; }
    .hero { min-height: 50vh; }
    .hero-inner { padding: 2rem 1.4rem; }
    .details-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .hero-inner { padding: 1.8rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
}
