/* StocksMD Landing Page — Premium Fintech / Medical Vitals Aesthetic */
/* Palette re-bound to the canonical Design_System tokens (static/css/tokens.css,
   loaded globally by base.html). No hardcoded hex here — the landing palette is
   now sourced from the one canonical set so landing / screener / interior all
   share the same base surfaces + greens (Req 1.6, 3.5). The landing-only
   decorative values (cyan glow border, hero glows, larger hero radii) have no
   canonical equivalent and stay local to keep the landing hero aesthetic. */
:root {
    --landing-bg: var(--bg-base);
    --landing-card: var(--bg-surface);
    --landing-card-hover: var(--bg-surface-2);
    /* landing-only cyan glow border — no canonical equivalent, kept local */
    --landing-border: rgba(34, 211, 238, 0.08);
    --accent-cyan: var(--status-info);
    --accent-green: var(--status-healthy);
    --accent-amber: var(--status-caution);
    --accent-red: var(--status-risk);
    /* --text-primary and --text-muted intentionally NOT re-declared here: they
       share the canonical token names + values and inherit from tokens.css
       (avoids a circular var(--text-primary) self-reference). */
    --text-dim: var(--text-disabled);   /* canonical #64748B */
    /* landing-only glow effects — no canonical equivalent, kept local */
    --glow-cyan: rgba(34, 211, 238, 0.15);
    --glow-green: rgba(34, 197, 94, 0.12);
    /* landing hero radii are intentionally larger than canonical --radius-* to
       preserve the hero/section layout; kept local (layout unchanged) */
    --radius: 16px;
    --radius-sm: 10px;
}

/* Page-level overrides */
body.landing-page {
    background: var(--landing-bg);
    color: var(--text-primary);
}
body.landing-page .navbar {
    background: rgba(7, 17, 31, 0.85) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--landing-border);
    z-index: 1000;
}
/* Keep the hero glow/content from overlapping the absolutely-positioned nav */
body.landing-page .landing-hero {
    z-index: 1;
}

/* ─── Hero ─────────────────────────────────────────────────────────────── */
.landing-hero {
    padding: 100px 0 80px;
    position: relative;
}
.landing-hero::before {
    content: "";
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-cyan) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.4;
}
.hero-headline {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}
.hero-headline .accent {
    color: var(--accent-cyan);
}
.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 540px;
    line-height: 1.7;
    margin-bottom: 32px;
}
.hero-ctas {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}
.btn-primary-landing {
    background: var(--accent-cyan);
    color: #07111F;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    text-decoration: none;
}
.btn-primary-landing:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px var(--glow-cyan);
    color: #07111F;
    text-decoration: none;
}
.btn-secondary-landing {
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 8px;
    border: 1px solid rgba(248, 250, 252, 0.15);
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-decoration: none;
}
.btn-secondary-landing:hover {
    border-color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.05);
    color: var(--text-primary);
    text-decoration: none;
}

/* Ticker search */
.ticker-search {
    display: flex;
    max-width: 460px;
    background: var(--landing-card);
    border: 1px solid var(--landing-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ticker-search:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px var(--glow-cyan);
}
.ticker-search input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
}
.ticker-search input::placeholder {
    color: var(--text-dim);
}
.ticker-search button {
    background: var(--accent-green);
    border: none;
    padding: 14px 22px;
    color: #07111F;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.ticker-search button:hover {
    background: #16a34a;
}

/* Hero dashboard preview card */
.hero-preview {
    background: var(--landing-card);
    border: 1px solid var(--landing-border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
}
.hero-preview::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), transparent 60%);
    pointer-events: none;
    z-index: 0;
}
.hero-preview > * { position: relative; z-index: 1; }
.preview-ticker {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.preview-ticker .symbol {
    color: var(--accent-cyan);
}
.preview-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.preview-score-item {
    background: rgba(7, 17, 31, 0.6);
    border-radius: 8px;
    padding: 12px 14px;
}
.preview-score-item .label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.preview-score-item .value {
    font-size: 1.3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.preview-score-item .status {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 2px;
}
.status-healthy { color: var(--accent-green); }
.status-watch { color: var(--accent-amber); }
.status-low { color: var(--accent-green); }
.status-caution { color: var(--accent-amber); }
.status-risk { color: var(--accent-red); }
.status-muted { color: var(--text-dim); }
.val-healthy { color: var(--accent-green); }
.val-watch { color: var(--accent-amber); }
.val-risk { color: var(--accent-red); }
.val-muted { color: var(--text-muted); }
.preview-recommendation {
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(34, 197, 94, 0.08);
    border-left: 3px solid var(--accent-green);
    border-radius: 6px;
}
.preview-recommendation .rec-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}
.preview-recommendation .rec-text {
    color: var(--accent-green);
    font-weight: 700;
    font-size: 0.95rem;
}
.preview-header {
    margin-bottom: 14px;
}
.preview-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    font-weight: 600;
}

/* ─── Sections ─────────────────────────────────────────────────────────── */
.landing-section {
    padding: 80px 0;
}
.section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-cyan);
    font-weight: 600;
    margin-bottom: 12px;
}
.section-headline {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.section-sub {
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 48px;
}

/* Score cards */
.score-card-landing {
    background: var(--landing-card);
    border: 1px solid var(--landing-border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    height: 100%;
}
.score-card-landing:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(34, 211, 238, 0.15);
}
.score-card-landing .card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 16px;
}
.score-card-landing h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.score-card-landing p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0;
}
.score-card-landing .score-preview {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 14px;
}
.score-card-landing .score-number {
    font-size: 1.6rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.score-card-landing .score-max {
    font-size: 0.85rem;
    color: var(--text-dim);
}
.score-card-landing .score-bar {
    height: 4px;
    background: rgba(248, 250, 252, 0.06);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}
.score-card-landing .score-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
}

/* Steps / How it works */
.step-card {
    text-align: center;
    padding: 32px 20px;
}
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.25);
    color: var(--accent-cyan);
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 18px;
}
.step-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.step-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* Benefits */
.benefit-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 0;
}
.benefit-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(34, 211, 238, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
}
.benefit-card h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.benefit-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
}

/* Trust section */
.trust-points {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}
.trust-point {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 8px 14px;
    background: var(--landing-card);
    border-radius: 6px;
    border: 1px solid var(--landing-border);
}
.trust-point i {
    color: var(--accent-green);
    font-size: 0.8rem;
}

/* Final CTA */
.final-cta {
    text-align: center;
    padding: 80px 0;
}
.final-cta .section-headline {
    max-width: 500px;
    margin: 0 auto 16px;
}
.final-cta .section-sub {
    margin: 0 auto 32px;
    text-align: center;
}
.final-cta .hero-ctas {
    justify-content: center;
}

/* Footer */
.landing-footer {
    border-top: 1px solid var(--landing-border);
    padding: 48px 0 24px;
    color: var(--text-muted);
}
.landing-footer .footer-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.landing-footer .footer-brand span {
    color: var(--accent-cyan);
}
.landing-footer .tagline {
    font-size: 0.88rem;
    color: var(--text-dim);
    margin-bottom: 24px;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
}
.footer-links a:hover {
    color: var(--accent-cyan);
}
.footer-disclaimer {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.6;
    border-top: 1px solid var(--landing-border);
    padding-top: 20px;
    margin-top: 20px;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .landing-hero { padding: 60px 0 40px; }
    .hero-preview { margin-top: 40px; }
    .preview-scores { grid-template-columns: 1fr 1fr; }
    .ticker-search { max-width: 100%; }
    .hero-ctas { flex-direction: column; }
    .hero-ctas a, .hero-ctas button { width: 100%; text-align: center; }
    .trust-points { flex-direction: column; }
}
