@font-face {
    font-family: Cormorant;
    src: url('/assets/cormorant-italic.woff2') format('woff2');
    font-style: italic;
    font-weight: 500;
    font-display: swap;
}

:root {
    color-scheme: light;
    --ink: #203326;
    --green: #273d2b;
    --forest: #1b3023;
    --paper: #faf5e9;
    --page: #f6f0e4;
    --gold: #a78349;
    --soft-gold: #b39a70;
    --muted: #515e51;
    --display: Cormorant, 'Palatino Linotype', Georgia, serif;
    font-family: Georgia, Cambria, 'Times New Roman', serif;
    font-size: 16px;
    color: var(--ink);
    background: var(--page);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #a07940; outline-offset: 4px; }
main:focus, [tabindex='-1']:focus { outline: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.forest {
    isolation: isolate;
    background: radial-gradient(ellipse at 42% 22%, #39503b 0%, #213728 48%, #16291e 100%);
    position: relative;
}
.forest::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .22;
    pointer-events: none;
    background: url('/assets/papel.webp') repeat;
    mix-blend-mode: soft-light;
}
.cover {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(38px, 7vw, 100px) clamp(21px, 6vw, 80px);
}
body.invitation-open .cover { min-height: auto; padding-block: clamp(28px, 5vw, 72px); }

.paper {
    isolation: isolate;
    position: relative;
    width: min(100%, 910px);
    background: radial-gradient(ellipse at 48% 43%, #fcf8ed, #f5edde);
    box-shadow: 0 20px 55px #10231885, 0 1px 2px #1023188c;
}
.paper::before, .paper::after {
    content: '';
    position: absolute;
    pointer-events: none;
    border: 1px solid var(--gold);
    inset: 11px;
    z-index: -1;
    background: url('/assets/papel.webp') repeat;
    background-blend-mode: multiply;
}
.paper::after { inset: 16px; background: none; border-color: var(--soft-gold); }
.invitation { padding: clamp(60px, 9vw, 116px) clamp(25px, 7vw, 96px); }
body.invitation-open .invitation { padding-block: clamp(42px, 5.7vw, 70px); }
.invitation-content { position: relative; z-index: 2; display: grid; justify-items: center; text-align: center; }
.botanical { position: absolute; z-index: 1; aspect-ratio: 1; height: auto; object-fit: contain; pointer-events: none; }
.botanical--small { width: clamp(95px, 18%, 169px); left: -1%; top: -1%; transform: rotate(171deg) scaleX(-1); }
.botanical--large { width: clamp(155px, 43%, 382px); right: -5%; bottom: -10%; }

.monogram { display: block; position: relative; width: clamp(74px, 13vw, 118px); margin-bottom: clamp(10px, 1.5vw, 22px); }
.monogram svg { width: 100%; height: auto; display: block; }
.monogram > span { position: absolute; inset: 0; display: grid; place-content: center; font: italic 500 clamp(36px, 6vw, 57px)/1 var(--display); }
.monogram i { display: inline-block; position: relative; left: -.17em; top: .1em; }
.monogram i + i { margin-top: -.55em; left: .18em; top: .02em; }
h1, h2, h3 { font-family: var(--display); font-style: italic; font-weight: 500; text-wrap: balance; }
h1 { font-size: clamp(48px, 8.4vw, 118px); letter-spacing: -.037em; line-height: .96; margin: 0 0 clamp(23px, 3vw, 37px); }
h1 span { white-space: nowrap; }
.invitation-date { font-size: clamp(16px, 2.15vw, 23px); margin: -8px 0 25px; }
.invitation-date:last-child { margin-bottom: 0; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 48px;
    padding: .64em 1.55em .72em;
    background: var(--green);
    color: #fffaf0;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: clamp(17px, 2.25vw, 24px);
    line-height: 1.1;
    text-decoration: none;
    transition: background .18s ease, box-shadow .18s ease;
}
.button:hover { background: #172c1f; box-shadow: 0 4px 12px #26372732; }
.button:disabled { opacity: .67; cursor: wait; }

.section-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    min-height: 68px;
    padding: 5px 16px;
    background: var(--paper);
    border-bottom: 1px solid #c8b38c83;
    font-size: clamp(14px, 2.5vw, 17px);
}
.section-nav a { text-underline-offset: .25em; text-decoration-color: transparent; padding: 11px clamp(12px, 3.6vw, 30px); position: relative; }
.section-nav a:hover { text-decoration-color: var(--gold); }
.section-nav a + a::before { content: ''; position: absolute; width: 4px; height: 4px; left: -2px; top: calc(50% - 2px); border-radius: 100%; background: var(--gold); }
.section { width: min(1160px, 100%); margin-inline: auto; padding: clamp(47px, 6vw, 92px) clamp(23px, 7vw, 92px); }
.ruled-heading { display: flex; align-items: center; justify-content: center; gap: clamp(13px, 3.5vw, 33px); text-align: center; }
h2 { font-size: clamp(43px, 6.65vw, 75px); line-height: 1; letter-spacing: -.026em; margin: 0 0 38px; }
.ruled-heading::before, .ruled-heading::after { content: ''; background: var(--gold); height: 1px; width: min(21%, 220px); align-self: center; flex: 0 1 21%; }
.dedication { max-width: 560px; margin: -16px auto 36px; text-align: center; font-size: 1.1rem; line-height: 1.65; }
.venues { width: min(100%, 830px); display: grid; grid-template-columns: 1fr 1fr; margin-inline: auto; }
.venue { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: clamp(13px, 3vw, 28px); padding: 4px clamp(20px, 5vw, 63px); }
.venue + .venue { border-left: 1px solid #c2a981; }
.venue-icon { margin-top: 5px; }
.venue h3 { font-size: clamp(31px, 5vw, 46px); line-height: 1; margin: 0 0 10px; }
.venue p { margin: 3px 0; font-size: clamp(16px, 2.35vw, 18px); line-height: 1.48; }
.venue p.venue-name { margin-top: 7px; }
.venue-address { color: var(--muted); }
.text-link { display: inline-block; margin-top: 9px; text-underline-offset: .26em; text-decoration-thickness: 1px; text-decoration-color: var(--gold); }
.details { display: grid; gap: 14px; text-align: center; margin: 34px 0 0; }
.details dt { font-weight: bold; }
.details dd { margin: 5px 0 0; line-height: 1.5; }

.gallery { padding-top: clamp(6px, 1.7vw, 22px); }
.gallery-frame { position: relative; }
.gallery-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 32px) / 3);
    gap: 16px;
    margin: 0;
    padding: 3px;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-color: #8e9b89 #e9e0cf;
    scrollbar-width: thin;
}
.gallery-track li { scroll-snap-align: start; }
.gallery-track figure { margin: 0 0 6px; border: 1px solid var(--gold); padding: 5px; background: var(--paper); }
.gallery-track img { width: 100%; object-fit: cover; aspect-ratio: 3 / 4; height: auto; background: #e4e6df; }
.gallery-arrow { display: grid; place-items: center; position: absolute; top: calc(50% - 25px); width: 44px; height: 44px; border: 1px solid #b29f7f; border-radius: 50%; background: var(--paper); color: var(--ink); box-shadow: 0 3px 9px #30332724; }
.gallery-arrow--back { left: -23px; }
.gallery-arrow--next { right: -23px; }
.gallery-arrow:disabled { opacity: .46; cursor: default; }
.gallery-arrow svg { stroke: currentColor; stroke-width: 1.25; fill: none; }

.rsvp { padding: clamp(40px, 8vw, 110px) clamp(21px, 6vw, 80px); }
.rsvp-paper { margin-inline: auto; padding: clamp(46px, 8vw, 84px) clamp(25px, 8vw, 116px); }
.rsvp-paper .botanical--large { width: clamp(120px, 32%, 280px); right: -4%; bottom: -6%; }
.rsvp-content { position: relative; z-index: 2; text-align: center; max-width: 620px; margin-inline: auto; }
.rsvp h2 { margin-bottom: 18px; }
.deadline { margin: 0 0 24px; line-height: 1.5; }
.rsvp form { display: grid; justify-items: center; gap: 17px; }
.field { width: 100%; min-width: 0; display: grid; gap: 6px; text-align: left; }
.field label, .field legend { font-size: clamp(15px, 2.7vw, 18px); line-height: 1.35; }
.field input:not([type='radio']), .field textarea { color: var(--ink); width: 100%; border: 1px solid #718072; background: #fffaf1ed; border-radius: 6px; padding: 9px 11px; min-height: 46px; font-size: 16px; }
.field textarea { resize: vertical; }
.field input[type='number'] { width: 100px; }
.field input[aria-invalid], .field textarea[aria-invalid] { border-color: #9e392c; }
.answers { border: 0; padding: 0; margin: 0; }
.answers legend { padding: 0; margin-bottom: 3px; }
.options { display: flex; flex-wrap: wrap; column-gap: 27px; }
.options label { display: flex; align-items: center; gap: 8px; min-height: 42px; cursor: pointer; }
.options input { margin: 0; width: 18px; height: 18px; accent-color: var(--green); }
.optional, .privacy { color: var(--muted); font-size: .88rem; }
.privacy { text-align: left; justify-self: start; margin: -6px 0 0; line-height: 1.4; }
.error { color: #85271f; line-height: 1.35; }
.feedback { background: #eae7d8; padding: 13px; border: 1px solid #b5a47a; line-height: 1.5; }
.rsvp-contact { margin: 13px 0 0; }
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; left: -10000px; }

@media (max-width: 830px) {
    .gallery-track { grid-auto-columns: calc((100% - 16px) / 2); }
}
@media (max-width: 600px) {
    .cover { padding-inline: 20px; }
    .invitation { padding-block: 88px; }
    .paper::before { inset: 8px; }
    .paper::after { inset: 12px; }
    .botanical--small { left: -2%; top: -2%; }
    .botanical--large { right: -5%; bottom: -7%; }
    .venues { grid-template-columns: 1fr; max-width: 390px; }
    .venue { padding: 4px 11px 22px; }
    .venue + .venue { border-left: 0; border-top: 1px solid #c2a981; padding-top: 22px; padding-bottom: 0; }
    .venue-icon { width: 40px; height: 40px; }
    .gallery-arrow--back { left: -13px; }
    .gallery-arrow--next { right: -13px; }
    .rsvp-paper .botanical--small { opacity: .64; }
    .rsvp-paper .botanical--large { opacity: .55; }
    .ruled-heading { gap: 13px; }
    .ruled-heading::before, .ruled-heading::after { flex-basis: 24px; }
}
@media (max-width: 540px) {
    .gallery-track { grid-auto-columns: 78%; }
    .gallery-arrow { width: 39px; height: 39px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
