/**
 * LUPKYNIS Pro – 2026 HCP homepage (template-parts/home-hero.php).
 *
 * Its own file, enqueued from front-page.php, so this ticket adds nothing to
 * theme-overrides.css or inc/enqueue.php, both of which the Pantheon upstream branch
 * has rewritten. Navigation, ISI and footer are shared and are not styled here.
 *
 * Figma: "0.0 - Home - Desktop Expand" (2197:12505), a 1440px frame.
 */

.home-refresh {
    --home-deep-teal: #023038;
    --home-teal-700: #007b76;
    --home-teal-900: #004946;
    --home-sea-green-500: #00ada6;
    --home-sea-green-300: #54c8c3;
    --home-sea-green-100: #b0e6e3;
    --home-hero-bg: #011418;
    font-family: "Mulish", sans-serif;
}

/* ==========================================================================
   1. Hero: kidney art, headline, trial callout, CTA cards, footnotes
   ========================================================================== */

.home-hero {
    position: relative;
    overflow: hidden;
    background-color: var(--home-hero-bg);
    color: #fff;
}

/* The 1440 frame. Above 1200px everything in it scales with its width, so the copy and
   the cards keep their place beside the kidneys at any screen size; past 1920px it stops
   growing and the art fades into the hero colour at the sides. */
.home-hero__frame {
    position: relative;
    max-width: 120rem;
    margin: 0 auto;
    container-type: inline-size;
}

/* The art keeps the frame's proportions so the badge's reference superscript can be
   placed over it in percentages, and sized against the art itself. */
.home-hero__art-inner {
    position: relative;
    aspect-ratio: 1440 / 1296;
    container-type: inline-size;
}

.home-hero__art-inner img {
    display: block;
    width: 100%;
    height: 100%;
}

/* "1,a,b" sits on the "29 days" badge at (1068, 271) of the 1440 frame. Never below
   0.5rem, so it stays legible where the art is small and grows with browser zoom. */
.home-hero__badge-refs {
    position: absolute;
    left: 74.24%;
    top: 21.37%;
    font-family: "Montserrat", "Mulish", sans-serif;
    font-weight: 700;
    font-size: max(0.5rem, 0.448cqw);
    line-height: 1;
    color: var(--home-sea-green-100);
    white-space: nowrap;
}

.home-hero__inner {
    position: relative;
    max-width: 77.5rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
}

/* Paragraph rules match "#front .main p" (style-min.css, 1rem) in specificity and load after it. */
#content p.home-hero__eyebrow {
    margin: 0 0 1rem;
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.25;
    color: var(--home-sea-green-100);
}

.home-hero__title {
    margin: 0 0 2.5rem;
    max-width: 34rem;
    font-family: "Montserrat", "Mulish", sans-serif;
    font-weight: 700;
    font-size: 2.25rem;
    line-height: 1.125;
    letter-spacing: 0;
    text-transform: none;
    color: #fff;
}

/* Figma 2197:12512: the cue's top sits just under the x-height of "up" and its
   bottom ~0.6 x-height above the baseline (measured on the 4x export, CU-86bcfffav). */
.home-hero__title sup {
    font-size: 0.288em;
    vertical-align: 1.125em;
    top: 0;
    margin-left: 0.15em;
    font-weight: inherit;
}

/* Shared CTA button (Figma "Button": Gotham Black 20, teal-700, asymmetric corners). */
.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2.5rem;
    border-radius: 0 25px 0 25px;
    background-color: var(--home-teal-700);
    font-family: "Montserrat", "Mulish", sans-serif;
    font-weight: 900;
    font-size: 1.25rem;
    line-height: 1.2;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.home-btn:hover,
.home-btn:focus-visible {
    background-color: var(--home-teal-900);
    color: #fff;
    text-decoration: none;
}

.home-btn:focus-visible {
    outline: 3px solid var(--home-sea-green-300);
    outline-offset: 3px;
}

#content p.home-hero__callout {
    position: relative;
    margin: 3rem 0 1.25rem;
    padding: 0.25rem 0 0.25rem 1.625rem;
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.25;
    color: #fff;
}

.home-hero__callout::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background-color: var(--home-sea-green-500);
}

.home-cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

.home-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2.5rem 1.25rem;
    background-color: var(--home-deep-teal);
    text-align: center;
}

.home-card--start {
    border-radius: 0 50px 0 50px;
}

.home-card--rep {
    border-radius: 50px 0 50px 0;
}

.home-card__title {
    margin: 0;
    font-family: "Mulish", sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1.25;
    text-transform: none;
    color: #fff;
}

/* Below desktop the art is shown as a crop around the kidneys, above the copy. */
@media (max-width: 1199.98px) {
    .home-hero__art {
        position: relative;
        max-width: 40rem;
        margin: 0 auto;
        aspect-ratio: 1 / 0.97;
        overflow: hidden;
        /* Fade the crop into the hero colour instead of showing its edges. */
        -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent), linear-gradient(to bottom, #000 85%, transparent);
        -webkit-mask-composite: source-in;
        mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent), linear-gradient(to bottom, #000 85%, transparent);
        mask-composite: intersect;
    }

    .home-hero__art-inner {
        width: 210%;
        margin-left: -95%;
        margin-top: -21%;
    }

    /* Here the art is too small for the 0.5rem floor to fit between "in" and the
       badge's arrow, so the references move just outside the arrow, on the same line. */
    .home-hero__badge-refs {
        left: calc(74.24% + 3.1cqw);
    }

    .home-hero__inner {
        padding-top: 0;
    }
}

/* On the narrowest phones "Get patients started" is wider than its card; let it wrap. */
@media (max-width: 399.98px) {
    .home-card .home-btn {
        max-width: 100%;
        padding-right: 1.5rem;
        padding-left: 1.5rem;
        white-space: normal;
        text-align: center;
    }
}

@media (min-width: 768px) {
    .home-hero__title {
        font-size: 3rem;
    }

    #content p.home-hero__callout {
        font-size: 1.5rem;
    }

    /* Tablet keeps the cards stacked, one below the other, as on phones: there is no
       tablet design, and side by side they only fit from desktop up. */
    .home-cards {
        grid-template-columns: minmax(0, 34.375rem);
        justify-content: center;
    }
}

@media (min-width: 1200px) {
    /* The frame's art runs behind the 129px navigation; the hero starts below it. */
    .home-hero__art {
        position: absolute;
        top: -8.96cqw;
        left: 0;
        width: 100%;
    }

    /* --u is one Figma rem: 16px at 1440, and in proportion to the frame at any other
       width, so the layout is the frame scaled rather than reflowed over the art.
       Text uses --t instead: half rem, half --u. It is the Figma size at 1440 and still
       follows the art, but browser zoom (WCAG 1.4.4) narrows the frame and shrinks --u,
       so a size in --u alone never grew when zoomed; the rem half does. Measures that
       hold text (title width, button padding) are in em so they follow the font. */
    .home-hero__inner {
        --u: calc(100cqw / 90);
        --t: calc(0.5rem + 0.5 * var(--u));
        /* The hero ends 1175px down the frame, 1046px below the navigation (agency round 1). */
        min-height: 72.64cqw;
        max-width: none;
        padding: 0 calc(6.25 * var(--u)) calc(3.75 * var(--u));
    }

    /* The copy's height at 1440, so smaller (wider screen) text cannot lift the callout and
       cards onto the kidneys; larger (zoomed) text pushes them down instead. */
    .home-hero__copy {
        min-height: calc(29.5 * var(--u));
        padding-top: calc(8.375 * var(--u));
        padding-left: calc(3.125 * var(--u));
    }

    #content p.home-hero__eyebrow {
        margin-bottom: var(--u);
        font-size: calc(1.125 * var(--t));
    }

    .home-hero__title {
        max-width: 9.805em;
        margin-bottom: calc(2.5 * var(--u));
        font-size: calc(3.4677 * var(--t));
        line-height: 1.125;
    }

    .home-hero .home-btn {
        padding: 1.2em 2em;
        border-radius: 0 1.25em 0 1.25em;
        font-size: calc(1.25 * var(--t));
    }

    #content p.home-hero__callout {
        margin: calc(13.625 * var(--u)) 0 calc(1.25 * var(--u)) calc(3.125 * var(--u));
        padding: calc(0.25 * var(--u)) 0 calc(0.25 * var(--u)) calc(1.625 * var(--u));
        font-size: calc(1.5 * var(--t));
    }

    .home-hero__callout::before {
        width: calc(0.375 * var(--u));
    }

    .home-cards {
        grid-template-columns: repeat(2, calc(34.375 * var(--u)));
        gap: calc(1.5 * var(--u));
    }

    .home-card {
        gap: calc(1.5 * var(--u));
        padding: calc(2.5 * var(--u)) calc(1.25 * var(--u));
    }

    .home-card--start {
        border-radius: 0 calc(3.125 * var(--u)) 0 calc(3.125 * var(--u));
    }

    .home-card--rep {
        border-radius: calc(3.125 * var(--u)) 0 calc(3.125 * var(--u)) 0;
    }

    .home-card__title {
        font-size: calc(1.5 * var(--t));
    }
}

@media (min-width: 1921px) {
    .home-hero__art {
        -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
        mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
    }
}

/* ==========================================================================
   2. Footnotes, abbreviations and references (white band above the ISI)
   ========================================================================== */

.home-refs {
    background-color: #fff;
    color: var(--home-deep-teal);
}

.home-refs__inner {
    max-width: 77.5rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
    font-size: 0.75rem;
    line-height: 1.25;
}

@media (min-width: 1200px) {
    .home-refs__inner {
        max-width: calc(77.5rem + 12.5rem);
        padding: 2.5rem 6.25rem;
    }
}

#content .home-refs__inner p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}

/* Footnotes a/b: since agency round 1 (CU-86bcfffa8) they sit on white in the
   references band below the art, above the abbreviations (Figma "Footnote" 2197:12544). */
.home-refs__footnotes {
    margin: 0 0 0.75rem;
}

/* The footnotes are an editor field (WYSIWYG): a list, or paragraphs if retyped. */
.home-refs__footnotes ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#content .home-refs__footnotes p,
#content .home-refs__footnotes li {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.home-refs__footnotes li {
    position: relative;
    padding-left: 5px;
}

.home-refs__footnotes li > sup:first-child {
    position: absolute;
    left: 0;
    /* Own 1:1 line box so the marker sits on the first line (Figma "Footnote" 2305:2199).
       Client round 2c (CU-86bcfffav): 1px higher than before, so the marker ink spans
       0.33-0.63em (a) and 0.33-0.75em (b) above the baseline, as in Figma 2305:2201 / 2305:2205.
       MLR round 3 (CU-86bcfffba, p.1): still read as too low; raised 2px more (0.167em of
       the 12px text) so the letter hangs beside the first line, its top above the caps. */
    top: calc(0.18em - 2px);
    line-height: 1;
}

/* Client round 2c (CU-86bcfffav): the reference cues after each footnote (3, 1) and the
   squared unit sit lower than the sitewide SUPS offset in Figma 2305:2202 / 2305:2206: the
   glyph baseline is 0.3em above the text baseline (0.35em sitewide). Text renders on whole
   pixels at 12px, so anything from -0.433em to -0.533em lands on the same pixel row. */
.home-refs__footnotes li > sup:not(:first-child) {
    top: -0.5em; /* 0.3em of the text: 0.3 / 0.6 */
}

.home-refs__list {
    margin-top: 0.75rem;
}

/* Scoped under .home-refs__inner so it outranks "#content .home-refs__inner p { margin: 0 }";
   the 4px gap to the list is Figma "Frame 216" item spacing. */
#content .home-refs__inner .home-refs__heading {
    margin-bottom: 0.25rem;
    font-weight: 700;
    /* Client round 2 (CU-86bcfffav): Sea Green #00ADA6 as requested (2.79:1 on white, below WCAG AA for 12px text). */
    color: var(--home-sea-green-500);
}
