/*
 * Dr. Pop Hero v2
 *
 * The upper composition is width-driven. Browser chrome may change how much
 * of the lower portrait is visible, but not the relationship between logo,
 * headline, CTA and face.
 */

.drpop-hero-block {
    --drpop-hero-safe-height: calc(100vh - var(--header-height, 4.5rem) - 1px);
    position: relative;
    display: block;
    min-width: 0;
    min-height: var(--drpop-hero-safe-height);
    overflow: clip;
    background: #b7b3ac;
    color: var(--color-ink, #111014);
    isolation: isolate;
    container: drpop-hero / inline-size;
}

@supports (height: 100svh) {
    .drpop-hero-block {
        --drpop-hero-safe-height: calc(100svh - var(--header-height, 4.5rem) - 1px);
    }
}

.drpop-hero-block__backdrop {
    position: absolute;
    z-index: 0;
    inset: 0;
    background:
        radial-gradient(ellipse 105% 115% at 47% 32%, transparent 46%, rgb(54 61 57 / 0.14) 78%, rgb(42 50 46 / 0.34) 100%),
        radial-gradient(ellipse 72% 74% at 47% 27%, rgb(240 237 232 / 0.98) 0%, rgb(225 220 214 / 0.9) 34%, rgb(198 195 188 / 0.35) 62%, transparent 80%),
        linear-gradient(180deg, transparent 0%, rgb(125 130 126 / 0.08) 52%, rgb(82 91 87 / 0.38) 72%, rgb(62 72 68 / 0.78) 100%),
        linear-gradient(90deg, rgb(70 73 69 / 0.3) 0%, rgb(70 73 69 / 0.08) 18%, transparent 35%, transparent 68%, rgb(55 63 59 / 0.12) 82%, rgb(48 57 53 / 0.38) 100%),
        #b7b3ac;
    pointer-events: none;
}

.drpop-hero-block__media {
    position: absolute;
    z-index: 1;
    inset: 0;
    overflow: clip;
    pointer-events: none;
}

.drpop-hero-block__portrait {
    position: absolute;
    top: clamp(5.9rem, 24.5cqw, 6.2rem);
    right: calc(clamp(-7.5rem, -28cqw, -5rem) + 0.25rem);
    bottom: auto;
    left: auto;
    display: block;
    width: auto;
    max-width: none;
    height: clamp(36rem, 157cqw, 40rem);
    object-fit: contain;
    object-position: top right;
    user-select: none;
}

.drpop-hero-block__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: clamp(4.75rem, 22cqw, 5.5rem) 1rem calc(1.5rem + env(safe-area-inset-bottom)) clamp(1.25rem, 5cqw, 2rem);
}

.drpop-hero-block__logo {
    display: block;
    width: clamp(12rem, 50cqw, 14rem);
    max-width: none;
    height: auto;
    margin: 0 0 1.25rem;
    user-select: none;
}

.drpop-hero-block__headline {
    position: relative;
    z-index: 2;
    width: fit-content;
    max-width: calc(100cqw - 2.5rem);
    margin: 0;
    color: var(--color-ink, #111014);
    font-size: clamp(2.05rem, 9.9cqw, 2.75rem);
    font-weight: 800;
    line-height: 0.94;
    letter-spacing: -0.055em;
    text-wrap: nowrap;
}

.drpop-hero-block__headline > span,
.drpop-hero-block__headline-line {
    display: block;
    white-space: nowrap;
}

.drpop-hero-block__actions {
    position: relative;
    z-index: 3;
    display: flex;
    margin-top: 1.25rem;
}

.drpop-hero-block__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: none;
    min-height: 3.5rem;
    padding: 0.75rem;
    border: 2px solid transparent;
    border-radius: var(--radius-control, 0.5rem);
    background: var(--color-signal, #ffd400);
    color: var(--color-ink, #111014);
    font-size: clamp(1rem, 4.2cqw, 1.0625rem);
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 160ms ease, transform 160ms ease;
}

.drpop-hero-block__cta:hover {
    background: var(--color-signal-hover, #e8bd00);
    color: var(--color-ink, #111014);
    transform: translateY(-2px);
}

.drpop-hero-block__cta:focus-visible {
    outline: 3px solid var(--color-electric, #2457d6);
    outline-offset: 4px;
}

/* Very narrow phones: preserve headline clearance instead of forcing the
   desktop/mobile portrait scale onto a 320px canvas. */
@container drpop-hero (max-width: 22.5rem) {
    .drpop-hero-block__portrait {
        right: -7.75rem;
        height: clamp(35rem, 170cqw, 38rem);
    }

    .drpop-hero-block__headline {
        font-size: clamp(1.95rem, 9.6cqw, 2.15rem);
    }

    .drpop-hero-block__cta {
        font-size: 1rem;
        padding-inline: 0.65rem;
    }
}

/* Tablet composition. The portrait is still anchored from the top so browser
   toolbars can only affect the lower crop. */
@container drpop-hero (min-width: 40rem) {
    .drpop-hero-block__content {
        padding-top: clamp(5.5rem, 14cqw, 6.625rem);
        padding-inline-start: clamp(2.75rem, calc(18.5cqw - 5.7rem), 8rem);
        padding-bottom: 2rem;
    }

    .drpop-hero-block__logo {
        width: clamp(15rem, calc(22cqw + 6.25rem), 22.875rem);
        margin-bottom: clamp(1rem, calc(3.125cqw - 0.25rem), 1.75rem);
    }

    .drpop-hero-block__headline {
        max-width: none;
        font-size: clamp(3.0625rem, calc(4.385cqw + 1.309rem), 4.5rem);
        line-height: clamp(0.92em, calc(1.294em - 2.405cqw), 0.98em);
    }

    .drpop-hero-block__actions {
        margin-top: clamp(0.875rem, calc(5.75cqw - 1.425rem), 2.25rem);
    }

    .drpop-hero-block__cta {
        min-height: clamp(3.25rem, calc(1.375cqw + 2.7rem), 3.9375rem);
        padding-inline: clamp(1.5rem, 3.5cqw, 2.5rem);
        font-size: clamp(0.96875rem, calc(0.91cqw + 0.61rem), 1.25rem);
    }

    .drpop-hero-block__portrait {
        top: clamp(2.4rem, 6cqw, 3.5rem);
        right: clamp(-5rem, calc(26.04cqw - 14.8rem), 0rem);
        height: clamp(46rem, 115cqw, 56rem);
    }
}

/* Desktop: width establishes the desired composition, viewport height only
   provides a ceiling. A shallow browser window therefore scales the portrait
   instead of pushing the head under the navigation. */
@container drpop-hero (min-width: 64rem) {
    .drpop-hero-block__content {
        width: 58%;
        padding-top: clamp(6.625rem, calc(13.3cqw - 1.875rem), 10rem);
        padding-inline-start: clamp(2.75rem, calc(18.5cqw - 5.7rem), 16.8125rem);
        padding-bottom: 3rem;
    }

    .drpop-hero-block__logo {
        width: clamp(22.875rem, calc(39cqw - 12.5rem), 34.5rem);
        margin-bottom: clamp(1.75rem, 1.875cqw, 2.25rem);
    }

    .drpop-hero-block__headline {
        font-size: clamp(4.5rem, calc(3.333cqw + 1.5rem), 5.5rem);
        line-height: 0.93;
    }

    .drpop-hero-block__actions {
        margin-top: clamp(2.25rem, calc(2.25cqw + 0.8rem), 4.6875rem);
    }

    .drpop-hero-block__cta {
        min-height: clamp(3.875rem, calc(5.2cqw - 0.75rem), 5.5rem);
        padding-inline: clamp(2.25rem, 3.5cqw, 4rem);
        font-size: clamp(1.25rem, calc(1.667cqw - 0.25rem), 1.75rem);
    }

    .drpop-hero-block__portrait {
        top: auto;
        right: clamp(1.5rem, 8.5cqw, 11rem);
        bottom: 0;
        height: min(
            clamp(44rem, 60cqw, 67.5rem),
            calc(100svh - var(--header-height, 4.5rem) - clamp(1.5rem, 2.5cqw, 3rem))
        );
    }
}

/* At the 1024–1279px desktop transition, keep enough portrait on screen
   without crowding the text column. */
@container drpop-hero (min-width: 64rem) and (max-width: 79.99rem) {
    .drpop-hero-block__content {
        width: 55%;
        padding-top: clamp(5.75rem, 10.5cqw, 7rem);
    }

    .drpop-hero-block__logo {
        width: clamp(18rem, 31cqw, 22.875rem);
    }

    .drpop-hero-block__headline {
        font-size: clamp(3.75rem, 6cqw, 4.5rem);
    }

    .drpop-hero-block__portrait {
        right: clamp(0rem, calc(41.1cqw - 24.4rem), 4rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .drpop-hero-block__cta {
        transition: none;
    }
}
