/* ============================================================
 * GMP Resources page  (Gym Marketing Pros, v1.0.0)
 * Prompt 12 Resources page (AVADA-PAGE-SECTION v7.6)
 * Manifests: GMP-DSM-20261110, GMP-RCM-20261113
 * ============================================================
 * Loaded by inc/site-resources.php only on pages whose content
 * holds the marker class gmp-has-resources (Column Hero Heading).
 * Printed after gmp-components.css. Every rule that overrides an
 * Avada element style is lifted to ID level with
 * :is(.x, #gmp-unused); #gmp-unused never exists in the page.
 *
 *  1. Hero: heading measure, picker label, goal picker
 *     (radio pills) and the "Start with" result link
 *  2. Photo link cards: Free Reviews and More sections
 *     (Columns gmp-res-card, gmp-res-card--more)
 *  3. Calculators: six tiles (Code Block gmp-res-tiles)
 *  4. Reduced motion
 *
 * Colors are DSM palette tokens only. The shared arrow is the
 * component icon --gmp-icon-arrow (gmp-components.css section 2).
 * ============================================================ */


/* ============================================================
 * 1. HERO
 * ============================================================ */

/* H1: balanced lines, at most 6em wide from 1024px: the design's
   12ch, measured in its Roboto Flex "0" (0.497em). The Font Layer
   face has a narrower "0", so ch would make the box too narrow. */
:is(.gmp-res-hero-title, #gmp-unused) :is(h1, h2) {
    text-wrap: balance;
}

@media (min-width: 1024px) {
    :is(.gmp-res-hero-title, #gmp-unused) :is(h1, h2) {
        max-width: 6em;
    }
}

/* Picker label (Text Block, Builder sets Roboto Flex 700 12px
   0.14em uppercase Peach Accent Text): plain axes, no italic. */
:is(.gmp-res-pick-label, #gmp-unused),
:is(.gmp-res-pick-label, #gmp-unused) > p {
    font-variation-settings: "wdth" 100, "slnt" 0;
    font-style: normal;
}

/* Goal picker: one wrapping row of radio pills, 8px apart. */
:is(.gmp-res-pick, #gmp-unused) .gmp-res-pick__goals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

:is(.gmp-res-pick, #gmp-unused) .gmp-res-goal {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    margin: 0;
    padding: 10px 18px;
    border: 1px solid var(--awb-color6) !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--awb-color1) !important;
    font-family: "GMP Roboto Flex", var(--awb-typography3-font-family);
    font-variation-settings: "wdth" 100, "slnt" 0;
    font-style: normal;
    font-weight: 700;
    font-size: 15px;
    line-height: normal;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, background-color .2s, color .2s;
}

/* Picked: White fill and border, Brand Black label. */
:is(.gmp-res-pick, #gmp-unused) .gmp-res-goal[aria-checked="true"] {
    border-color: var(--awb-color1) !important;
    background: var(--awb-color1) !important;
    color: var(--awb-color8) !important;
}

/* Hover: Brand Red border (picked or not, as in the design). */
:is(.gmp-res-pick, #gmp-unused) .gmp-res-goal:hover {
    border-color: var(--awb-color4) !important;
}

:is(.gmp-res-pick, #gmp-unused) .gmp-res-goal:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* Result: Button Red link card under the pills, 18px below. */
:is(.gmp-res-pick, #gmp-unused) a.gmp-res-pick__go {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    padding: 20px 24px;
    border-radius: 20px;
    background: var(--awb-color5);
    color: var(--awb-color1) !important;
    text-decoration: none;
    animation: gmp-res-fade-up .35s cubic-bezier(.2,.8,.2,1) both;
}

:is(.gmp-res-pick, #gmp-unused) a.gmp-res-pick__go[hidden] {
    display: none;
}

:is(.gmp-res-pick, #gmp-unused) a.gmp-res-pick__go:is(:hover, :focus, :focus-visible, :active) {
    color: var(--awb-color1) !important;
}

:is(.gmp-res-pick, #gmp-unused) a.gmp-res-pick__go:focus-visible {
    outline: 2px solid var(--awb-color1);
    outline-offset: 3px;
}

:is(.gmp-res-pick, #gmp-unused) .gmp-res-pick__text {
    display: grid;
    gap: 6px;
}

:is(.gmp-res-pick, #gmp-unused) :is(.gmp-res-pick__label, .gmp-res-pick__btn) {
    font-family: var(--awb-typography5-font-family);
    font-variation-settings: "wdth" 100, "slnt" 0;
    font-style: normal;
    font-weight: 700;
    font-size: 12px;
    line-height: normal;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* The question: display type (family and axes from gmp-display). */
:is(.gmp-res-pick, #gmp-unused) .gmp-res-pick__q {
    font-weight: 900;
    font-size: clamp(26px, 2.6vw, 40px);
    line-height: 0.92;
    letter-spacing: 0;
    text-transform: uppercase;
}

:is(.gmp-res-pick, #gmp-unused) .gmp-res-pick__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--awb-color8);
    white-space: nowrap;
}

:is(.gmp-res-pick, #gmp-unused) .gmp-res-pick__btn::after {
    content: "";
    flex: none;
    width: 16px;
    height: 16px;
    background-color: var(--awb-color1);
    -webkit-mask: var(--gmp-icon-arrow) center / contain no-repeat;
    mask: var(--gmp-icon-arrow) center / contain no-repeat;
}

@keyframes gmp-res-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}


/* ============================================================
 * 2. PHOTO LINK CARDS (Free Reviews, More)
 * Column gmp-res-card: Builder owns the photo (Background
 * Image, Cover, Center Center), the Image Placeholder Surface
 * fill, padding, 28px radius, Overflow Hidden, Gap and Content
 * Alignment Flex End. This file owns the minimum height, the
 * Brand Black fade (Avada draws a Column's Gradient under its
 * photo, so the fade is a layer) and the whole-card link: the
 * card's own arrow link (Text Block gmp-res-card-cta) stretches
 * a transparent layer over the card, so a click anywhere opens
 * it and the link keeps its words as its name.
 * ============================================================ */

:is(.gmp-res-card, #gmp-unused) {
    --gmp-res-fade-top: hsla(var(--awb-color8-h),var(--awb-color8-s),var(--awb-color8-l),calc(var(--awb-color8-a) - 90%));
    --gmp-res-fade-end: 70%;
    position: relative;
    isolation: isolate;
    min-height: 340px;
}

:is(.gmp-res-card, #gmp-unused).gmp-res-card--more {
    --gmp-res-fade-top: hsla(var(--awb-color8-h),var(--awb-color8-s),var(--awb-color8-l),calc(var(--awb-color8-a) - 85%));
    --gmp-res-fade-end: 75%;
    min-height: 360px;
}

/* Fade: Brand Black 10% (More: 15%) at the top to 92% at 70%
   (More: 75%). padding: inherit + content-box keeps it on the
   painted card whether Avada spaces the Column or not. */
:is(.gmp-res-card, #gmp-unused)::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    box-sizing: border-box;
    padding: inherit;
    background-clip: content-box;
    background-image: linear-gradient(180deg,
        var(--gmp-res-fade-top) 0%,
        hsla(var(--awb-color8-h),var(--awb-color8-s),var(--awb-color8-l),calc(var(--awb-color8-a) - 8%)) var(--gmp-res-fade-end));
    border-radius: var(--awb-border-radius);
    pointer-events: none;
}

/* Words above the fade. The link's Text Block is not positioned
   (z-index works on it as a flex item), so the link's layer below
   covers the whole card, not just the Text Block. */
:is(.gmp-res-card, #gmp-unused) .fusion-text {
    position: relative;
    z-index: 1;
}

:is(.gmp-res-card, #gmp-unused) .fusion-text.gmp-res-card-cta {
    position: static;
    z-index: 2;
}

/* Kicker (Builder sets Roboto Flex 700 12px 0.14em uppercase
   Peach Accent Text): plain axes, no italic. */
:is(.gmp-res-card, #gmp-unused) .gmp-res-kicker > p {
    font-variation-settings: "wdth" 100, "slnt" 0;
    font-style: normal;
}

/* Title (Builder sets the display type): weight 900, as the
   Font Layer gives Title headings. */
:is(.gmp-res-card, #gmp-unused) .gmp-res-card-title > p {
    font-weight: 900;
    text-wrap: balance;
}

/* Card link: gmp-arrow-link (white label, Brand Red arrow). The
   design's card has no hover change, so the label stays White;
   the arrow is 16px as designed. */
:is(.fusion-body, #gmp-unused) a.gmp-arrow-link.gmp-res-card__link {
    --gmp-arrow-fg-on: var(--awb-color1);
}

:is(.fusion-body, #gmp-unused) a.gmp-arrow-link.gmp-res-card__link::after {
    width: 16px;
    height: 16px;
}

/* The whole-card layer. */
:is(.fusion-body, #gmp-unused) a.gmp-arrow-link.gmp-res-card__link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: var(--awb-border-radius);
}

/* Keyboard focus: a White ring just inside the card edge (the
   card clips anything outside its rounded box). */
:is(.fusion-body, #gmp-unused) a.gmp-arrow-link.gmp-res-card__link:focus-visible {
    outline: none;
}

:is(.fusion-body, #gmp-unused) a.gmp-arrow-link.gmp-res-card__link:focus-visible::before {
    outline: 2px solid var(--awb-color1);
    outline-offset: -4px;
}


/* ============================================================
 * 3. CALCULATORS: six tiles (Code Block HTML)
 * ul.gmp-res-tiles > li > a.gmp-res-tile[data-calc]:
 *   span.gmp-res-tile__top > span.gmp-res-tile__name
 *                          + span.gmp-res-tile__ring
 *   h3.gmp-res-tile__q
 *   span.gmp-res-tile__gets > span.gmp-res-tile__label
 *                           + span.gmp-res-tile__text
 * 1 column below 720px, 2 from 720px, 3 from 1024px, 12px gap.
 * Rest: White card, Light Text on Dark border, Brand Black text,
 * Red on Light labels. Hover, keyboard focus and the tile the
 * hero picker chose (is-picked, set by gmp-resources.js): Brand
 * Black card, White text, Peach labels, Button Red ring turned
 * up 45 degrees, raised 4px. .35s.
 * ============================================================ */

:is(.gmp-res-tiles, #gmp-unused) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 720px) {
    :is(.gmp-res-tiles, #gmp-unused) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    :is(.gmp-res-tiles, #gmp-unused) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

:is(.gmp-res-tiles, #gmp-unused) > li {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

:is(.gmp-res-tiles, #gmp-unused) > li::before {
    content: none;
}

:is(.gmp-res-tiles, #gmp-unused) a.gmp-res-tile {
    --gmp-res-tile-fg: var(--awb-color8);
    --gmp-res-tile-bg: var(--awb-color1);
    --gmp-res-tile-bd: var(--awb-color12);
    --gmp-res-tile-kc: var(--awb-color9);
    --gmp-res-tile-line: var(--awb-color23);
    --gmp-res-tile-ring-bg: transparent;
    --gmp-res-tile-ring-bd: var(--awb-color22);
    --gmp-res-tile-ring-ic: var(--awb-color8);
    --gmp-res-tile-ring-t: none;
    --gmp-res-tile-lift: none;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    min-height: 340px;
    padding: clamp(24px, 2.6vw, 36px);
    border: 1px solid var(--gmp-res-tile-bd);
    border-radius: 28px;
    background: var(--gmp-res-tile-bg);
    color: var(--gmp-res-tile-fg) !important;
    text-decoration: none;
    transform: var(--gmp-res-tile-lift);
    transition: background-color .35s, color .35s, border-color .35s, transform .35s;
}

:is(.gmp-res-tiles, #gmp-unused) a.gmp-res-tile:is(:hover, :focus-visible, .is-picked) {
    --gmp-res-tile-fg: var(--awb-color1);
    --gmp-res-tile-bg: var(--awb-color8);
    --gmp-res-tile-bd: var(--awb-color8);
    --gmp-res-tile-kc: var(--awb-color10);
    --gmp-res-tile-line: var(--awb-color17);
    --gmp-res-tile-ring-bg: var(--awb-color5);
    --gmp-res-tile-ring-bd: var(--awb-color4);
    --gmp-res-tile-ring-ic: var(--awb-color1);
    --gmp-res-tile-ring-t: rotate(-45deg);
    --gmp-res-tile-lift: translateY(-4px);
}

:is(.gmp-res-tiles, #gmp-unused) a.gmp-res-tile:focus-visible {
    outline: 2px solid var(--awb-color8);
    outline-offset: 3px;
}

:is(.gmp-res-tiles, #gmp-unused) .gmp-res-tile__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

:is(.gmp-res-tiles, #gmp-unused) :is(.gmp-res-tile__name, .gmp-res-tile__label) {
    font-family: var(--awb-typography5-font-family);
    font-variation-settings: "wdth" 100, "slnt" 0;
    font-style: normal;
    font-weight: 700;
    font-size: 12px;
    line-height: normal;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gmp-res-tile-kc);
    transition: color .35s;
}

:is(.gmp-res-tiles, #gmp-unused) .gmp-res-tile__ring {
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    box-sizing: border-box;
    border: 1px solid var(--gmp-res-tile-ring-bd);
    border-radius: 50%;
    background: var(--gmp-res-tile-ring-bg);
    transform: var(--gmp-res-tile-ring-t);
    transition: background-color .35s, border-color .35s, transform .35s;
}

:is(.gmp-res-tiles, #gmp-unused) .gmp-res-tile__ring::before {
    content: "";
    display: block;
    width: 16px;
    height: 16px;
    background-color: var(--gmp-res-tile-ring-ic);
    -webkit-mask: var(--gmp-icon-arrow) center / contain no-repeat;
    mask: var(--gmp-icon-arrow) center / contain no-repeat;
    transition: background-color .35s;
}

/* Question: H3 (family and axes from the Font Layer h3 rule). */
:is(.gmp-res-tiles, #gmp-unused) h3.gmp-res-tile__q {
    margin: 0;
    color: inherit;
    font-weight: 900;
    font-size: clamp(28px, 2.6vw, 40px);
    line-height: 0.92;
    letter-spacing: 0;
    text-transform: uppercase;
    text-wrap: balance;
}

:is(.gmp-res-tiles, #gmp-unused) .gmp-res-tile__gets {
    display: grid;
    gap: 6px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--gmp-res-tile-line);
    transition: border-color .35s;
}

:is(.gmp-res-tiles, #gmp-unused) .gmp-res-tile__text {
    font-family: "GMP Roboto Flex", var(--awb-typography3-font-family);
    font-variation-settings: "wdth" 100, "slnt" 0;
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: normal;
    letter-spacing: 0;
    text-transform: none;
}


/* ============================================================
 * 4. REDUCED MOTION: nothing fades, rises or turns over time;
 * the states still change.
 * ============================================================ */

@media (prefers-reduced-motion: reduce) {
    :is(.gmp-res-pick, #gmp-unused) .gmp-res-goal,
    :is(.gmp-res-tiles, #gmp-unused) a.gmp-res-tile,
    :is(.gmp-res-tiles, #gmp-unused) :is(.gmp-res-tile__name, .gmp-res-tile__label, .gmp-res-tile__ring, .gmp-res-tile__gets),
    :is(.gmp-res-tiles, #gmp-unused) .gmp-res-tile__ring::before {
        transition: none;
    }

    :is(.gmp-res-pick, #gmp-unused) a.gmp-res-pick__go {
        animation: none;
    }
}
