/* AegisAI marketing site — shared styles
 * Self-contained, no build step. Drop into Hostinger as-is.
 *
 * v2: GODMODE polish pass.
 *   - equal-height cards via flex column
 *   - responsive table collapse at <720px
 *   - pipeline grid retuned (number column tight against text)
 *   - dark-section accent corrected for contrast
 *   - kicker-center helper class (drops the no-op inline style)
 *   - section anchor scroll-margin-top so #ids don't slip under sticky nav
 *   - hero h1 cap bumped; tighter line-height on huge sizes
 *   - footer brand-dot uses lighter accent on dark background
 *   - .problem-grid as a real class with its own breakpoint
 *   - subtle dividers, tighter spacing rhythm in dense sections
 */

:root {
    --bg: #0b1220;
    --bg-soft: #0f172a;
    --bg-card: #111c2f;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-card: #ffffff;
    --border-dark: #1e293b;
    --border-light: #e2e8f0;
    --text-on-dark: #f1f5f9;
    --text-on-dark-muted: #94a3b8;
    --text: #0f172a;
    --text-muted: #475569;
    --text-faint: #94a3b8;
    --accent: #38bdf8;
    --accent-strong: #0ea5e9;
    --accent-deep: #0369a1;
    --accent-glow: rgba(56, 189, 248, 0.18);
    --accent-2: #a78bfa;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --max-w: 1200px;
    --gutter: clamp(20px, 4vw, 40px);
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 22px;
    --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-strong: 0 20px 50px rgba(15, 23, 42, 0.20);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --nav-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--surface);
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-strong); text-decoration: none; transition: color 160ms var(--ease); }
a:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
    color: var(--text);
    text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.4vw, 4.2rem); line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.22rem; line-height: 1.3; }
h4 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--font-mono); font-size: 0.92em; }
code {
    background: rgba(56, 189, 248, 0.10);
    color: var(--accent-deep);
    padding: 0.12em 0.45em;
    border-radius: 5px;
    font-size: 0.88em;
    word-break: break-word;
}
.section-dark code { background: rgba(56, 189, 248, 0.12); color: var(--accent); }
pre {
    background: var(--bg);
    color: var(--text-on-dark);
    padding: 22px 24px;
    border-radius: var(--radius);
    overflow-x: auto;
    line-height: 1.55;
    font-size: 0.92em;
    border: 1px solid var(--border-dark);
}
pre code { background: transparent; color: inherit; padding: 0; }

/* Layout */
.container { max-width: var(--max-w); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding: clamp(64px, 9vw, 110px) 0; scroll-margin-top: var(--nav-h); }
.section-tight { padding: clamp(40px, 6vw, 70px) 0; }
.section-dark { background: var(--bg); color: var(--text-on-dark); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--text-on-dark); }
.section-dark p { color: var(--text-on-dark-muted); }
.section-soft { background: var(--surface-soft); }

.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-strong);
    margin-bottom: 18px;
    font-weight: 600;
}
.section-dark .eyebrow { color: var(--accent); }

.lead {
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    color: var(--text-muted);
    max-width: 60ch;
    line-height: 1.65;
}
.section-dark .lead { color: var(--text-on-dark-muted); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.97rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 160ms var(--ease), box-shadow 200ms var(--ease), background 200ms var(--ease), color 200ms var(--ease);
    line-height: 1;
    white-space: nowrap;
    min-height: 44px;
}
.btn-primary { background: var(--accent-strong); color: white; box-shadow: 0 6px 20px rgba(14, 165, 233, 0.25); }
.btn-primary:hover { background: var(--accent-deep); color: white; transform: translateY(-1px); box-shadow: 0 10px 25px rgba(14, 165, 233, 0.35); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-light); }
.btn-secondary:hover { background: var(--surface-soft); color: var(--text); transform: translateY(-1px); }
.section-dark .btn-secondary, .hero .btn-secondary { color: var(--text-on-dark); border-color: rgba(241, 245, 249, 0.22); }
.section-dark .btn-secondary:hover, .hero .btn-secondary:hover { background: rgba(241, 245, 249, 0.08); color: var(--text-on-dark); }
.btn-ghost { background: transparent; color: var(--accent-strong); padding: 10px 16px; border: none; }
.btn-ghost:hover { color: var(--accent-deep); background: var(--accent-glow); }
.btn-arrow::after { content: "→"; transition: transform 160ms var(--ease); }
.btn-arrow:hover::after { transform: translateX(3px); }

/* Top nav */
.topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border-light);
}
.topnav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 24px; min-height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--text); letter-spacing: -0.01em; flex-shrink: 0; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand-mark { width: 30px; height: 30px; }
.brand-dot { color: var(--accent-strong); }
.section-dark .brand-dot, .footer .brand-dot { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; padding: 0; margin: 0; }
.nav-links a { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--accent-strong); text-decoration: none; }
.nav-links a.active { color: var(--accent-strong); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--border-light); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 1.2rem; color: var(--text); line-height: 1; }

@media (max-width: 880px) {
    .nav-links, .nav-cta { display: none; }
    .nav-toggle { display: inline-flex; }
    .topnav.is-open .nav-links, .topnav.is-open .nav-cta { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; margin-top: 14px; padding-bottom: 8px; }
    .topnav.is-open .topnav-inner { flex-direction: column; align-items: stretch; }
    .topnav.is-open .nav-cta .btn { justify-content: center; }
    .topnav.is-open .nav-links a { padding: 8px 0; }
}

/* Hero */
.hero {
    position: relative;
    background: radial-gradient(ellipse at top, #1e293b 0%, var(--bg) 60%);
    color: var(--text-on-dark);
    padding: clamp(72px, 10vw, 130px) 0 clamp(80px, 12vw, 150px);
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(700px circle at 18% 0%, rgba(56, 189, 248, 0.14), transparent 60%),
        radial-gradient(560px circle at 82% 30%, rgba(167, 139, 250, 0.10), transparent 60%);
    pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr 0.95fr; gap: 64px; align-items: center; }
.hero-visual { position: relative; aspect-ratio: 1 / 1; max-width: 460px; margin-left: auto; }

@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .hero-visual { margin: 0 auto; max-width: 360px; }
}

.hero h1 { color: white; font-size: clamp(2.2rem, 5.6vw, 4.0rem); margin-bottom: 22px; letter-spacing: -0.025em; }
.hero .lead { color: var(--text-on-dark-muted); font-size: clamp(1.05rem, 1.4vw, 1.18rem); max-width: 56ch; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 0.9rem; color: var(--text-on-dark-muted); align-items: center; }
.hero-meta-item { display: inline-flex; align-items: center; gap: 8px; line-height: 1; }
.hero-meta-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); flex-shrink: 0; }

/* Cards — equal heights inside .grid */
.card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-soft);
    transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card > *:last-child { margin-bottom: 0; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-strong); border-color: rgba(56, 189, 248, 0.4); }
.card h3 { margin-top: 0; }
.section-dark .card { background: var(--bg-card); border-color: var(--border-dark); }
.section-dark .card h3 { color: var(--text-on-dark); }
.section-dark .card p { color: var(--text-on-dark-muted); }

/* Grids */
.grid { display: grid; gap: 24px; align-items: stretch; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }
@media (min-width: 881px) and (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 880px) { .problem-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Icon */
.icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-glow);
    color: var(--accent-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    flex-shrink: 0;
}
.section-dark .icon { color: var(--accent); }
.icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Pipeline */
.pipeline { display: grid; gap: 12px; margin-top: 20px; }
.stage {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 18px;
    padding: 18px 22px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    align-items: start;
    box-shadow: var(--shadow-soft);
}
.section-dark .stage { background: var(--bg-card); border-color: var(--border-dark); box-shadow: none; }
.stage-num {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--accent-glow);
    color: var(--accent-strong);
    font-weight: 700;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}
.section-dark .stage-num { background: rgba(56, 189, 248, 0.16); color: var(--accent); }
.stage-name { font-weight: 600; margin: 4px 0 0; color: var(--text); font-size: 1.02rem; }
.section-dark .stage-name { color: var(--text-on-dark); }
.stage-desc { margin: 6px 0 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.55; }
.section-dark .stage-desc { color: var(--text-on-dark-muted); }

/* Tables */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.95rem; }
.table th, .table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.table th { background: var(--surface-soft); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); white-space: nowrap; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface-soft); }
.section-dark .table-wrap { background: rgba(255, 255, 255, 0.02); border-color: var(--border-dark); box-shadow: none; }
.section-dark .table th { background: rgba(255, 255, 255, 0.04); color: var(--text-on-dark-muted); }
.section-dark .table td { color: var(--text-on-dark); border-bottom-color: var(--border-dark); }
.section-dark .table tr:hover td { background: rgba(255, 255, 255, 0.03); }

@media (max-width: 720px) {
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { padding: 12px 16px; border-bottom: 1px solid var(--border-light); }
    .section-dark .table tr { border-bottom-color: var(--border-dark); }
    .table tr:last-child { border-bottom: none; }
    .table td { padding: 6px 0; border: none; }
    .table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--text-muted);
        font-weight: 600;
        margin-bottom: 2px;
    }
    .section-dark .table td::before { color: var(--text-on-dark-muted); }
}

/* Pricing tier */
.tier {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
    height: 100%;
}
.tier-featured { border-color: var(--accent-strong); box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-soft); position: relative; }
.tier-featured::before {
    content: "Most popular";
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--accent-strong);
    color: white;
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 6px 12px;
    border-radius: 999px;
}
.tier h3 { margin: 0; font-size: 1.4rem; }
.tier-price { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); line-height: 1; }
.tier-price small { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.tier ul { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; font-size: 0.95rem; color: var(--text-muted); flex-grow: 1; }
.tier li { display: flex; gap: 10px; align-items: flex-start; }
.tier li::before {
    content: "";
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
    background-repeat: no-repeat;
    background-size: contain;
}

/* Footer */
.footer { background: var(--bg); color: var(--text-on-dark-muted); padding: 64px 0 32px; }
.footer a { color: var(--text-on-dark-muted); }
.footer a:hover { color: var(--text-on-dark); text-decoration: none; }
.footer .brand { color: var(--text-on-dark); }
.footer .brand:hover { color: var(--text-on-dark); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { color: var(--text-on-dark); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; font-weight: 600; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.95rem; }
.footer-blurb { margin-top: 14px; max-width: 36ch; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 30px; border-top: 1px solid var(--border-dark); font-size: 0.85rem; color: var(--text-faint); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border-light); padding: 22px 0; }
.faq-item summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; color: var(--text); font-size: 1.05rem; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent-strong); font-size: 1.5rem; line-height: 1; transition: transform 200ms var(--ease); flex-shrink: 0; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin-top: 14px; color: var(--text-muted); }

/* Misc */
.kicker { margin-bottom: 44px; max-width: 64ch; }
.kicker h2 { margin-bottom: 14px; }
.kicker .lead { margin-bottom: 0; }
.kicker-center { text-align: center; margin-left: auto; margin-right: auto; }
.kicker-center .lead { margin-left: auto; margin-right: auto; }

.feature-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-muted); line-height: 1.55; }
.section-dark .feature-list li { color: var(--text-on-dark-muted); }
.feature-list li::before {
    content: "";
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 3px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230ea5e9' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
    background-repeat: no-repeat;
    background-size: contain;
}
.section-dark .feature-list li::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
}

.tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.74rem; padding: 4px 10px; border-radius: 999px; background: var(--accent-glow); color: var(--accent-deep); font-weight: 600; letter-spacing: 0.04em; line-height: 1.4; white-space: nowrap; }
.tag-success { background: rgba(16, 185, 129, 0.12); color: #047857; }
.tag-warning { background: rgba(245, 158, 11, 0.14); color: #b45309; }

.cta-banner { background: linear-gradient(135deg, var(--bg) 0%, #1e293b 100%); border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 70px); text-align: center; color: var(--text-on-dark); position: relative; overflow: hidden; }
.cta-banner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.18), transparent 50%), radial-gradient(circle at 80% 80%, rgba(167, 139, 250, 0.10), transparent 50%); pointer-events: none; }
.cta-banner > * { position: relative; }
.cta-banner h2 { color: white; margin-bottom: 12px; font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
.cta-banner p { color: var(--text-on-dark-muted); margin-bottom: 28px; max-width: 60ch; margin-left: auto; margin-right: auto; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.section-dark .text-muted { color: var(--text-on-dark-muted); }
.no-margin { margin: 0; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 32px; }

.page-header { background: var(--bg); color: var(--text-on-dark); padding: clamp(64px, 8vw, 100px) 0 clamp(40px, 5vw, 60px); position: relative; overflow: hidden; }
.page-header::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px circle at 18% 0%, rgba(56, 189, 248, 0.14), transparent 60%); pointer-events: none; }
.page-header > .container { position: relative; }
.page-header h1 { color: white; margin-bottom: 14px; }
.page-header p { color: var(--text-on-dark-muted); font-size: 1.1rem; max-width: 60ch; margin-bottom: 0; }

.hero-platform { width: 100%; height: 100%; display: block; }

@media print {
    .topnav, .footer, .cta-banner { display: none; }
    body { color: black; background: white; }
}
