:root {
    --bg: #07111f;
    --bg-soft: #0b1728;
    --surface: #101d31;
    --surface-light: #15243a;
    --surface-muted: rgba(15, 23, 42, 0.72);

    --text: #f4f7fb;
    --text-soft: #dbe7f5;
    --muted: #9fb0c7;

    --accent: #38bdf8;
    --accent-strong: #22d3ee;
    --accent-alt: #8b5cf6;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;

    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(148, 163, 184, 0.32);

    --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 14px 40px rgba(0, 0, 0, 0.18);
    --shadow-glow: 0 20px 60px rgba(56, 189, 248, 0.18);

    --container: 1180px;

    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

/* -------------------------------------------------------
   Base
------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.14), transparent 32rem),
        linear-gradient(180deg, #07111f 0%, #081322 48%, #050b14 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

p {
    margin-top: 0;
}

.site-shell {
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: min(var(--container), calc(100% - 2rem));
    margin: 0 auto;
}

/* -------------------------------------------------------
   Header / Navigation
------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 17, 31, 0.84);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}

.header-inner,
.site-header > .container {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* Backwards compatibility if layout still uses h1 */
.site-header h1 {
    margin: 0;
    font-size: 1rem;
}

.site-header h1 a {
    text-decoration: none;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-image {
    height: 44px;
    width: auto;
    display: block;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.8rem;
    background:
        linear-gradient(135deg, rgba(56, 189, 248, 0.95), rgba(139, 92, 246, 0.95));
    color: #ffffff;
    font-size: 0.78rem;
    box-shadow: 0 14px 35px rgba(56, 189, 248, 0.22);
}

.brand-text {
    font-size: 1.05rem;
}

.main-nav,
.site-header nav {
    display: flex;
    align-items: center;
    gap: 1.35rem;
}

.main-nav a,
.site-header nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.main-nav a:hover,
.site-header nav a:hover {
    color: var(--text);
}

.header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6rem;
    padding: 0 1rem;
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 999px;
    color: #e0f7ff;
    background: rgba(56, 189, 248, 0.08);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
}

.header-cta:hover {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.15);
}

/* -------------------------------------------------------
   Main
------------------------------------------------------- */

main {
    min-height: 60vh;
}

/* -------------------------------------------------------
   Hero
------------------------------------------------------- */

.hero-section {
    position: relative;
    padding: 6.5rem 0 4rem;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4rem;
    align-items: center;
}

.eyebrow {
    margin: 0 0 1rem;
    color: var(--accent);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 800;
}

.hero-content h1 {
    margin: 0 0 1.5rem;
    max-width: 780px;
    font-size: clamp(2.4rem, 4.8vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.055em;
    font-weight: 800;
}

.hero-lead {
    max-width: 690px;
    margin: 0;
    color: #b8c7da;
    font-size: 1.18rem;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.1rem;
}

.btn,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.9rem 1.3rem;
    border: 0;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.btn:hover,
.button:hover {
    transform: translateY(-1px);
}

.btn-primary,
.button {
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    color: #e2e8f0;
    border: 1px solid var(--border-strong);
    background: rgba(15, 23, 42, 0.64);
}

.hero-proof {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}

.hero-proof div {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.hero-proof strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text);
    font-size: 0.95rem;
}

.hero-proof span {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Old hero compatibility */

.hero {
    position: relative;
    max-width: 980px;
    margin: 0 auto;
    padding: 5rem 0;
}

.hero h2 {
    margin: 0 0 1.5rem;
    font-size: clamp(2.3rem, 4.6vw, 4.3rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
    font-weight: 800;
}

.lead {
    color: #b8c7da;
    font-size: 1.18rem;
    line-height: 1.75;
}

/* -------------------------------------------------------
   Agent system visual
------------------------------------------------------- */

.hero-visual {
    position: relative;
}

.system-panel {
    position: relative;
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.66));
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow:
        var(--shadow-soft),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
}

.system-panel::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background:
        linear-gradient(
            135deg,
            rgba(56, 189, 248, 0.35),
            rgba(139, 92, 246, 0.2),
            transparent 62%
        );
}

.system-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #cbd5e1;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 800;
}

.status-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.9);
}

.flow-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.flow-strip span {
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 999px;
    padding: 0.45rem 0.5rem;
    text-align: center;
    color: #b8c7da;
    background: rgba(2, 6, 23, 0.42);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.agent-grid {
    display: grid;
    gap: 1rem;
}

.agent-card {
    position: relative;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-md);
    padding: 1rem;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.62));
}

.agent-card-highlight {
    border-color: rgba(56, 189, 248, 0.34);
    background:
        linear-gradient(180deg, rgba(14, 116, 144, 0.22), rgba(15, 23, 42, 0.72));
}

.agent-number {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: var(--accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 800;
}

.agent-card strong {
    display: block;
    margin-bottom: 0.35rem;
    color: #ffffff;
    font-size: 1rem;
}

.agent-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.system-footer {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: #a7f3d0;
    font-size: 0.82rem;
    font-weight: 700;
}

.pulse-line {
    display: inline-block;
    width: 3.5rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--success), transparent);
}

/* -------------------------------------------------------
   Generic sections
------------------------------------------------------- */

.section {
    padding: 5rem 0;
}

.section-compact {
    padding: 2rem 0;
}

.section-alt {
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.12));
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-heading {
    max-width: 780px;
    margin-bottom: 2.5rem;
}

.section-heading h2,
.workflow-grid h2,
.cta-panel h2 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
    letter-spacing: -0.055em;
}

.section-heading p,
.section-intro,
.cta-panel p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

/* -------------------------------------------------------
   Proof bar
------------------------------------------------------- */

.proof-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.58);
}

.proof-bar span {
    padding: 1rem;
    color: #cbd5e1;
    border-right: 1px solid var(--border);
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
}

.proof-bar span:last-child {
    border-right: none;
}

/* -------------------------------------------------------
   Cards / Feature cards
------------------------------------------------------- */

.card,
.feature-card,
.use-case-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(16, 29, 49, 0.82), rgba(16, 29, 49, 0.52));
    padding: 1.35rem;
    box-shadow: var(--shadow-card);
}

.card {
    max-width: 860px;
    margin: 1.5rem auto;
}

.card h3,
.feature-card h3,
.use-case-card h3 {
    margin: 0 0 0.65rem;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.card p,
.feature-card p,
.use-case-card p {
    color: var(--muted);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.feature-label {
    display: block;
    margin-bottom: 1.3rem;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.feature-card p,
.use-case-card p {
    margin: 0;
    font-size: 0.94rem;
}

/* -------------------------------------------------------
   Workflow
------------------------------------------------------- */

.workflow-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 4rem;
    align-items: start;
}

.workflow-grid h2 {
    max-width: 600px;
}

.inline-link {
    display: inline-flex;
    margin-top: 1rem;
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

.inline-link:hover {
    text-decoration: underline;
}

.workflow-steps {
    display: grid;
    gap: 1rem;
}

.workflow-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.56);
}

.workflow-step > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 0.8rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 900;
}

.workflow-step h3 {
    margin: 0 0 0.25rem;
}

.workflow-step p {
    margin: 0;
    color: var(--muted);
}

/* -------------------------------------------------------
   Use cases
------------------------------------------------------- */

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* -------------------------------------------------------
   CTA
------------------------------------------------------- */

.cta-section {
    padding-bottom: 6rem;
}

.cta-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 26rem),
        linear-gradient(135deg, rgba(16, 29, 49, 0.94), rgba(15, 23, 42, 0.84));
    box-shadow: var(--shadow-glow);
}

.cta-panel > div {
    max-width: 760px;
}

/* -------------------------------------------------------
   Forms
------------------------------------------------------- */

form {
    width: 100%;
}

label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-soft);
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    margin: 0.4rem 0 1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.72);
    color: var(--text);
    font: inherit;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(56, 189, 248, 0.72);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

textarea {
    min-height: 9rem;
    resize: vertical;
}

button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.85rem 1.25rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
}

/* -------------------------------------------------------
   Dashboard compatibility
------------------------------------------------------- */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.dashboard-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    background:
        linear-gradient(180deg, rgba(16, 29, 49, 0.82), rgba(16, 29, 49, 0.52));
}

.dashboard-card h3 {
    margin-top: 0;
}

.dashboard-card p {
    color: var(--muted);
}

/* -------------------------------------------------------
   Footer
------------------------------------------------------- */

.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.42);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr repeat(3, 1fr);
    gap: 2rem;
    padding: 3.5rem 0;
}

.footer-brand {
    margin-bottom: 1rem;
}

.footer-copy {
    max-width: 420px;
    color: var(--muted);
}

.site-footer h4 {
    margin: 0 0 1rem;
    color: var(--text);
}

.site-footer a {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--muted);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--text);
}

.site-footer p {
    color: var(--muted);
}

.footer-link-strong {
    color: var(--accent) !important;
    font-weight: 800;
}

.footer-bottom {
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.88rem;
}

/* -------------------------------------------------------
   Utility
------------------------------------------------------- */

.compact-feature-grid {
    grid-template-columns: repeat(2, 1fr);
}

.text-muted {
    color: var(--muted);
}

.text-accent {
    color: var(--accent);
}

/* -------------------------------------------------------
   Responsive
------------------------------------------------------- */

@media (max-width: 1100px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 980px) {
    .header-inner,
    .site-header > .container {
        flex-wrap: wrap;
        padding: 1rem 0;
    }

    .main-nav,
    .site-header nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero-grid,
    .workflow-grid {
        grid-template-columns: 1fr;
    }

    .hero-section {
        padding-top: 4rem;
    }

    .hero-proof,
    .proof-bar,
    .use-case-grid,
    .footer-grid,
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-panel {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 1.25rem, var(--container));
    }

    .header-cta {
        display: none;
    }

    .main-nav,
    .site-header nav {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.2rem;
    }

    .hero-section {
        padding: 3.5rem 0 2.5rem;
    }

    .hero-content h1,
    .hero h2 {
        font-size: clamp(2.25rem, 12vw, 3.2rem);
        line-height: 1.05;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn,
    .button {
        width: 100%;
    }

    .hero-proof,
    .feature-grid,
    .compact-feature-grid,
    .proof-bar,
    .use-case-grid,
    .footer-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .proof-bar span {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .proof-bar span:last-child {
        border-bottom: none;
    }

    .flow-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .section {
        padding: 3.5rem 0;
    }

    .section-compact {
        padding: 1.5rem 0;
    }

    .cta-panel {
        padding: 1.4rem;
    }

    .footer-grid {
        padding: 2.5rem 0;
    }
}
