/* ============================================================ */
/*  Hero FX: Evidence Console + Portrait Biometric Scan          */
/*  Loaded after site.v4.css; only overrides the two hero        */
/*  animation surfaces, nothing else.                            */
/* ============================================================ */

:root {
    --fx-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
    --fx-alert: var(--badge-priority, #e11d2e);
}

/* ---------- Evidence Console (replaces the signal strip) ----- */

.home-hero-signal.fx-console {
    /* Full-bleed: the console spans the viewport so it carries on 32" displays,
       while the shapes themselves stay within a readable centre column (JS). */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    height: clamp(210px, 19vw, 280px);
    margin-top: 2.6rem;
    border-top-color: rgba(57, 201, 124, 0.3);
    background:
        radial-gradient(ellipse at 50% 50%, rgba(57, 201, 124, 0.085), transparent 62%),
        linear-gradient(180deg, rgba(57, 201, 124, 0.03), rgba(255, 255, 255, 0.004)),
        transparent;
    cursor: crosshair;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.home-hero-signal.fx-console::after {
    background: linear-gradient(90deg, #000 0, transparent 9%, transparent 91%, #000 100%);
    z-index: 1;
}

.fx-console #home-hero-canvas {
    pointer-events: none;
}

.fx-hud {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 0;
    bottom: 0;
    width: min(100% - 2 * var(--page-pad-x), var(--content-max) - 2 * var(--page-pad-x));
    transform: translateX(-50%);
    pointer-events: none;
    font-family: var(--fx-mono);
    font-size: 0.66rem;
    line-height: 1.5;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}

.fx-hud-title {
    position: absolute;
    top: 0.8rem;
    left: 0;
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
    color: var(--accent);
    white-space: nowrap;
}

.fx-hud-index {
    color: rgba(255, 255, 255, 0.5);
}

.fx-hud-read {
    position: absolute;
    top: 0.8rem;
    right: 0;
    text-align: right;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
}

.fx-hud-read span {
    display: block;
}

.fx-hud-read span + span {
    color: rgba(255, 255, 255, 0.46);
}

.fx-hud-steps {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.8rem;
    display: flex;
    gap: 6px;
}

.fx-hud-steps i {
    position: relative;
    flex: 1 1 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.fx-hud-steps i::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleX(var(--p, 0));
    transform-origin: 0 50%;
}

/* ---------- Portrait biometric scan -------------------------- */

.hero-portrait.fx-portrait {
    background: #030504;
}

/* The legacy CSS scan/grid overlay is replaced by the canvas sequence. */
.hero-portrait.fx-portrait::after {
    animation: none;
    background: radial-gradient(circle at 70% 22%, rgba(57, 201, 124, 0.12), transparent 34%);
    opacity: 0.6;
}

.fx-portrait-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.fx-portrait-hud {
    position: absolute;
    z-index: 4;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    pointer-events: none;
    font-family: var(--fx-mono);
    font-size: 0.62rem;
    line-height: 1.55;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.fx-portrait-hud b {
    display: block;
    font-weight: 400;
    color: var(--accent);
}

.fx-portrait-hud .fx-right {
    text-align: right;
}

.fx-portrait-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.fx-portrait-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: fxPulse 1.6s ease-in-out infinite;
}

@keyframes fxPulse {
    50% { opacity: 0.35; }
}

/* ---------- Responsive ---------------------------------------- */

@media (max-width: 980px) {
    .home-hero-signal.fx-console {
        width: 100vw;
    }

    .fx-hud {
        width: calc(100% - 2 * var(--page-pad-mobile));
    }
}

@media (max-width: 768px) {
    .home-hero-signal.fx-console {
        height: 228px;
        margin-top: 1.6rem;
    }

    .fx-hud {
        font-size: 0.6rem;
        letter-spacing: 0.12em;
    }

    .fx-hud-read {
        top: auto;
        bottom: 1.5rem;
        left: 0;
        text-align: left;
    }

    .fx-hud-read span + span {
        display: none;
    }

    .fx-portrait-hud {
        left: max(0.9rem, env(safe-area-inset-left));
        right: max(0.9rem, env(safe-area-inset-right));
    }
}

@media (prefers-reduced-motion: reduce) {
    .fx-portrait-status::before {
        animation: none;
    }
}
