/* ================================================
   Mermaid ("Sirena") — Standard Kids Birthday Theme
   An under-the-sea birthday.
   Palette: pale aqua · teal · deep navy · coral · pearl
   Fonts:   Comfortaa (display) + Kaushan Script (name) + Nunito (body)
   Style:   Bubble-framed photo, pearls & starfish, and the party plan laid
            out as a dive through the ocean depths.
   ================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --aqua:       #7fd0cf;
    --aqua-soft:  #dcf1ef;
    /* --teal / --coral / --navy are the customer-recolourable slots
       (config/themes.php 'colors' => 'palette'); the -deep shades derive from
       them via color-mix so the live demo picker + a saved palette both cascade. */
    --teal:       #2b8a9e;
    --teal-deep:  color-mix(in srgb, var(--teal) 76%, #04202a);
    --navy:       #143a52;
    --navy-deep:  color-mix(in srgb, var(--navy) 74%, #000);
    --coral:      #ef9a7a;
    --coral-deep: color-mix(in srgb, var(--coral) 82%, #6f2a10);
    --pearl:      #f7f2ea;
    --sand:       #efe4cf;
    --gold:       #e0b968;
    --ink:        #234854;
    --text:       #4c6771;
    --muted:      #8aa2aa;
    --cream:      #f4fbfa;
    --cream-alt:  #eaf6f4;
    --white:      #ffffff;
    --border:     rgba(35, 72, 84, .12);
    --accent-color: #2b8a9e;
    --radius:     20px;
    --btn-radius: 50px;

    --ff-display: 'Comfortaa', 'Trebuchet MS', Verdana, sans-serif;
    --ff-script:  'Kaushan Script', 'Segoe Script', cursive;
    --ff-body:    'Nunito', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

    --ocean-line: linear-gradient(90deg, var(--coral), var(--teal) 50%, var(--navy));
    --depth: linear-gradient(180deg,
        color-mix(in srgb, var(--aqua) 82%, #fff) 0%,
        var(--teal) 42%, var(--teal-deep) 70%, var(--navy) 100%);

    --card-shadow: 0 1px 2px rgba(20, 58, 82, .06), 0 10px 26px rgba(20, 58, 82, .09), 0 40px 70px rgba(20, 58, 82, .12);
    --card-shadow-sm: 0 1px 2px rgba(20, 58, 82, .06), 0 12px 28px rgba(20, 58, 82, .1);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--ff-body);
    color: var(--text);
    background:
        radial-gradient(circle at 1px 1px, rgba(35, 72, 84, .03) 1px, transparent 0) 0 0 / 24px 24px,
        var(--cream);
    line-height: 1.7;
    overflow-x: hidden;
}

body.mr-scroll-lock {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--teal-deep); text-decoration: none; transition: color .2s; }
a:hover { color: var(--coral-deep); }

/* ================================================
   ENVELOPE INTRO — foldable-phone style
   CLOSED is a compact half-height cover, sealed shut at the bottom with the
   coral age-badge. Clicking cracks the seal and the cover flips open around
   the top hinge (an even 50/50 split — transform-origin: top exactly
   reflects the closed half onto the other half with no gap or overlap, so
   the open card is exactly double the closed cover's height), revealing a
   full-height card: the cover's own back face (top half) plus a second panel
   that was hidden underneath it (bottom half). Together the two halves carry
   the whole env__letter-style composition (motif + kicker up top, name +
   tagline + date below) as one continuous surface, held readable for a beat,
   before the whole thing dissolves to reveal the real invitation underneath.
   Hidden entirely with JS off (see .mr-has-envelope) so the invitation is
   always reachable.
   ================================================ */
.mr-envelope {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 6vh 6vw;
    background: linear-gradient(165deg, var(--aqua-soft) 0%, var(--cream-alt) 100%);
    cursor: pointer;
    /* delay = flip duration (.7s) + full-card hold (1.5s), so the overlay
       only starts dissolving once the reader has had time with the open card */
    transition: opacity .5s ease 2.2s, visibility .5s ease 2.2s;
}
.mr-has-envelope .mr-envelope { display: flex; }
.mr-envelope.is-open { opacity: 0; visibility: hidden; pointer-events: none; }

.mr-envelope::before {
    content: '';
    position: absolute;
    inset: 1.1rem;
    border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent);
    box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--teal) 12%, transparent);
    border-radius: 28px;
    pointer-events: none;
}

.mr-envelope__stage {
    position: relative;
    width: min(400px, 88vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
    animation: mr-env-rise .8s ease both;
    perspective: 1400px;
}

/* Full open-card height; while closed only the bottom half of this box is
   visually occupied (the folded cover), leaving the top half empty — that
   empty space is what makes it read as compact/folded rather than a
   full-size card lying on its side. */
.mr-envelope__pocket {
    position: relative;
    width: 100%;
    aspect-ratio: 100 / 100;
}

/* the hidden half: sits behind the cover, revealed once it flips away */
.mr-envelope__bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 50%;
    z-index: 1;
    background: linear-gradient(160deg, var(--cream) 0%, var(--cream-alt) 100%);
    border: 1px solid color-mix(in srgb, var(--teal) 28%, transparent);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(35, 72, 84, .06), 0 10px 26px rgba(35, 72, 84, .1), 0 40px 70px rgba(35, 72, 84, .12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: .22rem;
    padding: 1rem 1.25rem;
}

/* the cover: hinged at the pocket's vertical centre (its own top edge) */
.mr-envelope__flap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 50%;
    z-index: 2;
    transform-style: preserve-3d;
    transform-origin: top center;
    transition: transform .7s cubic-bezier(.4, 0, .2, 1);
}
/* unfolds upward around the top hinge — the bottom edge, where the seal
   sits, lifts up and away — ending up in the pocket's TOP half, showing its
   back face: the foldable-phone "opens flat" motion. */
.mr-envelope.is-open .mr-envelope__flap {
    transform: rotateX(-180deg);
}

.mr-envelope__face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    background: linear-gradient(160deg, var(--cream) 0%, var(--cream-alt) 100%);
    border: 1px solid color-mix(in srgb, var(--teal) 28%, transparent);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(35, 72, 84, .06), 0 10px 26px rgba(35, 72, 84, .1), 0 40px 70px rgba(35, 72, 84, .12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: .3rem;
    padding: 1rem 1.25rem;
}
.mr-envelope__face--front { transform: rotateX(0deg); }
/* pre-rotated 180° from the front, so once the flap itself reaches -180°
   this face's total rotation cancels out to 0 — facing the viewer normally,
   flush against the top of the now-revealed bottom half. */
.mr-envelope__face--back {
    transform: rotateX(180deg);
    border-bottom: none;
}

.mr-envelope__star {
    width: 26px;
    height: 26px;
    color: var(--coral);
}

.mr-envelope__kicker {
    font-family: var(--ff-body);
    font-size: .6rem;
    font-weight: 700;
    color: var(--teal-deep);
    max-width: 24ch;
    line-height: 1.3;
}
.mr-envelope__name {
    font-family: var(--ff-script);
    font-size: clamp(1.7rem, 7vw, 2.3rem);
    line-height: 1;
    color: var(--navy);
}
.mr-envelope__name--lg { font-size: clamp(1.9rem, 7.6vw, 2.5rem); }
.mr-envelope__tagline {
    font-family: var(--ff-body);
    font-size: .68rem;
    font-weight: 700;
    color: var(--coral-deep);
}
.mr-envelope__date-pill {
    display: inline-block;
    margin-top: .15rem;
    padding: .32rem .85rem;
    border-radius: var(--btn-radius);
    background: #fff;
    box-shadow: 0 2px 8px rgba(35, 72, 84, .1);
    font-family: var(--ff-body);
    font-size: .6rem;
    font-weight: 700;
    color: var(--ink);
}

.mr-envelope__seal {
    position: absolute;
    left: 50%;
    bottom: -26px;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--coral) 55%, white), var(--coral) 52%, var(--coral-deep) 100%);
    box-shadow: 0 8px 20px rgba(217, 118, 79, .42);
    z-index: 3;
    transition: transform .6s ease, opacity .5s ease;
}
.mr-envelope__seal::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 2px dashed rgba(255, 255, 255, .65);
    border-radius: 50%;
}
.mr-envelope__seal-num {
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: 1.6rem;
    color: #fff;
    line-height: 1;
}
.mr-envelope.is-open .mr-envelope__seal {
    transform: translateX(-50%) scale(.6);
    opacity: 0;
}

.mr-envelope__prompt {
    font-family: var(--ff-body);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--teal-deep);
    animation: mr-env-pulse 2.6s ease-in-out infinite;
}
.mr-envelope.is-open .mr-envelope__prompt {
    opacity: 0;
    animation: none;
    transition: opacity .3s ease;
}

@keyframes mr-env-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes mr-env-pulse { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }

/* ── Containers ─────────────────────────────── */
.mr-container     { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.mr-container--sm { max-width: 680px; }

/* Alternating section backgrounds, computed from what actually renders. */
.mr-alt-sections > * { background: var(--white); }
.mr-alt-sections > *:nth-child(even) { background: var(--cream-alt); }

.mr-alt-sections .mr-countdown,
.mr-alt-sections .mr-audio,
.mr-alt-sections .mr-story,
.mr-alt-sections .mr-gallery,
.mr-alt-sections .mr-dive,
.mr-alt-sections .mr-dress-code,
.mr-alt-sections .mr-good-to-know,
.mr-alt-sections .mr-location,
.mr-alt-sections .mr-accommodation,
.mr-alt-sections .mr-gallery-upload,
.mr-alt-sections .mr-guest-wall,
.mr-alt-sections .mr-album,
.mr-alt-sections .mr-closing,
.mr-alt-sections .mr-rsvp {
    padding: 4.5rem 1rem;
}

/* ── Section helpers ─────────────────────────── */
.mr-section-title {
    position: relative;
    font-family: var(--ff-display);
    font-size: clamp(1.7rem, 4.4vw, 2.4rem);
    font-weight: 700;
    color: var(--ink);
    text-align: center;
    line-height: 1.25;
    padding-bottom: 1.15rem;
    margin-bottom: 1.1rem;
}
/* a little scallop shell above every section title (SVG Repo asset 159079, CC0) */
.mr-section-title::before {
    content: '';
    display: block;
    width: 26px;
    height: 24px;
    margin: 0 auto .5rem;
    background: no-repeat center / contain
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 495.699 495.699' fill='%232b8a9e' fill-rule='evenodd'%3E%3Cpath d='M466.083,219.447c-3.25-1.685-5.631-4.661-6.588-8.198c-0.939-3.534-0.352-7.305,1.628-10.391c10.677-16.667,11.969-38.482,1.356-56.82c-10.59-18.345-30.122-28.135-49.883-27.229c-3.655,0.167-7.207-1.209-9.786-3.798c-2.601-2.579-3.99-6.142-3.826-9.798c0.907-19.767-8.897-39.31-27.216-49.904c-18.324-10.587-40.178-9.303-56.856,1.389c-3.083,1.971-6.855,2.557-10.394,1.609c-3.537-0.944-6.501-3.342-8.177-6.584c-9.117-17.567-27.373-29.578-48.527-29.578c-21.168,0-39.423,12.018-48.52,29.578c-1.696,3.25-4.661,5.629-8.199,6.584c-3.537,0.948-7.309,0.371-10.393-1.601c-16.661-10.667-38.483-11.942-56.803-1.348c-18.32,10.586-28.126,30.12-27.22,49.881c0.15,3.655-1.223,7.215-3.807,9.798c-2.598,2.59-6.149,3.963-9.805,3.798c-19.746-0.9-39.287,8.89-49.881,27.229c-10.575,18.319-9.304,40.141,1.374,56.803c1.979,3.085,2.548,6.855,1.608,10.381c-0.936,3.538-3.335,6.521-6.588,8.209C12.018,228.557,0,246.811,0,267.98c0,21.025,11.865,39.188,29.229,48.35c18.976,9.996,37.495,22.133,54.21,35.583l73.146,58.902c14.148,11.386,19.727,30.37,13.977,47.608c-1.32,3.965-0.653,8.333,1.795,11.727c2.431,3.394,6.368,5.403,10.559,5.403h129.869c4.192,0,8.13-2.009,10.561-5.403c2.446-3.394,3.114-7.762,1.793-11.727c-5.75-17.232-0.171-36.214,13.962-47.602l73.013-58.807c16.878-13.603,35.146-25.578,54.338-35.685c17.382-9.161,29.249-27.314,29.249-48.35C495.699,246.811,483.665,228.55,466.083,219.447zM175.576,315.951c-2.784,1.813-6.405,1.3-8.583-1.057l-84.9-91.816c-6.467-6.982-6.031-17.877,0.942-24.34c6.987-6.461,17.884-6.034,24.336,0.954c0.652,0.7,1.275,1.511,1.776,2.281l68.371,104.711C179.532,309.782,178.659,313.933,175.576,315.951zM208.059,310.628c-3.338,0.721-6.636-1.196-7.713-4.356l-56.584-164.15c-3.103-8.979,1.658-18.766,10.645-21.861c8.981-3.092,18.771,1.677,21.855,10.654c0.219,0.627,0.422,1.367,0.553,2.002l36.372,169.788C213.976,306.305,211.66,309.859,208.059,310.628zM265.013,120.556l-10.492,183.93c-0.219,3.688-3.368,6.504-7.057,6.294c-3.42-0.2-6.102-2.942-6.285-6.294l-10.492-183.93c-0.537-9.478,6.705-17.599,16.192-18.146c9.469-0.535,17.599,6.706,18.134,16.186C265.046,119.249,265.046,119.916,265.013,120.556zM295.352,306.272c-1.191,3.496-4.993,5.347-8.483,4.15c-3.235-1.115-5.059-4.467-4.357-7.717l36.375-169.788c1.978-9.283,11.129-15.201,20.414-13.214c9.288,1.993,15.186,11.129,13.211,20.415c-0.152,0.652-0.358,1.381-0.57,2.004L295.352,306.272zM415.397,220.797c-0.52,0.797-1.175,1.602-1.794,2.281l-84.897,91.816c-2.516,2.707-6.755,2.878-9.471,0.372c-2.432-2.254-2.816-5.89-1.057-8.582l68.37-104.711c5.196-7.969,15.874-10.205,23.833-5.011C418.347,202.159,420.593,212.836,415.397,220.797z'/%3E%3C/svg%3E");
}
.mr-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 5px;
    border-radius: 5px;
    background: var(--ocean-line);
}

.mr-eyebrow {
    font-family: var(--ff-script);
    font-size: 1.05rem;
    color: var(--teal);
    text-align: center;
    margin-bottom: .3rem;
}

/* ── Floating topbar ─────────────────────────── */
.mr-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    padding: .85rem 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    transition: background .3s ease, backdrop-filter .3s ease, box-shadow .3s ease;
}
.mr-topbar__brand {
    font-family: var(--ff-script);
    font-size: 1.35rem;
    color: var(--ink);
    transition: color .3s ease;
}
@media (min-width: 601px) {
    .mr-topbar.scrolled {
        background: color-mix(in srgb, var(--cream) 92%, transparent);
        backdrop-filter: blur(10px);
        box-shadow: 0 1px 0 var(--border);
    }
}
.mr-topbar__links { display: flex; gap: 1.5rem; margin-left: auto; }
.mr-topbar__links a {
    position: relative;
    font-family: var(--ff-body);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink);
    padding-bottom: .2rem;
}
.mr-topbar__links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--teal);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .25s ease;
}
.mr-topbar__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.mr-topbar__toggle { display: none; }

@media (max-width: 600px) {
    .mr-topbar__toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 2.4rem;
        height: 2.4rem;
        border: 0;
        border-radius: 999px;
        background: color-mix(in srgb, var(--teal) 22%, var(--white));
        cursor: pointer;
        margin-left: auto;
    }
    .mr-topbar__toggle span {
        display: block;
        width: 17px;
        height: 2px;
        margin: 0 auto;
        background: var(--teal-deep);
        border-radius: 2px;
        transition: transform .25s ease, opacity .2s ease;
    }
    .mr-topbar__toggle.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .mr-topbar__toggle.is-active span:nth-child(2) { opacity: 0; }
    .mr-topbar__toggle.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    .mr-topbar__links {
        position: absolute;
        top: calc(100% + .5rem);
        right: 1.1rem;
        left: 1.1rem;
        flex-direction: column;
        gap: 0;
        background: var(--white);
        border-radius: 14px;
        box-shadow: var(--card-shadow-sm);
        padding: .35rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
    }
    .mr-topbar__links.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
    .mr-topbar__links a { padding: .7rem .85rem; border-radius: 10px; }
    .mr-topbar__links a:hover { background: var(--cream); }
    .mr-topbar__links a::after { display: none; }
}

/* Demo-only Basic/Standard switch + close + cart — shared look, positioned here. */
.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;
}

/* ── Rising bubbles (hero + dive) ───────────── */
@keyframes mr-rise {
    0%   { transform: translateY(0) scale(.7); opacity: 0; }
    12%  { opacity: .75; }
    85%  { opacity: .45; }
    100% { transform: translateY(-340px) scale(1); opacity: 0; }
}

/* ── Hero (pattern A: bubble photo + text on aqua ground) ── */
.mr-hero {
    position: relative;
    padding: 8rem 0 5.5rem;
    background:
        radial-gradient(ellipse 65% 50% at 82% 10%, color-mix(in srgb, var(--aqua) 30%, transparent), transparent),
        radial-gradient(ellipse 60% 55% at 6% 42%, color-mix(in srgb, var(--teal) 16%, transparent), transparent),
        var(--aqua-soft);
    overflow: hidden;
}
.mr-hero__bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.mr-hero__bubble {
    position: absolute;
    bottom: -30px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .9), rgba(255, 255, 255, .12) 62%, transparent);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
    animation: mr-rise linear infinite;
}

.mr-hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: center;
    gap: 2.75rem;
}

.mr-hero__media { position: relative; justify-self: center; width: min(20rem, 62vw); }
.mr-hero__bubble-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: var(--aqua);
    box-shadow:
        0 0 0 8px rgba(255, 255, 255, .65),
        0 0 0 10px color-mix(in srgb, var(--teal) 35%, transparent),
        0 26px 55px rgba(20, 58, 82, .22);
}
.mr-hero__img,
.mr-hero__placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 28%;
}
.mr-hero__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    background: linear-gradient(150deg, var(--aqua), var(--coral));
}
.mr-hero__gloss {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 38%),
        radial-gradient(circle at 74% 82%, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 30%);
}

.mr-hero__mermaid {
    position: absolute;
    left: -14%;
    top: 46%;
    width: 82%;
    height: auto;
    transform: translateY(-50%) scaleX(-1);
    color: color-mix(in srgb, var(--teal) 30%, transparent);
    z-index: 0;
    pointer-events: none;
}
@media (max-width: 760px) {
    .mr-hero__mermaid { left: -8%; width: 70%; opacity: .55; }
}
.mr-hero__star {
    position: absolute;
    top: -20px;
    right: -14px;
    width: 60px;
    height: auto;
    color: var(--coral);
    transform: rotate(14deg);
    z-index: 3;
    filter: drop-shadow(0 5px 10px rgba(217, 118, 79, .35));
}
.mr-hero__shell {
    position: absolute;
    left: -18px;
    bottom: -10px;
    width: 62px;
    height: auto;
    color: var(--pearl);
    transform: rotate(-10deg);
    z-index: 3;
    filter: drop-shadow(0 6px 12px rgba(20, 58, 82, .2));
}
.mr-hero__pearls {
    position: absolute;
    left: -6px;
    bottom: -6px;
    width: 56%;
    height: 56%;
    z-index: 3;
    pointer-events: none;
}
.mr-hero__pearl {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, #fff, #e7dcc5 70%, #cdbf9e);
    box-shadow: 0 1px 3px rgba(20, 58, 82, .25);
}
/* strung along a quarter-arc hugging the bubble's lower-left */
.mr-hero__pearl:nth-child(1) { bottom: 3%;  left: 46%; }
.mr-hero__pearl:nth-child(2) { bottom: 13%; left: 31%; }
.mr-hero__pearl:nth-child(3) { bottom: 26%; left: 18%; }
.mr-hero__pearl:nth-child(4) { bottom: 41%; left: 9%; }
.mr-hero__pearl:nth-child(5) { bottom: 57%; left: 4%; }
.mr-hero__pearl:nth-child(6) { bottom: 73%; left: 3%; }
.mr-hero__pearl:nth-child(7) { bottom: 87%; left: 8%; }

.mr-hero__seal {
    position: absolute;
    right: -8px;
    bottom: 16px;
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--coral) 55%, white), var(--coral) 52%, var(--coral-deep) 100%);
    box-shadow: 0 8px 20px rgba(217, 118, 79, .42);
    z-index: 4;
}
.mr-hero__seal::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 2px dashed rgba(255, 255, 255, .65);
    border-radius: 50%;
}
.mr-hero__seal-num {
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: 1.9rem;
    color: #fff;
    line-height: 1;
}

.mr-hero__eyebrow {
    font-family: var(--ff-script);
    font-size: 1.15rem;
    color: var(--teal);
    margin-bottom: .2rem;
}
.mr-hero__name {
    font-family: var(--ff-script);
    font-weight: 400;
    font-size: clamp(2.9rem, 9vw, 4.6rem);
    line-height: 1.05;
    color: var(--teal-deep);
}
.mr-hero__tagline {
    font-family: var(--ff-display);
    font-weight: 500;
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: var(--coral-deep);
    margin: .45rem 0 1.3rem;
}
.mr-hero__date-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    font-weight: 700;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: .5rem 1.15rem;
    box-shadow: var(--card-shadow-sm);
    margin-bottom: .85rem;
}
.mr-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.35rem;
    font-size: .9rem;
    color: var(--text);
}

@media (max-width: 760px) {
    .mr-hero { padding: 7rem 0 4.5rem; }
    .mr-hero__inner { grid-template-columns: 1fr; text-align: center; gap: 2.75rem; }
    .mr-hero__media { justify-self: center; }
    .mr-hero__meta { justify-content: center; }
}

/* ── Note — a message on a scalloped shell card ── */
.mr-note { background: var(--white); padding: 5rem 1rem 4.25rem; }
.mr-note__card {
    position: relative;
    background: var(--aqua-soft);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 2.5rem 2rem 2.75rem;
    text-align: center;
    box-shadow: var(--card-shadow-sm);
}
/* fluted (shell-edge) top */
.mr-note__scallop {
    position: absolute;
    left: 0; right: 0; top: -13px;
    height: 15px;
    background: var(--aqua-soft);
    -webkit-mask: radial-gradient(13px at 50% 100%, #000 97%, #0000) 50% 0 / 26px 15px repeat-x;
            mask: radial-gradient(13px at 50% 100%, #000 97%, #0000) 50% 0 / 26px 15px repeat-x;
}
.mr-note__watermark {
    position: absolute;
    right: 10px;
    bottom: 8px;
    width: 78px;
    height: 78px;
    color: color-mix(in srgb, var(--teal) 14%, transparent);
    pointer-events: none;
}
.mr-note__text {
    position: relative;
    font-family: var(--ff-display);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--ink);
    line-height: 1.75;
}
.mr-note__pearls {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1.35rem;
}
.mr-note__pearls span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, #fff, #e7dcc5 70%, #cdbf9e);
    box-shadow: 0 1px 3px rgba(20, 58, 82, .2);
}

/* ── Countdown ─────────────────────────────── */
.mr-countdown { text-align: center; }
.mr-countdown__timer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.6rem;
}
.mr-countdown__unit {
    min-width: 5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.1rem .75rem;
    box-shadow: var(--card-shadow-sm);
}
.mr-countdown__number {
    display: block;
    font-family: var(--ff-display);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--teal-deep);
    font-variant-numeric: lining-nums tabular-nums;
}
.mr-countdown__label {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ── Our little story — scallop-shell photos threaded on a tide line ── */
.mr-story { text-align: center; }
.mr-story__intro { max-width: 34rem; margin: .4rem auto 0; color: var(--text); }
.mr-story__tide {
    position: relative;
    max-width: 56rem;
    margin: 2.5rem auto 0;
}
.mr-story__wave {
    position: absolute;
    left: -2%;
    right: -2%;
    top: 34%;
    width: 104%;
    height: 90px;
    z-index: 0;
    pointer-events: none;
}
.mr-story__row {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}
.mr-story__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
/* the photo is a pearl cradled in an open scallop shell (SVG Repo 80489, CC0) */
.mr-story__shell {
    position: relative;
    width: min(13.5rem, 62vw);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mr-story__shell::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: no-repeat center / contain
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 495.699 495.699' fill='%23ef9a7a' fill-rule='evenodd'%3E%3Cpath d='M466.083,219.447c-3.25-1.685-5.631-4.661-6.588-8.198c-0.939-3.534-0.352-7.305,1.628-10.391c10.677-16.667,11.969-38.482,1.356-56.82c-10.59-18.345-30.122-28.135-49.883-27.229c-3.655,0.167-7.207-1.209-9.786-3.798c-2.601-2.579-3.99-6.142-3.826-9.798c0.907-19.767-8.897-39.31-27.216-49.904c-18.324-10.587-40.178-9.303-56.856,1.389c-3.083,1.971-6.855,2.557-10.394,1.609c-3.537-0.944-6.501-3.342-8.177-6.584c-9.117-17.567-27.373-29.578-48.527-29.578c-21.168,0-39.423,12.018-48.52,29.578c-1.696,3.25-4.661,5.629-8.199,6.584c-3.537,0.948-7.309,0.371-10.393-1.601c-16.661-10.667-38.483-11.942-56.803-1.348c-18.32,10.586-28.126,30.12-27.22,49.881c0.15,3.655-1.223,7.215-3.807,9.798c-2.598,2.59-6.149,3.963-9.805,3.798c-19.746-0.9-39.287,8.89-49.881,27.229c-10.575,18.319-9.304,40.141,1.374,56.803c1.979,3.085,2.548,6.855,1.608,10.381c-0.936,3.538-3.335,6.521-6.588,8.209C12.018,228.557,0,246.811,0,267.98c0,21.025,11.865,39.188,29.229,48.35c18.976,9.996,37.495,22.133,54.21,35.583l73.146,58.902c14.148,11.386,19.727,30.37,13.977,47.608c-1.32,3.965-0.653,8.333,1.795,11.727c2.431,3.394,6.368,5.403,10.559,5.403h129.869c4.192,0,8.13-2.009,10.561-5.403c2.446-3.394,3.114-7.762,1.793-11.727c-5.75-17.232-0.171-36.214,13.962-47.602l73.013-58.807c16.878-13.603,35.146-25.578,54.338-35.685c17.382-9.161,29.249-27.314,29.249-48.35C495.699,246.811,483.665,228.55,466.083,219.447zM175.576,315.951c-2.784,1.813-6.405,1.3-8.583-1.057l-84.9-91.816c-6.467-6.982-6.031-17.877,0.942-24.34c6.987-6.461,17.884-6.034,24.336,0.954c0.652,0.7,1.275,1.511,1.776,2.281l68.371,104.711C179.532,309.782,178.659,313.933,175.576,315.951zM208.059,310.628c-3.338,0.721-6.636-1.196-7.713-4.356l-56.584-164.15c-3.103-8.979,1.658-18.766,10.645-21.861c8.981-3.092,18.771,1.677,21.855,10.654c0.219,0.627,0.422,1.367,0.553,2.002l36.372,169.788C213.976,306.305,211.66,309.859,208.059,310.628zM265.013,120.556l-10.492,183.93c-0.219,3.688-3.368,6.504-7.057,6.294c-3.42-0.2-6.102-2.942-6.285-6.294l-10.492-183.93c-0.537-9.478,6.705-17.599,16.192-18.146c9.469-0.535,17.599,6.706,18.134,16.186C265.046,119.249,265.046,119.916,265.013,120.556zM295.352,306.272c-1.191,3.496-4.993,5.347-8.483,4.15c-3.235-1.115-5.059-4.467-4.357-7.717l36.375-169.788c1.978-9.283,11.129-15.201,20.414-13.214c9.288,1.993,15.186,11.129,13.211,20.415c-0.152,0.652-0.358,1.381-0.57,2.004L295.352,306.272zM415.397,220.797c-0.52,0.797-1.175,1.602-1.794,2.281l-84.897,91.816c-2.516,2.707-6.755,2.878-9.471,0.372c-2.432-2.254-2.816-5.89-1.057-8.582l68.37-104.711c5.196-7.969,15.874-10.205,23.833-5.011C418.347,202.159,420.593,212.836,415.397,220.797z'/%3E%3C/svg%3E");
    filter: drop-shadow(0 12px 20px rgba(20, 58, 82, .26));
}
.mr-story__img {
    position: relative;
    z-index: 1;
    width: 60%;
    aspect-ratio: 1 / 1;
    margin-bottom: 8%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 4px #fff, 0 0 0 6px color-mix(in srgb, var(--teal) 32%, transparent),
        0 6px 16px rgba(20, 58, 82, .25);
}
.mr-story__img--blank { background: linear-gradient(150deg, var(--aqua), var(--coral)); }
.mr-story__cap {
    font-family: var(--ff-body);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--teal-deep);
}
.mr-story__period {
    font-family: var(--ff-script);
    font-size: 1.2rem;
    color: var(--coral-deep);
    margin-top: .1rem;
}
.mr-story__title {
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--ink);
    margin: .05rem 0 .4rem;
}
.mr-story__desc { font-size: .86rem; line-height: 1.6; color: var(--text); }
@media (max-width: 720px) {
    .mr-story__row { grid-template-columns: 1fr; max-width: 20rem; margin: 0 auto; gap: 2.5rem; }
    .mr-story__wave { display: none; }
}

/* ── The dive — bespoke party plan ─────────── */
.mr-dive { text-align: center; }
.mr-dive__column {
    position: relative;
    max-width: 30rem;
    margin: 2.25rem auto 0;
    padding: 2.1rem 1.6rem 2.4rem;
    border-radius: 24px;
    overflow: hidden;
    background: var(--depth);
    box-shadow: var(--card-shadow);
}
.mr-dive__bubbles { position: absolute; inset: 0; pointer-events: none; }
.mr-dive__bubble {
    position: absolute;
    bottom: -16px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .85), rgba(255, 255, 255, .1) 62%, transparent);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
    animation: mr-rise linear infinite;
}
.mr-dive__stops {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0;
    padding: 0 0 0 .25rem;
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    text-align: left;
}
.mr-dive__stops::before {
    content: '';
    position: absolute;
    left: 5px;
    top: .6rem;
    bottom: .6rem;
    width: 2px;
    background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .55) 0 4px, transparent 4px 10px);
}
.mr-dive__stop {
    position: relative;
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: baseline;
    gap: .2rem .85rem;
    padding-left: 1.6rem;
}
.mr-dive__pin {
    position: absolute;
    left: -1px;
    top: .35rem;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--coral);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .22);
}
.mr-dive__time {
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: .95rem;
    color: #fff;
    font-variant-numeric: lining-nums tabular-nums;
}
.mr-dive__body { grid-column: 3; display: flex; flex-direction: column; }
.mr-dive__label { font-family: var(--ff-display); font-weight: 500; font-size: .98rem; color: #fff; line-height: 1.4; }
.mr-dive__where { font-size: .8rem; color: rgba(255, 255, 255, .72); margin-top: .1rem; }
.mr-dive__where a { margin-left: .3rem; font-weight: 700; color: #fff; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    .mr-hero__bubble, .mr-dive__bubble { animation: none; opacity: .4; }
}

/* ── Map ───────────────────────────────────── */
.mr-location { text-align: center; }
.mr-location__address { color: var(--text); margin-bottom: 1.4rem; }

/* the map framed in a submarine porthole */
.mr-porthole {
    position: relative;
    width: min(23rem, 100%);
    aspect-ratio: 1 / 1;
    margin: 0 auto 1.75rem;
    padding: 16px;
    border-radius: 50%;
    background: linear-gradient(150deg, #fbf7ee, #d9cdb2 55%, #b9a884);
    box-shadow: 0 0 0 3px var(--teal), inset 0 3px 8px rgba(255, 255, 255, .7),
        inset 0 -6px 14px rgba(20, 58, 82, .25), 0 26px 55px rgba(20, 58, 82, .3);
}
.mr-porthole__bolts {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, var(--teal-deep) 0 1.6deg, transparent 1.6deg 22.5deg);
    -webkit-mask: radial-gradient(circle, #0000 calc(50% - 9px), #000 calc(50% - 9px) calc(50% - 3px), #0000 calc(50% - 3px));
            mask: radial-gradient(circle, #0000 calc(50% - 9px), #000 calc(50% - 9px) calc(50% - 3px), #0000 calc(50% - 3px));
    opacity: .8;
}
.mr-porthole .mr-map {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5), inset 0 0 30px rgba(20, 58, 82, .4);
    margin: 0;
}
.mr-porthole .mr-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.mr-porthole__glass {
    position: absolute;
    inset: 16px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 42%);
    z-index: 2;
}

/* ── Album / closing ───────────────────────── */
.mr-album { text-align: center; }
.mr-album__sub { color: var(--muted); margin-bottom: 1.5rem; }
.mr-closing { text-align: center; }
.mr-closing__text {
    font-family: var(--ff-display);
    font-weight: 500;
    font-size: 1.15rem;
    color: var(--ink);
}

/* ── Buttons ───────────────────────────────── */
.mr-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--teal), var(--teal-deep));
    color: #fff !important;
    font-family: var(--ff-display);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    padding: .95rem 2.4rem;
    border-radius: var(--btn-radius);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(30, 107, 125, .32);
    transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}
.mr-btn:hover {
    background: linear-gradient(135deg, var(--coral), var(--coral-deep));
    box-shadow: 0 12px 28px rgba(217, 118, 79, .36);
    transform: translateY(-2px);
    text-decoration: none;
}

/* ── Shape divider (wave) ──────────────────── */
.mr-shape {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    pointer-events: none;
    z-index: 3;
}
.mr-shape-top { top: -1px; }
.mr-shape-bottom { bottom: -1px; }
/* The authored wave already fills its bottom edge flush with the section
   boundary; a plain bottom seam must NOT rotate. Rotate only the mirror cases. */
.mr-shape[data-negative="true"].mr-shape-bottom,
.mr-shape[data-negative="false"].mr-shape-top { transform: rotate(180deg); }
.mr-shape svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 30px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* ── Footer ────────────────────────────────── */
.mr-footer {
    background: linear-gradient(160deg, var(--teal-deep), var(--navy));
    color: rgba(255, 255, 255, .9);
    text-align: center;
    padding: 3.75rem 1.25rem 3.25rem;
}
.mr-footer__mark {
    width: 30px;
    height: auto;
    margin: 0 auto 1rem;
    color: var(--coral);
}
.mr-footer__name {
    display: block;
    font-family: var(--ff-script);
    font-size: 2.1rem;
    color: #fff;
}
.mr-footer__date {
    margin-top: .3rem;
    font-size: .9rem;
    letter-spacing: .04em;
    font-variant-numeric: lining-nums;
}
.mr-footer__venue { font-size: .85rem; color: rgba(255, 255, 255, .78); margin-top: .15rem; }
.mr-footer__cal {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.6rem;
    background: rgba(255, 255, 255, .16) !important;
    box-shadow: none;
}
.mr-footer__cal:hover { background: rgba(255, 255, 255, .26) !important; transform: translateY(-2px); }
.mr-footer__cal-icon { width: 1.05rem; height: 1.05rem; }

/* ── Gallery — a wall of bubbles (Captured Moments + guest uploads) ───── */
.mr-gallery .gg-grid,
.mr-gallery-upload .gg-grid { gap: 1.1rem; }
.mr-gallery .gg-item,
.mr-gallery-upload .gg-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px color-mix(in srgb, var(--teal) 30%, transparent),
        0 10px 24px rgba(20, 58, 82, .2);
}
.mr-gallery .gg-item img,
.mr-gallery-upload .gg-item img { width: 100%; height: 100%; object-fit: cover; }
.mr-gallery .gg-item::after,
.mr-gallery-upload .gg-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 42%);
}

/* ── RSVP — the final dive: a fish-scale panel ── */
.mr-alt-sections .mr-rsvp .rsvp-layout-wrap {
    position: relative;
    max-width: 32rem;
    margin: 2.5rem auto 0;
    padding: 1.9rem 1.6rem 2rem;
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 100%, #0000 46%, color-mix(in srgb, var(--teal) 10%, transparent) 47% 48%, #0000 49%) 0 0 / 40px 20px,
        radial-gradient(circle at 50% 100%, #0000 46%, color-mix(in srgb, var(--teal) 10%, transparent) 47% 48%, #0000 49%) 20px 10px / 40px 20px,
        var(--white);
    box-shadow: var(--card-shadow);
}
.mr-alt-sections .mr-rsvp .form__group input,
.mr-alt-sections .mr-rsvp .form__group select,
.mr-alt-sections .mr-rsvp .form__group textarea,
.mr-alt-sections .mr-rsvp .rsvp-stepper {
    border-radius: 999px;
    background: var(--aqua-soft);
    border-color: color-mix(in srgb, var(--teal) 24%, transparent);
}
.mr-alt-sections .mr-rsvp .form__group textarea { border-radius: 18px; }
.mr-alt-sections .mr-rsvp .form__group label { color: var(--ink); }
.mr-gallery-upload { text-align: center; }
.mr-gallery-upload .gu-desc {
    text-align: center;
    max-width: 34rem;
    margin-left: auto;
    margin-right: auto;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 640px) {
    .mr-alt-sections .mr-countdown,
    .mr-alt-sections .mr-audio,
    .mr-alt-sections .mr-story,
    .mr-alt-sections .mr-gallery,
    .mr-alt-sections .mr-dive,
    .mr-alt-sections .mr-dress-code,
    .mr-alt-sections .mr-good-to-know,
    .mr-alt-sections .mr-location,
    .mr-alt-sections .mr-accommodation,
    .mr-alt-sections .mr-gallery-upload,
    .mr-alt-sections .mr-guest-wall,
    .mr-alt-sections .mr-album,
    .mr-alt-sections .mr-closing,
    .mr-alt-sections .mr-rsvp {
        padding: 3.5rem 1rem;
    }
}
