/**
 * 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(var(--fd-champagne-rgb, 245, 238, 220), 0.12) 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 {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    max-width: min(100%, var(--fd-hero-visual-size, 676px));
    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, #fdfbf7) 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;
    }
}


/* ════════════════════════════════
 * S01 — feathered picture edge, flowing gold ribbon, tool field.
 * Agreed 7 September 2026: 3:2 slot, ribbon corner to corner.
 * Revised 8 September 2026: feather split per axis, slot +5%, tool field added.
 * ════════════════════════════════ */

/*
 * The picture dissolves into the page across its outer edge. Two linear
 * gradients intersected give a true rectangular feather; a single radial
 * mask would round the corners far more than intended and eat the scene.
 * Where mask-composite is unsupported the picture renders as a plain
 * rectangle — degraded, never broken.
 *
 * The two percentages differ ON PURPOSE. A single 10% produced 71px of fade
 * across a 710px width but only 47px down a 473px height, so the top and
 * bottom dissolved over a third less distance than the sides and read as a
 * hard line while the sides read as a blend. 10% / 16% puts roughly the same
 * NUMBER OF PIXELS on every edge, which is what the eye actually judges.
 */
.fi-hero-visual {
    --fd-hero-feather-x: 10%;
    --fd-hero-feather-y: 16%;
    -webkit-mask-image:
        linear-gradient(to right, transparent 0%, #000 var(--fd-hero-feather-x), #000 calc(100% - var(--fd-hero-feather-x)), transparent 100%),
        linear-gradient(to bottom, transparent 0%, #000 var(--fd-hero-feather-y), #000 calc(100% - var(--fd-hero-feather-y)), transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, transparent 0%, #000 var(--fd-hero-feather-x), #000 calc(100% - var(--fd-hero-feather-x)), transparent 100%),
        linear-gradient(to bottom, transparent 0%, #000 var(--fd-hero-feather-y), #000 calc(100% - var(--fd-hero-feather-y)), transparent 100%);
    mask-composite: intersect;
}

/*
 * Two-stage blend. The artwork is generated on a warmer cream than the page
 * (RGB 251,245,234 against 253,251,247), so fading it straight onto the page
 * left it sitting in a visibly creamier patch. Instead the page carries a
 * pool of the artwork's OWN tone, larger than the picture and soft-edged:
 * the picture fades into its own colour, and the pool fades to the page.
 * The difference then reads as light falling, not as a mismatch.
 * A trace of gold sits over the top so the pool is warm rather than grey.
 */
.fi-hero__visual-wrap::before {
    content: '';
    position: absolute;
    inset: -15% -9%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 50%,
            rgba(212, 160, 23, 0.13) 0%,
            rgba(212, 160, 23, 0.04) 46%,
            transparent 66%),
        radial-gradient(ellipse at 50% 50%,
            rgba(var(--fd-art-tone-rgb, 251, 245, 234), 0.96) 0%,
            rgba(var(--fd-art-tone-rgb, 251, 245, 234), 0.62) 50%,
            rgba(var(--fd-art-tone-rgb, 251, 245, 234), 0) 74%);
    filter: blur(30px);
}

.fi-hero__visual-wrap > * {
    position: relative;
    z-index: 1;
}

/* Ribbon: sweeps corner to corner behind the whole hero, thickest in the
   middle, faded to nothing at both ends so it never terminates in a line. */
.fi-hero__ribbon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

@media (max-width: 767px) {
    .fi-hero__ribbon {
        opacity: 0.55;
    }
}

/* ════════════════════════════════
 * S01 tool field — the stack findi360 teaches, as texture.
 *
 * 115 marks: ten tools in their own brand colour (Python, Power BI, SQL,
 * DuckDB, MongoDB, Fabric, pandas, Polars, NumPy, Nessie) and 105 flat
 * silhouettes behind them — other tools plus 28 techniques with no logo at
 * all (Power Query, DAX, time intelligence, star schema, waterfall, Pareto,
 * reconciliation, cohort grids…). The point is density without colour, the
 * way a chat wallpaper works: felt, not read.
 *
 * It is ONE cached SVG rather than inline markup because 115 icons in the
 * document would add ~50 kB of DOM to every homepage load for decoration.
 * The whole strength of the layer is the one opacity number below — raise or
 * lower it here, no regeneration needed.
 *
 * The file carries its own hole where the picture sits, so nothing lands on
 * the artwork. That hole is positioned for the desktop grid, which is why the
 * layer is hidden once the columns stack.
 * ════════════════════════════════ */
.fi-hero__field {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.49;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 1023px) {
    /* Columns stack here, so the picture is no longer where the hole is. */
    .fi-hero__field {
        display: none;
    }
}


/* ════════════════════════════════
 * Hero headline — sized to hold one line per row.
 *
 * The four-noun headline is far longer than the tagline it replaced.
 * Measured in the live font (Inter 800, -0.03em): "Finance. Data. Tools. AI."
 * is 11.6x its own font-size, so at the display scale it wanted ~600px inside
 * a 483px column and broke into two rows. Capped at 40px it measures 464px and
 * holds one line at every desktop width from 1024 up.
 *
 * Two details that matter if this is ever retuned:
 *  - max-width was min(100%, 30rem) = 480px, three pixels narrower than the
 *    column itself. Released to 100% so the column is the only constraint.
 *  - Scoped to min-width 1024 ON PURPOSE. Below that the columns stack and the
 *    430px / 360px / 320px ramps later in this file must keep winning; an
 *    unscoped rule here would sit after them and silently override them.
 * ════════════════════════════════ */
@media (min-width: 1024px) {
    .fi-hero__title {
        max-width: 100%;
        font-size: clamp(1.9rem, 2.9vw, 2.5rem);
    }
}

/*
 * The support line is tied to the headline, not to a fixed size.
 *
 * Measured in the live font: "Keep Sharing | Keep Learning | Keep Growing" is
 * 22.1x its own font-size; "Your Growth Engine." is 10.0x the title's. For the
 * sub-line to finish inside the gold line, support must stay at roughly 0.42
 * of the title -- so it scales on the SAME vw as the title above. Pinning it to
 * one pixel size would sit correctly at 1440 and overhang again at 1200, which
 * is how it drifted out of sync in the first place.
 *
 * The floor is a readability limit, not a proportional one: below about 14.4px
 * a bold sub-line stops reading as a sub-line. Between 1024 and roughly 1180 it
 * therefore runs a few percent past the gold line, which is invisible at that
 * width where everything is tighter anyway.
 */
@media (min-width: 1024px) {
    .fi-hero__support {
        font-size: clamp(0.9rem, 1.22vw, 1.06rem);
    }
}
