:root {
    --cream: #faf6ef;
    --paper: #fffdf9;
    --ink: #2f2822;
    --ink-soft: #6b5f52;
    --terracotta: #b06a3f;
    --terracotta-deep: #8f5330;
    --wine: #7a2e30;
    --skyline: #6f8fa3;
    --gold: #b8935a;
    --line: #e6dac8;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Jost", -apple-system, sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.65;
}

h1, h2 {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 600;
}

.script {
    font-family: "Petit Formal Script", cursive;
    font-weight: 400;
}

/* --- header --- */

.site-header {
    text-align: center;
    padding: 2.5rem 1rem 1rem;
}

.couple-names {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.6rem;
    color: var(--terracotta-deep);
    text-decoration: none;
    letter-spacing: 0.02em;
}

main {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1.25rem 4rem;
}

/* --- divider: sutil guiño España/Argentina --- */

.ribbon-divider {
    height: 3px;
    width: 72px;
    margin: 0 auto;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--wine) 0%, var(--wine) 45%, var(--skyline) 55%, var(--skyline) 100%);
    opacity: 0.75;
}

/* --- hero / monogram --- */

.hero {
    text-align: center;
    padding: 1.5rem 0 2.5rem;
}

.monogram {
    width: 132px;
    height: 132px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    border: 1px solid var(--gold);
    outline: 1px solid var(--gold);
    outline-offset: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper);
    position: relative;
}

.monogram .script {
    font-size: 2.6rem;
    color: var(--terracotta-deep);
    line-height: 1;
}

.sprig {
    position: absolute;
    width: 34px;
    height: auto;
    opacity: 0.85;
    color: var(--gold);
}

.sprig.left { left: -14px; bottom: 8px; transform: scaleX(-1) rotate(8deg); }
.sprig.right { right: -14px; bottom: 8px; transform: rotate(8deg); }

.monogram--signature {
    width: 86px;
    height: 86px;
    margin: 0 auto 1.25rem;
    outline-offset: 3px;
}

.monogram--signature .script { font-size: 1.7rem; }
.monogram--signature .sprig { width: 22px; }

.hero .subtitle {
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 1rem;
}

.hero .date {
    font-size: 1.05rem;
    color: var(--terracotta-deep);
    margin: 0.75rem 0 0.25rem;
}

.hero .countdown {
    font-size: 0.95rem;
    color: var(--ink-soft);
    margin-bottom: 1.5rem;
}

.hero .countdown strong {
    color: var(--wine);
    font-weight: 600;
}

/* --- cards / sections --- */

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1.75rem 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.card.narrow {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

.card-heading .icon {
    width: 22px;
    height: 22px;
    color: var(--terracotta-deep);
    flex-shrink: 0;
}

.card-heading h2 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--ink);
}

.card .venue {
    font-weight: 600;
    color: var(--terracotta-deep);
    margin: 0 0 0.15rem;
}

.card .address {
    color: var(--ink-soft);
    margin: 0 0 0.6rem;
}

.card a.maps-link {
    color: var(--wine);
    font-size: 0.9rem;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.card a.maps-link:hover { opacity: 0.75; }

.card p.body-text {
    color: var(--ink-soft);
    margin: 0;
}

/* --- fotos y placeholders --- */

.photo-frame {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--line);
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-credit {
    display: block;
    font-size: 0.7rem;
    color: var(--ink-soft);
    margin: -0.75rem 0 1rem;
    text-align: right;
}

.photo-credit a { color: inherit; }

.photo-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px dashed var(--gold);
    background:
        repeating-linear-gradient(135deg, rgba(184, 147, 90, 0.07) 0 2px, transparent 2px 14px),
        linear-gradient(135deg, #fdf7ee, var(--cream));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--gold);
    text-align: center;
}

.photo-placeholder svg { width: 30px; height: 30px; }

.photo-placeholder span {
    font-size: 0.8rem;
    color: var(--ink-soft);
    letter-spacing: 0.03em;
}

.hero .photo-placeholder,
.hero .photo-frame {
    max-width: 320px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}

.map-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--line);
    margin-top: 0.9rem;
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.winter-note {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px dashed var(--line);
}

.winter-note svg { width: 16px; height: 16px; color: var(--gold); flex-shrink: 0; }

/* --- buttons --- */

.button {
    display: inline-block;
    background: var(--terracotta);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.02em;
    transition: background 0.15s ease;
}

.button:hover { background: var(--terracotta-deep); }

.button-secondary {
    display: inline-block;
    background: transparent;
    color: var(--terracotta-deep);
    border: 1px solid var(--terracotta);
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

/* --- forms --- */

form label {
    display: block;
    margin-top: 1.1rem;
    font-weight: 500;
    color: var(--ink);
}

input[type="text"], select, textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    margin-top: 0.4rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--paper);
    color: var(--ink);
}

input[type="text"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--terracotta);
}

.attending-choice {
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.radio-option:has(input:checked) {
    border-color: var(--terracotta);
    background: #fdf3ea;
}

.radio-option input { width: auto; accent-color: var(--terracotta); }

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 400;
}

.bus-toggle-label {
    margin-top: 1rem;
}

.bus-options {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--line);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bus-options legend {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-soft);
    padding: 0;
    margin-bottom: 0.35rem;
}

.checkbox-inline input {
    width: auto;
    margin-top: 0;
    accent-color: var(--terracotta);
}

fieldset.attendee-row {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1.1rem;
    margin-bottom: 1rem;
    background: var(--paper);
}

#attendees-section h2 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.15rem;
}

.errors {
    color: var(--wine);
    padding-left: 1.2rem;
}

.messages {
    list-style: none;
    padding: 0;
}

/* --- footer --- */

.site-footer {
    text-align: center;
    padding: 2rem 1.5rem 3rem;
    color: var(--terracotta-deep);
}

.site-footer .script {
    font-size: 1.6rem;
}

@media (max-width: 480px) {
    .monogram { width: 110px; height: 110px; }
    .monogram .script { font-size: 2.1rem; }
}

/* --- Warm Heritage: modern functional layout --- */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    background: #fffdfa;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0;
    background: rgba(244, 236, 226, 0.96);
    border-bottom: 1px solid #ddcdbb;
    backdrop-filter: blur(12px);
}

.site-header__inner {
    width: min(1120px, calc(100% - 2.5rem));
    min-height: 76px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
}

.couple-names {
    justify-self: start;
    font-size: 1.45rem;
}

.site-nav {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    min-height: 76px;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    align-self: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 1rem;
    color: var(--ink-soft);
    font-size: 1rem;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    border-radius: 4px;
    transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--terracotta-deep);
    border-bottom-color: var(--terracotta-deep);
}

.button--compact {
    justify-self: end;
    min-height: 44px;
    padding: 0.65rem 1.55rem;
    font-size: 0.9rem;
}

main {
    width: min(1120px, 100%);
    max-width: none;
    padding: 0 2rem 6rem;
}

.hero {
    padding: 3.5rem 0 2.75rem;
}

.hero .photo-frame {
    width: min(290px, 72vw);
    margin-bottom: 1.25rem;
    border: 8px solid #f2ebe2;
    box-shadow: 0 14px 34px rgba(77, 49, 35, 0.08);
}

.hero .photo-frame img {
    object-position: 50% 38%;
}

.hero .subtitle {
    margin-bottom: 0.35rem;
    color: var(--terracotta-deep);
    font-size: 0.72rem;
}

.hero .date {
    margin: 0;
    color: var(--ink);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.3rem);
    font-weight: 600;
    line-height: 1.15;
}

.hero .countdown {
    margin: 0.75rem 0 1.35rem;
}

.button {
    min-height: 44px;
    padding: 0.75rem 1.75rem;
    background: var(--terracotta-deep);
    box-shadow: 0 5px 14px rgba(143, 83, 48, 0.12);
    transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
    background: var(--wine);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(122, 46, 48, 0.16);
}

.button:focus-visible,
.button-secondary:focus-visible,
.maps-link:focus-visible {
    outline: 2px solid var(--wine);
    outline-offset: 3px;
}

.welcome-card {
    position: relative;
    width: min(650px, 100%);
    margin: 0 auto;
    padding: 1.75rem 2rem;
    text-align: center;
    background: #fffaf7;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(77, 49, 35, 0.04);
}

.welcome-card::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #fffaf7;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    transform: translateX(-50%) rotate(45deg);
}

.welcome-card .body-text {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 4.5rem auto 3rem;
    color: var(--terracotta-deep);
}

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

.section-divider span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.event-grid,
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.card {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(77, 49, 35, 0.05);
}

.event-card {
    padding: 0;
    overflow: hidden;
}

.event-card .card-heading {
    min-height: 64px;
    margin: 0;
    padding: 1.15rem 1.4rem;
    border-bottom: 1px solid var(--line);
}

.event-card .card-heading h2,
.info-grid .card-heading h2 {
    font-size: clamp(1.55rem, 2.4vw, 1.85rem);
}

.event-card > .photo-frame {
    aspect-ratio: 16 / 9;
    margin: 0;
    border: 0;
    border-radius: 0;
}

.event-card > .venue,
.event-card > .address,
.event-card > .maps-link,
.event-card > .map-embed {
    margin-left: 1.4rem;
    margin-right: 1.4rem;
}

.event-card > .venue {
    margin-top: 1.25rem;
}

.event-card > .map-embed {
    width: auto;
    margin-top: 1.1rem;
    margin-bottom: 1.4rem;
}

.info-grid:empty {
    display: none;
}

.rsvp-card {
    width: min(640px, 100%);
    margin: 4rem auto 0;
    padding: 3rem;
}

.rsvp-card > h1 {
    margin: 0;
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.8rem);
}

.rsvp-intro {
    margin: 0.5rem 0 2rem;
    color: var(--ink-soft);
    text-align: center;
}

.rsvp-card > form > .attending-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rsvp-card > form > .attending-choice .radio-option {
    justify-content: center;
}

.radio-option {
    position: relative;
    min-height: 44px;
}

.radio-option:has(input:checked) {
    color: white;
    border-color: var(--terracotta-deep);
    background: var(--terracotta-deep);
}

.radio-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-option:has(input:focus-visible) {
    outline: 2px solid var(--wine);
    outline-offset: 2px;
}

fieldset.attendee-row {
    padding: 1.35rem;
    border-radius: 8px;
    background: #fffaf7;
}

.button-secondary {
    width: 100%;
    min-height: 44px;
    border-style: dashed;
    border-radius: 6px;
}

.rsvp-submit {
    display: block;
    margin: 2rem auto 0;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #fffaf7;
}

@media (max-width: 760px) {
    .site-header__inner {
        width: calc(100% - 2rem);
        min-height: 60px;
        grid-template-columns: 1fr auto;
    }

    .button--compact {
        min-height: 40px;
    }

    main {
        padding: 0 1rem 4rem;
    }

    .hero {
        padding: 2.25rem 0 2rem;
    }

    .welcome-card {
        padding: 1.4rem 1.2rem;
    }

    .section-divider {
        margin: 3rem auto 2rem;
    }

    .event-grid,
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .rsvp-card {
        margin-top: 1.5rem;
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 430px) {
    .couple-names {
        font-size: 1.1rem;
    }

    .button--compact {
        padding-inline: 1rem;
        font-size: 0.82rem;
    }

    .hero .date {
        font-size: 1.85rem;
    }

    .rsvp-card > form > .attending-choice {
        grid-template-columns: 1fr;
    }

    .bus-options .attending-choice {
        gap: 0.4rem;
    }

    .bus-options .radio-option {
        flex: 1;
        padding-inline: 0.75rem;
    }
}

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

    .button,
    .site-nav a {
        transition: none;
    }
}

/* --- about us story --- */

.story-section {
    width: min(920px, 100%);
    margin: 4.5rem auto 0;
    padding: 2.5rem;
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(300px, 1fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4.5rem);
    background: #f7efe6;
    border: 1px solid #e4d5c5;
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(77, 49, 35, 0.06);
}

.story-eyebrow {
    margin: 0 0 0.5rem;
    color: var(--terracotta-deep);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.story-copy h2 {
    margin: 0 0 1.25rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
}

.story-copy p:not(.story-eyebrow) {
    margin: 0 0 1rem;
    color: var(--ink-soft);
    font-size: 1rem;
}

.story-copy p:last-child {
    margin-bottom: 0;
}

.story-illustration {
    margin: 0;
    padding: 0.65rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(77, 49, 35, 0.09);
}

.story-illustration img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 3px;
}

@media (max-width: 900px) {
    .story-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .story-copy {
        text-align: center;
    }

    .story-illustration {
        width: min(520px, 100%);
        margin: 0 auto;
    }
}

@media (max-width: 560px) {
    .story-section {
        margin-top: 3rem;
        padding: 1.25rem;
    }

    .story-copy h2 {
        font-size: 2rem;
    }
}

/* --- contact page --- */

.contact-page {
    width: min(900px, 100%);
    margin: 0 auto;
    padding: 4rem 0 2rem;
}

.contact-intro {
    width: min(620px, 100%);
    margin: 0 auto 4.5rem;
    text-align: center;
}

.contact-eyebrow,
.contact-role {
    margin: 0 0 0.45rem;
    color: var(--terracotta-deep);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.contact-intro h1 {
    margin: 0 0 0.8rem;
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1.1;
}

.contact-intro p:last-child {
    margin: 0;
    color: var(--ink-soft);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.contact-card {
    position: relative;
    min-height: 310px;
    padding: 2.5rem 2rem 2rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(77, 49, 35, 0.06);
}

.contact-card--has-character {
    margin-top: 3rem;
    padding-top: 4.5rem;
}

.contact-character {
    position: absolute;
    right: 1.5rem;
    pointer-events: none;
}

.contact-character img {
    width: 100%;
    height: 100%;
    display: block;
}

.contact-character--pixel {
    top: -92px;
    width: 152px;
    height: 152px;
}

.contact-character--pixel img {
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 6px 4px rgba(47, 40, 34, 0.2));
}

.contact-character--photo {
    top: -64px;
    width: 240px;
    height: 118px;
    padding: 4px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(47, 40, 34, 0.16);
    transform: rotate(-1.5deg);
    overflow: hidden;
}

.contact-character--photo img {
    object-fit: cover;
    border-radius: 3px;
}

.contact-card h2 {
    margin: 0 0 0.75rem;
    font-size: 2rem;
}

.contact-note {
    margin: 0 0 1.5rem;
    color: var(--ink-soft);
}

.contact-details {
    margin: 0;
    display: grid;
    gap: 1rem;
}

.contact-details div {
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
}

.contact-details dt {
    color: var(--ink-soft);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-details dd {
    margin: 0.15rem 0 0;
    font-weight: 500;
}

.contact-details a {
    color: var(--terracotta-deep);
    text-decoration-color: rgba(143, 83, 48, 0.35);
    text-underline-offset: 0.2em;
    overflow-wrap: anywhere;
}

.contact-details a:hover,
.contact-details a:focus-visible {
    color: var(--wine);
    text-decoration-color: currentColor;
}

@media (max-width: 700px) {
    .contact-page {
        padding-top: 2.5rem;
    }

    .contact-intro {
        margin-bottom: 3.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .contact-card--has-character {
        margin-top: 2.5rem;
    }

    .contact-character--photo {
        top: -54px;
        width: 205px;
        height: 101px;
    }
}

/* --- responsive section navigation --- */

.site-nav a.is-active {
    color: white;
    background: #6d3b27;
    font-weight: 500;
    border-bottom-color: #6d3b27;
}

@media (max-width: 900px) {
    html {
        scroll-padding-top: 7.5rem;
    }

    .site-header__inner {
        width: 100%;
        min-height: 0;
        padding: 0 1rem;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0 1rem;
    }

    .couple-names,
    .button--compact {
        margin-block: 0.65rem;
    }

    .couple-names {
        grid-column: 1;
        grid-row: 1;
    }

    .button--compact {
        grid-column: 2;
        grid-row: 1;
    }

    .site-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        width: calc(100% + 2rem);
        min-height: 48px;
        margin-left: -1rem;
        padding: 0 0.5rem;
        gap: 0.2rem;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        border-top: 1px solid rgba(109, 59, 39, 0.12);
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .site-nav a {
        flex: 0 0 auto;
        min-height: 48px;
        padding: 0 0.8rem;
        font-size: 0.9rem;
        white-space: nowrap;
        border-bottom-width: 3px;
    }
}
