/* Landing scenes - the marketing page's bespoke visuals.
   Plain CSS, like analyze_scenes.css and today_scenes.css: tailwind_built.css
   is prebuilt and committed, so a new utility class in a template would
   silently not exist. Unlayered on purpose: these rules beat Tailwind's
   layered utilities on the same element without !important. */

/* ---- Line breaks: no lone last word, the way Analyze and Today read ----
   balance evens out a headline's lines; pretty keeps a paragraph's last line
   from being one stranded word. Browsers without either just wrap as before. */
#main-content :is(h1, h2, h3) { text-wrap: balance; }
#main-content p { text-wrap: pretty; }

/* ---- Hero layout: copy beside the card from 1024px, stacked below ---- */
.lp-hero-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
    max-width: 74rem;
    margin: 0 auto;
}
/* The note under the search sits in the search's text-left wrapper (its
   results read left to right), but below lg the hero is centred, and so is
   the note; at lg it follows the copy back to the left edge. */
.lp-hero-note { text-align: center; }
@media (min-width: 1024px) {
    .lp-hero-note { text-align: left; }
    .lp-hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
        gap: 3.5rem;
    }
    /* No auto margins on the column: in a grid they shrink an item to fit
       its content and centre it, so the copy would drift off the left edge. */
    .lp-hero-copy { margin: 0; text-align: left; }
    .lp-hero-copy .lp-hero-center {
        margin-left: 0;
        margin-right: 0;
        justify-content: flex-start;
    }
}

/* The card and the proof row arrive after the copy's nth-child cascade
   (style.css .lp-hero-item, 0.05s-0.62s) instead of joining it. */
.lp-hero-card { animation: lp-fade-up 0.8s ease-out 0.3s both; }
.lp-proof { animation: lp-fade-up 0.7s ease-out 0.72s both; }

/* ---- Proof row: the plan's trust strip, now inside the hero ---- */
.lp-proof {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
}
.lp-proof li { display: inline-flex; align-items: center; gap: 0.375rem; }
.lp-proof svg { width: 0.875rem; height: 0.875rem; flex: none; color: var(--color-accent, #c8f45d); }
@media (min-width: 1024px) {
    .lp-proof { display: grid; grid-template-columns: repeat(2, max-content); justify-content: start; gap: 0.625rem 1.75rem; }
}
.lp-hero-exits { margin-top: 1.5rem; }

/* ---- The card ---- */
.lp-trio {
    position: relative;
    padding: 1.25rem;
    border: 1px solid var(--color-border, #1c2431);
    border-radius: 1.5rem;
    background: linear-gradient(160deg, rgba(17, 23, 34, 0.94), rgba(8, 11, 16, 0.94));
    box-shadow: 0 40px 90px -45px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    text-align: left;
}
.lp-trio::before {
    content: "";
    position: absolute;
    inset: -1px -1px auto;
    height: 3px;
    border-radius: 1.5rem 1.5rem 0 0;
    background: linear-gradient(90deg, var(--color-horizon-day, #38bdf8), var(--color-horizon-swing, #a78bfa), var(--color-horizon-invest, #facc15));
}

.lp-trio-tabs { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 1rem; }
.lp-trio-tab {
    min-height: 2.25rem;
    padding: 0 0.875rem;
    border: 1px solid var(--color-border, #1c2431);
    border-radius: 999px;
    background: rgba(8, 11, 16, 0.6);
    color: #cbd5e1;
    font: 700 0.8125rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.lp-trio-tab:hover { border-color: rgba(200, 244, 93, 0.55); color: #fff; }
.lp-trio-tab[aria-selected="true"] {
    border-color: var(--color-accent, #c8f45d);
    background: var(--color-accent, #c8f45d);
    color: var(--color-base, #080b10);
}
.lp-trio-tab:focus-visible,
.lp-trio-panel:focus-visible,
.lp-trio-cta:focus-visible {
    outline: 2px solid var(--color-accent, #c8f45d);
    outline-offset: 3px;
}
.lp-trio-panel { border-radius: 1rem; }

.lp-trio-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.25rem 0.75rem;
    margin-bottom: 1rem;
}
.lp-trio-name { font-size: 1.125rem; font-weight: 800; color: #fff; line-height: 1.2; }
.lp-trio-symbol { margin-left: 0.25rem; font: 700 0.75rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #94a3b8; }
.lp-trio-price { margin-top: 0.125rem; font: 600 0.875rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #cbd5e1; }
.lp-trio-stamp { display: inline-flex; align-items: center; gap: 0.375rem; padding-top: 0.25rem; font-size: 0.75rem; color: #94a3b8; }
.lp-trio-live {
    width: 0.5rem;
    height: 0.5rem;
    flex: none;
    border-radius: 50%;
    background: var(--color-bull, #3ddc97);
    animation: lp-live-pulse 2.4s ease-out infinite;
}
@keyframes lp-live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55); }
    70%, 100% { box-shadow: 0 0 0 0.45rem rgba(61, 220, 151, 0); }
}

/* ---- Dials: one per horizon, filled to the Direction score ---- */
.lp-trio-dials {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}
.lp-dial {
    --lp-hue: var(--color-horizon-day, #38bdf8);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.25rem 0.875rem;
    border: 1px solid var(--color-border, #1c2431);
    border-radius: 1rem;
    background: rgba(8, 11, 16, 0.55);
    text-align: center;
}
.lp-dial--swing { --lp-hue: var(--color-horizon-swing, #a78bfa); }
.lp-dial--invest { --lp-hue: var(--color-horizon-invest, #facc15); }
.lp-dial-label { margin-bottom: 0.375rem; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lp-hue); }
.lp-dial-gauge { position: relative; display: block; width: 100%; max-width: 7.5rem; }
.lp-dial-arc { display: block; width: 100%; height: auto; overflow: visible; }
.lp-dial-track,
.lp-dial-fill { fill: none; stroke-width: 9; stroke-linecap: round; }
.lp-dial-track { stroke: rgba(148, 163, 184, 0.14); }
.lp-dial-fill {
    stroke: var(--lp-hue);
    stroke-dasharray: 100;
    stroke-dashoffset: calc(100 - var(--lp-score, 0));
    filter: drop-shadow(0 0 5px var(--lp-hue));
    transition: stroke-dashoffset 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* landing_trio.js primes a panel empty, then lets it fill. */
.lp-trio-panel.is-priming .lp-dial-fill { stroke-dashoffset: 100; transition: none; }
.lp-dial-score {
    position: absolute;
    inset: auto 0 -0.25rem;
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.lp-dial-rating { margin-top: 0.625rem; font-size: 0.8125rem; font-weight: 700; color: #e2e8f0; line-height: 1.25; }
.lp-dial-risk { margin-top: 0.125rem; font-size: 0.75rem; font-weight: 600; }

/* ---- The pattern across the three horizons ---- */
.lp-trio-pattern {
    margin-bottom: 0.875rem;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(200, 244, 93, 0.2);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(200, 244, 93, 0.08), rgba(167, 139, 250, 0.06));
}
.lp-trio-pattern-name { font-size: 1.0625rem; font-weight: 800; color: var(--color-accent, #c8f45d); }
.lp-trio-pattern-kicker { display: block; margin-bottom: 0.125rem; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #94a3b8; }
.lp-trio-pattern-text { margin-top: 0.25rem; font-size: 0.8125rem; line-height: 1.5; color: #cbd5e1; }
.lp-trio-cta { display: inline-flex; align-items: center; min-height: 1.5rem; border-radius: 0.25rem; font-size: 0.875rem; font-weight: 700; color: var(--color-accent, #c8f45d); text-underline-offset: 4px; }
.lp-trio-cta:hover { text-decoration: underline; }

@media (max-width: 520px) {
    /* One row of equal chips instead of four-and-an-orphan. */
    .lp-trio-tabs { flex-wrap: nowrap; }
    .lp-trio-tab { flex: 1 1 0; min-width: 0; padding: 0 0.25rem; }
}
/* ---- Transparent by design: how a score is made, top to bottom ---- */
.lp-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: lp-flow;
}
.lp-flow li {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    border: 1px solid var(--color-border, #1c2431);
    border-radius: 999px;
    background: rgba(17, 23, 34, 0.75);
    font-size: 0.8125rem;
    font-weight: 600;
    color: #cbd5e1;
    counter-increment: lp-flow;
}
.lp-flow li::before {
    content: counter(lp-flow);
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    flex: none;
    border-radius: 50%;
    background: rgba(200, 244, 93, 0.14);
    color: var(--color-accent, #c8f45d);
    font-size: 0.75rem;
    font-weight: 800;
}
.lp-flow li:not(:last-child)::after { /* the connector into the next step */
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    width: 1px;
    height: 0.75rem;
    background: linear-gradient(var(--color-accent, #c8f45d), transparent);
    opacity: 0.5;
}

@media (max-width: 400px) {
    .lp-trio { padding: 1rem; }
    .lp-dial-score { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .lp-hero-card,
    .lp-proof { animation: none; opacity: 1; }
    .lp-dial-fill { transition: none; }
    .lp-trio-live { animation: none; }
}
@media print {
    .lp-hero-card,
    .lp-proof { animation: none; opacity: 1; }
}
