:root {
    --color-ivory: #fffaf5;
    --color-white: #ffffff;
    --color-blush: #f2d7d1;
    --color-blush-soft: #fbefeb;
    --color-dusty-rose: #b86f73;
    --color-champagne: #d8bd7e;
    --color-gold: #aa7d36;
    --color-wine: #652537;
    --color-wine-deep: #3a1b25;
    --color-ink: #2b2024;
    --color-muted: #716468;
    --color-line: rgba(101, 37, 55, 0.14);
    --shadow-soft: 0 20px 52px rgba(58, 27, 37, 0.12);
    --shadow-card: 0 12px 30px rgba(58, 27, 37, 0.1);
    --font-display: "Cormorant Garamond", Georgia, serif;
    --font-script: "Great Vibes", cursive;
    --font-body: "Montserrat", Arial, sans-serif;
    --section-padding: clamp(68px, 9vw, 112px);
}

/* Base: custom properties keep the visual system easy to retheme without touching each component. */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 86px;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--color-ivory);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.72;
}

body.nav-locked,
body.lightbox-open {
    overflow: hidden;
}

img,
svg {
    display: block;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

:focus-visible {
    outline: 3px solid rgba(170, 125, 54, 0.72);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    background: var(--color-wine);
    color: var(--color-white);
    border-radius: 6px;
    transform: translateY(-140%);
    transition: transform 180ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

/* Header: the reduced navigation creates a calmer first impression and clearer route to RSVP. */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 72px;
    padding: 14px clamp(18px, 4vw, 48px);
    color: var(--color-white);
    transition: background 220ms ease, color 220ms ease, box-shadow 220ms ease, backdrop-filter 220ms ease;
}

.site-header.scrolled,
.site-header.nav-open {
    background: rgba(255, 250, 245, 0.96);
    color: var(--color-ink);
    box-shadow: 0 8px 24px rgba(43, 32, 36, 0.08);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: inherit;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 0.9rem;
}

.nav-toggle {
    display: inline-grid;
    gap: 5px;
    width: 46px;
    min-width: 46px;
    height: 46px;
    place-content: center;
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 50%;
    cursor: pointer;
}

.site-header.scrolled .nav-toggle,
.site-header.nav-open .nav-toggle {
    background: rgba(101, 37, 55, 0.04);
    border-color: var(--color-line);
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.primary-nav {
    position: fixed;
    inset: 72px 14px auto;
    display: grid;
    gap: 4px;
    max-height: calc(100svh - 92px);
    padding: 16px;
    overflow-y: auto;
    background: rgba(255, 250, 245, 0.98);
    color: var(--color-ink);
    border: 1px solid var(--color-line);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.primary-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.primary-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 6px;
    color: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
}

.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav a.active {
    background: rgba(216, 189, 126, 0.2);
    color: var(--color-wine);
}

.primary-nav .nav-rsvp {
    color: var(--color-wine);
}

.language-selector {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 6px 10px;
    color: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
}

.language-selector span {
    color: currentColor;
    opacity: 0.45;
}

.language-option {
    min-width: 44px;
    min-height: 36px;
    padding: 7px 8px;
    background: transparent;
    color: inherit;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
}

.language-option:hover,
.language-option:focus-visible,
.language-option[aria-pressed="true"] {
    background: rgba(216, 189, 126, 0.2);
    border-color: rgba(216, 189, 126, 0.45);
    color: var(--color-wine);
}

.language-announcement {
    position: fixed;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Hero: refined type and a single divider keep Frida and the date as the first visual priority. */
.hero {
    position: relative;
    display: grid;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    place-items: center;
    padding: 96px 0 70px;
    color: var(--color-white);
    text-align: center;
}

.hero-image,
.hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    z-index: -2;
    object-fit: cover;
    object-position: 50% 34%;
    transform: scale(1.025);
}

.hero-overlay {
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(36, 24, 28, 0.18), rgba(36, 24, 28, 0.5) 58%, rgba(36, 24, 28, 0.72)),
        radial-gradient(circle at center, rgba(255, 250, 245, 0.04), rgba(101, 37, 55, 0.28));
}

.hero-content {
    width: min(780px, calc(100% - 36px));
    padding-top: 26px;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.script-accent {
    margin: 0;
    color: #ffe7bc;
    font-family: var(--font-script);
    font-size: clamp(2.25rem, 10vw, 4.8rem);
    line-height: 1;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0;
}

h1 {
    margin-top: 8px;
    font-size: clamp(4rem, 15vw, 9.2rem);
    line-height: 0.96;
}

h2 {
    color: var(--color-wine);
    font-size: clamp(2.35rem, 8vw, 4.85rem);
    line-height: 1.02;
}

h3 {
    color: var(--color-wine);
    font-size: clamp(1.72rem, 5.5vw, 2.7rem);
    line-height: 1.06;
}

p {
    margin-top: 0;
}

.hero-date {
    width: fit-content;
    max-width: 100%;
    margin: 18px auto 0;
    padding: 10px 18px;
    border-top: 1px solid rgba(255, 231, 188, 0.8);
    border-bottom: 1px solid rgba(255, 231, 188, 0.8);
    font-size: clamp(0.82rem, 2.6vw, 0.98rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.4;
    text-transform: uppercase;
}

.hero-intro {
    max-width: 560px;
    margin: 22px auto 0;
    font-size: clamp(1rem, 2.8vw, 1.16rem);
}

.hero-divider,
.ornament {
    width: min(210px, 68vw);
    height: 1px;
    margin: 28px auto 0;
    background: linear-gradient(90deg, transparent, var(--color-champagne), transparent);
}

.hero-divider::before,
.ornament::before {
    display: block;
    width: 8px;
    height: 8px;
    margin: -4px auto 0;
    background: var(--color-champagne);
    border-radius: 50%;
    box-shadow: 16px 0 0 rgba(216, 189, 126, 0.5), -16px 0 0 rgba(216, 189, 126, 0.5);
    content: "";
}

.scroll-indicator {
    position: absolute;
    bottom: 24px;
    left: 50%;
    display: grid;
    width: 28px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    place-items: start center;
    transform: translateX(-50%);
}

.scroll-indicator span {
    width: 5px;
    height: 5px;
    margin-top: 10px;
    background: var(--color-white);
    border-radius: 50%;
    animation: scrollDot 1.8s ease-in-out infinite;
}

/* Sections: moderate spacing keeps the page luxurious without making guests scroll through unnecessary weight. */
.section {
    padding: var(--section-padding) 0;
}

.section-inner {
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
}

.narrow {
    width: min(740px, calc(100% - 36px));
    text-align: center;
}

.section-heading {
    max-width: 760px;
    margin: 0 auto clamp(30px, 5vw, 52px);
    text-align: center;
}

.section-kicker,
.card-label {
    margin: 0 0 12px;
    color: var(--color-gold);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.35;
    text-transform: uppercase;
}

.lead {
    color: var(--color-wine);
    font-family: var(--font-display);
    font-size: clamp(1.42rem, 4.2vw, 2.08rem);
    line-height: 1.28;
}

.invitation-section {
    position: relative;
    background: linear-gradient(180deg, var(--color-ivory), #fffefd 52%, var(--color-ivory));
}

.invitation-section::before,
.invitation-section::after {
    position: absolute;
    width: 78px;
    height: 78px;
    border-color: rgba(170, 125, 54, 0.28);
    content: "";
}

.invitation-section::before {
    top: 30px;
    left: 18px;
    border-top: 1px solid;
    border-left: 1px solid;
}

.invitation-section::after {
    right: 18px;
    bottom: 30px;
    border-right: 1px solid;
    border-bottom: 1px solid;
}

/* Countdown: simplified counters use whitespace and typography instead of heavy boxes. */
.countdown-section {
    padding: clamp(58px, 7vw, 82px) 0;
    background: var(--color-wine-deep);
    color: var(--color-white);
    text-align: center;
}

.countdown-inner {
    width: min(900px, calc(100% - 36px));
}

.countdown-section h2 {
    color: var(--color-white);
}

.countdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 760px;
    margin: 30px auto 0;
}

.countdown div {
    min-width: 0;
    padding: 8px 6px 12px;
    border-top: 1px solid rgba(216, 189, 126, 0.42);
}

.countdown strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.35rem, 10vw, 4.35rem);
    line-height: 0.98;
}

.countdown span {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.35;
    text-transform: uppercase;
}

.countdown-complete {
    margin: 26px auto 0;
    color: #ffe7bc;
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 5vw, 2.25rem);
}

.calendar-button {
    gap: 9px;
    margin-top: 30px;
    background: transparent;
    color: #ffe7bc;
    border-color: rgba(255, 231, 188, 0.68);
}

.calendar-button:hover,
.calendar-button:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffe7bc;
}

/* Gallery: the featured portrait anchors the section, with smaller crops kept gentle to avoid cutting faces. */
.gallery-section {
    background: #fffefd;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.gallery-item {
    position: relative;
    min-height: 270px;
    overflow: hidden;
    padding: 0;
    background: var(--color-blush);
    border: 1px solid rgba(170, 125, 54, 0.18);
    border-radius: 8px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
    transition: transform 420ms ease, filter 420ms ease;
}

.gallery-feature img {
    object-position: 50% 28%;
}

.gallery-wide img {
    object-position: 50% 38%;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
    filter: saturate(1.04) contrast(1.02);
    transform: scale(1.025);
}

/* Event cards: removing embedded maps reduces page weight, so fine borders and icons carry the location section visually. */
.event-section {
    background: var(--color-ivory);
}

.event-cards {
    display: grid;
    gap: 18px;
}

.event-card,
.detail-card,
.rsvp-form {
    border: 1px solid var(--color-line);
    border-radius: 8px;
}

.event-card {
    position: relative;
    overflow: hidden;
    padding: clamp(26px, 5vw, 42px);
    background: rgba(255, 255, 255, 0.84);
}

.event-card::before,
.detail-card::before {
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(216, 189, 126, 0.22);
    border-radius: 6px;
    pointer-events: none;
    content: "";
}

.venue-icon {
    display: block;
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
    border: 1px solid var(--color-champagne);
    border-radius: 50%;
    background:
        linear-gradient(90deg, transparent 47%, var(--color-champagne) 47% 53%, transparent 53%),
        linear-gradient(0deg, transparent 47%, var(--color-champagne) 47% 53%, transparent 53%);
}

.venue-icon-reception {
    background:
        radial-gradient(circle at 50% 42%, var(--color-champagne) 0 5px, transparent 6px),
        linear-gradient(90deg, transparent 47%, var(--color-champagne) 47% 53%, transparent 53%);
}

.event-card dl {
    display: grid;
    gap: 18px;
    margin: 26px 0;
}

dt {
    color: var(--color-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    line-height: 1.35;
    text-transform: uppercase;
}

dd {
    margin: 4px 0 0;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    background: var(--color-wine);
    color: var(--color-white);
    border: 1px solid var(--color-wine);
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background 190ms ease, border-color 190ms ease, color 190ms ease, transform 190ms ease, box-shadow 190ms ease;
}

.button:hover,
.button:focus-visible {
    background: var(--color-dusty-rose);
    border-color: var(--color-dusty-rose);
    box-shadow: 0 10px 22px rgba(101, 37, 55, 0.18);
    transform: translateY(-1px);
}

.button-secondary {
    background: transparent;
    color: var(--color-wine);
}

.button-secondary:hover,
.button-secondary:focus-visible {
    background: var(--color-wine);
    border-color: var(--color-wine);
    color: var(--color-white);
}

.button[disabled],
.button[aria-disabled="true"] {
    background: #b8acae;
    border-color: #b8acae;
    color: var(--color-white);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Timeline: the compact vertical program remains editable and secondary to the venue details. */
.timeline-section {
    background: #fffefd;
}

.timeline {
    position: relative;
    display: grid;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

.timeline::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 8px;
    width: 1px;
    background: rgba(101, 37, 55, 0.16);
    content: "";
}

.timeline li {
    position: relative;
    display: grid;
    grid-template-columns: minmax(76px, 92px) 1fr;
    gap: 16px;
    min-height: 68px;
    padding-left: 30px;
}

.timeline li::before {
    position: absolute;
    top: 8px;
    left: 3px;
    width: 11px;
    height: 11px;
    background: var(--color-gold);
    border: 3px solid #fffefd;
    border-radius: 50%;
    content: "";
}

.timeline time {
    color: var(--color-wine);
    font-weight: 700;
}

.timeline span {
    font-family: var(--font-display);
    font-size: 1.38rem;
    font-weight: 700;
    line-height: 1.12;
}

/* Details: one cohesive grid replaces three separate bands and lowers the page's visual noise. */
.details-section {
    background: linear-gradient(180deg, var(--color-ivory), var(--color-blush-soft));
}

.details-grid {
    display: grid;
    gap: 16px;
}

.detail-card {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    padding: clamp(24px, 5vw, 36px);
    background: rgba(255, 255, 255, 0.78);
    text-align: center;
}

.detail-card h3 {
    font-size: clamp(1.78rem, 5vw, 2.45rem);
}

.registry-card p:not(.card-label):not(.small-note) {
    margin: 16px auto 0;
    max-width: 34rem;
}

.dress-icon {
    display: block;
    width: 50px;
    height: 50px;
    margin: 0 auto 18px;
    border: 1px solid var(--color-champagne);
    border-radius: 50%;
    background:
        linear-gradient(90deg, transparent 47%, var(--color-champagne) 47% 53%, transparent 53%),
        radial-gradient(circle at 50% 22%, transparent 0 7px, var(--color-champagne) 8px 9px, transparent 10px);
}

.placeholder-button {
    margin-top: 18px;
}

.small-note {
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 0.92rem;
}

/* RSVP: the darker rose field and ivory panel make confirmation the page's primary action. */
.rsvp-section {
    background:
        linear-gradient(135deg, rgba(101, 37, 55, 0.97), rgba(184, 111, 115, 0.9)),
        var(--image-rsvp-background, url("images/img3.jpg")) center / cover;
    color: var(--color-white);
}

.rsvp-layout {
    display: grid;
    gap: clamp(28px, 5vw, 56px);
    align-items: center;
}

.rsvp-copy {
    max-width: 650px;
}

.rsvp-section h2,
.rsvp-section .section-kicker {
    color: var(--color-white);
}

.rsvp-copy p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
}

.deadline {
    display: inline-block;
    margin: 10px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 231, 188, 0.48);
    color: #ffe7bc !important;
    font-weight: 700;
}

.rsvp-form {
    display: grid;
    gap: 14px;
    padding: clamp(22px, 4.4vw, 36px);
    background: rgba(255, 250, 245, 0.96);
    color: var(--color-ink);
    box-shadow: var(--shadow-soft);
    text-align: left;
}

.rsvp-closed {
    display: grid;
    gap: 10px;
    padding: clamp(22px, 4.4vw, 36px);
    background: rgba(255, 250, 245, 0.96);
    color: var(--color-ink);
    box-shadow: var(--shadow-soft);
}

.rsvp-closed[hidden] {
    display: none;
}

.rsvp-closed h3 {
    margin: 0;
    color: var(--color-wine);
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 5vw, 2.8rem);
    line-height: 1;
}

.rsvp-closed p {
    margin: 0;
    color: var(--color-muted);
}

.field-group {
    display: grid;
    gap: 5px;
}

.honeypot-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.rsvp-form label {
    color: var(--color-wine);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
}

.attendance-group {
    margin: 0;
    padding: 0;
    border: 0;
}

.attendance-group legend {
    margin-bottom: 6px;
    color: var(--color-wine);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
}

.radio-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 13px;
    background: var(--color-white);
    border: 1px solid rgba(101, 37, 55, 0.18);
    border-radius: 8px;
    cursor: pointer;
}

.radio-card input {
    width: 18px;
    min-height: 18px;
    accent-color: var(--color-wine);
}

.radio-card span {
    color: var(--color-ink);
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: none;
}

.radio-card:has(input:checked) {
    border-color: rgba(170, 125, 54, 0.72);
    box-shadow: 0 0 0 3px rgba(216, 189, 126, 0.18);
}

.rsvp-form input,
.rsvp-form textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    color: var(--color-ink);
    background: var(--color-white);
    border: 1px solid rgba(101, 37, 55, 0.22);
    border-radius: 8px;
    outline: 0;
}

.rsvp-form .radio-card input {
    width: 18px;
    min-height: 18px;
    padding: 0;
}

.rsvp-form textarea {
    resize: vertical;
}

.rsvp-form input:focus,
.rsvp-form textarea:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 4px rgba(170, 125, 54, 0.18);
}

.rsvp-form input[aria-invalid="true"],
.rsvp-form textarea[aria-invalid="true"] {
    border-color: #9c2a3b;
}

.field-error,
.field-help,
.form-note {
    min-height: 22px;
    margin: 0;
    font-size: 0.9rem;
}

.field-error {
    color: #8f2431;
}

.field-help {
    color: var(--color-muted);
}

.form-note {
    color: var(--color-wine);
    text-align: center;
}

.turnstile-wrapper {
    display: grid;
    gap: 6px;
    min-height: 0;
}

.button-large {
    width: 100%;
    min-height: 58px;
    cursor: pointer;
}

/* Music and lightbox: large fixed controls remain touch-friendly while unavailable music stays hidden. */
.music-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 35;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 14px;
    background: rgba(255, 250, 245, 0.94);
    color: var(--color-wine);
    border: 1px solid var(--color-line);
    border-radius: 999px;
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.music-toggle[hidden] {
    display: none;
}

.music-icon {
    font-size: 1.1rem;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 10px;
    align-items: center;
    padding: 72px 14px 24px;
    background: rgba(21, 13, 16, 0.92);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox figure {
    display: grid;
    gap: 12px;
    justify-items: center;
    min-width: 0;
    margin: 0;
}

.lightbox img {
    max-width: 100%;
    max-height: 78svh;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    object-fit: contain;
}

.lightbox figcaption {
    color: var(--color-white);
    font-size: 0.92rem;
    text-align: center;
}

.lightbox-close,
.lightbox-control {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    cursor: pointer;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 2rem;
    line-height: 1;
}

.lightbox-control {
    font-size: 2.5rem;
    line-height: 1;
}

/* Footer: restrained ending prevents the final section from competing with RSVP. */
.final-section {
    display: grid;
    min-height: 48vh;
    padding: var(--section-padding) 0;
    place-items: center;
    background:
        linear-gradient(rgba(43, 32, 36, 0.86), rgba(43, 32, 36, 0.94)),
        var(--image-final-background, url("images/img1.jpg")) center / cover;
    color: var(--color-white);
    text-align: center;
}

.final-section h2 {
    margin-top: 10px;
    color: var(--color-white);
}

.final-section span {
    display: block;
    margin-top: 16px;
    color: #ffe7bc;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    justify-content: center;
    padding: 24px 18px;
    background: #20171a;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

.footer-credit {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35em;
    align-items: center;
    justify-content: center;
}

.footer-heart {
    display: inline-block;
    color: #c83e4d;
}

.site-footer .footer-brand {
    color: #ffe7bc;
    font-family: var(--font-display);
    font-weight: 700;
}

/* Animation: small reveal motion adds polish; reduced-motion users receive immediate static content. */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
}

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

@keyframes scrollDot {
    0%,
    100% {
        opacity: 0;
        transform: translateY(0);
    }

    45% {
        opacity: 1;
        transform: translateY(14px);
    }
}

@media (min-width: 560px) {
    .countdown {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 250px;
    }

    .gallery-item {
        min-height: auto;
    }

    .gallery-feature {
        grid-row: span 2;
    }

    .gallery-wide {
        grid-column: span 2;
    }
}

@media (min-width: 820px) {
    .nav-toggle {
        display: none;
    }

    .primary-nav {
        position: static;
        display: flex;
        align-items: center;
        width: auto;
        max-height: none;
        padding: 0;
        overflow: visible;
        background: transparent;
        border: 0;
        box-shadow: none;
        color: inherit;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .primary-nav a {
        padding: 8px 10px;
        font-size: 0.72rem;
    }

    .primary-nav .nav-rsvp {
        margin-left: 4px;
        padding-inline: 15px;
        border: 1px solid currentColor;
        border-radius: 999px;
    }

    .language-selector {
        margin-left: 4px;
        padding-inline: 6px;
        font-size: 0.7rem;
    }

    .event-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .details-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .registry-card {
        text-align: left;
    }

    .rsvp-layout {
        grid-template-columns: minmax(0, 0.88fr) minmax(360px, 1fr);
    }
}

@media (min-width: 1080px) {
    .gallery-grid {
        grid-template-columns: 1.25fr 0.85fr 0.85fr;
        grid-auto-rows: 240px;
    }

    .gallery-feature {
        grid-row: span 2;
    }

    .gallery-wide {
        grid-column: span 2;
    }
}

@media (max-width: 390px) {
    body {
        font-size: 0.97rem;
    }

    .brand span:last-child {
        display: none;
    }

    h1 {
        font-size: clamp(3.55rem, 18vw, 4.1rem);
    }

    h2 {
        font-size: clamp(2.1rem, 12vw, 2.55rem);
    }

    .timeline li {
        grid-template-columns: 72px 1fr;
    }

    .lightbox {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        padding-inline: 8px;
    }

    .lightbox-close,
    .lightbox-control {
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-image {
        transform: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
