/* ========================================
   AceVault — Mothership Styles
   Dark theme, developer aesthetic
   ======================================== */

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

:root {
    --primary: #00D4AA;
    --primary-dim: rgba(0, 212, 170, 0.15);
    --primary-glow: rgba(0, 212, 170, 0.3);
    --purple: #7c3aed;
    --purple-dim: rgba(124, 58, 237, 0.15);
    --bg: #0a0a1a;
    --bg-alt: #0f0f23;
    --surface: #141428;
    --surface-hover: #1a1a35;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text: #eaeaea;
    --text-secondary: #8892b0;
    --text-dim: #5a6380;
    --red: #ef4444;
    --yellow: #f59e0b;
    --cyan: #06b6d4;
    --pink: #ec4899;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.2s ease;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* --- Layout --- */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 480px;
    margin: 0 auto;
}

/* --- Nav --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: background var(--transition), backdrop-filter var(--transition);
}

.nav.scrolled {
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-github {
    color: var(--text-secondary);
    transition: color var(--transition);
    display: flex;
    align-items: center;
}

.nav-github:hover {
    color: var(--text);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #0a0a1a;
    padding: 10px 20px;
}

.btn-primary:hover {
    background: #00e6b8;
    box-shadow: 0 0 24px var(--primary-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-hover);
    padding: 10px 20px;
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: var(--radius);
}

.btn-block {
    width: 100%;
}

/* --- Hero --- */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(ellipse, var(--primary-dim), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-dim);
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 100px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 20px;
}

.hero-sub {
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 64px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* --- Products --- */
.products {
    padding: 100px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--border-hover);
    background: var(--surface-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.product-card.flagship {
    border-color: rgba(0, 212, 170, 0.2);
    background: linear-gradient(135deg, var(--surface), rgba(0, 212, 170, 0.05));
}

.product-card.flagship:hover {
    border-color: rgba(0, 212, 170, 0.4);
    box-shadow: 0 8px 32px rgba(0, 212, 170, 0.1);
}

.product-card.coming-soon {
    border-style: dashed;
    opacity: 0.6;
}

.product-card.coming-soon:hover {
    opacity: 0.8;
    transform: none;
}

.product-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    background: var(--primary-dim);
    padding: 4px 10px;
    border-radius: 100px;
}

.product-icon {
    margin-bottom: 20px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-dim);
    border-radius: var(--radius-sm);
}

.product-card:nth-child(2) .product-icon {
    background: var(--purple-dim);
}

.product-card:nth-child(3) .product-icon {
    background: rgba(245, 158, 11, 0.15);
}

.product-card:nth-child(4) .product-icon {
    background: rgba(239, 68, 68, 0.15);
}

.product-card:nth-child(5) .product-icon {
    background: rgba(6, 182, 212, 0.15);
}

.product-card:nth-child(6) .product-icon {
    background: rgba(236, 72, 153, 0.15);
}

.product-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.product-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
    flex: 1;
}

.product-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    transition: gap var(--transition);
}

/* --- Mission --- */
.mission {
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

.mission-content {
    max-width: 720px;
    margin: 0 auto;
}

.mission-content h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    line-height: 1.15;
}

.mission-content > p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    margin-bottom: 16px;
    line-height: 1.7;
}

.mission-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.value h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary);
}

.value p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* --- Open Source --- */
.open-source {
    padding: 80px 0;
    text-align: center;
}

.os-cta {
    margin-top: 32px;
}

/* --- CTA Section --- */
.cta-section {
    padding: 100px 0;
    text-align: center;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
}

.cta-section h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.cta-section > .container > p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    margin-bottom: 32px;
}

.cta-form {
    display: flex;
    gap: 12px;
    max-width: 440px;
    margin: 0 auto;
}

.cta-input {
    flex: 1;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color var(--transition);
}

.cta-input::placeholder {
    color: var(--text-dim);
}

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

.cta-note {
    margin-top: 12px;
    font-size: 0.8125rem;
    color: var(--text-dim);
}

/* --- Footer --- */
.footer {
    padding: 64px 0 32px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .nav-logo {
    margin-bottom: 12px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    max-width: 280px;
    line-height: 1.5;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition);
}

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

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-dim);
    font-size: 0.8125rem;
}

/* --- Load animation --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* --- Reduced motion preference --- */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }
    .animate-in {
        opacity: 1;
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 26, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 120px 0 80px;
    }

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

    .hero h1 br {
        display: none;
    }

    .hero-stats {
        gap: 32px;
    }

    .stat-num {
        font-size: 1.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .mission-values {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .mission-content h2 br {
        display: none;
    }

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

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