/**
 * Role: Mobile-First HeroHeader styles covering EditorialHero, full-bleed StoryHero, and Tiber ProfileHero variants.
 * SRP: Only changes when HeroHeader layout geometry, gradient scrims, or BrandCard surface tokens change.
 * DRY References: Uses BrandCard CSS tokens from brand.css and composes AvatarBadge inside Story and Profile heroes (ADR 0003, 0007, 0008).
 */

/* Base Mobile-First Styles (320px-767px) */
/* Variant 1: Light-Mode Editorial Hero */
.hc-editorial-hero--white {
    background-color: var(--color-white);
    color: var(--color-tiber);
    padding: 1.5rem 0 1.85rem;
    border-bottom: 4px solid var(--color-mystic);
}

.hc-editorial-hero--compact {
    padding: 0 0 1.35rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-mystic);
}

.hc-editorial-hero__inner--narrow {
    max-width: 46rem;
}

.hc-editorial-hero__inner--wide {
    max-width: 48rem;
}

.hc-editorial-hero__eyebrow {
    margin: 0 0 0.45rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-blue-bayoux);
}

.hc-editorial-hero__title {
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.75rem, 7.2vw, 3.15rem);
    line-height: 1.24;
    letter-spacing: 0.01em;
    color: var(--color-tiber);
}

.hc-editorial-hero__subtitle {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--color-blue-bayoux);
}

/* Variant 2: Full-Bleed Story Hero (Homepage Screen 1) */
.hc-story-hero {
    position: relative;
    overflow: hidden;
    height: calc(100svh - var(--header-height));
    min-height: 540px;
    max-height: 780px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-color: var(--color-tiber);
    color: var(--color-white);
}

.hc-story-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hc-story-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
}

/* Directional scrim protects bottom copy contrast while keeping faces unobstructed above. */
.hc-story-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(6, 46, 54, 0.96) 0%,
        rgba(6, 46, 54, 0.85) 38%,
        rgba(6, 46, 54, 0.25) 60%,
        rgba(6, 46, 54, 0) 72%
    );
}

.hc-story-hero .hc-story-hero__content {
    position: relative;
    z-index: 2;
    padding-top: 1rem;
    padding-bottom: 1.25rem;
}

.hc-story-hero__stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 100%;
}

.hc-story-hero__eyebrow {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-energy-yellow);
}

.hc-story-hero__title {
    margin: 0 0 0.4rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 11.5vw, 4.5rem);
    line-height: 0.96;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--color-white);
}

.hc-story-hero__line {
    display: block;
}

.hc-story-hero__line--accent {
    color: var(--color-tahiti-gold);
}

.hc-story-hero__subtitle {
    margin: 0 0 0.8rem;
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--color-mystic);
}

.hc-story-hero__cta {
    width: 100%;
    text-align: center;
}

.hc-story-hero__micro-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.hc-story-hero__micro-row .hc-avatar {
    border: 1.5px solid rgba(255, 255, 255, 0.75);
}

.hc-story-hero__microcopy {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.3;
    color: var(--color-mystic);
}

/* Variant 3: Tiber Profile Hero (ADHD-friendly Student Dashboard) */
.hc-profile-hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 1.65rem 1.25rem 1.45rem;
    background: linear-gradient(145deg, #003238 0%, #0A464E 100%);
    color: var(--color-white);
    box-shadow: 0 14px 32px rgba(0, 50, 56, 0.16);
}

.hc-profile-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/assets/core/pattern-speech.svg');
    background-repeat: repeat;
    background-size: 460px auto;
    filter: brightness(0) invert(1);
    opacity: 0.055;
    pointer-events: none;
}

.hc-profile-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.95rem;
}

.hc-profile-hero__meta {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.hc-profile-hero__eyebrow {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.hc-profile-hero__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 2.05rem;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--color-white);
}

.hc-profile-hero__email {
    margin: 0;
    font-size: 0.94rem;
    color: rgba(255, 255, 255, 0.88);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hc-profile-hero__badges {
    margin-top: 0.45rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

/* Invariant: Sleek translucent pill avoids Click Gravity collision with the solid orange .btn--primary CTA below. */
.hc-role-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.78rem;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: var(--color-white);
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hc-role-pill--super_admin {
    background-color: rgba(240, 130, 26, 0.18);
    border-color: rgba(240, 130, 26, 0.75);
    color: var(--color-energy-yellow);
}

.hc-role-pill--coach {
    background-color: rgba(130, 161, 175, 0.24);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Tablet & Desktop Enhancements */
@media (min-width: 768px) {
    .hc-editorial-hero--white {
        padding: 3rem 0 3.25rem;
    }

    .hc-editorial-hero__subtitle {
        font-size: 1.0625rem;
    }

    .hc-story-hero {
        justify-content: center;
        height: clamp(560px, calc(100svh - var(--header-height)), 700px);
        max-height: 700px;
    }

    .hc-story-hero__img {
        object-position: right center;
    }

    .hc-story-hero__scrim {
        background: linear-gradient(
            to right,
            rgba(6, 46, 54, 0.94) 0%,
            rgba(6, 46, 54, 0.84) 34%,
            rgba(6, 46, 54, 0.25) 48%,
            rgba(6, 46, 54, 0) 60%
        );
    }

    .hc-story-hero .hc-story-hero__content {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .hc-story-hero__stack {
        max-width: 560px;
    }

    .hc-story-hero__subtitle {
        font-size: 1.125rem;
        margin-bottom: 1.25rem;
    }

    .hc-story-hero__cta {
        width: auto;
        padding: 0.85rem 1.75rem;
    }

    .hc-profile-hero {
        padding: 2.15rem 2.25rem;
    }

    .hc-profile-hero__inner {
        flex-direction: row;
        text-align: left;
        gap: 1.5rem;
    }

    .hc-profile-hero__meta {
        align-items: flex-start;
    }

    .hc-profile-hero__title {
        font-size: 2.45rem;
    }

    .hc-profile-hero__badges {
        justify-content: flex-start;
    }
}
