﻿/* ─── TOKENS ───────────────────────────────── */
[data-theme="light"] {
    --bg: #f8fafc;
    --bg2: #ffffff;
    --surface: #ffffff;
    --surface2: #f1f5f9;
    --border: #e2e8f0;
    --border2: #cbd5e1;
    --t1: #1e293b;
    --t2: #475569;
    --t3: #94a3b8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 16px rgba(0,0,0,.07), 0 2px 6px rgba(0,0,0,.05);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.09), 0 4px 12px rgba(0,0,0,.06);
    --shadow-xl: 0 24px 64px rgba(0,0,0,.11), 0 8px 20px rgba(0,0,0,.07);
    --nav-bg: rgba(248,250,252,.88);
}

[data-theme="dark"] {
    --bg: #09090b;
    --bg2: #0f172a;
    --surface: #18181b;
    --surface2: #1e293b;
    --border: #27272a;
    --border2: #3f3f46;
    --t1: #f8fafc;
    --t2: #94a3b8;
    --t3: #52525b;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
    --shadow-md: 0 4px 16px rgba(0,0,0,.4);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
    --shadow-xl: 0 24px 64px rgba(0,0,0,.6);
    --nav-bg: rgba(9,9,11,.88);
}

/* Shared tokens */
:root {
    --indigo: #4f46e5;
    --indigo-l: #6366f1;
    --indigo-bg: rgba(79,70,229,.08);
    --amber: #e67e22;
    --amber-l: #f39c12;
    --green: #10b981;
    --rose: #f43f5e;
    --purple: #7c3aed;
    --code-bg: #0f172a;
}

/* ─── BASE ─────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Geist', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--t2);
    -webkit-font-smoothing: antialiased;
    transition: background .3s, color .3s;
}

/* ─── NAV ──────────────────────────────────── */
#ag-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    min-height: 62px;
    background: var(--surface);
    transition: box-shadow .3s, border-color .3s;
    border-bottom: 1px solid var(--border);
}

    #ag-nav.ag-sc {
        box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,.08);
    }

.ag-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -.02em;
    color: var(--t1);
    text-decoration: none;
}

    .ag-logo:hover {
        color: var(--t1);
        text-decoration: none;
    }

.ag-logo-box {
    width: 32px;
    height: 32px;
    background: var(--indigo);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ag-lbars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
}

    .ag-lbars span {
        display: block;
        width: 3.5px;
        border-radius: 2px;
        background: white;
    }

        .ag-lbars span:nth-child(1) {
            height: 7px;
        }

        .ag-lbars span:nth-child(2) {
            height: 12px;
        }

        .ag-lbars span:nth-child(3) {
            height: 16px;
        }

        .ag-lbars span:nth-child(4) {
            height: 10px;
        }

/* ─── Bootstrap Navbar Overrides ───────────── */
#ag-nav.navbar {
    padding: 0 5vw;
    height: 62px;
    flex-wrap: nowrap;
}

#ag-nav .navbar-brand {
    padding: 0;
    margin-right: 0;
}

/* Toggler — right side ag-on mobile */
#ag-nav .navbar-toggler {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--t2);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: .95rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    margin-left: 0;
    flex-shrink: 0;
}

    #ag-nav .navbar-toggler:hover {
        border-color: var(--border2);
        color: var(--t1);
        background: var(--surface2);
    }

    #ag-nav .navbar-toggler:focus {
        outline: none;
        box-shadow: none;
    }

    #ag-nav .navbar-toggler.is-open {
        border-color: rgba(244,63,94,.3);
        color: var(--rose, #f43f5e);
        background: rgba(244,63,94,.06);
    }

/* Theme btn always visible beside toggler ag-on mobile */
#ag-nav .ag-btn-theme {
    flex-shrink: 0;
}

/* Collapse fills remaining space ag-on desktop */
#ag-nav .navbar-collapse {
    flex-grow: 1;
    justify-content: space-between;
    align-items: center;
}

/* Desktop: links centered */
#ag-nav .navbar-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

    #ag-nav .navbar-nav .nav-link {
        font-size: .875rem;
        font-weight: 500;
        color: var(--t2) !important;
        padding: 6px 13px;
        border-radius: 6px;
        transition: color .15s, background .15s;
        white-space: nowrap;
    }

        #ag-nav .navbar-nav .nav-link:hover {
            color: var(--t1) !important;
            background: var(--surface2);
        }

        /* Hide icons ag-on desktop nav links, show only ag-on mobile */
        #ag-nav .navbar-nav .nav-link i {
            display: none;
        }

@media(max-width:991px) {
    #ag-nav .navbar-nav .nav-link i {
        display: inline-block;
    }
}

/* Desktop: buttons right */
#ag-nav .ag-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* ─── Mobile collapse ───────────────────────── */
@media(max-width:991px) {
    #ag-nav.navbar {
        height: auto;
        min-height: 62px;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    /* Top bar row: ag-logo + theme + toggler */
    #ag-nav .navbar-brand {
        line-height: 62px;
    }

    #ag-nav .ag-nav-mobile-right {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
        height: 62px;
    }

    /* Collapse: full width dropdown below top bar */
    #ag-nav .navbar-collapse {
        width: 100%;
        background: var(--surface);
        border-top: 1px solid var(--border);
        padding: 8px 0 16px;
        position: absolute;
        top: 62px;
        left: 0;
        right: 0;
        box-shadow: 0 12px 32px rgba(0,0,0,.1);
    }

    /* Nav links: vertical list with icons */
    #ag-nav .navbar-nav {
        position: static;
        transform: none;
        flex-direction: column;
        width: 100%;
        padding: 0 5vw;
        margin-bottom: 0 !important;
    }

        #ag-nav .navbar-nav .nav-item {
            border-bottom: 1px solid var(--border);
        }

            #ag-nav .navbar-nav .nav-item:last-child {
                border-bottom: none;
            }

        #ag-nav .navbar-nav .nav-link {
            padding: 13px 0;
            border-radius: 0;
            font-size: .95rem;
            display: flex;
            align-items: center;
            gap: 10px;
        }

            #ag-nav .navbar-nav .nav-link i {
                width: 18px;
                color: var(--t3);
                font-size: .85rem;
                text-align: center;
                flex-shrink: 0;
            }

    /* Action buttons: 2 equal columns, equal height */
    #ag-nav .ag-nav-right {
        width: 100%;
        padding: 14px 5vw 0;
        border-top: 1px solid var(--border);
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 0;
    }

    #ag-nav .ag-btn-login {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        height: 44px;
        border: 1.5px solid var(--border2);
        border-radius: 8px;
        font-size: .875rem;
        font-weight: 600;
        color: var(--t2);
        text-decoration: none;
        transition: all .15s;
        box-sizing: border-box;
    }

        #ag-nav .ag-btn-login:hover {
            color: var(--indigo);
            border-color: var(--indigo);
        }

    #ag-nav .ag-btn-dl {
        justify-content: center;
        height: 44px;
        padding: 0;
        box-sizing: border-box;
    }
}

/* ─── Page overlay when menu open ──────────── */
.ag-nav-overlay {
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 997;
    background: rgba(15,23,42,.28);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    pointer-events: none;
}

    .ag-nav-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

.ag-btn-login {
    font-size: .875rem;
    font-weight: 500;
    color: var(--t2);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    transition: color .15s;
}

    .ag-btn-login:hover {
        color: var(--t1);
        text-decoration: none;
    }

/* Theme toggle */
.ag-btn-theme {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--t2);
    cursor: pointer;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

    .ag-btn-theme:hover {
        border-color: var(--border2);
        color: var(--t1);
        background: var(--surface2);
    }

.ag-btn-dl {
    font-size: .875rem;
    font-weight: 700;
    color: #fff;
    background: var(--amber);
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background .15s, transform .12s, box-shadow .15s;
    box-shadow: 0 2px 8px rgba(230,126,34,.35);
}

    .ag-btn-dl:hover {
        background: var(--amber-l);
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(230,126,34,.45);
        color: #fff;
        text-decoration: none;
    }

/* ─── HERO ─────────────────────────────────── */
#ag-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 5vw 80px;
    position: relative;
    overflow: hidden;
    text-align: center;
    background: var(--bg);
}

.ag-hero-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(79,70,229,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(79,70,229,.05) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 55% at 50% 40%, black 20%, transparent 80%);
}

[data-theme="dark"] .ag-hero-grid {
    background-image: linear-gradient(rgba(99,102,241,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,.06) 1px, transparent 1px);
}

.ag-hero-glow {
    position: absolute;
    pointer-events: none;
    width: 640px;
    height: 380px;
    background: radial-gradient(ellipse, rgba(79,70,229,.1) 0%, transparent 70%);
    top: 32%;
    left: 50%;
    transform: translate(-50%, -50%);
}

[data-theme="dark"] .ag-hero-glow {
    background: radial-gradient(ellipse, rgba(79,70,229,.22) 0%, transparent 70%);
}

.ag-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16,185,129,.08);
    border: 1px solid rgba(16,185,129,.25);
    padding: 5px 16px;
    border-radius: 100px;
    font-family: 'Geist Mono', monospace;
    font-size: .68rem;
    color: #059669;
    margin-bottom: 28px;
    position: relative;
}

[data-theme="dark"] .ag-hero-badge {
    color: #34d399;
}

.ag-bp {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: bpulse 2.2s ease-in-out infinite;
}

@keyframes bpulse {
    0%,100% {
        box-shadow: 0 0 0 0 rgba(16,185,129,.5);
    }

    60% {
        box-shadow: 0 0 0 5px rgba(16,185,129,0);
    }
}

.ag-hero-h1 {
    font-weight: 800;
    font-size: clamp(2.6rem, 5.5vw, 4.2rem);
    line-height: 1.06;
    letter-spacing: -.035em;
    color: var(--t1);
    max-width: 760px;
}

    .ag-hero-h1 .ag-accent {
        color: var(--indigo);
    }

.ag-hero-sub {
    font-size: 1.08rem;
    line-height: 1.78;
    color: var(--t2);
    max-width: 520px;
    position: relative;
}

.ag-btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--amber);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    padding: 12px 28px;
    border-radius: 9px;
    text-decoration: none;
    transition: background .15s, transform .12s, box-shadow .15s;
    box-shadow: 0 3px 12px rgba(230,126,34,.4);
}

    .ag-btn-cta-primary:hover {
        background: var(--amber-l);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(230,126,34,.5);
        color: #fff;
        text-decoration: none;
    }

.ag-btn-cta-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--indigo);
    font-weight: 600;
    font-size: .95rem;
    padding: 11px 28px;
    border-radius: 9px;
    text-decoration: none;
    border: 1.5px solid var(--indigo);
    transition: background .15s, color .15s;
}

    .ag-btn-cta-outline:hover {
        background: var(--indigo);
        color: #fff;
        text-decoration: none;
    }

/* Preview ag-chrome */
.ag-preview {
    width: 100%;
    max-width: 980px;
    margin-top: 60px;
    position: relative;
}

.ag-chrome {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.ag-cbar {
    display: flex;
    align-items: center;
    padding: 11px 16px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
}

.ag-dots {
    display: flex;
    gap: 7px;
}

    .ag-dots span {
        width: 11px;
        height: 11px;
        border-radius: 50%;
    }

.ag-dr {
    background: #ff5f57;
}

.ag-dy {
    background: #ffbd2e;
}

.ag-dg {
    background: #28c840;
}

.ag-curl {
    flex: 1;
    text-align: center;
    font-family: 'Geist Mono', monospace;
    font-size: .68rem;
    color: var(--t3);
}

/* Gantt */
.ag-ghead {
    display: grid;
    grid-template-columns: 210px 1fr;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    font-family: 'Geist Mono', monospace;
    font-size: .6rem;
    color: var(--t3);
}

.ag-ghead-l {
    padding: 8px 16px;
    border-right: 1px solid var(--border);
}

.ag-gmons {
    display: flex;
}

    .ag-gmons span {
        flex: 1;
        text-align: center;
        padding: 8px 4px;
        border-right: 1px solid var(--border);
    }

.ag-grow {
    display: grid;
    grid-template-columns: 210px 1fr;
    border-bottom: 1px solid var(--border);
    height: 38px;
    transition: background .1s;
}

    .ag-grow:hover {
        background: var(--surface2);
    }

    .ag-grow:last-child {
        border-bottom: none;
    }

.ag-gname {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    font-size: .75rem;
    color: var(--t2);
    border-right: 1px solid var(--border);
    white-space: nowrap;
    overflow: hidden;
}

    .ag-gname.ag-grp {
        color: var(--t1);
        font-weight: 600;
    }

.ag-ind {
    display: inline-block;
    width: 14px;
    flex-shrink: 0;
}

.ag-gbars {
    position: relative;
}

.ag-gb {
    position: absolute;
    top: 8px;
    height: 22px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    padding: 0 9px;
    overflow: hidden;
    font-family: 'Geist Mono', monospace;
    font-size: .58rem;
    color: rgba(255,255,255,.85);
    white-space: nowrap;
}

    .ag-gb.ag-crit {
        box-shadow: 0 0 0 1.5px var(--rose), 0 0 10px rgba(244,63,94,.25);
    }

/* ─── LOGOS STRIP ──────────────────────────── */
#ag-logos {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 28px 5vw;
    background: var(--surface);
}

.ag-logos-label {
    font-family: 'Geist Mono', monospace;
    font-size: .65rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--t3);
    text-align: center;
    margin-bottom: 20px;
}

.ag-fw-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.ag-fw {
    display: flex;
    align-items: center;
    gap: 9px;
    opacity: .45;
    transition: opacity .2s;
    cursor: default;
    font-weight: 600;
    font-size: .9rem;
    color: var(--t1);
}

    .ag-fw:hover {
        opacity: .8;
    }

.ag-fwb {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 800;
}

/* ─── SECTION COMMONS ──────────────────────── */
.ag-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Geist Mono', monospace;
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--indigo);
    background: var(--indigo-bg);
    border: 1px solid rgba(79,70,229,.2);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 18px;
}

.ag-stitle {
    font-weight: 700;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: -.025em;
    color: var(--t1);
    margin-bottom: 14px;
}

.ag-sbody {
    font-size: 1rem;
    line-height: 1.78;
    color: var(--t2);
    max-width: 420px;
}

/* ─── FEATURES ─────────────────────────────── */
#features {
    padding: 110px 5vw;
    background: var(--bg);
}

.ag-frow {
    display: flex;
    align-items: center;
    gap: 64px;
    margin-bottom: 96px;
}

    .ag-frow:last-child {
        margin-bottom: 0;
    }

    .ag-frow.ag-flip {
        flex-direction: row-reverse;
    }

.ag-fcopy {
    flex: 0 0 360px;
}

.ag-fcard {
    flex: 1;
    min-height: 280px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.ag-fi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--indigo-bg);
    border: 1px solid rgba(79,70,229,.2);
    margin-bottom: 18px;
    font-size: 1rem;
    color: var(--indigo);
}

.ag-fb {
    padding: 26px;
}

/* vdom */
.ag-vvp {
    border: 1px dashed rgba(79,70,229,.35);
    border-radius: 9px;
    padding: 10px;
    margin-bottom: 8px;
    position: relative;
}

.ag-vvpl {
    position: absolute;
    top: -9px;
    left: 10px;
    background: var(--surface);
    padding: 0 6px;
    font-family: 'Geist Mono', monospace;
    font-size: .58rem;
    color: var(--indigo);
}

.ag-vr {
    height: 26px;
    border-radius: 4px;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-family: 'Geist Mono', monospace;
    font-size: .62rem;
    position: relative;
    overflow: hidden;
}

    .ag-vr.ag-on {
        background: rgba(79,70,229,.07);
        color: var(--t2);
        border: 1px solid rgba(79,70,229,.12);
    }

    .ag-vr.ag-off {
        background: var(--surface2);
        color: var(--t3);
    }

.ag-vrf {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(79,70,229,.15), transparent);
    border-radius: 4px;
}

.ag-vstat {
    font-family: 'Geist Mono', monospace;
    font-size: .62rem;
    color: var(--t3);
    text-align: center;
    margin-top: 10px;
}

    .ag-vstat strong {
        color: #059669;
    }

[data-theme="dark"] .ag-vstat strong {
    color: #34d399;
}

/* constraints */
.ag-cgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ag-cc {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
}

.ag-cci {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.ag-ccl {
    font-family: 'Geist Mono', monospace;
    font-size: .62rem;
    color: var(--indigo);
    margin-bottom: 4px;
}

.ag-ccd {
    font-size: .7rem;
    color: var(--t3);
    line-height: 1.45;
}

.ag-ccb {
    height: 4px;
    border-radius: 2px;
    margin-top: 10px;
    background: var(--border);
    overflow: hidden;
}

.ag-ccbf {
    height: 100%;
    border-radius: 2px;
}

/* heatmap */
.ag-rtable {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ag-rrow {
    display: grid;
    grid-template-columns: 86px 1fr auto;
    gap: 10px;
    align-items: center;
}

.ag-rname {
    font-size: .72rem;
    color: var(--t2);
    white-space: nowrap;
    font-weight: 500;
}

.ag-rcells {
    display: flex;
    gap: 2px;
}

.ag-rc {
    flex: 1;
    height: 18px;
    border-radius: 2px;
    min-width: 14px;
}

.ag-r0 {
    background: rgba(16,185,129,.12);
}

.ag-r1 {
    background: rgba(16,185,129,.3);
}

.ag-r2 {
    background: rgba(245,158,11,.4);
}

.ag-r3 {
    background: rgba(244,63,94,.5);
}

.ag-r4 {
    background: rgba(244,63,94,.85);
}

.ag-rbadge {
    font-family: 'Geist Mono', monospace;
    font-size: .6rem;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    font-weight: 600;
}

.ag-rok {
    background: rgba(5,150,105,.08);
    color: #059669;
    border: 1px solid rgba(5,150,105,.2);
}

.ag-rover {
    background: rgba(244,63,94,.08);
    color: var(--rose);
    border: 1px solid rgba(244,63,94,.2);
}

[data-theme="dark"] .ag-rok {
    color: #34d399;
}

/* shortcuts */
.ag-skrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: .8rem;
    color: var(--t2);
}

    .ag-skrow:last-child {
        border-bottom: none;
    }

kbd {
    background: var(--surface2);
    border: 1px solid var(--border2);
    color: var(--t1);
    padding: 2px 9px;
    border-radius: 5px;
    font-family: 'Geist Mono', monospace;
    font-size: .62rem;
    box-shadow: var(--shadow-sm);
}

.ag-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 16px;
}

.ag-tag {
    font-size: .72rem;
    font-weight: 500;
    padding: 4px 11px;
    border-radius: 6px;
    background: var(--surface2);
    color: var(--t2);
    border: 1px solid var(--border);
}

/* ─── CODE / DX  ───────────────────────────── */
#ag-dx {
    padding: 110px 5vw;
    background: var(--code-bg); /* stays dark always */
    position: relative;
    overflow: hidden;
}

    #ag-dx::before {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        background-image: linear-gradient(rgba(99,102,241,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,.05) 1px, transparent 1px);
        background-size: 60px 60px;
        mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
    }

    #ag-dx .ag-eyebrow {
        background: rgba(79,70,229,.15);
        border-color: rgba(99,102,241,.3);
    }

    #ag-dx .ag-stitle {
        color: #f8fafc;
    }

    #ag-dx .ag-sbody {
        color: #94a3b8;
        max-width: 460px;
    }

.ag-csplit {
    display: flex;
    gap: 28px;
    margin-top: 52px;
    align-items: flex-start;
}

.ag-ceditor {
    flex: 1;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.ag-etabs {
    display: flex;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 0 16px;
}

.ag-etab {
    padding: 10px 16px;
    font-family: 'Geist Mono', monospace;
    font-size: .7rem;
    color: #8b949e;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

    .ag-etab.ag-on {
        color: #f0f6fc;
        border-color: var(--indigo-l);
    }

.ag-cinner {
    padding: 22px 24px;
    overflow-x: auto;
}

.ag-cinner pre {
    font-family: 'Geist Mono', monospace;
    font-size: .72rem;
    line-height: 1.85;
    color: #c9d1d9;
    white-space: pre;
    margin: 0;
}

.ag-kw {
    color: #ff7b72;
}

.ag-fn {
    color: #79c0ff;
}

.ag-str {
    color: #a5d6ff;
}

.ag-cm {
    color: #484f58;
    font-style: italic;
}

.ag-obj {
    color: #ffa657;
}

.ag-prop {
    color: #d2a8ff;
}

.ag-bool {
    color: #79c0ff;
}

.ag-coutput {
    flex: 1;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.ag-otopbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-bottom: 1px solid #30363d;
    background: #0d1117;
    font-family: 'Geist Mono', monospace;
    font-size: .68rem;
    color: #8b949e;
}

.ag-odot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    animation: bpulse 2s infinite;
}

.oinner {
    padding: 18px;
}

.ag-mgantt {
    background: #0d1117;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #30363d;
}

.ag-mghead {
    padding: 8px 12px;
    font-family: 'Geist Mono', monospace;
    font-size: .6rem;
    color: #8b949e;
    background: #161b22;
    border-bottom: 1px solid #30363d;
}

.ag-mgrow {
    display: grid;
    grid-template-columns: 100px 1fr;
    border-bottom: 1px solid #21262d;
}

    .ag-mgrow:last-child {
        border-bottom: none;
    }

.ag-mglabel {
    font-family: 'Geist Mono', monospace;
    font-size: .6rem;
    color: #8b949e;
    padding: 7px 10px;
    border-right: 1px solid #30363d;
    white-space: nowrap;
    overflow: hidden;
}

.ag-mgbars {
    position: relative;
    height: 34px;
}

.ag-mgb {
    position: absolute;
    top: 7px;
    height: 20px;
    border-radius: 4px;
}

.ag-opills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.ag-op {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'Geist Mono', monospace;
    font-size: .62rem;
    padding: 4px 10px;
    border-radius: 5px;
}

/* ─── DEMO ─────────────────────────────────── */
#ag-demo {
    padding: 110px 5vw;
    background: var(--bg);
}

.ag-dtoolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    justify-content: center;
}

.ag-dbtn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--t2);
    cursor: pointer;
    font-family: 'Geist', sans-serif;
    font-size: .8rem;
    font-weight: 500;
    transition: all .15s;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

    .ag-dbtn:hover {
        border-color: var(--border2);
        color: var(--t1);
        background: var(--surface2);
    }

    .ag-dbtn.ag-on {
        background: var(--indigo);
        border-color: var(--indigo);
        color: white;
        box-shadow: 0 4px 14px rgba(79,70,229,.35);
    }

.ag-dchrome {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.ag-dbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
}

.ag-dbar-l {
    font-family: 'Geist Mono', monospace;
    font-size: .68rem;
    color: var(--t3);
}

.ag-dbar-r {
    display: flex;
    gap: 8px;
}

.ag-dchip {
    font-family: 'Geist Mono', monospace;
    font-size: .6rem;
    padding: 3px 10px;
    border-radius: 5px;
    font-weight: 500;
}

.ag-dwm {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ag-dwm span {
        font-family: 'Geist', sans-serif;
        font-weight: 800;
        font-size: 2rem;
        color: rgba(79,70,229,.05);
        letter-spacing: 10px;
        transform: rotate(-20deg);
        white-space: nowrap;
    }

/* ─── PRICING ──────────────────────────────── */
#pricing {
    padding: 110px 5vw;
    background: var(--bg);
}

.ag-pgrid {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 52px;
    align-items: stretch;
}

.ag-pc {
    flex: 0 0 288px;
    max-width: 288px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    transition: transform .2s, box-shadow .2s;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

    .ag-pc:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-xl);
    }

    /* FEATURED card — stronger shadow, indigo ring */
    .ag-pc.ag-feat {
        flex: 0 0 308px;
        max-width: 308px;
        border-color: var(--indigo);
        box-shadow: 0 0 0 3px rgba(79,70,229,.12), var(--shadow-xl);
        transform: translateY(-6px);
        background: var(--surface);
        z-index: 2;
        display: flex;
        flex-direction: column;
    }

        .ag-pc.ag-feat:hover {
            transform: translateY(-10px);
            box-shadow: 0 0 0 3px rgba(79,70,229,.18), 0 32px 80px rgba(0,0,0,.14);
        }

.ag-pcbadge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--indigo);
    color: white;
    font-family: 'Geist Mono', monospace;
    font-size: .62rem;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 100px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(79,70,229,.4);
}

.ag-pcplan {
    font-size: .75rem;
    font-weight: 700;
    color: var(--t3);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.ag-pctag {
    font-size: .82rem;
    color: var(--t2);
    margin-bottom: 24px;
}

.ag-pcprice {
    font-weight: 800;
    font-size: 2.8rem;
    color: var(--t1);
    letter-spacing: -.04em;
    line-height: 1;
    margin-bottom: 4px;
}

.ag-pc.ag-feat .ag-pcprice {
    color: var(--indigo);
}

.ag-pcnote {
    font-size: .72rem;
    color: var(--t3);
    margin-bottom: 28px;
}

.ag-pcdivider {
    height: 1px;
    background: var(--border);
    margin-bottom: 20px;
}

.ag-pcf {
    list-style: none;
    padding: 0;
    margin-bottom: 28px;
    flex: 1;
}

    .ag-pcf li {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        font-size: .83rem;
        color: var(--t2);
        margin-bottom: 10px;
        line-height: 1.5;
    }

        .ag-pcf li .fa {
            color: var(--green);
            margin-top: 3px;
            flex-shrink: 0;
            font-size: .78rem;
        }

.ag-btn-ghost {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border-radius: 9px;
    font-weight: 600;
    font-size: .875rem;
    text-decoration: none;
    border: 1.5px solid var(--border2);
    color: var(--t2);
    background: transparent;
    transition: all .15s;
}

    .ag-btn-ghost:hover {
        border-color: var(--indigo);
        color: var(--indigo);
        text-decoration: none;
    }

.ag-btn-amber-solid {
    display: block;
    text-align: center;
    padding: 13px 20px;
    border-radius: 9px;
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none;
    background: var(--amber);
    color: #fff;
    box-shadow: 0 4px 16px rgba(230,126,34,.4);
    transition: background .15s, transform .12s, box-shadow .15s;
}

    .ag-btn-amber-solid:hover {
        background: var(--amber-l);
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(230,126,34,.55);
        color: #fff;
        text-decoration: none;
    }

/* ─── FOOTER ───────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 64px 5vw 36px;
    background: var(--surface);
}

.ag-fgrid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.6fr;
    gap: 48px;
    margin-bottom: 48px;
}

.ag-fbrand {
}

.ag-ftag {
    font-size: .84rem;
    line-height: 1.7;
    color: var(--t3);
    margin: 14px 0;
}

.ag-fcol {
}

.ag-fct {
    font-weight: 700;
    font-size: .75rem;
    color: var(--t1);
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.ag-flinks {
    list-style: none;
    padding: 0;
}

    .ag-flinks li {
        margin-bottom: 10px;
    }

    .ag-flinks a {
        font-size: .84rem;
        color: var(--t3);
        text-decoration: none;
        transition: color .15s;
    }

        .ag-flinks a:hover {
            color: var(--indigo);
        }

.ag-fbot {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .76rem;
    color: var(--t3);
    flex-wrap: wrap;
    gap: 8px;
}

/* Newsletter */
.ag-fnews {
}

.ag-fnews-title {
    font-weight: 700;
    font-size: .82rem;
    color: var(--t1);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.ag-fnews-sub {
    font-size: .78rem;
    color: var(--t3);
    line-height: 1.55;
    margin-bottom: 14px;
}

.ag-fnews-form {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border2);
    border-radius: 9px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}

    .ag-fnews-form:focus-within {
        border-color: var(--indigo);
        box-shadow: 0 0 0 3px rgba(79,70,229,.12);
    }

.ag-fnews-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    padding: 10px 14px;
    font-family: 'Geist', sans-serif;
    font-size: .82rem;
    color: var(--t1);
    min-width: 0;
}

    .ag-fnews-input::placeholder {
        color: var(--t3);
    }

.ag-fnews-btn {
    flex-shrink: 0;
    background: var(--indigo);
    color: #fff;
    border: none;
    padding: 0 14px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    transition: background .15s, transform .1s;
    border-radius: 0 7px 7px 0;
}

    .ag-fnews-btn:hover {
        background: var(--indigo-l);
    }

    .ag-fnews-btn:active {
        transform: scale(.95);
    }

.ag-fnews-note {
    font-size: .7rem;
    color: var(--t3);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ag-fnews-success {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: var(--green);
    background: rgba(16,185,129,.08);
    border: 1px solid rgba(16,185,129,.2);
    padding: 10px 14px;
    border-radius: 9px;
    margin-top: 2px;
}


#ag-prefooter {
    padding: 100px 5vw;
    background: var(--indigo);
    position: relative;
    overflow: hidden;
    text-align: center;
}

    #ag-prefooter::before {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
        background-size: 56px 56px;
        mask-image: radial-gradient(ellipse 80% 100% at 50% 50%, black 30%, transparent 100%);
    }

.ag-pf-glow {
    position: absolute;
    pointer-events: none;
    width: 560px;
    height: 320px;
    background: radial-gradient(ellipse, rgba(255,255,255,.12) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ag-pf-title {
    font-weight: 800;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -.03em;
    color: #fff;
    margin-bottom: 16px;
    position: relative;
}

.ag-pf-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,.72);
    max-width: 500px;
    margin: 0 auto 36px;
    line-height: 1.7;
    position: relative;
}

.ag-btn-pf {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--amber);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 15px 36px;
    border-radius: 11px;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(0,0,0,.25), 0 2px 8px rgba(230,126,34,.5);
    transition: background .15s, transform .12s, box-shadow .15s;
    position: relative;
}

    .ag-btn-pf:hover {
        background: var(--amber-l);
        color: #fff;
        text-decoration: none;
        transform: translateY(-3px);
        box-shadow: 0 12px 36px rgba(0,0,0,.3), 0 4px 16px rgba(230,126,34,.6);
    }

.ag-btn-pf-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.85);
    font-weight: 600;
    font-size: .9rem;
    padding: 12px 24px;
    border-radius: 9px;
    text-decoration: none;
    border: 1.5px solid rgba(255,255,255,.25);
    transition: background .15s, color .15s;
    position: relative;
}

    .ag-btn-pf-ghost:hover {
        background: rgba(255,255,255,.2);
        color: #fff;
        text-decoration: none;
    }

.ag-pf-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-top: 40px;
    flex-wrap: wrap;
    position: relative;
}

.ag-pf-trust-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .82rem;
    color: rgba(255,255,255,.65);
    font-weight: 500;
}

    .ag-pf-trust-item i {
        color: rgba(255,255,255,.5);
    }

/* ─── REVEAL ANIM ──────────────────────────── */
/* Keep .ag-rv class but let AOS handle animation for new elements */
.ag-rv {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .55s ease, transform .55s ease;
}

    .ag-rv.ag-in {
        opacity: 1;
        transform: translateY(0);
    }

    .ag-rv.ag-d1 {
        transition-delay: .08s;
    }

    .ag-rv.ag-d2 {
        transition-delay: .16s;
    }

    .ag-rv.ag-d3 {
        transition-delay: .24s;
    }

/* ─── RESPONSIVE ───────────────────────────── */
@media(max-width:991px) {
    .ag-frow, .ag-frow.ag-flip, .ag-csplit {
        flex-direction: column !important;
    }

    .ag-fcopy {
        flex: none;
    }

    .ag-pgrid {
        flex-direction: column;
        align-items: center;
    }

    .ag-pc.ag-feat {
        flex: 0 0 288px;
        max-width: 288px;
        transform: none;
    }

    .ag-fgrid {
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width:575px) {
    .ag-hero-ctas {
        flex-direction: column;
        align-items: stretch;
    }

    .ag-btn-cta-primary, .ag-btn-cta-outline {
        justify-content: center;
    }

    .ag-fgrid {
        grid-template-columns: 1fr;
    }
}
