/* ========================================
   MoltChain Design System - FROM SCRATCH
   Orange Theme, Professional Grade
   Built for Agent-First Blockchain
   ======================================== */

/* ===== CSS Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0A0E27;
    color: #FFFFFF;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== CSS Variables ===== */
:root {
    /* Colors - Orange Theme */
    --orange-primary: #FF6B35;
    --orange-dark: #E5501B;
    --orange-accent: #F77F00;
    --blue-primary: #004E89;
    --blue-accent: #118AB2;
    --green-success: #06D6A0;
    --yellow-warning: #FFD23F;
    
    /* Backgrounds */
    --bg-dark: #0A0E27;
    --bg-darker: #060812;
    --bg-card: #141830;
    --bg-hover: #1a1f3a;
    --bg-primary: var(--bg-dark);
    --bg-surface: var(--bg-card);
    
    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: #B8C1EC;
    --text-muted: #6B7A99;
    
    /* Borders */
    --border: #1F2544;
    --border-light: #2a3052;
    
    /* Spacing - TIGHTER */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(255, 107, 53, 0.3);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

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

code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-darker);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

/* ===== Layout ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-xl);
}

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

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-xl);
}

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

.nav-menu {
    display: flex;
    gap: var(--space-xl);
    list-style: none;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-accent));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--orange-primary);
    border: 2px solid var(--orange-primary);
}

.btn-secondary:hover {
    background: var(--orange-primary);
    color: white;
}

.btn-sm {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9rem;
}

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

/* ===== Cards - REFINED ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-xl);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: var(--orange-primary);
}

/* ===== Grid Layouts ===== */
.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-orange { color: var(--orange-primary); }

.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); }

.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); }

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
    }
}

/* ===== Animations ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-slideUp {
    animation: slideUp 0.6s ease forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.8s ease forwards;
}

/* ===== Code Blocks - REFINED ===== */
.code-example {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
    overflow-x: auto;
}

.code-example pre {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.code-example code {
    background: none;
    padding: 0;
}

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

.code-header .lang {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--orange-primary);
    letter-spacing: 0.05em;
}
