:root {
    --cream: #FAF6EF;
    --linen: #EFE6D8;
    --sand: #E2D5C1;
    --taupe: #8A7968;
    --ink: #2E2A26;
    --muted: #5E554C;
    --orange: #D9733B;
    --orange-deep: #B85A27;
    --orange-darker: #9C4A1E;
    --apricot: #F2C29B;
    --error: #A23B1A;

    --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --font-sans: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-script: "Pinyon Script", "Cormorant Garamond", cursive;

    --radius: 6px;
    --shadow: 0 14px 34px -22px rgba(46, 42, 38, 0.45);
    --max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}

body {
    margin: 0;
    background-color: var(--cream);
    background-image: radial-gradient(circle at 1px 1px, rgba(138, 121, 104, 0.08) 1px, transparent 0);
    background-size: 22px 22px;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .h3 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.15;
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.5rem); }
h3, .h3 { font-size: 1.55rem; }
h1:focus { outline: none; }

p { margin: 0 0 1em; }

a { color: var(--orange-deep); text-underline-offset: 3px; }
a:hover { color: var(--orange-darker); }

:focus-visible {
    outline: 2px solid var(--orange-deep);
    outline-offset: 3px;
    border-radius: 2px;
}

img { max-width: 100%; height: auto; display: block; }

address { font-style: normal; margin: 0 0 1.25rem; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.narrow { max-width: 720px; }
.center { text-align: center; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 100;
    padding: 0.6rem 1rem;
    background: var(--ink);
    color: #fff;
}
.skip-link:focus { left: 1rem; top: 1rem; color: #fff; }

.eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--taupe);
}

.lead {
    max-width: 640px;
    margin-inline: auto;
    font-size: 1.15rem;
    color: var(--muted);
}

.pending { font-style: italic; color: var(--taupe); }

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 246, 239, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--sand);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink);
    text-decoration: none;
    font-family: var(--font-serif);
    font-size: 1.4rem;
}
.brand:hover { color: var(--ink); }

.site-nav ul {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    padding: 0.3rem 0;
    border-bottom: 1px solid transparent;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.site-nav a:hover, .site-nav a.active { border-bottom-color: var(--orange); }

.site-nav a.nav-cta {
    padding: 0.45rem 1.1rem;
    border: 1px solid var(--orange-deep);
    border-radius: 999px;
    color: var(--orange-deep);
    font-weight: 700;
}
.site-nav a.nav-cta:hover, .site-nav a.nav-cta.active { background: var(--orange-deep); color: #fff; }

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--sand);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.bars { display: grid; gap: 4px; width: 18px; }
.bars span { display: block; height: 1.5px; background: var(--ink); border-radius: 1px; }

@media (max-width: 1000px) {
    .menu-toggle { display: inline-flex; }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        background: var(--cream);
        border-bottom: 1px solid var(--sand);
        box-shadow: var(--shadow);
    }
    .site-nav.open { display: block; }

    .site-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: min(100% - 2.5rem, var(--max));
        margin-inline: auto;
        padding: 0.5rem 0 1.25rem;
    }
    .site-nav a { display: block; padding: 0.9rem 0; border-bottom: 1px solid var(--linen); }
    .site-nav a.nav-cta { margin-top: 1rem; text-align: center; }
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary { background: var(--orange-deep); color: #fff; }
.btn-primary:hover { background: var(--orange-darker); color: #fff; }

.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--cream); }

.btn-link {
    padding: 0.25rem 0;
    border: 0;
    background: none;
    color: var(--orange-deep);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.btn-link:hover { color: var(--orange-darker); text-decoration: underline; }

.btn-icon {
    flex: none;
    width: 2.9rem;
    border: 1px solid #CDBFA9;
    border-radius: var(--radius);
    background: #fff;
    color: var(--muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.btn-icon:hover { border-color: var(--error); color: var(--error); }

/* ---------- Sections ---------- */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-tight { padding: 1rem 0 clamp(3.5rem, 8vw, 6rem); }
.section-alt { background: var(--linen); }

.section-heading { margin-bottom: 2.5rem; text-align: center; }

.page-header { padding: clamp(3rem, 7vw, 5rem) 0 1.5rem; text-align: center; }

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 420px;
    margin: 1.75rem auto;
}
.divider span { flex: 1; height: 1px; background: var(--sand); }
.divider img { width: 110px; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 8vw, 6rem);
    background: linear-gradient(180deg, var(--linen), var(--cream));
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.hero-text { text-align: center; }
.hero-text .monogram { margin: 0 auto 1rem; }

.hero-names {
    margin: 0.25rem 0 0.75rem;
    font-family: var(--font-script);
    font-size: clamp(3.4rem, 9vw, 6.2rem);
    font-weight: 400;
    line-height: 1.05;
}
.hero-names .amp { margin: 0 0.12em; color: var(--orange); font-size: 0.75em; }

.hero-date {
    margin-bottom: 0.4rem;
    font-family: var(--font-serif);
    font-size: clamp(1.35rem, 2.5vw, 1.7rem);
    letter-spacing: 0.05em;
}

.hero-place {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--taupe);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.hero-photo { width: 100%; max-width: 420px; justify-self: center; }

.hero-branch {
    position: absolute;
    width: clamp(90px, 13vw, 170px);
    opacity: 0.8;
    pointer-events: none;
}
.hero-branch.left { left: -28px; top: 24px; transform: rotate(-14deg); }
.hero-branch.right { right: -28px; bottom: -24px; transform: scaleX(-1) rotate(-14deg); }

@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-photo { max-width: 300px; order: 2; }
    .hero-branch { opacity: 0.45; }
}

/* ---------- Monogram ---------- */

.monogram { display: block; color: var(--ink); }
.monogram-letters {
    fill: currentColor;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 56px;
    font-weight: 500;
}
.monogram-amp { fill: var(--orange); font-family: var(--font-script); font-style: normal; font-size: 64px; }

/* ---------- Countdown ---------- */

.countdown {
    display: flex;
    justify-content: center;
    gap: clamp(0.4rem, 2vw, 1rem);
    margin-top: 1.75rem;
}

.countdown-unit {
    min-width: 4.4rem;
    padding: 0.7rem 0.4rem;
    border: 1px solid var(--sand);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.65);
    text-align: center;
}

.countdown-value {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-variant-numeric: lining-nums tabular-nums;
    line-height: 1.1;
}

.countdown-label {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--taupe);
}

.countdown-done { margin-top: 1.5rem; font-family: var(--font-serif); font-size: 1.6rem; color: var(--orange-deep); }

/* ---------- Photos ---------- */

.photo-frame {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 6px solid #fff;
    border-radius: 999px 999px var(--radius) var(--radius);
    background: var(--sand);
    box-shadow: var(--shadow);
}
.photo-frame.rect { border-width: 4px; border-radius: var(--radius); }
.photo-frame > img { width: 100%; height: 100%; object-fit: cover; }

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    height: 100%;
    background: repeating-linear-gradient(135deg, var(--linen) 0 14px, #E9DFCF 14px 28px);
    color: var(--taupe);
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-style: italic;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}
.gallery-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: zoom-in;
}
.gallery-trigger .photo-frame { transition: transform 0.2s; }
.gallery-trigger:hover .photo-frame { transform: scale(1.025); }

.lightbox {
    width: min(96vw, 1400px);
    height: min(94dvh, 1100px);
    max-width: none;
    max-height: none;
    padding: 1rem;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius);
    background: #211E1B;
}
.lightbox::backdrop { background: rgba(25, 22, 19, 0.88); backdrop-filter: blur(3px); }
.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.lightbox-content > img {
    width: auto;
    height: auto;
    max-width: calc(96vw - 2rem);
    max-height: calc(94dvh - 2rem);
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: rgba(33, 30, 27, 0.8);
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.rsvp-error-dialog {
    width: min(92vw, 480px);
    max-width: none;
    padding: 0;
    border: 1px solid var(--sand);
    border-radius: var(--radius);
    background: var(--cream);
    color: var(--ink);
    box-shadow: var(--shadow);
}
.rsvp-error-dialog::backdrop { background: rgba(25, 22, 19, 0.72); backdrop-filter: blur(3px); }
.rsvp-error-content { padding: clamp(1.5rem, 5vw, 2.5rem); }
.rsvp-error-content h2 { font-size: 1.8rem; }
.rsvp-error-message { margin: 0 0 1.5rem; color: var(--muted); }

/* ---------- Home ---------- */

.key-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0 0;
    text-align: center;
}
.key-facts div { padding: 1.5rem 1rem; border-top: 1px solid var(--sand); }
.key-facts dt {
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--orange-deep);
}
.key-facts dd { margin: 0; font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.35; }

.cta-band { background: var(--ink); color: var(--cream); }
.cta-band h2 { color: #fff; }
.cta-band .eyebrow { color: var(--apricot); }
.cta-band .btn-primary { margin-top: 0.5rem; }

/* ---------- Cards ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.card {
    padding: 1.75rem;
    border: 1px solid var(--sand);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}
.card p:last-child { margin-bottom: 0; }

.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
}
.card-link:hover { color: inherit; transform: translateY(-3px); border-color: var(--apricot); }
.card-link .more {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange-deep);
}

.people { max-width: 760px; margin-inline: auto; }
.person { text-align: center; }
.person .role { color: var(--taupe); }
.avatar {
    display: grid;
    place-items: center;
    width: 140px;
    height: 140px;
    margin: 0 auto 1rem;
    border: 4px solid #fff;
    border-radius: 50%;
    background: var(--linen);
    box-shadow: var(--shadow);
    color: var(--orange-deep);
    font-family: var(--font-serif);
    font-size: 2.8rem;
    object-fit: cover;
}

.notice {
    margin-top: 2.5rem;
    padding: 1.25rem 1.5rem;
    border-left: 3px solid var(--orange);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: #fff;
}
.notice p:last-child { margin-bottom: 0; }
.notice.success { margin-top: 0; }
.notice.error { border-left-color: var(--error); background: #FFF5F2; color: var(--error); }

.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { position: relative; padding: 0 0 1rem 2rem; }
.checklist li::before {
    content: "";
    position: absolute;
    left: 0.25rem;
    top: 0.55rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--orange);
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 1rem;
    padding: 3rem 1rem;
    border: 1px dashed var(--sand);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.5);
    font-family: var(--font-serif);
    font-size: 1.5rem;
}

/* ---------- Schedule ---------- */

.timeline {
    position: relative;
    max-width: 720px;
    margin: 1rem auto 2rem;
    padding: 0;
    list-style: none;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 6.5rem;
    top: 0.6rem;
    bottom: 2rem;
    width: 1px;
    background: var(--sand);
}
.timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 2rem;
    padding-bottom: 2.25rem;
}
.timeline li::before {
    content: "";
    position: absolute;
    left: calc(6.5rem - 7px);
    top: 0.6rem;
    width: 14px;
    height: 14px;
    border: 2px solid var(--orange);
    border-radius: 50%;
    background: var(--cream);
}
.timeline time {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-variant-numeric: lining-nums;
    line-height: 1.2;
    text-align: right;
}
.timeline h2 { margin-bottom: 0.25rem; }
.timeline p { margin-bottom: 0.4rem; }
.timeline .place {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--taupe);
}

@media (max-width: 560px) {
    .timeline::before { left: 4.25rem; }
    .timeline li { grid-template-columns: 3.5rem 1fr; gap: 1.5rem; }
    .timeline li::before { left: calc(4.25rem - 7px); }
    .timeline time { font-size: 1.25rem; }
}

/* ---------- Venues ---------- */

.venue {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--sand);
}
.venue:nth-of-type(even) .venue-art { order: 2; }

.venue-art {
    padding: 1.5rem;
    border: 1px solid var(--sand);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}
.venue-art img { width: 100%; }

.floors { margin: 0 0 1.5rem; padding: 0; list-style: none; }
.floors li { display: flex; gap: 1rem; padding: 0.55rem 0; border-top: 1px dashed var(--sand); }
.floors strong { min-width: 6.5rem; font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; font-variant-numeric: lining-nums; }

@media (max-width: 760px) {
    .venue { grid-template-columns: 1fr; }
    .venue:nth-of-type(even) .venue-art { order: 0; }
}

/* ---------- About ---------- */

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.story { font-size: 1.12rem; }
.story p:first-child::first-letter {
    float: left;
    margin: 0.05em 0.1em 0 0;
    font-family: var(--font-serif);
    font-size: 3.6em;
    line-height: 0.85;
    color: var(--orange-deep);
}
.signature { font-family: var(--font-script); font-size: 2rem; color: var(--taupe); }

@media (max-width: 760px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-grid .photo-frame { max-width: 300px; margin-inline: auto; }
}

/* ---------- Forms ---------- */

.form { display: grid; gap: 1.75rem; }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

legend, .form label:not(.radio-option):not(.checkbox) {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.form .sub-label { margin-top: 1rem; font-weight: 400 !important; }

.form input:not([type="radio"]):not([type="checkbox"]), .form textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid #CDBFA9;
    border-radius: var(--radius);
    background: #fff;
    color: inherit;
    font: inherit;
}
.form input:not([type="radio"]):not([type="checkbox"]):focus, .form textarea:focus {
    outline: 2px solid var(--orange);
    outline-offset: 1px;
    border-color: var(--orange);
}
.form .invalid { border-color: var(--error); }

.guest-row { display: flex; gap: 0.5rem; margin-bottom: 0.6rem; }
.guest-attendance { display: block; margin: 0 0 1rem; }
.guest-attendance legend { margin-bottom: 0.35rem; font-size: 0.8rem; }
.guest-attendance .radio-option { padding: 0.4rem 0.85rem; font-size: 0.9rem; }

.radio-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.radio-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.2rem;
    border: 1px solid #CDBFA9;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
}
.radio-option:has(input:checked) { border-color: var(--orange-deep); background: #FDF1E8; }

.checkbox { display: flex; align-items: flex-start; gap: 0.6rem; cursor: pointer; }

input[type="radio"], input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    flex: none;
    accent-color: var(--orange-deep);
}
.checkbox input { margin-top: 0.3rem; }
.form button:disabled { opacity: 0.65; cursor: wait; }

.hint { margin: 0.35rem 0 0; font-size: 0.88rem; color: var(--muted); }
.validation-message { margin-top: 0.35rem; font-size: 0.9rem; color: var(--error); }

/* ---------- Footer ---------- */

.site-footer {
    padding: 3.5rem 0 2.5rem;
    background: var(--ink);
    color: #E9E1D4;
    text-align: center;
}
.site-footer .monogram { margin: 0 auto; color: var(--cream); }
.site-footer a { color: var(--apricot); }
.site-footer a:hover { color: #fff; }
.footer-names { margin: 0.5rem 0 0; font-family: var(--font-script); font-size: 2.6rem; color: #fff; }
.footer-date { letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.8rem; }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.4rem;
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
}
.footer-note { margin: 0; font-size: 0.9rem; }

/* ---------- Blazor shell ---------- */

.app-loading {
    display: grid;
    place-items: center;
    min-height: 100vh;
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-style: italic;
    color: var(--taupe);
}

#blazor-error-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: none;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: #FDF1E8;
    border-top: 2px solid var(--orange-deep);
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
}
#blazor-error-ui .dismiss { position: absolute; right: 1rem; top: 0.6rem; cursor: pointer; }
