/* ============================================================
   Algoist Pulse - Landing page styles
   Brand-matched to the Algoist Intelligence Platform
   ============================================================ */

:root {
    /* Dark theme - default */
    --bg-body:     #0c0c10;
    --bg-surface:  #16151b;
    --accent:      #ea580c;
    --accent-dark: #fb923c;
    --accent-rgb:  234, 88, 12;
    --text:        #f5f3f0;
    --text-muted:  #9a9088;
    --border:      #29262f;
    --nav-bg:      rgba(12, 12, 16, .82);
    --band:        linear-gradient(135deg, #16131a 0%, #2a1a10 100%);
    --green:       #22c55e;
    --green-text:  #4ade80;
}

[data-theme="light"] {
    --bg-body:     #f7f4f0;
    --bg-surface:  #ffffff;
    --accent:      #ea580c;
    --accent-dark: #c2410c;
    --accent-rgb:  234, 88, 12;
    --text:        #1a1512;
    --text-muted:  #6b5e52;
    --border:      #e5ddd5;
    --nav-bg:      rgba(255, 255, 255, .92);
    --band:        linear-gradient(135deg, #1a1512 0%, #2d1f14 100%);
    --green:       #22c55e;
    --green-text:  #15803d;
}

html { background: var(--bg-body); }

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ── Navigation ───────────────────────────────────────────── */
.pub-nav {
    position: sticky; top: 0; z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: .85rem 2rem;
    display: flex; align-items: center; justify-content: space-between;
}
.pub-nav-logo {
    font-size: 1.15rem; font-weight: 800;
    color: var(--text); text-decoration: none;
    display: flex; align-items: center; gap: .55rem;
}
.pub-nav-logo img { height: 28px; width: auto; }
.pub-nav-logo .pill {
    font-size: .62rem; font-weight: 800; letter-spacing: .08em;
    text-transform: uppercase; color: var(--accent);
    background: rgba(var(--accent-rgb), .1);
    padding: .15rem .5rem; border-radius: 20px;
}
.pub-nav-links { display: flex; align-items: center; gap: 1.5rem; }
.pub-nav-links a { font-size: .88rem; font-weight: 600; color: var(--text-muted); }
.pub-nav-links a:hover { color: var(--accent); text-decoration: none; }
.pub-nav-cta {
    padding: .42rem 1.15rem; border-radius: 8px;
    background: var(--accent); color: #fff !important;
    font-weight: 700; font-size: .88rem;
    transition: opacity .15s, transform .1s;
}
.pub-nav-cta:hover { opacity: .88; transform: translateY(-1px); text-decoration: none !important; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--text); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 6rem 2rem 5rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .35rem .9rem;
    border-radius: 20px;
    background: rgba(var(--accent-rgb), .1);
    color: var(--accent);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.hero-eyebrow .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .6);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .55); }
    70%  { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}
.hero h1 {
    font-size: clamp(2.1rem, 5.2vw, 3.7rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.025em;
    color: var(--text);
    margin-bottom: 1.35rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
    font-size: 1.12rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 2.35rem;
    line-height: 1.7;
}
.hero-ctas { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .78rem 2rem; border-radius: 10px;
    background: var(--accent); color: #fff;
    font-weight: 700; font-size: 1rem;
    border: none; cursor: pointer;
    transition: opacity .15s, transform .1s;
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); text-decoration: none; }
.btn-ghost {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .78rem 1.75rem; border-radius: 10px;
    background: transparent; color: var(--text-muted);
    font-weight: 600; font-size: 1rem;
    border: 1.5px solid var(--border);
    transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.hero-trust {
    margin-top: 2.75rem;
    font-size: .8rem;
    color: var(--text-muted);
    display: flex; justify-content: center; align-items: center; gap: 1.6rem; flex-wrap: wrap;
}
.hero-trust-item { display: flex; align-items: center; gap: .4rem; }
.hero-trust-item svg { color: var(--green); flex-shrink: 0; }

/* progression chips under hero */
.progression {
    margin-top: 3.25rem;
    display: flex; justify-content: center; align-items: center;
    gap: .5rem; flex-wrap: wrap;
}
.progression .chip {
    font-size: .82rem; font-weight: 700;
    padding: .4rem .9rem; border-radius: 8px;
    background: var(--bg-surface); border: 1px solid var(--border);
    color: var(--text-muted);
}
.progression .chip:last-child {
    color: var(--accent); border-color: rgba(var(--accent-rgb), .35);
    background: rgba(var(--accent-rgb), .06);
}
.progression .arrow { color: var(--accent); font-weight: 800; }

/* ── Generic section ──────────────────────────────────────── */
.section { padding: 5rem 2rem; }
.section.tint { background: var(--bg-surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-head { max-width: 620px; }
.section-head.center { margin: 0 auto; text-align: center; }
.section-label {
    font-size: .75rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--accent); margin-bottom: .75rem;
}
.section-title {
    font-size: clamp(1.65rem, 3vw, 2.4rem); font-weight: 800;
    letter-spacing: -.02em; line-height: 1.18; margin-bottom: .9rem;
}
.section-sub { font-size: 1.02rem; color: var(--text-muted); line-height: 1.65; }

/* ── Features grid ────────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}
.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.feature-card:hover {
    border-color: rgba(var(--accent-rgb), .3);
    box-shadow: 0 4px 22px rgba(var(--accent-rgb), .08);
    transform: translateY(-3px);
}
.feature-icon {
    width: 46px; height: 46px;
    border-radius: 11px;
    background: rgba(var(--accent-rgb), .1);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.15rem;
}
.feature-title { font-size: 1.02rem; font-weight: 700; margin-bottom: .5rem; }
.feature-desc { font-size: .885rem; color: var(--text-muted); line-height: 1.6; }

/* ── Alert categories ─────────────────────────────────────── */
.alerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 3rem;
}
.alert-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 1.5rem 1.6rem;
    transition: box-shadow .15s, transform .15s;
}
.alert-card:hover { box-shadow: 0 4px 22px rgba(0,0,0,.06); transform: translateY(-2px); }
.alert-card .head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .65rem; }
.alert-card h3 { font-size: 1.02rem; font-weight: 800; }
.alert-card p { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }
.tag {
    font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
    padding: .2rem .55rem; border-radius: 20px; white-space: nowrap;
}
.tag.live   { background: rgba(34,197,94,.14);  color: var(--green-text); }
.tag.soon   { background: rgba(var(--accent-rgb),.14); color: var(--accent-dark); }

/* ── Action queue (findings -> tasks) ─────────────────────── */
.queue {
    margin-top: 3rem;
    display: grid; gap: 1rem;
}
.queue-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center; gap: 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.1rem 1.4rem;
}
.queue-row .finding { font-size: .9rem; color: var(--text-muted); }
.queue-row .task { font-size: .92rem; font-weight: 700; }
.queue-row .to { color: var(--accent); font-weight: 800; font-size: 1.2rem; }

/* ── Steps ────────────────────────────────────────────────── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.step-item { position: relative; }
.step-number {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--accent); color: #fff;
    font-weight: 800; font-size: .9rem;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: .95rem;
}
.step-title { font-weight: 700; margin-bottom: .4rem; }
.step-desc { font-size: .885rem; color: var(--text-muted); line-height: 1.6; }

/* ── Channels ─────────────────────────────────────────────── */
.channels {
    display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.5rem;
}
.channel {
    display: inline-flex; align-items: center; gap: .55rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: .6rem 1.15rem;
    font-size: .9rem; font-weight: 700;
}
.channel .state { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.channel .state.live { color: var(--green-text); }
.channel .state.soon { color: var(--accent-dark); }

/* ── Forecasting / moat ───────────────────────────────────── */
.forecast {
    background: var(--band);
    border: 1px solid var(--border);
    color: #fff; border-radius: 20px;
    padding: 3.25rem 2.5rem;
    margin-top: 1rem;
}
.forecast .section-label { color: #f0a878; }
.forecast h2 { color: #fff; }
.forecast .section-sub { color: #c9b8a8; }
.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem; margin-top: 2.5rem;
}
.forecast-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px; padding: 1.4rem;
}
.forecast-card .quote { font-size: .98rem; font-weight: 700; line-height: 1.45; margin-bottom: .55rem; color: #fff; }
.forecast-card .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #f0a878; font-weight: 700; }

/* ── CTA band ─────────────────────────────────────────────── */
.cta-band {
    background: var(--band);
    border-top: 1px solid var(--border);
    color: #fff; text-align: center; padding: 5rem 2rem;
}
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; letter-spacing: -.02em; margin-bottom: 1rem; }
.cta-band p { font-size: 1.02rem; color: #c9b8a8; max-width: 540px; margin: 0 auto 2.25rem; line-height: 1.65; }

/* ── Footer ───────────────────────────────────────────────── */
.pub-footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 2rem;
    text-align: center;
    font-size: .82rem;
    color: var(--text-muted);
}
.pub-footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: .65rem; flex-wrap: wrap; }
.pub-footer-links a { color: var(--text-muted); font-weight: 500; }
.pub-footer-links a:hover { color: var(--accent); }

/* ── Theme toggle ─────────────────────────────────────────── */
.theme-toggle {
    display: inline-flex; align-items: center; gap: .65rem;
    margin-bottom: 1.5rem;
    font-size: .82rem; font-weight: 600; color: var(--text-muted);
    background: transparent; border: 0; padding: 0;
    font-family: inherit; cursor: pointer;
}
.theme-switch {
    position: relative; width: 52px; height: 28px;
    border-radius: 30px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    cursor: pointer; padding: 0;
    transition: background .2s, border-color .2s;
    flex-shrink: 0;
}
.theme-switch .knob {
    position: absolute; top: 2px; left: 2px;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.theme-switch .knob svg { width: 13px; height: 13px; }
.theme-switch .knob .sun  { display: none; }
.theme-switch .knob .moon { display: block; }
[data-theme="light"] .theme-switch .knob { transform: translateX(24px); }
[data-theme="light"] .theme-switch .knob .sun  { display: block; }
[data-theme="light"] .theme-switch .knob .moon { display: none; }
.theme-switch:hover { border-color: var(--accent); }

/* ── Scroll reveal ────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 760px) {
    .pub-nav { padding: .75rem 1rem; }
    .pub-nav-links { gap: 1rem; }
    .pub-nav-links .hide-mobile { display: none; }
    .hero { padding: 3.75rem 1rem 3rem; }
    .section { padding: 3.25rem 1rem; }
    .queue-row { grid-template-columns: 1fr; text-align: center; gap: .5rem; }
    .queue-row .to { transform: rotate(90deg); }
    .forecast { padding: 2.25rem 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}
