/* The www motif (PRD-011 W1): the two arches of the spa's own "m" are the only shape on the
 * site. Loaded after assets/mbs-system.css and before style.css, on www only; colours come only
 * from the design-system tokens. Every www page uses these as they are:
 *
 *   .mbs-arch        a photograph's frame: a half-round top, square bottom. Put the <img> inside.
 *   #mbs-m-arch      the double arch (the "m") as an SVG clipPath, defined once in footer.php;
 *                    hero scale and the footer only: clip-path: url(#mbs-m-arch).
 *   .btn-primary     the one button shape: arch top, solid fill. .btn (secondary): same shape,
 *                    a tone step on the ground, no outline at rest.
 *   .mbs-card        a flat tone step with an arch-topped photo, square bottom, no border or shadow.
 *   .mbs-arch-list   list items bulleted with a 10px filled arch in the accent.
 *   .mbs-tab         a text tab; the active one (aria-current, aria-selected or aria-pressed="true")
 *                    carries a 2px ink underline. No pills, circles or blobs anywhere.
 *   .mbs-frame       the page's one pair of outer margins: --mbs-gutter, content at most --mbs-max.
 *   .mbs-shutter     the one hero picture that opens from the bottom (mbs-motion.js).
 *   data-mbs-still   on any element: its parts get no entrance.
 */

:root {
    --mbs-arch: 999px 999px 0 0;
    --mbs-arch-button: 999px 999px 6px 6px;
    --mbs-gutter: clamp(16px, 3.2vw, 48px);
    --mbs-max: 1200px;

    --mbs-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --mbs-ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
    --mbs-ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
    --mbs-t-press: 140ms;
    --mbs-t-hover: 180ms;
}

/* The frame */
.mbs-frame {
    box-sizing: border-box;
    padding-inline: max(var(--mbs-gutter), (100% - var(--mbs-max)) / 2);
}

/* Photographs */
.mbs-arch {
    display: block;
    border-radius: var(--mbs-arch);
    overflow: hidden;
}
.mbs-arch img,
.mbs-arch video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Buttons: one shape on every page */
.btn,
.mbs-btn {
    border-radius: var(--mbs-arch-button);
    transition: transform var(--mbs-t-press) var(--mbs-ease-out), background-color var(--mbs-t-hover) ease,
        border-color var(--mbs-t-hover) ease, color var(--mbs-t-hover) ease;
}
.btn:not(.btn-primary):not(.btn-quiet):not(.btn-danger) {
    border-color: var(--mbs-gold-200);
    background: var(--mbs-gold-200);
}
.btn:not(.btn-primary):not(.btn-quiet):not(.btn-danger):hover {
    border-color: var(--mbs-gold-300);
    background: var(--mbs-gold-300);
}
.btn:active,
.mbs-btn:active,
.mbs-card:active,
.chip:active,
.mbs-tab:active {
    transform: scale(0.97);
}

/* Cards */
.mbs-card {
    display: flex;
    flex-direction: column;
    background: var(--mbs-raised);
    color: var(--mbs-ink);
    text-decoration: none;
    transition: transform var(--mbs-t-press) var(--mbs-ease-out), background-color var(--mbs-t-hover) ease;
}
.mbs-card > .mbs-arch {
    aspect-ratio: 4 / 5;
}
@media (hover: hover) and (pointer: fine) {
    a.mbs-card:hover {
        background: var(--mbs-gold-100);
    }
}

/* List bullet: a 10px filled arch */
.mbs-arch-list {
    padding-left: 0;
    list-style: none;
}
.mbs-arch-list > li {
    position: relative;
    padding-left: 22px;
}
.mbs-arch-list > li::before {
    content: "";
    position: absolute;
    top: 0.5em;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: var(--mbs-arch);
    background: var(--mbs-gold-500);
}

/* Text tabs in place of chips */
.mbs-tab {
    display: inline-flex;
    align-items: center;
    min-height: var(--mbs-target-min);
    padding: 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--mbs-ink);
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--mbs-t-press) var(--mbs-ease-out), border-color var(--mbs-t-hover) ease;
}
.mbs-tab[aria-current],
.mbs-tab[aria-selected="true"],
.mbs-tab[aria-pressed="true"] {
    border-bottom-color: var(--mbs-ink);
}
@media (hover: hover) and (pointer: fine) {
    .mbs-tab:hover {
        border-bottom-color: var(--mbs-gold-300);
    }
}

/* Motion (mbs-motion.js adds .mbs-motion to <html>; without script everything simply shows).
   Each section's heading, text and picture rise 24px and fade in once, 70ms apart. */
@media (prefers-reduced-motion: no-preference) {
    .mbs-motion [data-mbs-in="in"] {
        transition: opacity 700ms var(--mbs-ease-out), transform 900ms var(--mbs-ease-out);
        transition-delay: var(--mbs-delay, 0ms);
    }
    .mbs-motion [data-mbs-in="wait"] {
        opacity: 0;
        transform: translateY(24px);
    }

    /* The hero picture opens from the bottom over 1.1s while the image settles from 1.12. */
    .mbs-motion .mbs-shutter {
        overflow: hidden;
        clip-path: inset(100% 0 0 0);
        transition: clip-path 1100ms var(--mbs-ease-in-out);
    }
    .mbs-motion .mbs-shutter img,
    .mbs-motion .mbs-shutter video {
        transform: scale(1.12);
        transition: transform 1500ms var(--mbs-ease-soft);
    }
    .mbs-motion .mbs-shutter.is-open {
        clip-path: inset(0);
    }
    .mbs-motion .mbs-shutter.is-open img,
    .mbs-motion .mbs-shutter.is-open video {
        transform: none;
    }
}

/* Printing scrolls nothing, so every waiting part shows and the shutter is open. */
@media print {
    .mbs-motion [data-mbs-in] {
        opacity: 1;
        transform: none;
    }
    .mbs-motion .mbs-shutter {
        clip-path: none;
    }
    .mbs-motion .mbs-shutter img,
    .mbs-motion .mbs-shutter video {
        transform: none;
    }
}
