/**
 * findi360 homepage header + hero — editorial 48/52 grid, content-driven height.
 * Batch 2 — no svh/vh min fill; visual slot scales with locked geometry tokens.
 */

.fi-hero--premium {
    position: relative;
    overflow-x: clip;
    overflow-y: visible;
    padding: 0;
    background: var(--fd-gradient-section-hero);
}

.fi-hero--premium::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 0%, rgba(245, 238, 220, 0.35) 100%);
}

.fi-hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: var(--fd-grid-hero);
    gap: var(--fd-grid-gap-lg, var(--fd-space-8, 32px));
    align-items: center;
    min-height: 0;
    width: 100%;
    min-width: 0;
}

.fi-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: var(--fd-measure-hero-copy, 36rem);
    width: 100%;
    min-width: 0;
    justify-content: center;
    order: 1;
}

.fi-hero__copy > .fi-eyebrow,
.fi-hero__copy > .fd-eyebrow {
    margin: 0 0 var(--fd-home-gap-eyebrow-heading, var(--fd-space-2, 8px));
}

.fi-hero__title {
    margin: 0 0 var(--fd-home-gap-heading-support, var(--fd-space-3, 12px));
    /* Wide enough for approved two-line break at display scale (avoid 3–4 soft wraps). */
    max-width: min(100%, 30rem);
    font-family: var(--fd-font-heading, 'Inter', system-ui, sans-serif);
    font-size: var(--fd-text-display);
    font-weight: var(--fd-font-weight-heading, 800);
    line-height: var(--fd-line-height-display, 1.08);
    letter-spacing: var(--fd-letter-tight, -0.03em);
    color: var(--fd-text-strong, var(--fd-black, #0e0e0e));
    text-wrap: balance;
}

.fi-hero__title-break {
    display: block;
}

.fi-hero__highlight {
    display: block;
    color: var(--fd-accent-deep, var(--fd-gold-deep, #a86a00));
}

.fi-hero__support {
    margin: 0 0 var(--fd-home-gap-heading-body, var(--fd-space-4, 16px));
    font-size: var(--fd-text-h3);
    font-weight: var(--fd-font-weight-subheading, 700);
    line-height: 1.3;
    color: var(--fd-text-primary, var(--fd-charcoal, #202020));
}

.fi-hero__body {
    margin: 0;
    font-size: var(--fd-text-body-lg);
    line-height: var(--fd-line-height-body, 1.6);
    color: var(--fd-muted-text, #6f6a62);
    max-width: min(100%, var(--fd-measure-prose, 40rem));
}

.fi-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fd-actions-gap, var(--fd-space-3, 12px));
    margin-top: var(--fd-home-gap-body-cta, var(--fd-space-4, 16px));
}

.fi-hero__cta-primary,
.fi-hero__cta-secondary {
    min-width: min(100%, 11rem);
}

.fi-hero__cta-primary {
    flex: 0 1 auto;
}

.fi-hero__cta-secondary {
    flex: 0 1 auto;
}

.fi-hero__visual-wrap {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    max-width: min(100%, calc(var(--fd-hero-visual-size, 520px) * 1.12));
    min-height: 0;
    margin-inline: 0 0;
    margin-left: auto;
    align-self: center;
    order: 2;
}

.fi-hero__visual-wrap:has(.fi-hero-visual--admin-banner) {
    max-width: 100%;
    justify-content: stretch;
}

.fi-hero-visual {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: var(--fi-hero-visual-ratio, var(--fd-slot-hero-ratio, 1 / 1));
    margin-inline: auto;
    min-height: 0;
}

.fi-hero-visual .fd-picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.fi-hero-visual .fd-picture img,
.fi-hero-visual__art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center bottom;
    opacity: 0;
    transition: opacity 650ms ease;
    pointer-events: none;
    filter: var(--fd-art-shadow-filter);
}

.fi-hero-visual__stage {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    place-items: end center;
}

.fi-hero-visual__art.is-active,
.fi-hero-visual .fd-picture img.is-active {
    opacity: 1;
}

.fi-hero-visual__fade--edge {
    position: absolute;
    inset: 2% 0 0;
    background: radial-gradient(ellipse 90% 80% at 50% 60%, transparent 42%, var(--fd-bg-primary, #faf8f3) 82%);
    pointer-events: none;
    z-index: 2;
}

.fi-hero-visual__geometry {
    position: absolute;
    inset: 2% 2% 4%;
    border: 1px solid rgba(217, 154, 22, 0.12);
    border-radius: var(--fd-radius-lg, 22px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, transparent 45%),
        linear-gradient(180deg, rgba(245, 238, 220, 0.25) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.fi-hero-visual__geometry::after {
    content: '';
    position: absolute;
    top: 18%;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(217, 154, 22, var(--fd-deco-line-opacity)), transparent);
}

.fi-mascot-spotlight,
.fi-hero-mascot-stage {
    display: none;
}

@media (min-width: 1024px) {
    .fi-hero__visual-wrap {
        justify-content: flex-end;
        align-self: center;
    }

    .fi-hero__visual-wrap:has(.fi-hero-visual--admin-banner) {
        justify-content: stretch;
        align-self: stretch;
        max-width: 100%;
    }
}

@media (max-width: 1023px) {
    .fi-hero__grid {
        grid-template-columns: 1fr;
        gap: var(--fd-space-5, 20px);
        align-items: start;
    }

    .fi-hero__copy {
        order: 1;
        max-width: none;
    }

    .fi-hero__title {
        max-width: min(100%, 30rem);
    }

    .fi-hero__body {
        max-width: var(--fd-measure-prose, 40rem);
    }

    .fi-hero__visual-wrap {
        order: 2;
        align-self: center;
        justify-content: center;
        width: min(100%, var(--fd-hero-visual-size, 520px));
        max-width: min(100%, var(--fd-hero-visual-size, 520px));
        margin-inline: auto;
    }
}

@media (max-width: 767px) {
    .fi-hero__actions {
        flex-direction: column;
    }

    .fi-hero__cta-primary,
    .fi-hero__cta-secondary {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .fi-hero__title {
        font-size: clamp(1.75rem, 7.5vw, 2.25rem);
    }

    .fi-hero__body {
        font-size: var(--fd-text-body);
    }
}

@media (max-width: 360px) {
    .fi-hero__title {
        font-size: clamp(1.65rem, 8.5vw, 2rem);
    }

    .fi-hero__support {
        font-size: var(--fd-text-body-lg);
    }
}

@media (max-width: 320px) {
    .fi-hero__title {
        font-size: clamp(1.625rem, 8.25vw, 1.9rem);
        letter-spacing: -0.02em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fi-hero-visual__art {
        transition: none;
    }
}
