/*
 * NaniLabs Design System
 * Apple-inspired, premium, consistent
 * 
 * Products:
 * - AURA (purple) - Payments
 * - HIVE (yellow) - Battles  
 * - MEAT (red) - Human Labor
 */

/* ============================================
   CSS Variables / Design Tokens
   ============================================ */

:root {
    /* Base Colors */
    --color-bg-primary: #000000;
    --color-bg-secondary: #0a0a0a;
    --color-bg-tertiary: #111111;
    --color-bg-card: #161616;
    --color-bg-elevated: #1c1c1c;
    
    /* Text Colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: #a1a1a6;
    --color-text-tertiary: #6e6e73;
    
    /* Border Colors */
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(255, 255, 255, 0.15);
    
    /* Product Accent Colors */
    --color-aura: #a78bfa;
    --color-aura-bright: #c4b5fd;
    --color-aura-dim: #7c3aed;
    
    --color-hive: #fbbf24;
    --color-hive-bright: #fcd34d;
    --color-hive-dim: #f59e0b;
    
    --color-meat: #f87171;
    --color-meat-bright: #fca5a5;
    --color-meat-dim: #ef4444;
    
    /* Utility Colors */
    --color-success: #34d399;
    --color-warning: #fbbf24;
    --color-error: #f87171;
    
    /* Typography */
    --font-sans: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;
    --space-5xl: 128px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(255, 255, 255, 0.1);
}

/* Product-specific accent overrides */
[data-product="aura"] {
    --color-accent: var(--color-aura);
    --color-accent-bright: var(--color-aura-bright);
    --color-accent-dim: var(--color-aura-dim);
}

[data-product="hive"] {
    --color-accent: var(--color-hive);
    --color-accent-bright: var(--color-hive-bright);
    --color-accent-dim: var(--color-hive-dim);
}

[data-product="meat"] {
    --color-accent: var(--color-meat);
    --color-accent-bright: var(--color-meat-bright);
    --color-accent-dim: var(--color-meat-dim);
}

/* ============================================
   Base Styles
   ============================================ */

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

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

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: var(--color-accent, var(--color-aura));
    color: var(--color-bg-primary);
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.headline-xl {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.headline-lg {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.headline-md {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600;
}

.headline-sm {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 600;
}

.body-lg {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.body-md {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.body-sm {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--color-text-tertiary);
}

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

.text-gradient {
    background: linear-gradient(135deg, var(--color-accent-bright), var(--color-accent), var(--color-accent-dim));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ============================================
   Layout
   ============================================ */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-lg {
    max-width: 1400px;
}

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

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

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

/* ============================================
   Navigation
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-md) 0;
    transition: var(--transition-base);
}

.nav.scrolled {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: 1.125rem;
}

.nav-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

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

.nav-cta {
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-accent);
    color: var(--color-bg-primary);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-base);
}

.nav-cta:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-bg-primary);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(var(--color-accent), 0.3);
}

.btn-secondary {
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-card);
    border-color: var(--color-border-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--color-accent);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    transition: var(--transition-base);
}

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

.card-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.card-accent {
    border-color: rgba(var(--color-accent), 0.2);
}

.card-accent:hover {
    border-color: rgba(var(--color-accent), 0.4);
    box-shadow: 0 0 60px rgba(var(--color-accent), 0.1);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: var(--space-2xl);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--color-success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.hero-title {
    margin-bottom: var(--space-lg);
}

.hero-subtitle {
    font-size: 1.375rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    width: 150%;
    height: 150%;
    top: -50%;
    left: -25%;
    background: radial-gradient(ellipse at center, rgba(var(--color-accent), 0.15) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}

.hero-glow-1 {
    top: 20%;
    left: 20%;
    background: var(--color-accent-dim);
}

.hero-glow-2 {
    bottom: 20%;
    right: 20%;
    background: var(--color-accent);
}

/* ============================================
   Feature Grid
   ============================================ */

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    padding: var(--space-2xl);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.feature-desc {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
}

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
}

.feature-list li::before {
    content: "✓";
    color: var(--color-success);
    font-weight: 600;
}

/* ============================================
   Stats
   ============================================ */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-xl);
    text-align: center;
}

.stat-value {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

.stat-label {
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
}

/* ============================================
   Code Block
   ============================================ */

.code-block {
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
}

.code-title {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.code-tag {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-accent);
    color: var(--color-bg-primary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.code-body {
    padding: var(--space-lg);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    overflow-x: auto;
}

.code-body .keyword { color: #c792ea; }
.code-body .string { color: #c3e88d; }
.code-body .comment { color: #546e7a; }
.code-body .function { color: var(--color-accent); }
.code-body .number { color: #f78c6c; }

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: var(--space-3xl) 0;
    border-top: 1px solid var(--color-border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.footer-link {
    color: var(--color-text-tertiary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

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

.footer-copy {
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
    text-align: center;
    margin-top: var(--space-xl);
}

/* ============================================
   Animations
   ============================================ */

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

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

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

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }

/* ============================================
   Utilities
   ============================================ */

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

.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-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.mx-auto { margin-left: auto; margin-right: auto; }

.max-w-sm { max-width: 400px; }
.max-w-md { max-width: 600px; }
.max-w-lg { max-width: 800px; }

.hidden { display: none; }

@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }
}

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-tertiary);
}
