/* ══════════════════════════════════════════════════════════════════════
   First-visit intro (Components/Shared/IntroPreloader.razor, js/intro.js).
   Hidden unless <html> carries `lp-intro`, so without JavaScript, with
   reduced motion, or on a repeat visit it never appears. Prefixed `lp-`.
   ══════════════════════════════════════════════════════════════════════ */

#lp-intro { display: none; }

html.lp-intro { overflow: hidden; }
html.lp-intro #lp-intro {
    --lp-bg: #ffffff;
    --lp-ink: #022c22;
    --lp-muted: #5b7a70;
    --lp-line: #dde7e3;
    display: block;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: var(--lp-bg);
    color: var(--lp-ink);
    font-family: 'Inter', system-ui, sans-serif;
    cursor: pointer;
    outline: none;
    /* If the script never runs to the end, let the page through anyway. */
    animation: lp-failsafe 0s 14s forwards;
}
@keyframes lp-failsafe { to { visibility: hidden; pointer-events: none; } }

/* The brand's colour logo on white, its on-dark version at night. */
#lp-logo .lp-t0 { stop-color: #10b981; }
#lp-logo .lp-t1 { stop-color: #047857; }
#lp-logo .lp-t2 { stop-color: #022c22; }
#lp-logo .lp-s0 { stop-color: #6ee7b7; }
#lp-logo .lp-s1 { stop-color: #059669; }
#lp-logo .lp-w0 { stop-color: #10b981; stop-opacity: 0; }
#lp-logo .lp-w1 { stop-color: #10b981; stop-opacity: .14; }
html[data-theme="dark"].lp-intro #lp-intro { --lp-bg: #0b1220; --lp-ink: #ffffff; --lp-muted: #a3b5ae; --lp-line: #24324a; }
html[data-theme="dark"] #lp-logo .lp-t0 { stop-color: #a7f3d0; }
html[data-theme="dark"] #lp-logo .lp-t1 { stop-color: #34d399; }
html[data-theme="dark"] #lp-logo .lp-t2 { stop-color: #10b981; }
html[data-theme="dark"] #lp-logo .lp-s0 { stop-color: #ecfdf5; }
html[data-theme="dark"] #lp-logo .lp-s1 { stop-color: #6ee7b7; }

.lp-stage { position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 6vh; }
#lp-logo { width: min(92vw, 660px, 105vh); aspect-ratio: 130 / 85.5; overflow: visible; }

/* Everything starts unrevealed; the script brings it in. */
#lp-leaf-tall, #lp-leaf-short, #lp-funnel, #lp-gold, #lp-ripple, .lp-letter { opacity: 0; }
.lp-wall {
    fill: none;
    stroke: #10b981;
    stroke-width: .32;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}
.lp-mouth { stroke-opacity: .55; }
#lp-gold { fill: #f2b400; }
#lp-ripple { fill: none; stroke: #f2b400; stroke-width: .5; }
.lp-letter { fill: var(--lp-ink); }
#lp-leads circle { fill: #059669; }

/* ── Heads-up display ─────────────────────────────────────────────── */
.lp-hud {
    position: absolute;
    left: clamp(20px, 5vw, 64px);
    right: clamp(20px, 5vw, 64px);
    bottom: clamp(24px, 5vh, 52px);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: end;
    gap: 14px 24px;
}
.lp-count { font: 800 clamp(54px, 9vw, 112px)/.85 'Manrope', 'Inter', sans-serif; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.lp-count i { font-style: normal; font-size: .28em; letter-spacing: 0; margin-left: 6px; color: var(--lp-muted); }
.lp-status { justify-self: end; font: 600 12px/1.4 'Inter', sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--lp-muted); text-align: right; }
.lp-track { grid-column: 1 / -1; position: relative; height: 1px; background: var(--lp-line); }
.lp-fill { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: #047857; }
.lp-head { position: absolute; top: 50%; left: 0; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #f2b400; }

.lp-skip {
    position: absolute;
    top: 20px;
    right: 20px;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--lp-muted);
    font: 600 12px 'Inter', sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
}
.lp-skip:hover { color: var(--lp-ink); }
.lp-skip:focus-visible { outline: 2px solid #10b981; outline-offset: 2px; }

#lp-portal { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* While the page opens through the funnel only the canvas is left. */
html.lp-intro #lp-intro.lp-opening { background: transparent; pointer-events: none; }
#lp-intro.lp-opening .lp-stage,
#lp-intro.lp-opening .lp-hud,
#lp-intro.lp-opening .lp-skip { visibility: hidden; }

@media (max-width: 560px) {
    .lp-hud { grid-template-columns: 1fr; }
    .lp-status { justify-self: start; text-align: left; order: -1; }
}
