/* Minimal AI Observability Theme */
:root {
    --bg: #050505;
    --surface: #0f0f0f;
    --surface-hover: #1a1a1a;
    --border: #27272a;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --text: #ededed;
    --text-muted: #a1a1aa;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --radius: 8px;
    --spacing: 1.5rem;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
    font-size: 16px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s;
}

button,
input,
textarea {
    font: inherit;
    color: inherit;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
    width: 100%;
}

.section {
    padding: 5rem 0;
    border-bottom: 1px solid var(--border);
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.flex {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.text-center {
    text-align: center;
}

.hidden {
    display: none;
}

/* Spacing Utilities */
.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Typography */
h1,
h2,
h3 {
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: #fff;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-muted);
    max-width: 65ch;
}

.text-lg {
    font-size: 1.125rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.font-mono {
    font-family: var(--font-mono);
}

.text-gradient {
    background: linear-gradient(to right, #fff, var(--primary));
    -webkit-background-clip: text;
    color: transparent;
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    border-color: var(--border);
    background: transparent;
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--text);
    background: var(--surface);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: 0.2s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(37, 99, 235, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-red {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

.badge-green {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.2);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

nav {
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a:hover {
    color: #fff;
}

/* Hero */
.hero {
    padding-top: 8rem;
    padding-bottom: 5rem;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.2;
    background: radial-gradient(circle at 50% 0%, var(--primary), transparent 70%);
    pointer-events: none;
}

/* Visuals */
.visual-container {
    background: linear-gradient(135deg, #0a0a0a, #111);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Form */
.input {
    width: 100%;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    color: #fff;
}

.input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #111;
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    position: relative;
    transform: scale(0.95);
    transition: 0.2s;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
    color: var(--text-muted);
}

.close-btn:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {

    /* Show hamburger button */
    #mobile-menu-button {
        display: block !important;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        color: var(--text);
        background: transparent;
    }

    /* Navigation: Hidden by default, shown when active */
    nav {
        height: auto;
        flex-wrap: wrap;
        padding: 0.5rem 0;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
        width: 100%;
        text-align: center;
        border-top: 1px solid var(--border);
        padding-top: 1rem;
    }

    .nav-links.show {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-links a {
        display: block;
        padding: 0.75rem;
        width: 100%;
        border-radius: var(--radius);
    }

    .nav-links a:hover {
        background: var(--surface-hover);
    }

    /* Move the "Book a Demo" button into the flow */
    nav .btn {
        margin-top: 1rem;
        width: 100%;
        display: none;
        /* Hide the desktop button, we'll assume it's cloned or just hide it for now to save space, or keep it if it fits */
    }

    /* Actually, let's keep the main CTA visible but maybe smaller, or hide it if it's in the nav-links. 
       In the HTML, the button is OUTSIDE .nav-links. 
       Let's make sure the button stays visible or moves into the menu. 
       For simplicity/MVP: Keep the CTA button visible next to hamburger, or hide it.
       Let's hide the desktop CTA on mobile and maybe add a link in the menu if needed. 
       But the user didn't ask to move it. Let's just ensure layout is clean. */

    nav>.btn {
        display: none;
        /* Hide the header button on mobile to save space */
    }

    /* Hero adjustments */
    .hero {
        padding-top: 8rem;
        /* Reduced since header is compact again */
        padding-bottom: 3rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    /* Layout: Single column grids */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Footer adjustments */
    footer .container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    footer .flex {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Modal adjustments */
    .modal-content {
        width: 90%;
        margin: 0 1rem;
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }
}