/* ═══════════════════════════════════════════════════════════════
   NULLSECTOR V2 — DESIGN SYSTEM
   Premium dark theme with glassmorphism & micro-animations
   ═══════════════════════════════════════════════════════════════ */

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

/* ── Custom Properties ──────────────────────────────────────── */
:root {
    /* Backgrounds */
    --bg-root: #000000;
    --bg-surface: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #161616;
    --bg-elevated: #1a1a1a;
    --bg-overlay: rgba(0, 0, 0, 0.85);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --text-dim: #444444;

    /* Borders */
    --border: #1e1e1e;
    --border-light: #2a2a2a;
    --border-hover: #3a3a3a;
    --border-active: #555555;

    /* Accent Colors */
    --accent-cyan: #00e5ff;
    --accent-magenta: #ff0055;
    --accent-purple: #7c3aed;
    --accent-green: #22c55e;
    --accent-amber: #f59e0b;
    --accent-blue: #3b82f6;

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #00e5ff 0%, #7c3aed 50%, #ff0055 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(0,229,255,0.1) 0%, rgba(124,58,237,0.1) 50%, rgba(255,0,85,0.05) 100%);
    --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow-cyan: 0 0 40px rgba(0, 229, 255, 0.15);
    --shadow-glow-purple: 0 0 40px rgba(124, 58, 237, 0.15);
    --shadow-glow-magenta: 0 0 40px rgba(255, 0, 85, 0.15);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 0.15s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    /* Layout */
    --max-width: 1400px;
    --nav-height: 72px;
}

/* ── Base ───────────────────────────────────────────────────── */
html {
    background: var(--bg-root);
    color-scheme: dark;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-root);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: var(--nav-height);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
a, button, input, textarea, [contenteditable="true"], .selectable {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; }
code { font-family: var(--font-mono); }

::selection {
    background: rgba(0, 229, 255, 0.3);
    color: #fff;
}

/* ── Typography ─────────────────────────────────────────────── */
.text-display {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.text-h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.text-h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.text-h3 {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    font-weight: 600;
    line-height: 1.3;
}

.text-body { font-size: 1rem; line-height: 1.7; }
.text-body-lg { font-size: 1.125rem; line-height: 1.7; }
.text-body-xl { font-size: 1.25rem; line-height: 1.7; }
.text-sm { font-size: 0.875rem; line-height: 1.5; }
.text-xs { font-size: 0.75rem; line-height: 1.4; }

.text-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.text-muted { color: var(--text-secondary); }
.text-dim { color: var(--text-muted); }
.text-center { text-align: center; }
.text-bold { font-weight: 700; }
.text-mono { font-family: var(--font-mono); }

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

.container-sm { max-width: 800px; }
.container-md { max-width: 1000px; }

.section {
    padding: var(--space-4xl) 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes borderGlow {
    0%, 100% { border-color: rgba(0, 229, 255, 0.2); }
    50% { border-color: rgba(0, 229, 255, 0.5); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stagger animation classes */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }
.stagger-5 { transition-delay: 0.25s; }
.stagger-6 { transition-delay: 0.3s; }
.stagger-7 { transition-delay: 0.35s; }
.stagger-8 { transition-delay: 0.4s; }

/* ── Premium Background Elements ────────────────────────────── */
.hero-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.hero-mesh .orb-1 {
    position: absolute;
    width: 600px; height: 600px;
    top: -20%; left: -10%;
    background: radial-gradient(circle, rgba(0,229,255,0.12) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    animation: float 25s ease-in-out infinite;
}
.hero-mesh .orb-2 {
    position: absolute;
    width: 500px; height: 500px;
    bottom: -15%; right: -5%;
    background: radial-gradient(circle, rgba(124,58,237,0.10) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    animation: float 30s ease-in-out infinite reverse;
}
.hero-mesh .orb-3 {
    position: absolute;
    width: 400px; height: 400px;
    top: 50%; left: 60%;
    background: radial-gradient(circle, rgba(255,0,85,0.06) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(100px);
    animation: float 20s ease-in-out infinite 5s;
}
.ns-hero-grid-lines {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    pointer-events: none;
}

.content-relative {
    position: relative;
    z-index: 1;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) var(--bg-root);
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-root); }
::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }
    .container {
        padding: 0 var(--space-md);
    }
    .section {
        padding: var(--space-3xl) 0;
    }
    .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
    .hide-desktop { display: none !important; }
}

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