/* =================================================================
   Cases Hero — module-scoped styles
   White background, typography-first (consistent with Blog & Contacts)
   ================================================================= */

.casesHero {
    position: relative;
    overflow: hidden;
    padding-bottom: clamp(40px, calc(60px - (var(--linearInterpolation500x1200) * 0.2)), 60px);
}

/* --- Content wrapper --- */

.casesHero__inner {
    position: relative;
    z-index: 1;
    animation: casesHeroFadeIn 0.6s ease both;
}

/* --- Card (no background — clean white) --- */

.casesHero__card {
    padding: 0;
}

/* --- Badge pill (2026 enhanced) --- */

.casesHero__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 20px;
    padding: 6px 14px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0.05em;
    color: var(--pharos-blue);
    background: #EEF3FE;
    border: 1px solid var(--pharos-blue-tint-15);
    border-radius: var(--pharos-radius-pill);
}

/* Dot indicator before badge text */
.casesHero__badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pharos-blue);
    flex-shrink: 0;
}

/* --- Breadcrumb --- */

.casesHero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    margin-bottom: 24px;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 14px;
    line-height: 1;
    color: var(--pharos-muted);
}

.casesHero__breadcrumb a {
    color: var(--pharos-body);
    text-decoration: none;
    transition: color 0.2s ease;
}

.casesHero__breadcrumb a:hover {
    color: var(--pharos-blue);
}

/* --- Eyebrow — 2026 pill/trust meta strip --- */

.casesHero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #64748B;
    margin: 0 0 14px;
    text-align: left;
    line-height: 1.4;
    background: #F9FAFB;
    border: 1px solid #EEF0F4;
    border-radius: 999px;
    padding: 6px 14px;
}

.casesHero__eyebrow a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.casesHero__eyebrow a:hover {
    color: var(--pharos-blue);
}

/* --- Title --- */

.casesHero__title {
    font-family: var(--font-display);
    font-weight: 700;
    --fontsizeMin: 52;
    --fontsizeMax: 80;
    font-size: clamp(var(--fontsizeMin) * 1px, var(--fontsizeMax) * 1px - (var(--linearInterpolation500x1200) * ((var(--fontsizeMax) - var(--fontsizeMin)) / 100)), var(--fontsizeMax) * 1px);
    line-height: 100%;
    letter-spacing: -0.02em;
    color: var(--pharos-text);
}

/* --- Subtitle --- */

.casesHero__subtitle {
    margin-top: 16px;
    font-family: var(--font-body);
    font-weight: 500;
    --fontsizeMin: 18;
    --fontsizeMax: 22;
    font-size: clamp(var(--fontsizeMin) * 1px, var(--fontsizeMax) * 1px - (var(--linearInterpolation500x1200) * ((var(--fontsizeMax) - var(--fontsizeMin)) / 100)), var(--fontsizeMax) * 1px);
    line-height: 150%;
    color: #475569;
    max-width: 560px;
    margin-bottom: 8px;
}

/* --- Intro paragraph --- */

.casesHero__intro {
    margin-top: 16px;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 170%;
    color: #475569;
    max-width: 65ch;
}

.casesHero__intro a {
    color: var(--pharos-blue);
    text-decoration: none;
    border-bottom: 1px solid var(--pharos-blue-tint-20);
    transition: border-color 0.2s ease;
}

.casesHero__intro a:hover {
    border-color: var(--pharos-blue-tint-60);
}


/* --- Compliance badges --- */

.casesHero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0 0;
    padding: 28px 0 0;
    border-top: 1px solid var(--pharos-border);
}

.casesHero__badgeItem {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid var(--pharos-border);
    background: #F8F9FC;
    color: var(--pharos-text);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.casesHero__badgeItem svg {
    flex-shrink: 0;
    color: var(--pharos-blue);
}

/* --- Stats cards spacing inside hero --- */

.casesHero__card .statsCards {
    margin-top: 32px;
}

/* --- Trust strip spacing inside hero --- */

.casesHero__card .trustStrip {
    margin-top: 28px;
    padding-top: 24px;
}

/* --- Two-column layout when form is present --- */

.casesHero__inner:has(.casesHero__form) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: clamp(25px, 4vw, 60px);
}

/* Breadcrumb spans full width above the two columns */
.casesHero__inner:has(.casesHero__form) .casesHero__breadcrumb {
    flex: 0 0 100%;
    margin-bottom: 0;
}

.casesHero__inner:has(.casesHero__form) .casesHero__card {
    flex: 1 1 0;
    min-width: 0;
}

/* Scale down heading when sharing space with form */
.casesHero__inner:has(.casesHero__form) .casesHero__title {
    --fontsizeMin: 34;
    --fontsizeMax: 56;
}

/* Remove max-width caps — let flexbox handle it */
.casesHero__inner:has(.casesHero__form) .casesHero__subtitle,
.casesHero__inner:has(.casesHero__form) .casesHero__intro {
    max-width: none;
}

.casesHero__form {
    flex: 0 0 auto;
    width: clamp(420px, 40vw, 510px);
    align-self: flex-start;
    margin-top: 12px;
}

/* ── Success state inside hero form ── */
.casesHero__form .contact-form__form[data-cf-state="success"] {
    min-height: 320px;
}

.casesHero__form .contact-form__success {
    color: var(--pharos-text);
    font-size: 18px;
    gap: 20px;
    padding: 48px 24px;
}

.casesHero__form .contact-form__success-icon {
    width: 56px;
    height: 56px;
    color: var(--pharos-blue);
}

/* Match contacts page form appearance: gradient border + button */
.casesHero__form .contact-form__form {
    border: 2px solid transparent;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, var(--pharos-blue) 0%, #4B7DE1 50%, #2037CD 100%) border-box;
}

.casesHero__form .contact-form__input:focus-visible,
.casesHero__form .contact-form__textarea:focus-visible {
    border-color: transparent;
    background:
        linear-gradient(#f5f5f7, #f5f5f7) padding-box,
        linear-gradient(135deg, var(--pharos-blue) 0%, #4B7DE1 50%, #2037CD 100%) border-box;
    box-shadow: 0 0 0 3px var(--pharos-blue-tint-10);
}

.casesHero__form .contact-form__submit {
    background: linear-gradient(135deg, var(--pharos-blue) 0%, #2037CD 50%, var(--pharos-blue) 100%);
    background-size: 200% 100%;
    transition: background-position 0.4s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.casesHero__form .contact-form__submit:hover {
    background-position: 100% 0;
    box-shadow: 0 6px 24px var(--pharos-blue-tint-35);
}

@media (max-width: 940px) {
    .casesHero__inner:has(.casesHero__form) {
        flex-direction: column;
    }

    .casesHero__inner:has(.casesHero__form) .casesHero__title {
        --fontsizeMin: 34;
        --fontsizeMax: 48;
    }

    .casesHero__form {
        width: 100%;
    }
}

/* --- Entrance animation --- */

@keyframes casesHeroFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Audience callout - CORE-EEAT Exp09 Audience Clarity */
.hero__audience {
    margin: 20px 0 24px 0;
    padding: 14px 18px;
    background: var(--pharos-blue-tint-05);
    border: 1px solid var(--pharos-blue-tint-12);
    border-radius: var(--pharos-radius-card);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: baseline;
}

.hero__audience-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pharos-blue);
    flex-shrink: 0;
}

.hero__audience-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.hero__audience-item {
    font-size: 14px;
    line-height: 1.55;
    color: var(--pharos-body);
    position: relative;
    padding-left: 14px;
}

.hero__audience-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--pharos-blue);
    opacity: 0.7;
}

@media (max-width: 767px) {
    .hero__audience {
        padding: 12px 14px;
        gap: 8px 12px;
    }
    .hero__audience-item {
        font-size: 13px;
    }
}

/* === 2026 MLOps uplift: hero mesh-gradient + noise overlay === */

/* Mesh-gradient background layered on the hero root wrapper */
.casesHero {
    background:
        radial-gradient(120% 80% at 10% 0%, rgba(var(--pharos-blue-rgb), 0.04) 0%, transparent 60%),
        radial-gradient(80% 60% at 90% 100%, rgba(var(--pharos-blue-rgb), 0.03) 0%, transparent 55%),
        var(--pharos-surface);
}

/* Hairline SVG noise overlay — barely visible texture */
@supports (mix-blend-mode: overlay) {
    .casesHero::before {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        z-index: 0;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
        mix-blend-mode: overlay;
        opacity: 0.04;
    }
}

/* Ensure hero content sits above the noise overlay */
.casesHero__inner {
    position: relative;
    z-index: 1;
}

/* === 2026 Wave 2: hero gradient-clip H1 === */

.casesHero__title {
    background: linear-gradient(135deg, var(--pharos-text) 0%, var(--pharos-blue) 55%, var(--pharos-blue-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--pharos-text); /* fallback */
}

@supports not (-webkit-background-clip: text) {
    .casesHero__title {
        background: none;
        -webkit-text-fill-color: unset;
        color: var(--pharos-text);
    }
}
