/*
 * JUSTICE APEX - BASE STYLES
 * ==========================
 * Shared styles for all pages.
 * Include this CSS on every page.
 * 
 * Usage:
 *   <link rel="stylesheet" href="/components/base.css">
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --bg-void: #030508;
    --bg-dark: #0a0f1a;
    --bg-card: #0d1424;
    --bg-card-hover: #111b2e;
    --accent-cyan: #00f0ff;
    --accent-green: #00ff88;
    --accent-purple: #a855f7;
    --accent-orange: #ff6b35;
    --accent-gold: #fbbf24;
    --accent-red: #f87171;
    --jade-green: #22c55e;
    --lumi-cyan: #00f0ff;
    --apex-purple: #a855f7;
    --text-bright: #f0f4f8;
    --text-main: #c9d1d9;
    --text-muted: #6b7280;
    --border-glow: rgba(0, 240, 255, 0.15);
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ============================================
   RESET & BASE
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-display);
    background: var(--bg-void);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.grid-bg {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.orb-cyan { background: var(--accent-cyan); }
.orb-green { background: var(--accent-green); }
.orb-purple { background: var(--accent-purple); }
.orb-gold { background: var(--accent-gold); }

.site-wrapper { position: relative; z-index: 1; min-height: 100vh; }

/* ============================================
   HEADER / NAV
   ============================================ */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    background: rgba(3, 5, 8, 0.85);
    border-bottom: 1px solid var(--border-glow);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.brand img {
    width: 36px;
    height: auto;
    border-radius: 8px;
}

.brand-text {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-bright);
}

.center-nav {
    margin-left: auto;
    margin-right: auto;
}

.center-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.center-nav a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.center-nav a:hover,
.center-nav a.active {
    color: var(--accent-cyan);
}

.center-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
    border-radius: 2px;
}

.social-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-icon img {
    width: 22px;
    height: 22px;
    opacity: 0.7;
    transition: all 0.2s;
}

.social-icon:hover img {
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.nav-toggle {
    display: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-glow);
    background: rgba(13, 20, 36, 0.8);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-bright);
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-bright);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-bright);
}

.accent { color: var(--accent-cyan); }
.accent-green { color: var(--accent-green); }
.accent-purple { color: var(--accent-purple); }
.accent-gold { color: var(--accent-gold); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 240, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-glow);
    color: var(--text-main);
}

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s;
}

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

/* ============================================
   FORMS
   ============================================ */
.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    background: var(--bg-dark);
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* ============================================
   BADGES & PILLS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-cyan);
}

.pill {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    border: 1px solid var(--border-glow);
    background: rgba(0, 240, 255, 0.05);
    color: var(--text-muted);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    border-top: 1px solid var(--border-glow);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.4); }
    50% { box-shadow: 0 0 20px 5px rgba(0, 240, 255, 0.1); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

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

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: blink 1s ease-in-out infinite;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .center-nav { display: none; }
    .nav-toggle { display: block; }
    .social-bar { display: none; }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
}

/* Mobile nav open state */
body.nav-open .center-nav {
    display: block;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-void);
    border-bottom: 1px solid var(--border-glow);
    padding: 1rem;
}

body.nav-open .center-nav ul {
    flex-direction: column;
    gap: 0;
}

body.nav-open .center-nav li {
    border-bottom: 1px solid var(--border-glow);
}

body.nav-open .center-nav a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
}
