/* ==========================================================================
   Milan & Sarah — brand stylesheet (v3: real brand fonts + elements)
   Great Vibes (names) · Trajan Pro (titles) · Cormorant (headings) · Inter (body)
   Palette: dusty-blue & ivory, navy ink. Mobile-first.
   ========================================================================== */

/* Real brand fonts (self-hosted) */
@font-face {
    font-family: 'Great Vibes';
    src: url('../fonts/GreatVibes-Regular.ttf') format('truetype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Trajan Pro';
    src: url('../fonts/TrajanPro-Regular.otf') format('opentype');
    font-weight: 400; font-style: normal; font-display: swap;
}

:root {
    /* Palette */
    --navy:        #24395B;
    --ink:         #23304A;   /* body text — high contrast, slightly softer than pure navy */
    --cornflower:  #5B7BB0;
    --dusty:       #9DB4D4;
    --sage:        #7D937E;
    --gold:        #A98B54;
    --powder:      #DCE5F1;
    --ivory:       #F7F5EF;
    --warm-white:  #FFFFFF;
    --line:        #e7e3d7;
    --line-soft:   #eeebe2;
    --muted:       #6b7488;
    --navy-fill:   #24395B;   /* button/chip fills — stays this navy in both themes for contrast against white text */

    /* Type */
    --font-title:   'Trajan Pro', 'Cormorant Garamond', Georgia, serif;  /* ceremonial caps */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-script:  'Great Vibes', 'Pinyon Script', cursive;

    --maxw: 940px;
    --measure: 42rem;   /* comfortable reading width */
}

/* ----- Base --------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--ivory);
    background-image: linear-gradient(180deg, #E8EEF7 0%, #F3F2EC 45%, #F7F5EF 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cornflower); text-decoration: none; }
a:hover { color: var(--navy); }

/* ----- Typography -------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--navy);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: .01em;
    margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); font-weight: 600; }

p { margin: 0 0 1.05rem; }

.script {
    font-family: var(--font-script);
    font-weight: 400;
    color: var(--navy);
    line-height: 1;
}

.eyebrow {
    font-family: var(--font-title);
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: .82rem;
    font-weight: 400;
    color: var(--cornflower);
    margin: 0 0 .9rem;
}

.lead {
    font-size: 1.14rem;
    line-height: 1.65;
    color: var(--ink);
    max-width: var(--measure);
}
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lead, .center.section-title .lead { margin-inline: auto; }

/* Thin gold divider — subtle, used inside cards */
.rule {
    width: 46px; height: 2px; border: 0; border-radius: 2px;
    background: var(--gold); opacity: .7; margin: 1.1rem auto;
}

/* Leaf-branch divider (real brand element) — used under page titles etc. */
.leaf-rule {
    display: block; width: 210px; max-width: 58%; height: 30px; border: 0;
    margin: 1.1rem auto;
    background: center / contain no-repeat url("../img/leaves.png");
}
.leaf-rule--sm { width: 150px; height: 22px; margin: .7rem auto; }

/* Botanical sprig (leaf branch) — sparingly */
.sprig {
    display: block; width: 150px; max-width: 50%; height: 24px;
    margin: 1rem auto;
    background: center / contain no-repeat url("../img/leaves.png");
}
.sprig--sm { width: 110px; height: 18px; margin: .6rem auto; }

/* ----- Page frame & soft floral accents ---------------------------------- */
.page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Transparent watercolour bouquets — top corners as light accents. */
.corner {
    position: absolute;
    top: 0;
    width: min(190px, 30vw);
    pointer-events: none;
    opacity: .92;
    z-index: 0;
    user-select: none;
}
.corner--tl { left: 0; }
.corner--tr { right: 0; transform: scaleX(-1); }
/* bottom corners removed from markup for a cleaner footer */

/* ----- Header / nav ------------------------------------------------------ */
.site-header {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 1.5rem 1rem .2rem;
}

.wordmark {
    font-family: var(--font-script);
    font-size: clamp(2rem, 6.5vw, 3rem);
    color: var(--navy);
    line-height: 1;
    display: block;
    margin: .1rem auto;
}

.nav {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: .1rem 1.9rem;
    padding: .7rem 1rem 0;
    margin: .7rem auto 0;
    max-width: var(--maxw);
}
.nav a {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: .13em;
    font-weight: 500;
    font-size: .74rem;
    color: var(--ink);
    padding: .95rem .1rem;
    position: relative;
}
.nav a:hover { color: var(--cornflower); }
.nav a.is-active { color: var(--gold); }
.nav a.is-active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: .45rem;
    height: 2px; border-radius: 2px; background: var(--gold);
}

.nav-toggle {
    display: none;
    position: relative; z-index: 4;
    margin: .5rem auto 0;
    background: #fff; border: 1px solid var(--line);
    box-shadow: 0 2px 10px -4px rgba(36,57,91,.25);
    border-radius: 9px; color: var(--navy);
    font-family: var(--font-body); text-transform: uppercase;
    letter-spacing: .16em; font-weight: 700; font-size: .76rem;
    padding: .75rem 1.6rem; cursor: pointer;
}

.nav-close { display: none; }

@media (max-width: 720px) {
    .corner { width: min(112px, 26vw); opacity: .85; }
    .site-header { padding-top: 1.4rem; }
    .nav-toggle { display: inline-block; margin-bottom: .4rem; }
    .wordmark { margin-bottom: .3rem; }

    /* Full-screen takeover, not a dropdown */
    .nav {
        display: none;
    }
    .nav.is-open {
        display: flex;
        position: fixed; inset: 0; z-index: 1500;
        flex-direction: column; align-items: center; justify-content: center;
        gap: 0;
        background: var(--ivory, #F7F5EF);
        max-width: none; margin: 0; padding: 2.5rem 1.5rem;
    }
    .nav.is-open a {
        padding: 1.1rem 0; border-bottom: 1px solid var(--line-soft);
        width: 100%; max-width: 20rem; text-align: center;
        font-size: 1.05rem; letter-spacing: .18em;
    }
    .nav.is-open a:last-of-type { border-bottom: none; }
    .nav-close {
        display: flex; align-items: center; justify-content: center;
        position: absolute; top: 1.4rem; right: 1.4rem;
        width: 46px; height: 46px; border-radius: 50%;
        background: transparent; border: 1px solid var(--line);
        color: var(--navy); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0;
    }
    body:has(.nav.is-open) { overflow: hidden; }
}

@media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
    .nav.is-open { animation: navFadeIn .28s ease both; }
    .nav.is-open a { animation: rise .35s cubic-bezier(.2,.75,.3,1) both; }
    .nav.is-open a:nth-of-type(1) { animation-delay: .04s; }
    .nav.is-open a:nth-of-type(2) { animation-delay: .09s; }
    .nav.is-open a:nth-of-type(3) { animation-delay: .14s; }
}
@keyframes navFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ----- Main container ---------------------------------------------------- */
main {
    position: relative;
    z-index: 2;
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1.4rem clamp(1.1rem, 4vw, 2rem) 3rem;
}
.section { margin: 2.2rem 0; }
.section-title { text-align: center; margin-bottom: 1.6rem; }
.section-title h1 {
    font-family: var(--font-title);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 400;
    font-size: clamp(1.55rem, 4.3vw, 2.25rem);
}

/* Quick-jump chips: "You're invited to …" */
.invited-nav { text-align: center; max-width: 600px; margin: 0 auto 1.8rem; }
.invited-nav .eyebrow { margin-bottom: .7rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.chip {
    display: inline-flex; align-items: center; gap: .45rem;
    font-family: var(--font-body); font-weight: 500; font-size: .74rem;
    letter-spacing: .02em; color: var(--navy);
    background: var(--warm-white); border: 1px solid var(--line);
    border-radius: 999px; padding: .5rem 1.05rem; white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { background: var(--navy-fill); color: #fff; border-color: var(--navy-fill); text-decoration: none; }
.chip:hover .chip-dot { background: #fff; }
.chip:hover .chip-check { color: #fff; }

/* Reply status on each chip */
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.chip-check { color: #4a7a4e; font-weight: 700; font-size: .82rem; line-height: 1; flex-shrink: 0; }
.chip--pending { border-color: #dcc79c; }               /* soft gold border draws the eye */
.chip--done { background: #eef3ec; border-color: #cbdac5; color: #3f5b41; }
.chip--done:hover { background: var(--navy-fill); color: #fff; border-color: var(--navy-fill); }

.chip-legend {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    margin: .8rem auto 0; font-size: .72rem; color: var(--muted);
}
.chip-legend-sep { margin: 0 .3rem; opacity: .6; }

/* ----- Cards / panels ---------------------------------------------------- */
.panel {
    background: var(--warm-white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: clamp(1.3rem, 4vw, 2.1rem);
    margin-bottom: 1.3rem;
    box-shadow: 0 10px 30px -22px rgba(36,57,91,.35);
}
.card-soft {
    background: var(--warm-white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 30px -22px rgba(36,57,91,.35);
}

/* ----- Hero (home) — photo one side, content the other ------------------- */
.hero {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
    gap: clamp(1.6rem, 5vw, 3.6rem);
    align-items: center;
    text-align: left;
    padding: 1rem 0 1.5rem;
}
.hero__content { min-width: 0; }
.hero__greeting {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 4.4vw, 2.4rem);
    font-weight: 600;
    color: var(--navy);
    line-height: 1.12;
    letter-spacing: .005em;
    margin: 0 0 1.1rem;
}
.hero .hero-photo {
    width: 100%;
    max-width: 440px;
    margin: 0;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 26px 52px -34px rgba(36,57,91,.55);
}
.hero .hero-photo--placeholder {
    display: flex; align-items: center; justify-content: center; text-align: center;
    background: linear-gradient(155deg, var(--powder), var(--warm-white));
    color: var(--cornflower);
    font-family: var(--font-body); font-weight: 500;
    letter-spacing: .12em; text-transform: uppercase; font-size: .74rem;
    padding: 2rem;
}
.hero .lead { margin-top: 1.3rem; }
.hero__actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }

@media (max-width: 760px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.3rem;
        padding-top: .4rem;
    }
    .hero .hero-photo { margin: 0 auto; max-width: 340px; }
    .hero .lead { margin-inline: auto; }
    .hero__actions { justify-content: center; }
    .home-top .countdown { gap: 1.1rem; }
}

.home-top { text-align: center; padding: .3rem 0 .6rem; }
.home-datewhere {
    font-family: var(--font-body); font-weight: 600;
    text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
    color: var(--cornflower); margin: 0 0 .9rem;
}
.home-top .countdown { justify-content: center; }

.countdown { display: inline-flex; gap: 1.5rem; }
.countdown div { text-align: center; }
.countdown .num {
    font-family: var(--font-display); font-weight: 600;
    font-size: 2rem; color: var(--navy); line-height: 1;
}
.countdown .lbl {
    font-family: var(--font-body); text-transform: uppercase;
    letter-spacing: .16em; font-size: .58rem; font-weight: 600; color: var(--muted);
    margin-top: .35rem;
}

/* ----- Event cards (image-forward: big square photo on top) -------------- */
.event-panel { max-width: 600px; margin-inline: auto; }
.event-hero {
    width: 100%;
    aspect-ratio: 1 / 1;           /* square, image is the focal point */
    background: center / cover no-repeat var(--powder);
}
.event-hero[data-lightbox] { cursor: zoom-in; }
.event-body { padding: clamp(1.4rem, 4.5vw, 2rem); }

/* ----- Global loading overlay -------------------------------------------- */
.loader {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem;
    background: rgba(247, 245, 239, .8);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.loader.is-active { opacity: 1; pointer-events: all; }
.loader__spin {
    width: 46px; height: 46px; border-radius: 50%;
    border: 3px solid rgba(36, 57, 91, .18); border-top-color: var(--navy);
    animation: spin .8s linear infinite;
}
.loader__label {
    font-family: var(--font-title); text-transform: uppercase;
    letter-spacing: .18em; font-size: .72rem; color: var(--navy);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- Lightbox (invitation image viewer) -------------------------------- */
.lightbox {
    position: fixed; inset: 0; z-index: 1000;
    display: none; align-items: center; justify-content: center;
    padding: 5vmin;
    background: rgba(28, 25, 23, .94);   /* warm stone */
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.lightbox.is-open { display: flex; animation: lbFade .22s ease both; }
.lightbox__img {
    max-width: min(92vw, 720px);
    max-height: 88vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .65);
    animation: lbZoom .3s cubic-bezier(.2, .75, .3, 1) both;
}
.lightbox__close {
    position: absolute; top: max(3vmin, 14px); right: max(3vmin, 14px);
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer;
    transition: background .15s, transform .15s;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .24); transform: scale(1.05); }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbZoom { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .lightbox.is-open, .lightbox__img { animation: none; }
}
.event-meta {
    font-family: var(--font-body); text-transform: uppercase;
    letter-spacing: .13em; font-size: .7rem; font-weight: 600; color: var(--cornflower);
    margin-bottom: .35rem;
}
.event-body h3 {
    font-family: var(--font-title);
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 400;
    margin-bottom: .25rem;
    font-size: clamp(1.3rem, 3.6vw, 1.65rem);
}
.event-where { color: var(--muted); font-size: .96rem; margin: 0; }
.event-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .9rem; }

/* ----- Generic modal (calendar picker, RSVP confirmation, …) ------------- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    display: none; align-items: center; justify-content: center;
    padding: 1.25rem;
    background: rgba(27, 44, 71, .45);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.modal-overlay.is-open { display: flex; }
@media (prefers-reduced-motion: no-preference) {
    .modal-overlay.is-open { animation: lbFade .18s ease both; }
}
.modal-card {
    position: relative;
    background: var(--warm-white);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 30px 70px -30px rgba(27, 44, 71, .55);
    max-width: 26rem; width: 100%;
    padding: clamp(1.5rem, 5vw, 2.2rem);
    text-align: center;
}
.modal-card__title {
    font-family: var(--font-display); font-weight: 600; color: var(--navy);
    font-size: clamp(1.5rem, 5vw, 1.9rem); margin: .4rem 0 .6rem;
}
.modal-card__lead { color: var(--ink); line-height: 1.6; margin: 0 0 1rem; }
.modal-close {
    position: absolute; top: .8rem; right: .8rem;
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--line);
    color: var(--navy); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0;
    transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--navy-fill); color: #fff; }
body:has(.modal-overlay.is-open) { overflow: hidden; }

.cal-options { display: grid; gap: .6rem; margin-top: 1.2rem; }
.cal-options a {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px;
    font-family: var(--font-body); font-weight: 600; font-size: .82rem;
    letter-spacing: .02em; color: var(--navy); text-decoration: none;
    transition: background .15s, border-color .15s;
}
.cal-options a:hover { background: var(--powder); border-color: var(--cornflower); }

/* ----- Registry ------------------------------------------------------------ */
.registry-card { max-width: 30rem; margin: 0 auto; }
.registry-card__logo { width: 150px; height: auto; display: inline-block; }

/* ----- Buttons ----------------------------------------------------------- */
.btn {
    display: inline-block;
    font-family: var(--font-body); font-weight: 600;
    text-transform: uppercase; letter-spacing: .1em; font-size: .74rem;
    padding: .85rem 1.6rem; border-radius: 10px;
    border: 1px solid var(--navy-fill); background: var(--navy-fill); color: #fff;
    cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .05s;
    text-align: center;
}
.btn:hover { background: #1b2c47; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy-fill); color: #fff; }
.btn--gold { background: var(--gold); border-color: var(--gold); }
.btn--gold:hover { background: #94793f; border-color: #94793f; color: #fff; }
.btn--block { display: block; width: 100%; }
.btn--sm { padding: .58rem 1.05rem; font-size: .68rem; border-radius: 8px; }
.btn--xs { padding: .4rem .8rem; font-size: .62rem; border-radius: 7px; }
.btn--lg { padding: 1.05rem 2.2rem; font-size: .82rem; border-radius: 12px; }

/* ----- Forms ------------------------------------------------------------- */
label { font-family: var(--font-body); font-size: .85rem; color: var(--ink); }
.field { margin-bottom: 1.05rem; }
.field > label {
    display: block; margin-bottom: .4rem;
    text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; font-weight: 600; color: var(--muted);
}
input[type=text], input[type=email], input[type=date], input[type=password], input[type=number], select, textarea {
    width: 100%;
    font-family: var(--font-body); font-size: 1rem; color: var(--ink);
    background: var(--warm-white); border: 1px solid var(--line);
    border-radius: 10px; padding: .72rem .85rem;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--cornflower);
    box-shadow: 0 0 0 3px rgba(91,123,176,.16);
}

/* RSVP — one clear card per invited guest */
.rsvp__intro {
    font-family: var(--font-body); font-weight: 600;
    text-transform: uppercase; letter-spacing: .12em; font-size: .74rem;
    color: var(--cornflower); margin: 0 0 .9rem;
}
.rsvp__person {
    border: 1px solid var(--line); border-radius: 12px;
    background: var(--warm-white); padding: .95rem 1.05rem; margin-bottom: .75rem;
}
.rsvp__head {
    display: flex; justify-content: space-between; align-items: center;
    gap: .7rem 1rem; flex-wrap: wrap;
}
.rsvp__who { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.rsvp__name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--navy); }
.rsvp__todo {
    font-family: var(--font-body); font-size: .62rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .1em; color: var(--gold);
    border: 1px solid #dcc79c; border-radius: 999px; padding: .12rem .5rem;
}
.rsvp__extra { margin-top: .9rem; padding-top: .85rem; border-top: 1px dashed var(--line); }
.rsvp__foot {
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem; flex-wrap: wrap; margin-top: 1.1rem; padding-top: .3rem;
}
@media (max-width: 520px) {
    .rsvp__head { align-items: flex-start; }
    .choice--rsvp { width: 100%; }
    .choice--rsvp label { flex: 1; text-align: center; }
}

/* Attending / Yes-No pills */
.choice {
    display: inline-flex; border: 1px solid var(--line); border-radius: 10px;
    overflow: hidden; background: var(--warm-white);
}
.choice label {
    padding: .55rem 1.15rem; cursor: pointer; margin: 0;
    font-family: var(--font-body); font-weight: 500; font-size: .76rem;
    letter-spacing: .04em; color: var(--ink); transition: background .15s, color .15s;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice input:checked + label { background: var(--navy-fill); color: #fff; }
.choice input.pos:checked + label { background: var(--sage); color: #fff; }
.choice input.neg:checked + label { background: #b06a6a; color: #fff; }

/* ----- Alerts ------------------------------------------------------------ */
.alert { border-radius: 10px; padding: .85rem 1.1rem; margin-bottom: 1.1rem; font-size: .96rem; border: 1px solid; }
.alert-success { background: #eef3ec; border-color: #cad9c4; color: #3f5b41; }
.alert-error   { background: #f7ecec; border-color: #e2c4c4; color: #8a4242; }
.alert-info    { background: #eef1f8; border-color: var(--powder); color: #37476a; }

/* ----- Footer ------------------------------------------------------------ */
.site-footer {
    position: relative; z-index: 2; flex-shrink: 0; text-align: center;
    padding: 1.8rem 1rem; border-top: 1px solid var(--line-soft); margin-top: 1.5rem;
    font-size: .85rem;
}
.site-footer a { text-decoration: underline; }

/* ----- Utilities --------------------------------------------------------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }
.pill {
    display: inline-block; font-family: var(--font-body); font-weight: 600;
    font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
    padding: .28rem .7rem; border-radius: 999px; border: 1px solid var(--line);
}
.pill--attending { background: #eef3ec; color: #3f5b41; border-color: #cad9c4; }
.pill--declined  { background: #f7ecec; color: #8a4242; border-color: #e2c4c4; }
.pill--pending   { background: var(--ivory); color: var(--muted); }

/* ==========================================================================
   Motion — entrance, scroll-reveal, page transitions, micro-interactions.
   All gated behind prefers-reduced-motion so it fully disables on request.
   ========================================================================== */

/* Cross-document page transitions (progressive enhancement; ignored where unsupported) */
@view-transition { navigation: auto; }

@media (prefers-reduced-motion: no-preference) {

    /* --- Entrance on load (above-the-fold page titles; home page has no entrance animation) --- */
    .section-title,
    .landing-hero > * {
        animation: rise .7s cubic-bezier(.2,.75,.3,1) both;
    }

    /* --- Scroll reveal (JS adds .reveal to below-the-fold blocks) --- */
    .reveal { opacity: 0; transform: translateY(20px); transition: opacity .75s ease, transform .75s cubic-bezier(.2,.75,.3,1); }
    .reveal.in { opacity: 1; transform: none; }
    /* Gentle stagger for grouped cards */
    .reveal.st-1 { transition-delay: .07s; }
    .reveal.st-2 { transition-delay: .14s; }
    .reveal.st-3 { transition-delay: .21s; }

    /* --- Micro-interactions --- */
    .panel, .event-panel, .card-soft {
        transition: transform .28s ease, box-shadow .28s ease;
    }
    .event-panel:hover, .card-soft:hover {
        transform: translateY(-4px);
        box-shadow: 0 24px 46px -26px rgba(36,57,91,.5);
    }
    .event-hero { transition: transform .6s ease; }
    .event-panel:hover .event-hero { transform: scale(1.03); }
    .hero-photo { transition: transform .5s ease, box-shadow .5s ease; }
    .hero-photo:hover { transform: scale(1.015); }
    .chip { transition: transform .15s ease, background .15s, color .15s, border-color .15s; }
    .chip:hover { transform: translateY(-2px); }
    .btn { transition: background .15s, color .15s, border-color .15s, transform .08s ease, box-shadow .2s ease; }
    .btn:hover { box-shadow: 0 10px 22px -14px rgba(27,44,71,.7); }
    .nav a::after,
    .leaf-rule { will-change: auto; }

    /* --- Root crossfade for the View Transitions API --- */
    ::view-transition-old(root) { animation: vtOut .24s ease both; }
    ::view-transition-new(root) { animation: vtIn .38s cubic-bezier(.2,.75,.3,1) both; }
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Dark mode — follows the visitor's OS/browser preference automatically.
   --navy-fill is deliberately left untouched here: it's the button/chip fill
   colour and needs to stay dark-navy in both themes for white button text to
   read. Everything else (headings, ink, surfaces, borders) flips.
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --navy:        #C3D2EC;
        --ink:         #DDE3EE;
        --cornflower:  #8FB0E8;
        --dusty:       #6D84A8;
        --sage:        #A9C2AA;
        --gold:        #D9BD86;
        --powder:      #263A55;
        --ivory:       #14181F;
        --warm-white:  #1B212B;
        --line:        #2E3644;
        --line-soft:   #262D39;
        --muted:       #8D97AC;
    }

    body {
        background-color: var(--ivory);
        background-image: linear-gradient(180deg, #171C26 0%, #14181F 45%, #12151B 100%);
    }

    .nav-toggle { background: var(--warm-white); }
    .card-soft, .panel, .event-panel, .modal-card, .card { box-shadow: 0 10px 30px -22px rgba(0,0,0,.6); }

    /* The Amazon wordmark SVG is baked dark-on-transparent; flip it for a dark surface. */
    .registry-card__logo { filter: invert(1) brightness(1.6); }

    /* Corner/leaf/sprig art was painted for a light page; dim slightly so it doesn't glare. */
    .corner, .leaf-rule, .sprig { opacity: .75; }
}

