/*
Theme Name:   Body By Beauty
Theme URI:    https://www.bodybybeauty.com/
Description:  Child theme of Ollie for Body By Beauty, Dr. Irene Tower's plastic surgery practice.
Author:       Pixel Jar
Author URI:   https://www.pixeljar.com/
Template:     ollie
Version:      0.2.0
Requires at least: 6.6
Requires PHP: 8.2
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  bodybybeauty
*/

/*
 * Only what theme.json can't express lives here. Every value is a theme.json
 * token (var(--wp--preset--*) or var(--wp--custom--*)).
 */

/* Focus: a visible ring on every background. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--main);
    outline-offset: var(--wp--custom--focus--offset);
}

.is-style-section-dark :focus-visible {
    outline-color: var(--wp--preset--color--main-accent);
}

/* Booking buttons: link-out icon after the label (icon added by the bbb-site plugin). */
.bbb-booking-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--wp--custom--icon--gap);
}

.bbb-booking-link__icon {
    flex: none;
    width: var(--wp--custom--icon--size);
    height: var(--wp--custom--icon--size);
}

/* Tap-to-call links get a phone icon. */
.bbb-phone a {
    text-decoration: none;
}

.bbb-phone a:hover {
    text-decoration: underline;
}

.bbb-phone a::before {
    content: "";
    display: inline-block;
    width: var(--wp--custom--icon--size);
    height: var(--wp--custom--icon--size);
    margin-inline-end: var(--wp--custom--icon--gap);
    vertical-align: -0.15em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.6a1 1 0 0 1-.25 1Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.6a1 1 0 0 1-.25 1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* A heading stays close to the text it introduces. */
:is(h1, h2, h3, h4, h5, h6).wp-block-heading + :is(p, .wp-block-list) {
    margin-block-start: var(--wp--custom--heading-gap);
}

/* Logo. */
.bbb-logo {
    flex: none;
    margin: 0;
}

/* aspect-ratio reserves the logo's space before it loads (no layout shift). */
.bbb-logo img {
    display: block;
    width: var(--wp--custom--logo--width);
    height: auto;
    aspect-ratio: 320 / 195;
}

/* Header main menu: square, black dropdowns with readable, title-case labels. */
/*
 * Ollie's inline navigation CSS sets submenu border, min-width and link padding
 * with !important, so those three declarations need !important to win here.
 */
.bbb-main-nav .wp-block-navigation__responsive-container-content > .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-container {
    left: 0;
    right: auto;
    min-width: var(--wp--custom--submenu--width) !important;
    margin-left: 0;
    border: 1px solid var(--wp--preset--color--border-dark) !important;
    border-radius: 0;
    box-shadow: none;
    padding-block: var(--wp--preset--spacing--x-small);
}

.bbb-main-nav .wp-block-navigation__responsive-container-content > .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-container .wp-block-navigation-item {
    padding-block: 0;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}

.bbb-main-nav .wp-block-navigation__responsive-container-content > .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    padding: var(--wp--preset--spacing--x-small) var(--wp--preset--spacing--small) !important;
}

/*
 * Six menu items, the logo and the booking button need about 1100px, so the
 * menu button and overlay stay on until then (core switches at 600px).
 */
@media (min-width: 600px) and (max-width: 1099.98px) {
    .bbb-main-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
        display: flex;
    }

    .bbb-main-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
        display: none;
    }
}

/* The band waits above the screen until the main navigation has scrolled away. */
.wp-site-blocks > header,
.bbb-header {
    display: contents;
}

.bbb-topbar {
    position: fixed;
    top: var(--wp-admin--admin-bar--height, 0px);
    right: 0;
    left: 0;
    z-index: 50;
    margin: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition:
        transform var(--wp--custom--motion--band-slide) var(--wp--custom--motion--easing),
        visibility 0s linear var(--wp--custom--motion--band-slide);
}

.bbb-topbar.is-shown {
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
    .bbb-topbar {
        transition: none;
    }
}

/* Equal outer columns keep the logo on the true center of the screen. */
.bbb-topbar > .wp-block-group.alignwide {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.bbb-topbar .bbb-phone {
    justify-self: start;
    margin: 0;
}

.bbb-topbar .bbb-topbar-book {
    justify-self: end;
}

.bbb-band-logo a {
    display: block;
}

.bbb-header .wp-block-buttons.bbb-floating-book {
    display: none;
}

@media (max-width: 600px) {
    .admin-bar .bbb-topbar {
        top: 0;
    }
}

.bbb-band-logo {
    flex: none;
    margin: 0;
}

.bbb-band-logo img {
    display: block;
    width: auto;
    height: var(--wp--custom--logo--band-height);
    aspect-ratio: 446 / 80;
}

/* Top bar items never wrap mid-label. */
.bbb-topbar .bbb-phone,
.bbb-topbar .wp-element-button {
    white-space: nowrap;
}

/* Phones: the top bar carries the booking button, so the main bar shows logo and menu only. */
@media (max-width: 599.98px) {
    .bbb-mainbar .bbb-mainbar-book {
        display: none;
    }

    .bbb-header .bbb-logo img {
        width: var(--wp--custom--logo--width-small);
    }

    .bbb-topbar .bbb-phone,
    .bbb-topbar .wp-element-button {
        letter-spacing: normal !important;
    }

    /* The booking button leaves the band and floats at the bottom of the screen. */
    body {
        padding-bottom: var(--wp--custom--book-bar--clearance);
    }

    .bbb-topbar > .wp-block-group.alignwide {
        grid-template-columns: 1fr auto;
    }

    .bbb-topbar .bbb-topbar-book {
        display: none;
    }

    /* A tinted, blurred bar lets the page show through without competing with the button. */
    .bbb-header .wp-block-buttons.bbb-floating-book {
        display: flex;
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 40;
        margin: 0;
        padding: var(--wp--preset--spacing--small);
        padding-bottom: calc(var(--wp--preset--spacing--small) + env(safe-area-inset-bottom));
        background: color-mix(in srgb, var(--wp--preset--color--main) var(--wp--custom--book-bar--tint), transparent);
        backdrop-filter: blur(var(--wp--custom--book-bar--blur));
        -webkit-backdrop-filter: blur(var(--wp--custom--book-bar--blur));
        transition:
            transform var(--wp--custom--motion--band-slide) var(--wp--custom--motion--easing),
            visibility 0s linear 0s;
    }

    /* Out of the way while another booking button is already on screen. */
    .bbb-header .wp-block-buttons.bbb-floating-book.is-hidden {
        visibility: hidden;
        transform: translateY(100%);
        transition:
            transform var(--wp--custom--motion--band-slide) var(--wp--custom--motion--easing),
            visibility 0s linear var(--wp--custom--motion--band-slide);
    }

    .bbb-floating-book .wp-block-button {
        width: 100%;
    }

    .bbb-floating-book .wp-element-button {
        justify-content: center;
        width: 100%;
        padding-block: var(--wp--custom--button--padding-block);
        font-size: var(--wp--preset--font-size--small);
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bbb-header .wp-block-buttons.bbb-floating-book,
    .bbb-header .wp-block-buttons.bbb-floating-book.is-hidden {
        transition: none;
    }
}

/* Narrowest phones: phone above the button rather than overflowing. */
@media (max-width: 379.98px) {
    .bbb-topbar > .wp-block-group.alignwide {
        grid-template-columns: auto;
        justify-content: center;
        justify-items: center;
    }

    .bbb-topbar .bbb-phone {
        justify-self: center;
    }
}

/* Menu button: cream icon on the black bar with a comfortable tap target. */
.bbb-mainbar .bbb-main-nav .wp-block-navigation__responsive-container-open {
    padding: var(--wp--preset--spacing--x-small);
    background: transparent;
    color: var(--wp--preset--color--base);
}

/* Mobile menu overlay: submenus open in place as an accordion. */
/* The overlay lives inside the header nav block, so reset the menu's type styles. */
.bbb-mobile-menu {
    overflow-y: auto;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}

.bbb-mobile-menu .bbb-logo img {
    width: var(--wp--custom--logo--width-small);
}

.bbb-mobile-nav,
.bbb-mobile-nav .wp-block-navigation__container {
    width: 100%;
    align-items: stretch;
}

.bbb-mobile-nav .wp-block-navigation-item.has-child {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.bbb-mobile-menu .bbb-mobile-nav.wp-block-navigation .has-child > .wp-block-navigation__submenu-icon {
    top: 0;
    display: flex;
    align-items: center;
    box-sizing: content-box;
    height: 1lh;
    padding: var(--wp--preset--spacing--x-small) 0;
    font-size: inherit;
    line-height: inherit;
}

.bbb-mobile-menu .wp-block-navigation-overlay-close {
    padding: var(--wp--preset--spacing--x-small);
    background: transparent;
    color: var(--wp--preset--color--base);
}

.bbb-mobile-nav .wp-block-navigation-item__content {
    padding: var(--wp--preset--spacing--x-small) 0 !important;
    background: transparent !important;
}

.bbb-mobile-nav.wp-block-navigation .has-child > .wp-block-navigation__submenu-container {
    position: static;
    flex-basis: 100%;
    width: 100%;
    min-width: 0 !important;
    margin: 0;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding-inline-start: var(--wp--preset--spacing--small);
}

.bbb-mobile-nav.wp-block-navigation .has-child .wp-block-navigation-submenu__toggle[aria-expanded="false"] ~ .wp-block-navigation__submenu-container {
    display: none;
}

.bbb-mobile-nav .wp-block-navigation__submenu-container .wp-block-navigation-item {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}

/* Gold hairline separators. */
:where(.bbb-footer, .bbb-mobile-menu) .wp-block-separator.has-background {
    height: 1px;
    border: 0;
}

/* Footer. */
.bbb-footer-label {
    font-weight: 700;
    letter-spacing: var(--wp--custom--letter-spacing--wider);
    text-transform: uppercase;
}

.bbb-footer-book {
    flex-basis: var(--wp--custom--footer--book-width);
}

.bbb-footer-nav,
.bbb-legal-nav {
    font-weight: 400;
    letter-spacing: var(--wp--custom--letter-spacing--wide);
}

/* Motion: submenus ease in. Transform and opacity only, never layout. */
@media (prefers-reduced-motion: no-preference) {
    .bbb-main-nav .wp-block-navigation__submenu-container {
        transform: translateY(calc(var(--wp--custom--motion--distance) * -1));
        transition:
            opacity var(--wp--custom--motion--duration) var(--wp--custom--motion--easing),
            transform var(--wp--custom--motion--duration) var(--wp--custom--motion--easing);
    }

    .bbb-main-nav .has-child .wp-block-navigation-submenu__toggle[aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
        transform: none;
    }
}

/*
 * Procedure pages. The body is the design: one soft bend at each section edge,
 * and a gold line that traces the figure's own waist and hip as the page scrolls.
 * --bbb-p is scroll progress from assets/js/bbb-motion.js.
 */
.wp-block-post-content :is(h1, h2, h3) {
    text-transform: none;
    text-wrap: balance;
}

.wp-block-post-content {
    overflow-x: clip;
}

.bbb-tt-measure > *,
p.bbb-tt-measure {
    max-width: var(--wp--custom--procedure--measure);
}

.wp-block-post-content > .alignfull {
    margin-block: 0;
}

.wp-block-post-content > .bbb-curve {
    margin-block: -1px 0;
}

/* Section edges. */
.bbb-curve {
    position: relative;
    height: var(--wp--custom--curve--height);
    margin-block: -1px;
    background: var(--bbb-curve-from);
}

.bbb-curve svg {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

/* Runs past the bottom edge so the dark band can't show through at the seam. */
.bbb-curve svg.bbb-curve__fill {
    height: calc(100% + 3px);
}

.bbb-curve--flip svg {
    scale: -1 1;
}

.bbb-curve__fill path {
    fill: var(--bbb-curve-to);
}

.bbb-curve__line path {
    fill: none;
    stroke: var(--wp--preset--color--primary);
    stroke-width: var(--wp--custom--curve--stroke);
    vector-effect: non-scaling-stroke;
}

/* Hero. */
.bbb-tt-hero {
    position: relative;
}

.bbb-tt-hero .wp-block-columns {
    position: relative;
    margin-bottom: 0;
}

.bbb-tt-hero .wp-block-columns::before {
    content: "";
    position: absolute;
    inset: -8% -12% -8% 40%;
    background: radial-gradient(closest-side, rgb(184 158 100 / 0.3), rgb(184 158 100 / 0));
    pointer-events: none;
}

.bbb-tt-hero-text {
    position: relative;
    padding-bottom: var(--wp--preset--spacing--large);
}

.bbb-tt-title {
    font-size: var(--wp--preset--font-size--xxx-large);
    line-height: var(--wp--custom--procedure--title-line);
}

.bbb-tt-title span {
    display: block;
    margin-top: var(--wp--preset--spacing--small);
    font-size: var(--wp--preset--font-size--large);
    line-height: var(--wp--custom--line-height--snug);
    color: var(--wp--preset--color--primary);
}

.bbb-tt-display {
    font-family: var(--wp--preset--font-family--display);
    line-height: var(--wp--custom--line-height--snug);
}

/* The photo's black background dissolves into the page: no frame, nothing cropped. */
.bbb-tt-figure {
    position: relative;
}

.bbb-tt-hero-img {
    margin: 0;
}

.wp-block-bbb-figure-outline {
    position: relative;
}

.bbb-tt-hero-img img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--bbb-figure-ratio);
    mask-image:
        linear-gradient(to right, transparent, #000 16%, #000 84%, transparent),
        linear-gradient(to bottom, transparent, #000 7%, #000 80%, transparent);
    mask-composite: intersect;
}

.bbb-tt-contour {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    aspect-ratio: var(--bbb-figure-ratio);
    overflow: visible;
    pointer-events: none;
}

.bbb-tt-contour path {
    fill: none;
    stroke: var(--wp--preset--color--main-accent);
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    filter: drop-shadow(0 0 6px rgb(184 158 100 / 0.9));
}

/* Images: soft corners, the whole picture. */
.bbb-tt-midsection,
.bbb-tt-portrait {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: var(--wp--custom--radius--sheet);
}

.bbb-tt-midsection {
    box-shadow: var(--wp--custom--shadow--float);
}

.bbb-tt-midsection img,
.bbb-tt-portrait img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.bbb-tt-midsection img {
    aspect-ratio: var(--wp--custom--procedure--mid-ratio);
}

.bbb-tt-portrait img {
    aspect-ratio: var(--wp--custom--procedure--portrait-ratio);
    object-position: 50% 12%;
}

/* Floating surfaces. */
.bbb-tt-callout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--wp--preset--spacing--small);
    padding: var(--wp--preset--spacing--large) var(--wp--preset--spacing--medium);
    text-align: center;
    background: var(--wp--preset--color--tertiary);
    border-radius: var(--wp--custom--radius--sheet);
    box-shadow: var(--wp--custom--shadow--float);
}

.bbb-tt-callout p {
    margin: 0;
    font-family: var(--wp--preset--font-family--display);
    font-size: var(--wp--preset--font-size--medium);
    line-height: var(--wp--custom--line-height--snug);
}

.bbb-tt-callout-icon {
    box-sizing: border-box;
    width: var(--wp--custom--procedure--badge);
    height: var(--wp--custom--procedure--badge);
    margin: 0;
    padding: 0.9rem;
    background: color-mix(in srgb, var(--wp--preset--color--primary-accent) 55%, var(--wp--preset--color--tertiary));
    border-radius: var(--wp--custom--radius--badge);
}

.bbb-tt-callout-icon img {
    display: block;
    width: 100%;
    height: 100%;
}

.bbb-tt-sheet {
    padding: var(--wp--preset--spacing--large);
    background: var(--wp--preset--color--tertiary);
    border-radius: var(--wp--custom--radius--sheet);
    box-shadow: var(--wp--custom--shadow--float);
}

.bbb-tt-checks {
    display: grid;
    gap: var(--wp--preset--spacing--small);
    padding: 0;
    list-style: none;
}

.bbb-tt-checks li {
    position: relative;
    min-height: var(--wp--custom--procedure--check);
    padding-inline-start: calc(var(--wp--custom--procedure--check) + 0.875rem);
}

.bbb-tt-checks li::before,
.bbb-tt-checks li::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: var(--wp--custom--procedure--check);
    height: var(--wp--custom--procedure--check);
}

.bbb-tt-checks li::before {
    background: var(--wp--preset--color--primary-accent);
    border-radius: var(--wp--custom--radius--leaf);
}

.bbb-tt-checks li::after {
    background: var(--wp--preset--color--gold-deep);
    mask: url("assets/images/icons/check.svg") center / 70% no-repeat;
}

.bbb-tt-fit-columns {
    margin-block: 0;
    gap: 0 !important;
}

.bbb-tt-fit-photo {
    position: relative;
    min-height: 26rem;
}

.bbb-tt-fit-img {
    position: absolute;
    inset: 0;
    margin: 0;
    overflow: hidden;
    border-radius: 0 var(--wp--custom--procedure--fit-radius) var(--wp--custom--procedure--fit-radius) 0;
}

.bbb-tt-fit-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
}

.bbb-tt-fit .bbb-tt-sheet {
    position: relative;
    z-index: 1;
    margin-block: var(--wp--preset--spacing--x-large);
    margin-inline: calc(var(--wp--custom--procedure--sheet-overlap) * -1) var(--wp--preset--spacing--medium);
}

.bbb-tt-fit .wp-block-buttons {
    margin-block-start: var(--wp--preset--spacing--large);
}

@media (max-width: 781.98px) {
    .bbb-tt-fit-photo {
        min-height: 0;
        aspect-ratio: 4 / 5;
    }

    .bbb-tt-fit-img {
        border-radius: 0 0 var(--wp--custom--radius--sheet) var(--wp--custom--radius--sheet);
    }

    .bbb-tt-fit .bbb-tt-sheet {
        margin-block: calc(var(--wp--custom--procedure--sheet-overlap) * -1) var(--wp--preset--spacing--large);
        margin-inline: var(--wp--preset--spacing--medium);
    }
}

.bbb-tt-card {
    padding: var(--wp--preset--spacing--medium) var(--wp--preset--spacing--large);
    margin-block-start: var(--wp--preset--spacing--medium);
    background: var(--wp--preset--color--primary-accent);
    border-radius: var(--wp--custom--radius--sheet);
    border: 1px solid var(--wp--preset--color--primary);
    box-shadow: var(--wp--custom--shadow--glow);
}

.bbb-tt-signature {
    border-radius: var(--wp--custom--radius--sheet);
    box-shadow: var(--wp--custom--shadow--glow);
}

/* Journey. */
/* The heading holds still beside the steps only while they sit side by side. */
@media (min-width: 782px) {
    .bbb-tt-sticky {
        position: sticky;
        top: var(--wp--preset--spacing--x-large);
        align-self: flex-start;
    }
}

.bbb-journey {
    position: relative;
    display: grid;
    gap: var(--wp--preset--spacing--small);
    counter-reset: bbb-step;
}

.bbb-journey::before {
    content: "";
    position: absolute;
    inset-block: 2rem;
    left: calc(var(--wp--preset--spacing--medium) + 1.375rem);
    width: 1px;
    background: var(--wp--preset--color--primary);
    transform: scaleY(var(--bbb-p, 1));
    transform-origin: top;
}

.bbb-tt-stacked {
    line-height: var(--wp--custom--line-height--tight);
}

.bbb-tt-step {
    position: relative;
    counter-increment: bbb-step;
    padding: var(--wp--preset--spacing--medium);
    background: #1c1a15;
    border: 1px solid rgb(184 158 100 / 0.3);
    border-radius: var(--wp--custom--radius--sheet);
}

.bbb-tt-step-title {
    display: flex;
    align-items: center;
    gap: var(--wp--preset--spacing--small);
    margin: 0;
    font-size: var(--wp--preset--font-size--large);
    font-weight: 400;
    line-height: var(--wp--custom--line-height--snug);
}

.bbb-tt-step-title::before {
    content: counter(bbb-step);
    flex: none;
    display: grid;
    place-items: center;
    width: var(--wp--custom--procedure--step-badge);
    height: var(--wp--custom--procedure--step-badge);
    font-size: var(--wp--preset--font-size--base);
    color: var(--wp--preset--color--main);
    background: var(--wp--preset--color--primary);
    border-radius: 50%;
}

.bbb-tt-step > :not(.bbb-tt-step-title) {
    max-width: var(--wp--custom--procedure--measure);
}

@media (min-width: 782px) {
    .bbb-tt-step > :not(.bbb-tt-step-title) {
        margin-inline-start: calc(var(--wp--custom--procedure--step-badge) + var(--wp--preset--spacing--small));
    }
}

/* Core's outline style shrinks the padding; keep paired buttons the same height. */
.wp-block-button.is-style-outline > .wp-element-button {
    padding-block: var(--wp--custom--button--padding-block);
    padding-inline: var(--wp--custom--button--padding-inline);
}

.bbb-tt-quote {
    max-width: var(--wp--style--global--content-size);
    margin-inline: auto;
    border: 0;
    padding: 0;
    text-align: center;
    font-family: var(--wp--preset--font-family--display);
    font-size: var(--wp--preset--font-size--x-large);
    line-height: var(--wp--custom--line-height--snug);
}

.bbb-tt-quote::before {
    content: "\201C";
    content: "\201C" / "";
    display: block;
    height: 0.62em;
    font-size: var(--wp--custom--procedure--quote-mark);
    line-height: 1;
    color: transparent;
    background: linear-gradient(135deg, var(--wp--preset--color--primary), var(--wp--preset--color--gold-deep));
    background-clip: text;
}

.bbb-tt-quote cite {
    font-family: var(--wp--preset--font-family--primary);
    font-size: var(--wp--preset--font-size--small);
    font-style: normal;
}

/* bbb-motion (head flag) means motion is allowed; bbb-motion-ready means the script is running,
   so nothing that waits on it can stay hidden if it never loads. */
.bbb-motion-ready .bbb-curve svg {
    transform: scaleY(calc(0.2 + var(--bbb-p, 0) * 0.8));
    transform-origin: bottom;
}

.bbb-motion-ready .bbb-curve__line {
    clip-path: inset(0 calc((1 - var(--bbb-p, 0)) * 100%) 0 0);
}

.bbb-motion .bbb-tt-contour path {
    stroke-dashoffset: max(0, 1 - var(--bbb-draw, 0));
}

.bbb-motion .bbb-tt-figure {
    --bbb-draw: var(--bbb-p, 0);
}

.bbb-motion-ready .bbb-tt-checks li::after {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 700ms var(--wp--custom--motion--easing);
    transition-delay: calc(var(--bbb-i, 0) * 90ms + 350ms);
}

.bbb-motion-ready .bbb-tt-checks li.is-in::after {
    clip-path: inset(0 0 0 0);
}

.bbb-motion-ready .bbb-tt-midsection img,
.bbb-motion-ready .bbb-tt-fit-img img,
.bbb-motion-ready .bbb-tt-portrait img {
    transform: translateY(calc((var(--bbb-p, 0.5) - 0.5) * -9%)) scale(1.12);
}

.bbb-motion-ready .bbb-unveil {
    clip-path: inset(10% 8% round var(--wp--custom--radius--sheet));
    transition: clip-path var(--wp--custom--motion--reveal) var(--wp--custom--motion--easing);
}

.bbb-motion-ready .bbb-unveil.is-in {
    clip-path: inset(0 round var(--wp--custom--radius--sheet));
}

.bbb-motion-ready .bbb-reveal {
    opacity: 0;
    transform: translateY(2.5rem);
    transition:
        opacity var(--wp--custom--motion--reveal) var(--wp--custom--motion--easing),
        transform var(--wp--custom--motion--reveal) var(--wp--custom--motion--easing);
    transition-delay: calc(var(--bbb-i, 0) * 90ms);
}

.bbb-motion-ready .bbb-reveal.is-in {
    opacity: 1;
    transform: none;
}

.bbb-motion-ready .bbb-tt-quote::before {
    opacity: min(1, calc(var(--bbb-p, 0) * 5));
    transform: translateY(calc((1 - min(1, var(--bbb-p, 0) * 3)) * 1.5rem));
}

.bbb-motion-ready .bbb-word {
    color: var(--wp--preset--color--border-light);
    transition: color 500ms var(--wp--custom--motion--easing);
}

.bbb-motion-ready .bbb-word.is-lit {
    color: var(--wp--preset--color--main);
}

/* Desktop: the hero pins for one scene, headline giving way to the promise. */
@media (min-width: 1100px) {
    .bbb-motion .bbb-tt-hero {
        min-height: var(--wp--custom--procedure--pin-height);
        padding-top: var(--wp--preset--spacing--medium) !important;
        padding-bottom: var(--wp--preset--spacing--xx-large);
    }

    .bbb-motion .bbb-tt-hero .wp-block-columns {
        position: sticky;
        top: calc(var(--wp--custom--procedure--stage-gap) / 2);
        height: calc(100vh - var(--wp--custom--procedure--stage-gap));
        align-items: center !important;
    }

    .bbb-motion .bbb-tt-figure {
        --bbb-draw: calc(var(--bbb-p, 0) * 1.7);
        align-self: center !important;
        transform: translateX(calc(var(--bbb-p, 0) * -4vw)) scale(calc(1 + var(--bbb-p, 0) * 0.14));
    }

    .bbb-motion .bbb-tt-hero-img img {
        width: auto;
        max-width: none;
        height: calc(100vh - var(--wp--custom--procedure--stage-gap));
        margin-inline: auto;
    }

    .bbb-motion .bbb-tt-contour {
        width: auto;
        height: calc(100vh - var(--wp--custom--procedure--stage-gap));
    }

    .bbb-motion .bbb-tt-hero-text {
        align-self: center !important;
        padding-bottom: 0;
    }

    .bbb-motion .bbb-tt-hero-text > :not(.bbb-tt-display) {
        opacity: calc(1 - var(--bbb-p, 0) * 3);
        transform: translateY(calc(var(--bbb-p, 0) * -7rem));
    }

    .bbb-motion .bbb-tt-hero-text > .bbb-tt-display {
        position: absolute;
        top: 50%;
        left: 0;
        margin: 0;
        max-width: 34rem;
        font-size: var(--wp--preset--font-size--xx-large) !important;
        line-height: var(--wp--custom--line-height--tight);
        opacity: calc((var(--bbb-p, 0) - 0.4) * 4);
        transform: translateY(calc(-50% + (1 - var(--bbb-p, 0)) * 5rem));
    }
}

@media (max-width: 781px) {
    .bbb-tt-hero .wp-block-columns::before {
        inset: 40% -40% -5% -40%;
    }
}

/* Answers to a person's action, and the opening moment. */
@media (prefers-reduced-motion: no-preference) {
    .wp-element-button {
        transition: background-color var(--wp--custom--motion--duration) var(--wp--custom--motion--easing), color var(--wp--custom--motion--duration) var(--wp--custom--motion--easing), transform var(--wp--custom--motion--duration) var(--wp--custom--motion--easing);
    }

    .wp-element-button:hover {
        transform: translateY(-2px);
    }

    .bbb-tt-title {
        animation: bbb-title-rise var(--wp--custom--motion--settle) var(--wp--custom--motion--easing) backwards;
    }

    .bbb-tt-hero-img img {
        animation: bbb-emerge var(--wp--custom--motion--emerge) var(--wp--custom--motion--easing) both;
    }

    .bbb-tt-hero .wp-block-columns::before {
        animation: bbb-breathe var(--wp--custom--motion--breathe) ease-in-out infinite alternate;
    }
}

@keyframes bbb-title-rise {
    from {
        clip-path: inset(0 0 45% 0);
        transform: translateY(1.5rem);
    }

    to {
        clip-path: inset(0 0 -20% 0);
        transform: none;
    }
}

/* Starts visible so the image still counts as painted immediately. */
@keyframes bbb-emerge {
    from {
        opacity: 0.25;
        transform: scale(1.05);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes bbb-breathe {
    from {
        opacity: 0.7;
        transform: scale(0.94);
    }

    to {
        opacity: 1;
        transform: scale(1.06);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
