/* ================================================
   Golden Eighteen — Digital Invitation Theme
   Gold-foil elegance for 18th birthdays: cream paper, a giant gold
   numeral hero, and scattered polka-dot confetti. All artwork is
   CSS/SVG — no photo assets beyond the host's own uploaded photos.
   ================================================ */

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

:root {
    --cream:      #f7f1e6;
    --cream-alt:  #efe4cf;
    --panel:      #fffaf0;
    --ink:        #2b2620;
    --ink-soft:   #6b5f4f;
    --gold:       #c9a227;
    --gold-light: #e8c565;
    --gold-deep:  #8a651a;
    --gold-pale:  #f3e6c4;
    --white:      #fffdf8;
    --accent-color: var(--gold);
    --radius:     18px;
    --btn-radius: 999px;
    --ff-numeral: 'Fraunces', Georgia, serif;
    --ff-display: 'Cormorant Garamond', Georgia, serif;
    --ff-script:  'Petit Formal Script', cursive;
    --ff-body:    'Jost', sans-serif;

    /* Wave curve baked into a background-image so it can auto-alternate per
       section via nth-child without repeating markup — same technique as
       the cosmic/littlestar/safari themes, recolored for cream paper. */
    --bgd-wave-cream:     url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M0,50 C83,90 167,10 250,50 C333,90 417,10 500,50 C583,90 667,10 750,50 C833,90 917,10 1000,50 L1000,100 L0,100 Z' fill='%23f7f1e6'/%3E%3C/svg%3E");
    --bgd-wave-cream-alt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M0,50 C83,90 167,10 250,50 C333,90 417,10 500,50 C583,90 667,10 750,50 C833,90 917,10 1000,50 L1000,100 L0,100 Z' fill='%23efe4cf'/%3E%3C/svg%3E");
    --bgd-wave-gold:      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M0,50 C83,90 167,10 250,50 C333,90 417,10 500,50 C583,90 667,10 750,50 C833,90 917,10 1000,50 L1000,100 L0,100 Z' fill='%23c9a227'/%3E%3C/svg%3E");

    /* Small repeating bead-row used for the thin seam between alternating
       sections (see .bgd-alt-sections below) — the bigger scalloped divider
       in shape-divider.blade.php marks the hero/countdown/RSVP boundaries. */
    --bgd-dot-row-cream:     url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 22'%3E%3Ccircle cx='11' cy='11' r='6' fill='%23f7f1e6'/%3E%3Ccircle cx='33' cy='11' r='6' fill='%23f7f1e6'/%3E%3C/svg%3E");
    --bgd-dot-row-alt:       url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 22'%3E%3Ccircle cx='11' cy='11' r='6' fill='%23efe4cf'/%3E%3Ccircle cx='33' cy='11' r='6' fill='%23efe4cf'/%3E%3C/svg%3E");

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--ff-body);
    font-weight: 400;
    color: var(--ink-soft);
    background-color: var(--cream);
    /* Faint paper grain — tiny warm specks, fixed so it shows through every
       section regardless of scroll or alternation. */
    background-image: radial-gradient(circle, rgba(138,101,26,.05) 1px, transparent 1.4px);
    background-size: 22px 22px;
    background-attachment: fixed;
    line-height: 1.7;
}

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

/* ---------- Utility ---------- */
.bgd-container         { max-width: 1100px; margin: 0 auto; }
.bgd-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. */
.bgd-alt-sections > * {
    position: relative;
    background: var(--cream);
}
.bgd-alt-sections > *:nth-child(even) {
    background: var(--cream-alt);
}

.bgd-poem::after,
.bgd-alt-sections > *:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 22px;
    background-repeat: repeat-x;
    background-size: 44px 100%;
    pointer-events: none;
    z-index: 1;
}
.bgd-alt-sections > *:nth-child(odd):not(:last-child)::after {
    background-image: var(--bgd-dot-row-alt);
}
.bgd-poem::after,
.bgd-alt-sections > *:nth-child(even):not(:last-child)::after {
    background-image: var(--bgd-dot-row-cream);
}

.bgd-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;
}
.bgd-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 64px;
    height: 10px;
    transform: translateX(-50%);
    background-image:
        radial-gradient(circle at 6px 5px, var(--gold) 4.5px, transparent 5px),
        radial-gradient(circle at 32px 5px, var(--gold-light) 3px, transparent 3.5px),
        radial-gradient(circle at 58px 5px, var(--gold) 4.5px, transparent 5px);
}

/* ---------- Shape dividers ----------
   A row of gold "beads" instead of a wave — the confetti-dot motif is this
   theme's signature, so the section seams echo it too. Generated as a
   repeating row of <circle>s in shape-divider.blade.php. */
.bgd-shape {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    direction: ltr;
    pointer-events: none;
    z-index: 1;
}
.bgd-shape-top { top: -1px; }
.bgd-shape-bottom { bottom: -1px; }
.bgd-shape[data-negative="false"].bgd-shape-bottom,
.bgd-shape[data-negative="true"].bgd-shape-top {
    transform: rotate(180deg);
}
.bgd-shape svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 26px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* ---------- Scattered gold dot decoration (<use> sprite technique) ---------- */
.bgd-fx-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.bgd-fx-dot { position: absolute; color: var(--gold); }
.bgd-fx-dot--sm { width: 10px; height: 10px; opacity: .35; }
.bgd-fx-dot--md { width: 16px; height: 16px; opacity: .25; }
/* Large dots use the #bgd-dot-foil symbol (gradient-filled, not currentColor)
   so they read as a richer "gold coin" instead of a pale flat outline. */
.bgd-fx-dot--lg { width: 28px; height: 28px; opacity: .5; }

/* Milestone-themed icons (key, champagne, cake, "18" roundel) scattered
   alongside the dots — more detailed than a plain circle, so opacity stays
   low to keep them as texture, not competing content. */
.bgd-fx-icon { position: absolute; color: var(--gold); }
.bgd-fx-icon--sm { width: 68px; height: 68px; opacity: .17; }
.bgd-fx-icon--md { width: 100px; height: 100px; opacity: .15; }
.bgd-fx-icon--lg { width: 145px; height: 145px; opacity: .13; }

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

/* ---------- Hero (two-column: numeral+photo panel / text) ---------- */
.bgd-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 7rem 1.5rem 5rem;
    background: var(--cream);
}

.bgd-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

/* ---------- Hero media: "18" in gold-foil type, stacked above the host
   photo in a round locket frame — a plain, proven pattern (same idea
   cosmic/littlestar/safari/superhero already use) instead of hand-built
   digit shapes with photo apertures, which never read cleanly as an actual
   "18" through several attempts. Stacked (not overlapped) so the numeral is
   never partly hidden behind the photo — overlapping them looked "premium"
   in theory but the frame ended up covering most of the "8". */
.bgd-hero__media {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    min-height: 400px;
}

.bgd-hero__numeral {
    font-family: var(--ff-numeral);
    font-weight: 700;
    font-size: clamp(7rem, 19vw, 12.5rem);
    line-height: .85;
    letter-spacing: -.01em;
    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 10px 24px rgba(138,101,26,.28)) url(#bgd-foil-texture);
    user-select: none;
}

.bgd-hero__frame {
    position: relative;
    width: clamp(9.5rem, 15vw, 13rem);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gold-pale);
    border: 7px solid var(--white);
    box-shadow: 0 0 0 2px var(--gold-light), 0 16px 36px rgba(43,38,32,.25);
}

.bgd-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bgd-hero__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}


/* ---------- Hero content ---------- */
.bgd-hero__content {
    position: relative;
    z-index: 2;
}

.bgd-hero__eyebrow {
    font-family: var(--ff-body);
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--gold-deep);
    margin-bottom: .75rem;
}

.bgd-hero__name {
    font-family: var(--ff-display);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.15;
    margin-bottom: .35rem;
}

.bgd-hero__subtitle {
    font-family: var(--ff-display);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--gold-deep);
    margin-bottom: 1.25rem;
}

/* ---------- Hero stat chips (school / class / motto) ---------- */
.bgd-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 1.5rem;
}

.bgd-hero__stat {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--panel);
    border: 1px solid rgba(201,162,39,.4);
    border-radius: var(--btn-radius);
    padding: .5rem 1rem;
}

.bgd-hero__stat-value {
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: .88rem;
    color: var(--ink);
}

.bgd-hero__stat-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ink-soft);
}

.bgd-hero__date {
    font-family: var(--ff-script);
    font-size: 2.6rem;
    line-height: 1;
    color: var(--ink);
    margin-bottom: 1.5rem;
    display: block;
}

.bgd-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 2rem;
}

.bgd-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: var(--panel);
    border: 1px solid rgba(43,38,32,.1);
    border-radius: var(--btn-radius);
    padding: .5rem 1.1rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(43,38,32,.06);
}

@media (max-width: 860px) {
    .bgd-hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .bgd-hero__content { text-align: center; }
    .bgd-hero__stats,
    .bgd-hero__meta { justify-content: center; }
    .bgd-hero__media { min-height: 260px; margin-bottom: 1.5rem; }
    .bgd-hero__numeral { font-size: clamp(5.5rem, 24vw, 8rem); }
}

@media (max-width: 500px) {
    .bgd-hero { padding-top: 6rem; }
}

/* Floating topbar */
.bgd-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    padding: .9rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    transition: background .3s ease, backdrop-filter .3s ease;
}

/* Desktop only (mobile hides these links behind the hamburger toggle, which
   already has its own self-contained dark-blur backdrop — the bar itself
   stays transparent unconditionally there). Give the bar a solid/blurred
   background past the scroll threshold (.scrolled toggled by data-topbar in
   theme.js) — light (not dark) since .bgd-topbar__links a is dark
   var(--ink-soft) text on this theme's light cream page. */
@media (min-width: 601px) {
    .bgd-topbar.scrolled {
        background: color-mix(in srgb, var(--cream) 92%, transparent);
        backdrop-filter: blur(10px);
    }
}

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

.bgd-topbar__toggle { display: none; }

/* Demo-only Basic/Standard switch + close + cart badge — shared look defined
   globally in layouts/theme.blade.php, just positioned here at opposite bottom
   corners, at every screen width. */
.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;
}

/* Mobile: collapse the link row behind a bordered hamburger button, opening a
   dropdown panel with the same links stacked. Always the same dark-translucent
   treatment. .bgd-topbar is space-between on desktop — pin the toggle to the
   left instead on mobile, matching every other theme. */
@media (max-width: 600px) {
    .bgd-topbar { justify-content: flex-start; }
    .bgd-topbar__toggle { order: -1; }

    .bgd-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(43,38,32,.55);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        cursor: pointer;
        transition: background .2s;
    }
    .bgd-topbar__toggle span {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 1px;
        background: #fff;
        transition: transform .25s ease, opacity .2s ease;
    }
    .bgd-topbar__toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .bgd-topbar__toggle.is-active span:nth-child(2) { opacity: 0; }
    .bgd-topbar__toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

}

/* ---------- A Little Note (message / quote card) ---------- */
.bgd-poem {
    padding: 5rem 1.25rem 6rem;
    text-align: center;
    position: relative;
    /* Distinct from the hero's cream so the shape-divider between them is
       actually visible instead of dots-on-matching-background. Also keeps
       the alternating rhythm going into .bgd-alt-sections right after it:
       cream (hero) → cream-alt (poem) → cream (countdown, 1st/odd child). */
    background: var(--cream-alt);
}

.bgd-poem__card {
    position: relative;
    background: var(--panel);
    border: 1px solid rgba(201,162,39,.35);
    border-radius: var(--radius);
    padding: 3rem 2rem 2.25rem;
    max-width: 640px;
    margin: 0 auto;
    box-shadow: 0 15px 40px rgba(43,38,32,.08);
}

.bgd-poem__quote {
    width: 36px;
    height: 36px;
    margin: 0 auto 1rem;
    color: var(--gold);
    opacity: .9;
}
.bgd-poem__quote svg { width: 100%; height: 100%; }

.bgd-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);
}

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

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

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

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

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

.bgd-countdown__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--panel);
    border: 1px solid rgba(201,162,39,.35);
    padding: 1.5rem 0 1.1rem;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(43,38,32,.08);
    min-width: 100px;
}

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

.bgd-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 ---------- */
.bgd-program {
    padding: 5rem 1.25rem 6rem;
}

/* Same structure as wedding-neela's .wn-details-grid/.wn-details-card —
   auto-fit grid, icon above title, time as a small label under it — just
   recolored gold/cream instead of copying a card/badge look of its own. */
.bgd-program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem 2rem;
    max-width: 960px;
    margin: 3rem auto 0;
    text-align: center;
}

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

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

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

.bgd-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);
}

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

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

/* ---------- Growing Up Story ---------- */
.bgd-story {
    padding: 5rem 1.25rem 6rem;
    text-align: center;
}

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

.bgd-story__timeline {
    position: relative;
    max-width: 780px;
    margin: 3rem auto 0;
    text-align: left;
}

.bgd-story__timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: repeating-linear-gradient(
        to bottom,
        var(--gold) 0,
        var(--gold) 8px,
        transparent 8px,
        transparent 16px
    );
    transform: translateX(-50%);
}

.bgd-story__item {
    position: relative;
    width: 50%;
    padding-bottom: 3.5rem;
}

.bgd-story__item:last-child {
    padding-bottom: 0;
}

.bgd-story__item--left {
    padding-right: 3rem;
    text-align: right;
}

.bgd-story__item--right {
    width: 50%;
    margin-left: 50%;
    padding-left: 3rem;
    text-align: left;
}

.bgd-story__dot {
    position: absolute;
    top: .3rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gold);
    border: 3px solid var(--cream);
    box-shadow: 0 0 0 2px var(--gold);
    z-index: 2;
}

.bgd-story__item--left .bgd-story__dot { right: -8px; }
.bgd-story__item--right .bgd-story__dot { left: -8px; }

.bgd-story__photo {
    position: relative;
    width: min(100%, 260px);
    aspect-ratio: 675 / 697;
    margin-bottom: 1rem;
    display: inline-block;
}

.bgd-story__item--left .bgd-story__photo { margin-left: auto; }
.bgd-story__item--right .bgd-story__photo { margin-right: auto; }

.bgd-story__photo-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    border: 3px solid var(--white);
    box-shadow: 0 10px 25px rgba(43,38,32,.18);
    display: block;
}

.bgd-story__photo-caption {
    position: absolute;
    left: .6rem;
    right: .6rem;
    bottom: .6rem;
    font-size: .75rem;
    font-weight: 700;
    text-align: center;
    color: var(--white);
    background: rgba(43,38,32,.7);
    border-radius: var(--btn-radius);
    padding: .3rem .5rem;
    z-index: 2;
}

.bgd-story__period {
    display: block;
    font-family: var(--ff-body);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-bottom: .25rem;
}

.bgd-story__title {
    font-family: var(--ff-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: .35rem;
}

.bgd-story__desc {
    font-size: .92rem;
    line-height: 1.65;
    color: var(--ink-soft);
}

@media (max-width: 720px) {
    .bgd-story__timeline::before {
        left: 1.4rem;
        transform: none;
    }

    .bgd-story__item,
    .bgd-story__item--right {
        width: 100%;
        margin-left: 0;
        padding-left: 3rem;
        padding-right: 0;
        text-align: left;
    }

    .bgd-story__item--left .bgd-story__dot,
    .bgd-story__item--right .bgd-story__dot {
        left: 1.4rem;
        right: auto;
        transform: translateX(-50%);
    }

    .bgd-story__item--left .bgd-story__photo,
    .bgd-story__item--right .bgd-story__photo {
        margin-left: 0;
        margin-right: auto;
    }
}

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

.bgd-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 ---------- */
.bgd-dress-code { padding: 5rem 1.25rem 6rem; text-align: center; }
.bgd-good-to-know { padding: 5rem 1.25rem 6rem; text-align: center; }

/* ---------- Good to Know (bespoke — plain gold icons inline with the
   title, not the shared component's flat gray cards) ---------- */
.bgd-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;
}

.bgd-gtk-card {
    position: relative;
    background: var(--panel);
    border: 1px solid rgba(201,162,39,.3);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(43,38,32,.06);
}

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

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

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

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

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

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

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

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

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

.bgd-location__map iframe {
    width: 100%;
    height: 380px;
    border: 0;
    display: block;
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(43,38,32,.15);
    filter: sepia(.12) saturate(.9);
}

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

.bgd-location__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--panel);
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

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

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

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

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

/* Decoration sits behind the heading/form, so both need an explicit
   stacking context above .bgd-fx-bg's z-index:1 — a position:static
   title would otherwise paint underneath it regardless of DOM order. */
.bgd-rsvp .bgd-section-title,
.bgd-rsvp .rsvp-layout-wrap {
    position: relative;
    z-index: 2;
}

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

.bgd-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(201,162,39,.35);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(43,38,32,.1);
    padding: 3.5rem 2.5rem;
}

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

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

.bgd-rsvp .form__group input[type="text"],
.bgd-rsvp .form__group input[type="email"],
.bgd-rsvp .form__group input[type="tel"],
.bgd-rsvp .form__group select,
.bgd-rsvp .form__group textarea {
    width: 100%;
    padding: .95rem 1.25rem;
    border: 1px solid rgba(43,38,32,.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;
}
.bgd-rsvp .form__group .rsvp-stepper {
    background: var(--cream);
}

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

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

.bgd-btn {
    display: block;
    width: 100%;
    padding: .9rem 2rem;
    background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
    color: var(--white);
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: 1.05rem;
    border: 0;
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 6px 18px rgba(138,101,26,.35);
    letter-spacing: .02em;
    margin-top: .5rem;
}

.bgd-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 22px rgba(138,101,26,.45);
    text-decoration: none;
}

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

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

.bgd-footer p { margin-bottom: .35rem; }
.bgd-footer a { color: var(--gold-light); }
.bgd-footer__ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    max-width: 13rem;
    margin: 0 auto 1rem;
    color: var(--gold-light);
}
.bgd-footer__ornament-line { flex: 1; height: 1px; background: linear-gradient(to right, transparent, currentColor); }
.bgd-footer__ornament-line:last-child { background: linear-gradient(to left, transparent, currentColor); }
.bgd-footer__ornament-mark { flex-shrink: 0; font-size: 1rem; line-height: 1; }
.bgd-footer__signoff { max-width: 24rem; margin: 0 auto 1.5rem; opacity: .8; }
.bgd-footer__cal {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.5rem;
    /* .bgd-footer a sets gold-light; restore the button's own white text. */
    color: #fff !important;
}
.bgd-footer__cal-icon { width: 1rem; height: 1rem; flex-shrink: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 500px) {
    /* nowrap + scroll fallback guarantees all 4 units stay on one row down to
       360px, instead of flex-wrap letting them fall to a 2x2 block once
       their min-width no longer fits. */
    .bgd-countdown__timer {
        gap: .5rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .bgd-countdown__timer::-webkit-scrollbar { display: none; }
    .bgd-countdown__unit {
        padding: 1rem .5rem .75rem;
        min-width: 58px;
        flex-shrink: 0;
    }
    .bgd-countdown__number { font-size: 2rem; }

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

/* Standardized horizontal gutter across every content section on mobile
   (padding-x: 1rem), matching wedding-romantic-bloom's convention — several
   sections here otherwise use a wider desktop-only gutter (1.25rem/1.5rem)
   that just eats into already-limited mobile width. Appended at the very end
   of the file (not folded into an earlier @media block) so equal-specificity
   source order guarantees this wins over each section's own base padding
   rule, which is declared later in the file than this file's other,
   topbar-only 600px media query. */
@media (max-width: 600px) {
.bgd-hero,
.bgd-poem,
.bgd-countdown,
.bgd-program,
.bgd-story,
.bgd-gallery,
.bgd-guest-wall,
.bgd-gallery-upload,
.bgd-dress-code,
.bgd-good-to-know,
.bgd-closing,
.bgd-location,
.bgd-album,
.bgd-rsvp,
.bgd-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
