/* ================================================
   Royal Eighteen — Digital Invitation Theme
   A crowned gold-foil frame for 18th birthdays: an ivory paper card with a
   thin double gold rule, laurel branches + ribbon curls bleeding from the
   corners, and a hand-lettered name. Purely typographic hero — no host
   photo — all artwork is CSS/SVG.
   ================================================ */

/* ---------- CSS Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --cream:      #fffdf7;
    --cream-alt:  #f4ead4;
    --panel:      #fffefb;
    --ink:        #241d12;
    --ink-soft:   #6c6252;
    --gold:       #b8933a;
    --gold-light: #e9c976;
    --gold-deep:  #7c5f22;
    --gold-pale:  #f3e6c4;
    --white:      #fffefb;
    --accent-color: var(--gold);
    --radius:     14px;
    --btn-radius: 999px;
    --ff-numeral: 'Playfair Display', Georgia, serif;
    --ff-display: 'Cormorant Garamond', Georgia, serif;
    --ff-script:  'Tangerine', cursive;
    --ff-body:    'Jost', sans-serif;

    /* Palette read by the shared <x-checkerboard-gallery-grid> lightbox engine. */
    --cbg-ink:      var(--ink);
    --cbg-accent:   var(--ink);
    --cbg-backdrop: #14100a;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--ff-body);
    font-weight: 400;
    color: var(--ink-soft);
    background-color: var(--cream);
    line-height: 1.7;
}

img { max-width: 100%; display: block; }
a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Utility ---------- */
.brg-container         { max-width: 1100px; margin: 0 auto; }
.brg-container--narrow { max-width: 680px; }

/* Sections alternate a subtle cream tint instead of a hardcoded color per
   section, so the rhythm survives whichever sections are hidden by plan
   tier, section-visibility toggles, or missing data. */
.brg-alt-sections > * {
    position: relative;
    background: var(--cream);
}
.brg-alt-sections > *:nth-child(even) {
    background: var(--cream-alt);
}

.brg-section-title {
    font-family: var(--ff-display);
    font-size: clamp(2rem, 4.4vw, 2.9rem);
    color: var(--ink);
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1.1rem;
}
.brg-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 46px;
    height: 1px;
    transform: translateX(-50%);
    background: var(--gold);
}

/* ---------- Shape dividers ---------- */
.brg-shape {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    direction: ltr;
    pointer-events: none;
    z-index: 1;
}
.brg-shape-top { top: -1px; }
.brg-shape-bottom { bottom: -1px; }
.brg-shape[data-negative="false"].brg-shape-bottom,
.brg-shape[data-negative="true"].brg-shape-top {
    transform: rotate(180deg);
}
.brg-shape svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 40px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* ---------- Scattered gold dot decoration (<use> sprite technique) ---------- */
.brg-fx-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.brg-fx-dot { position: absolute; color: var(--gold); }
.brg-fx-dot--sm { width: 8px; height: 8px; opacity: .3; }
.brg-fx-dot--md { width: 13px; height: 13px; opacity: .22; }
.brg-fx-dot--lg { width: 22px; height: 22px; opacity: .45; }

.brg-fx-icon { position: absolute; color: var(--gold); }
.brg-fx-icon--sm { width: 60px; height: 60px; opacity: .15; }
.brg-fx-icon--md { width: 90px; height: 90px; opacity: .13; }

@media (max-width: 700px) {
    .brg-fx-dot--lg { display: none; }
    .brg-fx-icon--md { display: none; }
}

/* ---------- Hero (single framed card, host photo medallion) ---------- */
.brg-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3.5rem 1.25rem 3.5rem;
    background: var(--cream);
}

.brg-hero__card {
    position: relative;
    z-index: 2;
    width: 100%;
    background: var(--panel);
    padding: 3.5rem 3rem 3rem;
    text-align: center;
    box-shadow: 0 24px 64px rgba(36,29,18,.1);
    overflow: hidden;
}

/* Thin double gold rule, inset from the card edges — the reference image's
   picture-frame border, done as two nested pseudo-outlines instead of a
   hand-drawn corner-flourish SVG so it scales cleanly at any card size. */
.brg-hero__card::before,
.brg-hero__card::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 3;
}
.brg-hero__card::before { inset: 16px; border: 1.5px solid var(--gold); }
.brg-hero__card::after { inset: 21px; border: 1px solid var(--gold); opacity: .5; }

.brg-hero__inner {
    position: relative;
    z-index: 2;
}

/* ---------- Corner motifs: illustrated gold leaf/ribbon artwork (vector-
   drawn, rasterized to transparent PNG) — sized by natural aspect ratio
   (width + height:auto; the leaf art is a tall 340x838 branch, the ribbon a
   300x368 curl) rather than a forced square box. The same asset is reused
   in the opposite corner via a 180deg rotation. ---------- */
.brg-hero__leaf,
.brg-hero__ribbon {
    position: absolute;
    z-index: 2;
    pointer-events: none;
}
.brg-hero__leaf img,
.brg-hero__ribbon img { width: 100%; height: auto; display: block; }

.brg-hero__leaf { width: clamp(64px, 14vw, 92px); opacity: .95; }
.brg-hero__leaf--tl { top: -6px; left: -6px; }
.brg-hero__leaf--br { bottom: -6px; right: -6px; transform: rotate(180deg); }

.brg-hero__ribbon { width: clamp(48px, 10vw, 72px); opacity: .95; }
.brg-hero__ribbon--tr { top: -4px; right: -4px; }
.brg-hero__ribbon--bl { bottom: -4px; left: -4px; transform: rotate(180deg); }

@media (max-width: 480px) {
    .brg-hero__leaf { width: 54px; }
    .brg-hero__ribbon { width: 42px; }
}

/* ---------- Hero content ---------- */
.brg-hero__eyebrow {
    font-family: var(--ff-body);
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--gold-deep);
    margin-bottom: 1rem;
}

/* ---------- Host portrait medallion (crown badge overlapping the photo) ---------- */
.brg-hero__portrait {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.35rem;
}

.brg-hero__crown {
    width: 42px;
    height: 30px;
    color: var(--gold);
    display: block;
    position: relative;
    z-index: 2;
    margin-bottom: -13px;
    filter: drop-shadow(0 2px 3px rgba(36,29,18,.15));
}

.brg-hero__photo {
    position: relative;
    width: clamp(110px, 22vw, 180px);
    height: clamp(110px, 22vw, 180px);
    border-radius: 50%;
    overflow: hidden;
    background: var(--gold-pale);
    border: 4px solid var(--white);
    box-shadow: 0 0 0 2px var(--gold), 0 12px 28px rgba(36,29,18,.2);
}

.brg-hero__photo-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brg-hero__photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
}

.brg-hero__numeral {
    font-family: var(--ff-numeral);
    font-weight: 900;
    font-size: clamp(4.2rem, 13vw, 5.8rem);
    line-height: .85;
    letter-spacing: -.01em;
    margin-top: .65rem;
    background: linear-gradient(160deg, var(--gold-light) 0%, var(--gold) 45%, var(--gold-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 6px 14px rgba(124,95,34,.25));
    user-select: none;
}
.brg-hero__numeral span { font-weight: 700; }

.brg-hero__caption {
    font-family: var(--ff-display);
    font-size: .98rem;
    font-weight: 700;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--ink);
    margin-top: .2rem;
}

.brg-hero__flourish {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    margin: 2rem auto 2.25rem;
    max-width: 210px;
}
.brg-hero__flourish span {
    flex: 1;
    height: 1px;
    background: var(--gold);
    opacity: .6;
}
.brg-hero__flourish svg {
    width: 6px;
    height: 6px;
    color: var(--gold);
    flex-shrink: 0;
}

.brg-hero__name {
    font-family: var(--ff-script);
    font-weight: 700;
    font-size: clamp(3.1rem, 9vw, 4.4rem);
    line-height: 1;
    color: var(--gold-deep);
    margin-bottom: 1.6rem;
}

/* ---------- Hero meta row (date / time / location, circular icons + dividers) ---------- */
.brg-hero__meta {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1.1rem;
    margin-bottom: 1.75rem;
}

.brg-hero__meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    flex: 1;
    min-width: 0;
    padding: 0 .5rem;
    position: relative;
}
.brg-hero__meta-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: .25rem;
    right: 0;
    bottom: .25rem;
    width: 1px;
    background: rgba(184,147,58,.35);
}

.brg-hero__meta-icon {
    width: 2.3rem;
    height: 2.3rem;
    color: var(--gold);
    fill: currentColor;
    overflow: visible;
}

.brg-hero__meta-value {
    font-family: var(--ff-display);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
}

@media (max-width: 480px) {
    .brg-hero__photo { width: 92px; height: 92px; }
    .brg-hero__meta { gap: .45rem; }
    .brg-hero__meta-icon { width: 1.75rem; height: 1.75rem; }
}

/* Floating topbar — no brand/logo, just the link menu, so it's centered
   rather than pinned to one edge (there's no second element to space it
   against). Mobile overrides back to flex-start (see 600px query) to sit
   the hamburger toggle at the left. */
.brg-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    padding: .9rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    transition: background .3s ease, backdrop-filter .3s ease;
}

@media (min-width: 601px) {
    .brg-topbar.scrolled {
        background: color-mix(in srgb, var(--cream) 92%, transparent);
        backdrop-filter: blur(10px);
    }
}

.brg-topbar__links {
    display: flex;
    gap: 1.25rem;
}
.brg-topbar__links a {
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ink-soft);
    transition: color .2s;
}
.brg-topbar__links a:hover { color: var(--gold-deep); text-decoration: none; }

.brg-topbar__toggle { display: none; }

/* Demo-only Basic/Standard switch + close + cart badge. */
.dpb-switch,
.dpb-fab {
    position: fixed;
    bottom: 1rem;
    z-index: 9999;
}
.dpb-fab { right: 1rem; }
.dpb-close { right: 4rem; }
.dpb-switch {
    left: 1rem;
    display: flex;
    align-items: center;
    height: 2.5rem;
    padding: 0 .25rem;
}
.dpb-switch a {
    display: inline-flex;
    align-items: center;
    height: 2rem;
    padding: 0 .9rem;
    font-size: 12px;
}

@media (max-width: 600px) {
    .brg-topbar { justify-content: flex-start; }
    .brg-topbar__toggle { order: -1; }

    .brg-topbar__toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 3rem;
        height: 3rem;
        padding: 0;
        border: 1.5px solid rgba(255,255,255,.25);
        border-radius: 50%;
        background: rgba(36,29,18,.55);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        cursor: pointer;
        transition: background .2s;
    }
    .brg-topbar__toggle span {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 1px;
        background: #fff;
        transition: transform .25s ease, opacity .2s ease;
    }
    .brg-topbar__toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .brg-topbar__toggle.is-active span:nth-child(2) { opacity: 0; }
    .brg-topbar__toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .brg-topbar__links {
        display: flex;
        flex-direction: column;
        gap: .25rem;
        position: absolute;
        top: calc(100% + .5rem);
        left: 1rem;
        right: 1rem;
        padding: .5rem;
        background: rgba(255,253,247,.97);
        border: 1px solid var(--gold-deep);
        border-radius: 12px;
        box-shadow: 0 12px 32px rgba(36,29,18,.2);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
    }
    .brg-topbar__links.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .brg-topbar__links a {
        text-align: center;
        padding: .65rem 1rem;
        border-radius: 8px;
        color: var(--ink-soft);
    }
    .brg-topbar__links a:hover { background: rgba(124,95,34,.1); color: var(--gold-deep); }
}

/* ---------- A Little Note (quote card) ---------- */
.brg-poem {
    padding: 5rem 1.25rem 6rem;
    text-align: center;
    position: relative;
    background: var(--cream-alt);
}

.brg-poem__card {
    position: relative;
    background: var(--panel);
    border: 1px solid rgba(184,147,58,.35);
    border-radius: var(--radius);
    padding: 3rem 2.5rem 2.25rem;
    max-width: 640px;
    margin: 0 auto;
    box-shadow: 0 15px 40px rgba(36,29,18,.08);
}

.brg-poem__quote {
    display: block;
    font-family: var(--ff-numeral);
    font-size: 3.5rem;
    line-height: 1;
    color: var(--gold);
    opacity: .8;
}
.brg-poem__quote--open { margin-bottom: -.5rem; }
.brg-poem__quote--close { margin-top: -.5rem; transform: scaleX(-1); }

.brg-poem__text {
    font-family: var(--ff-display);
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.8;
    white-space: pre-line;
    color: var(--ink);
}

.brg-poem__accent {
    margin-top: 1.25rem;
    font-size: 1.1rem;
    color: var(--gold);
}

/* ---------- Countdown ---------- */
.brg-countdown {
    position: relative;
    padding: 5rem 1.25rem 6rem;
    overflow: hidden;
}

.brg-audio {
    padding: 5rem 1.25rem 6rem;
}

.brg-countdown__intro {
    text-align: center;
    color: var(--ink-soft);
    font-size: 1.05rem;
    max-width: 480px;
    margin: 0 auto;
}

.brg-countdown__timer {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.brg-countdown__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--panel);
    border: 1px solid rgba(184,147,58,.35);
    padding: 1.5rem 0 1.1rem;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(36,29,18,.08);
    min-width: 100px;
}

.brg-countdown__number {
    font-family: var(--ff-display);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--gold-deep);
    line-height: 1;
}

.brg-countdown__label {
    font-family: var(--ff-body);
    font-size: .72rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: .5rem;
}

/* ---------- Program ---------- */
.brg-program {
    padding: 5rem 1.25rem 6rem;
}

.brg-program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem 2rem;
    max-width: 1100px;
    margin: 3rem auto 0;
    text-align: center;
}

.brg-program-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brg-program-card__icon {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--gold);
    fill: currentColor;
    overflow: visible;
    margin-bottom: 1.25rem;
}

.brg-program-card__title {
    font-family: var(--ff-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
}

.brg-program-card__title small {
    display: block;
    margin-top: .4rem;
    font-family: var(--ff-body);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold-deep);
}

.brg-program-card__location {
    font-size: .85rem;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: .85rem 0 1.4rem;
}

.brg-program-card .brg-btn {
    display: inline-block;
    width: auto;
    margin-top: auto;
    padding: .55rem 1.4rem;
    font-size: .78rem;
}

/* ---------- Growing Up Story ("Chapters" — deliberately not the shared
   alternating zigzag-with-spine layout every other theme uses. A row of
   numbered plaques instead: Roman numeral, circular photo medallion
   (echoes .brg-hero__photo), thin vertical rule between each chapter. ---------- */
.brg-story {
    padding: 5rem 1.25rem 6rem;
    text-align: center;
}

.brg-story__intro {
    max-width: 34rem;
    margin: 0 auto 1rem;
    font-size: 1rem;
    line-height: 1.7;
}

.brg-story__chapters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    margin-top: 3rem;
}

.brg-story__chapter {
    position: relative;
    flex: 1 1 220px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 2rem;
}
.brg-story__chapter:not(:last-child)::after {
    content: '';
    position: absolute;
    top: .25rem;
    bottom: .25rem;
    right: 0;
    width: 1px;
    background: rgba(184,147,58,.35);
}

.brg-story__numeral {
    font-family: var(--ff-numeral);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: .08em;
    color: var(--gold);
    margin-bottom: .85rem;
}

.brg-story__medallion {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gold-pale);
    border: 4px solid var(--white);
    box-shadow: 0 0 0 1.5px var(--gold), 0 10px 24px rgba(36,29,18,.16);
    margin-bottom: 1.1rem;
}

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

.brg-story__caption {
    display: block;
    font-family: var(--ff-display);
    font-style: italic;
    font-size: .82rem;
    color: var(--ink-soft);
    margin-bottom: .6rem;
}

.brg-story__period {
    display: block;
    font-family: var(--ff-body);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-bottom: .3rem;
}

.brg-story__title {
    font-family: var(--ff-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: .4rem;
}

.brg-story__desc {
    font-size: .9rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

@media (max-width: 720px) {
    .brg-story__chapters { flex-direction: column; align-items: center; gap: 3rem; }
    .brg-story__chapter { padding: 0 1rem; max-width: 320px; }
    .brg-story__chapter:not(:last-child)::after {
        top: auto;
        left: 20%;
        right: 20%;
        bottom: -1.5rem;
        width: auto;
        height: 1px;
    }
}

/* ---------- Gallery / Guest Wall ---------- */
.brg-gallery { padding: 5rem 1.25rem 6rem; text-align: center; }
.brg-guest-wall { padding: 5rem 1.25rem 6rem; text-align: center; }
.brg-gallery-upload { padding: 5rem 1.25rem 6rem; text-align: center; }

.brg-gallery-upload .gu-form {
    max-width: 620px;
    padding: 0 1.5rem;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* ---------- Dress Code / Good to Know ---------- */
.brg-dress-code { padding: 5rem 1.25rem 6rem; text-align: center; }
.brg-good-to-know { padding: 5rem 1.25rem 6rem; text-align: center; }

.brg-gtk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.brg-gtk-card {
    position: relative;
    background: var(--panel);
    border: 1px solid rgba(184,147,58,.3);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(36,29,18,.06);
}

.brg-gtk-card__head {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .6rem;
}

.brg-gtk-card__icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--gold);
    flex-shrink: 0;
}

.brg-gtk-card__title {
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    margin: 0;
}

.brg-gtk-card__text {
    font-size: .9rem;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0;
}

/* ---------- Closing ---------- */
.brg-closing {
    padding: 2.5rem 1.25rem;
    text-align: center;
}

.brg-closing p {
    font-family: var(--ff-display);
    font-style: italic;
    font-size: 1rem;
    color: var(--ink);
    opacity: .7;
    margin: 0;
}

/* ---------- Map ---------- */
.brg-location { padding: 5rem 1.25rem 6rem; }

.brg-location__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    margin-top: 1.5rem;
}

@media (max-width: 820px) {
    .brg-location__grid {
        grid-template-columns: 1fr;
    }
}

.brg-location__map iframe {
    width: 100%;
    height: 380px;
    border: 0;
    display: block;
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(36,29,18,.15);
    filter: sepia(.1) saturate(.9);
}

.brg-location__info {
    text-align: center;
}

.brg-location__icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 1rem;
    color: var(--gold);
    fill: currentColor;
    overflow: visible;
}

.brg-location__name {
    font-family: var(--ff-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: .5rem;
}

.brg-location__address {
    color: var(--ink-soft);
    margin-bottom: 1.5rem;
}

/* ---------- Album ---------- */
.brg-album { padding: 5rem 1.25rem; text-align: center; }
.brg-album__text { opacity: .8; margin-bottom: 2rem; }

/* ---------- RSVP ---------- */
.brg-rsvp {
    position: relative;
    padding: 5rem 1.25rem 6rem;
}
.brg-rsvp .rsvp-deadline {
    background: transparent;
    margin-bottom: 10px;
}

.brg-rsvp .brg-section-title,
.brg-rsvp .rsvp-layout-wrap {
    position: relative;
    z-index: 2;
}

.brg-rsvp__subtitle {
    text-align: center;
    color: var(--ink-soft);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.brg-alert--success {
    background: var(--panel);
    color: var(--ink);
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.rsvp-layout-wrap {
    max-width: 560px;
    margin: 0 auto;
    background: var(--panel);
    border: 1px solid rgba(184,147,58,.35);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(36,29,18,.1);
    padding: 3.5rem 2.5rem;
}

@media (max-width: 500px) {
    .rsvp-layout-wrap {
        padding: 2.5rem 1.25rem;
    }
}

.brg-rsvp .form__group label {
    display: block;
    font-family: var(--ff-body);
    font-weight: 600;
    font-size: .72rem;
    color: var(--ink);
    margin-bottom: .4rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.brg-rsvp .form__group input[type="text"],
.brg-rsvp .form__group input[type="email"],
.brg-rsvp .form__group input[type="tel"],
.brg-rsvp .form__group select,
.brg-rsvp .form__group textarea {
    width: 100%;
    padding: .95rem 1.25rem;
    border: 1px solid rgba(36,29,18,.12);
    border-radius: 8px;
    font-family: var(--ff-body);
    font-weight: 400;
    font-size: .95rem;
    color: var(--ink);
    background-color: var(--cream);
    transition: box-shadow .2s, border-color .2s;
    outline: none;
}
.brg-rsvp .form__group .rsvp-stepper {
    background: var(--cream);
}

.brg-rsvp .form__group input[type="text"]:focus,
.brg-rsvp .form__group input[type="email"]:focus,
.brg-rsvp .form__group input[type="tel"]:focus,
.brg-rsvp .form__group select:focus,
.brg-rsvp .form__group textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184,147,58,.2);
}

.brg-rsvp .form__error {
    display: block;
    color: #b3452c;
    font-size: .82rem;
    margin-top: .3rem;
}

/* Outline pill CTA — deliberately unfilled (border + transparent-on-panel
   background) rather than a solid gradient fill, echoing the reference
   invitation's outlined phone-CTA pill and giving this theme a lighter,
   more restrained button than birthday-18-golden's filled gradient one. */
.brg-btn {
    display: block;
    width: 100%;
    padding: .85rem 2rem;
    background: transparent;
    color: var(--gold-deep);
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: 1.05rem;
    border: 1.5px solid var(--gold);
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: background .2s, color .2s, transform .15s;
    letter-spacing: .02em;
    margin-top: .5rem;
    text-align: center;
}

.brg-btn:hover {
    background: var(--gold);
    color: var(--white);
    transform: translateY(-2px);
    text-decoration: none;
}

.brg-location .brg-btn,
.brg-album .brg-btn { display: inline-block; width: auto; margin-top: 1.5rem; }

/* ---------- Footer ---------- */
.brg-footer {
    background: var(--ink);
    color: rgba(255,254,251,.75);
    text-align: center;
    padding: 2.5rem 1.25rem;
    font-size: .9rem;
}

.brg-footer p { margin-bottom: .35rem; }
.brg-footer a { color: var(--gold-light); }
.brg-footer__ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    max-width: 13rem;
    margin: 0 auto 1rem;
    color: var(--gold-light);
}
.brg-footer__ornament-line { flex: 1; height: 1px; background: linear-gradient(to right, transparent, currentColor); }
.brg-footer__ornament-line:last-child { background: linear-gradient(to left, transparent, currentColor); }
.brg-footer__ornament-mark { flex-shrink: 0; font-size: 1rem; line-height: 1; }
.brg-footer__signoff { max-width: 24rem; margin: 0 auto 1.5rem; opacity: .8; }
/* Not .brg-btn — its translucent 35% gold wash is too faint for a footer CTA;
   a solid gold pill makes the action read. */
.brg-footer__cal {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.5rem;
    padding: .7rem 1.6rem;
    background: var(--gold-light);
    color: #211a0c !important;
    border-radius: 999px;
    font-weight: 700;
    font-size: .9rem;
    letter-spacing: .02em;
    box-shadow: 0 4px 15px rgba(0,0,0,.3);
    transition: transform .15s, box-shadow .15s;
}
.brg-footer__cal:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.4); text-decoration: none; }
.brg-footer__cal-icon { width: 1rem; height: 1rem; flex-shrink: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 500px) {
    .brg-countdown__timer {
        gap: .5rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .brg-countdown__timer::-webkit-scrollbar { display: none; }
    .brg-countdown__unit {
        padding: 1rem .5rem .75rem;
        min-width: 58px;
        flex-shrink: 0;
    }
    .brg-countdown__number { font-size: 2rem; }

    .brg-poem__card { padding: 2.5rem 1.25rem 1.75rem; }
}

/* Standardized horizontal gutter across every content section on mobile. */
@media (max-width: 600px) {
.brg-hero,
.brg-poem,
.brg-countdown,
.brg-program,
.brg-story,
.brg-gallery,
.brg-guest-wall,
.brg-gallery-upload,
.brg-dress-code,
.brg-good-to-know,
.brg-closing,
.brg-location,
.brg-album,
.brg-rsvp,
.brg-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
