/* ==========================================================================
   1. CSS Custom Properties (Theme)
   ========================================================================== */
:root {
    --bg-color: #0f1115;
    --card-bg: #181b21;
    --card-hover: #1f232b;
    --primary: #7c4dff;
    --primary-hover: #9066ff;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --border-color: #2e323b;
    --success: #00e676;
    --error: #ff5252;
    --processing: #2979ff;
    --radius-lg: 16px;
    --radius-md: 8px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);

    --nav-height: 72px;
    --container-max-width: 1200px;
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul {
    list-style: none;
}

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

/* ==========================================================================
   3. Layout Components
   ========================================================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   4. Typography & Utilities
   ========================================================================== */
.gradient-text {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(124, 77, 255, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(124, 77, 255, 0.4);
}

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

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

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


/* ==========================================================================
   5. Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: rgba(15, 17, 21, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo img {
    width: 30px;
    height: 30px;
}

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

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
}

/* ==========================================================================
   6. Hero Section
   ========================================================================== */
.hero {
    padding: 12rem 0 8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle background glow */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(124, 77, 255, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-logo-box {
    width: 100px;
    height: 100px;
    background-color: #181b21;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.hero-logo-box img {
    width: 72px;
    height: 72px;
}

.badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    background-color: #2a2d35;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.hero-terminal {
    max-width: 800px;
    margin: 3rem auto 0;
    background-color: #16181d;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.terminal-header {
    background-color: #1a1c23;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.terminal-body {
    padding: 1.5rem;
}

.terminal-line {
    margin-bottom: 0.5rem;
}

.terminal-line:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   7. Features Section
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background-color: var(--card-hover);
    transform: translateY(-5px);
    border-color: rgba(124, 77, 255, 0.3);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background-color: rgba(124, 77, 255, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   8. How It Works Section
   ========================================================================== */
.how-it-works {
    background-color: rgba(24, 27, 33, 0.5);
    /* slightly lighter than bg */
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    background-color: rgba(124, 77, 255, 0.08);
    border: 1px solid rgba(124, 77, 255, 0.2);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

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

/* ==========================================================================
   9. Up and Running Section
   ========================================================================== */
.quick-start-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quick-start-step {
    background: transparent;
}

.step-title {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.step-code {
    background-color: #14161a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
    overflow-x: auto;
    line-height: 1.5;
}

.prerequisites-box {
    margin-top: 1rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.prerequisites-box h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.prerequisites-list {
    list-style-type: none;
    color: var(--text-muted);
}

.prerequisites-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.prerequisites-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
}

/* ==========================================================================
   10. Plans & Pricing
   ========================================================================== */
.pricing-toggle {
    display: flex;
    background-color: #1a1c23;
    border-radius: var(--radius-md);
    padding: 0.25rem;
    width: max-content;
    margin: 0 auto 3rem;
    border: 1px solid var(--border-color);
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    background-color: #2a2d35;
    color: var(--text-main);
}

.toggle-btn:hover:not(.active) {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.05);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.pricing-grid.animate-in {
    animation: pricingFadeIn 0.4s ease-out forwards;
}

@keyframes pricingFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

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

.pricing-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card.enterprise {
    border-color: rgba(124, 77, 255, 0.4);
    box-shadow: 0 10px 30px rgba(124, 77, 255, 0.1);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 2rem;
    background-color: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.pricing-card p.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.pricing-card p.price-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.feature-check {
    color: var(--primary);
    font-weight: bold;
}

.pricing-card .btn {
    width: 100%;
}


/* ==========================================================================
   10. Footer
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 300px;
}

.footer h4 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ==========================================================================
   11. Animations (Intersection Observer Targets)
   ========================================================================== */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   12. Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background-color: var(--card-bg);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.3s ease-in-out;
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

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

    .hero-cta .btn {
        width: 100%;
    }

    .step-item {
        flex-direction: column;
        text-align: left;
        gap: 1rem;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}