/* Section: inclusion list. The heading, facts and button hold still in a column
   beside a ticked list; tablets stack the two, and phones fold the list into an
   accordion (initInclusionList in main.js) with the button under it. */

.inclusion-list {
    /* One Figma pixel of the 1352 content box, shrinking with the viewport. */
    --u: min(1px, (100vw - 2 * var(--container-pad)) / 1352);
    /* Where the site's content column starts and ends; the section is its own
       inline-size container so this ignores the page scrollbar. */
    --edge: max(var(--container-pad), (100cqi - var(--container-max)) / 2);

    position: relative;
    /* `clip`, not `hidden`: hidden would make the section a scroll container
       and the column below would never stick. */
    overflow: clip;
    isolation: isolate;
    container-type: inline-size;
    background: var(--color-white);
    color: var(--color-dark-purple);
}

.inclusion-list__inner {
    display: grid;
    grid-template-columns: minmax(0, 392fr) minmax(0, 779fr);
    column-gap: calc(181 * var(--u));
    align-items: start;
    padding: calc(84 * var(--u)) var(--edge) calc(120 * var(--u));
}

/* ── Column ──────────────────────────────────────────────── */

.inclusion-list__aside {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: calc(40 * var(--u));
    min-width: 0;
}

/* Holds under the floating header while the list scrolls past, on screens
   tall enough to show the whole column. */
@media (min-width: 1025px) and (min-height: 760px) {
    .inclusion-list__aside {
        position: sticky;
        top: 7.5rem;
    }
}

.inclusion-list__title {
    display: grid;
    gap: calc(16 * var(--u));
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    letter-spacing: 0;
}

/* Display/H-Display: Philosopher Bold Italic 80/88. The column is only as
   wide as "The full picture." at 56px, so on smaller desktops both lines
   shrink with it rather than wrapping the second line. */
.inclusion-list__title em {
    font-size: min(var(--text-display), calc(80 * var(--u)));
    font-style: italic;
    line-height: var(--lh-display);
}

/* Headings/H2: Philosopher Bold 56/64. */
.inclusion-list__title span {
    font-size: min(var(--text-h2), calc(56 * var(--u)));
    line-height: var(--lh-h2);
}

/* The two rules either side of the facts are the list's own borders. */
.inclusion-list__facts {
    display: flex;
    flex-direction: column;
    gap: calc(40 * var(--u));
    width: calc(340 * var(--u));
    margin: 0;
    padding: calc(40 * var(--u)) 0;
    border-block: 1px solid var(--color-soft-purple);
    list-style: none;
}

.inclusion-list__fact {
    display: flex;
    flex-direction: column;
    gap: calc(8 * var(--u));
}

.inclusion-list__fact-label {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--text-copy);
    font-weight: var(--fw-regular);
    line-height: 1.3333;
    letter-spacing: -0.25px;
    text-transform: uppercase;
}

.inclusion-list__fact-value {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-title3);
    font-weight: var(--fw-bold);
    line-height: var(--lh-title3);
    letter-spacing: -0.5px;
}

/* Paint and a base size. The shared button size (global.css) only arrives with
   .btn-fx-ready, which main.js adds, so this is what shows before it runs. */
.inclusion-list__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--color-accent-01);
    border-radius: 999px;
    background: var(--color-accent-01);
    color: var(--color-dark-purple);
    font-family: var(--font-body);
    font-size: var(--text-title6);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-title6);
    text-decoration: none;
    white-space: nowrap;
}

/* ── List ────────────────────────────────────────────────── */

.inclusion-list__items {
    display: flex;
    flex-direction: column;
    gap: calc(36 * var(--u));
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.inclusion-list__item {
    margin: 0;
}

.inclusion-list__item + .inclusion-list__item {
    padding-top: calc(36 * var(--u));
    border-top: 1px solid var(--color-soft-purple);
}

.inclusion-list__header {
    display: flex;
    align-items: center;
    gap: calc(24 * var(--u));
}

/* check.svg is a stroke, so it goes on as a mask and takes the fill: brand
   purple here, the softer purple on phones. */
.inclusion-list__check {
    flex: 0 0 auto;
    width: max(2rem, calc(40 * var(--u)));
    height: max(2rem, calc(40 * var(--u)));
    background: var(--color-primary);
    -webkit-mask: url("../../../../../uploads/meowgical/images/services/check.svg") center / contain no-repeat;
    mask: url("../../../../../uploads/meowgical/images/services/check.svg") center / contain no-repeat;
}

.inclusion-list__item-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-title4);
    font-weight: var(--fw-bold);
    line-height: var(--lh-title4);
    letter-spacing: -1px;
}

/* Only phones fold the list. */
.inclusion-list__plus {
    display: none;
}

.inclusion-list__panel {
    margin-top: calc(8 * var(--u));
}

.inclusion-list__desc {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--text-copy);
    font-weight: var(--fw-regular);
    line-height: var(--lh-copy);
    letter-spacing: 0;
}

/* ── Entrance ────────────────────────────────────────────────
   The list is left out of text-reveal.css because its copy folds away on
   phones; initInclusionList brings each item in on the same curve instead.
   The arming class only lands when the script runs and motion is allowed. */
.inclusion-list__header,
.inclusion-list__desc {
    transition:
        opacity var(--text-reveal-fade, 0.55s) var(--text-reveal-ease, cubic-bezier(0.22, 1, 0.36, 1)),
        transform var(--text-reveal-slide, 0.9s) var(--text-reveal-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.inclusion-list__desc {
    transition-delay: 0.08s;
}

.inclusion-list.is-armed .inclusion-list__item:not(.is-revealed) :is(.inclusion-list__header, .inclusion-list__desc) {
    opacity: 0;
    transform: translateY(var(--text-reveal-shift, 1rem));
}

/* Tablet: the column stacks over the list and stops holding still. */
@media (max-width: 1024px) {
    .inclusion-list__inner {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 3.5rem;
        padding-block: 4.5rem;
    }

    .inclusion-list__aside {
        gap: 2rem;
    }

    .inclusion-list__title {
        gap: 0.5rem;
    }

    .inclusion-list__title em {
        font-size: var(--text-display);
    }

    .inclusion-list__title span {
        font-size: var(--text-h2);
    }

    .inclusion-list__facts {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem 4rem;
        width: auto;
        min-width: min(100%, 21.25rem);
        padding-block: 2rem;
    }

    .inclusion-list__fact {
        gap: 0.5rem;
    }

    .inclusion-list__items {
        gap: 2rem;
    }

    .inclusion-list__item + .inclusion-list__item {
        padding-top: 2rem;
    }

    .inclusion-list__header {
        gap: 1rem;
    }

    .inclusion-list__panel {
        margin-top: 0.5rem;
    }
}

/* Phones: one column in the design's order (heading, facts, list, button)
   rather than the markup's, and the list folds. */
@media (max-width: 768px) {
    .inclusion-list__inner {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2rem;
        padding: 3.75rem var(--edge);
    }

    .inclusion-list__aside {
        display: contents;
    }

    .inclusion-list__title {
        order: 1;
        gap: 0;
    }

    .inclusion-list__title em {
        font-size: 2rem;
        line-height: 1.25;
        letter-spacing: -1px;
    }

    .inclusion-list__title span {
        font-size: 1.5rem;
        line-height: 1.3333;
        letter-spacing: -0.75px;
    }

    .inclusion-list__facts {
        order: 2;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 1rem;
        min-width: 0;
        padding: 0;
        border: 0;
    }

    .inclusion-list__fact {
        gap: 0.25rem;
    }

    .inclusion-list__fact-label {
        font-size: 1.125rem;
        line-height: 1.6667;
    }

    .inclusion-list__fact-value {
        font-size: 1.5rem;
        line-height: 1.3333;
        letter-spacing: -0.75px;
    }

    .inclusion-list__items {
        order: 3;
        gap: 0;
        border-top: 1px solid var(--color-secondary);
    }

    .inclusion-list__actions {
        order: 4;
    }

    .inclusion-list__item,
    .inclusion-list__item + .inclusion-list__item {
        padding-block: 1rem;
        border-top: 0;
        border-bottom: 1px solid var(--color-secondary);
    }

    /* Top-aligned so a wrapped title keeps the tick and the plus on its
       first line; the offsets centre both on a single line. */
    .inclusion-list__header {
        align-items: flex-start;
        gap: 0.5rem;
    }

    .inclusion-list__check {
        width: 2rem;
        height: 2rem;
        background: var(--color-soft-purple);
    }

    .inclusion-list__item-title {
        padding-top: 2px;
        font-size: 1.25rem;
        line-height: 1.4;
        letter-spacing: -0.5px;
    }

    /* Open items drop the plus, as in the design, but keep its box so the
       title does not reflow as it turns out of view. */
    .inclusion-list__plus {
        display: block;
        flex: 0 0 auto;
        width: 1.5rem;
        height: 1.5rem;
        margin-top: 0.25rem;
        opacity: 0;
        transform: rotate(45deg);
        transition:
            opacity 0.3s ease,
            transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
        pointer-events: none;
    }

    .inclusion-list__item.is-collapsed .inclusion-list__plus {
        opacity: 1;
        transform: none;
    }

    .inclusion-list__desc {
        font-size: 1.125rem;
        line-height: 1.6667;
        letter-spacing: -0.25px;
    }

    .inclusion-list__header[role="button"] {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .inclusion-list__header[role="button"]:focus-visible {
        outline: 2px solid var(--color-primary);
        outline-offset: 4px;
        border-radius: 0.25rem;
    }

    /* Rows animate from 1fr to 0fr; the panel stays visible until it has
       finished closing, and turns visible at once when opening. */
    .inclusion-list__panel {
        display: grid;
        grid-template-rows: 1fr;
        margin-top: 0.5rem;
        transition:
            grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1),
            margin-top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
            visibility 0s linear 0s;
    }

    .inclusion-list__panel-inner {
        min-height: 0;
        overflow: hidden;
    }

    .inclusion-list__item.is-collapsed .inclusion-list__panel {
        grid-template-rows: 0fr;
        margin-top: 0;
        visibility: hidden;
        transition:
            grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1),
            margin-top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
            visibility 0s linear 0.4s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .inclusion-list__header,
    .inclusion-list__desc,
    .inclusion-list__plus,
    .inclusion-list__panel,
    .inclusion-list__item.is-collapsed .inclusion-list__panel {
        transition: none;
    }
}
