/*
 * site.css — Shared foundation for all EVE marketing, docs, auth pages.
 * Provides: reset, body, .header, .logo, .nav-links, .btn, .footer,
 *           loading screen, mobile menu, responsive rules.
 * Uses CSS variables from theme.css — include theme.css BEFORE this file.
 */

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Body ──────────────────────────────────────────────── */
body {
    font-family: var(--font-sans, 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    background: var(--bg-primary, #0a0e1a);
    color: var(--text-primary, #c8cdd8);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-primary, #4a90e2);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover:not(.btn) {
    color: var(--accent-primary, #6ab0f5);
    filter: brightness(1.25);
}

/* ── Header ────────────────────────────────────────────── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 14, 26, 0.97) !important;
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    pointer-events: auto;
}

/* ── Logo ──────────────────────────────────────────────── */
.logo {
    text-transform: uppercase;
    letter-spacing: 4px;
    font-family: var(--font-mono, 'IBM Plex Mono', 'Consolas', monospace);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-heading, #e2e6ef);
}

.logo-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: var(--radius-sm, 2px);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading, #e2e6ef);
}

/* ── Navigation ────────────────────────────────────────── */
.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary, #7a8299);
    text-decoration: none;
    font-family: var(--font-mono, 'IBM Plex Mono', 'Consolas', monospace);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent-primary, #6ab0f5);
    filter: brightness(1.25);
}

.nav-links a.active {
    color: var(--accent-primary, #4a90e2);
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm, 2px);
    font-family: var(--font-mono, 'IBM Plex Mono', 'Consolas', monospace);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary,
.nav-links .btn-primary {
    background: var(--accent-primary, #4a90e2);
    color: #fff;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.2);
}
.btn-primary:hover {
    background: #3a80d2;
    color: #fff;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary, #c8cdd8);
    border: 1px solid var(--border-primary, #1a2444);
}
.btn-outline:hover {
    border-color: var(--accent-primary, #4a90e2);
    color: var(--accent-primary, #4a90e2);
    background: rgba(74, 144, 226, 0.08);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-secondary, #7c6df5);
    border: 1px solid var(--accent-secondary, #7c6df5);
}
.btn-secondary:hover {
    background: rgba(124, 109, 245, 0.15);
    color: #9589f7;
    border-color: #9589f7;
    transform: translateY(-1px);
}

/* ── Footer ────────────────────────────────────────────── */
.footer {
    padding: 60px 40px;
    background: var(--bg-header, rgba(10, 14, 26, 0.95));
    border-top: 1px solid var(--border-primary, #1a2444);
    text-align: left;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-heading, #e2e6ef);
}

.footer-brand p {
    color: var(--text-muted, #555a6e);
    font-size: 14px;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-heading, #e2e6ef);
}

.footer-links a {
    display: block;
    color: var(--text-secondary, #7a8299);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-primary, #6ab0f5);
    filter: brightness(1.25);
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-primary, #1a2444);
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted, #555a6e);
}

/* Simple centered footer variant (docs, auth pages) */
.footer--simple {
    padding: 30px 40px;
    text-align: center;
    color: var(--text-muted, #555a6e);
    font-size: 13px;
}
.footer--simple a {
    color: var(--accent-primary, #4a90e2);
}
.footer--simple a:hover {
    color: var(--accent-primary, #6ab0f5);
    filter: brightness(1.25);
}

/* ── Theme Footer (alias for theme.css compatibility) ── */
.theme-footer {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary, #7a8299);
    font-family: var(--font-mono, 'IBM Plex Mono', 'Consolas', monospace);
    font-size: 11px;
    letter-spacing: 0.05em;
    border-top: 1px solid var(--border-primary, #1a2444);
}
.theme-footer a { color: var(--accent-primary, #4a90e2); }
.theme-footer a:hover { color: var(--accent-primary, #6ab0f5); filter: brightness(1.25); }
.theme-footer-brand { margin-top: 8px; opacity: 0.5; }

/* ── Header: always dark (even in light mode) ──────── */
[data-theme="light"] .header {
    background: rgba(10, 14, 26, 0.97) !important;
    border-bottom-color: #1a2444 !important;
}
[data-theme="light"] .header .logo,
[data-theme="light"] .header .logo-text {
    color: #e2e6ef !important;
}
[data-theme="light"] .header .nav-links a {
    color: #7a8299 !important;
}
[data-theme="light"] .header .nav-links a:hover {
    color: #e2e6ef !important;
}
[data-theme="light"] .header .mobile-menu-btn {
    color: #e2e6ef !important;
    border-color: rgba(255,255,255,0.2) !important;
}

/* ── Footer: always dark (even in light mode) ───────── */
[data-theme="light"] .footer,
[data-theme="light"] .footer--simple,
[data-theme="light"] .theme-footer,
[data-theme="light"] .app-footer {
    background: rgba(10, 14, 26, 0.97) !important;
    border-top-color: #1a2444 !important;
    color: #555a6e !important;
}
[data-theme="light"] .footer-brand h3,
[data-theme="light"] .footer-links h4 {
    color: #e2e6ef !important;
}
[data-theme="light"] .footer-brand p,
[data-theme="light"] .footer-bottom {
    color: #555a6e !important;
}
[data-theme="light"] .footer-bottom {
    border-top-color: #1a2444 !important;
}
[data-theme="light"] .footer-links a {
    color: #7a8299 !important;
}
[data-theme="light"] .footer-links a:hover {
    color: #e2e6ef !important;
}
[data-theme="light"] .footer--simple a,
[data-theme="light"] .theme-footer a {
    color: #7c6df5 !important;
}
[data-theme="light"] .footer--simple a:hover,
[data-theme="light"] .theme-footer a:hover {
    color: #e2e6ef !important;
}

/* ── Loading Screen ────────────────────────────────────── */
#loadingScreen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    background: var(--bg-primary, #0a0e1a);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: opacity 0.4s ease;
}
#loadingScreen .loader-eq {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 32px;
}
#loadingScreen .loader-eq .eq-bar {
    width: 4px;
    background: linear-gradient(180deg, var(--accent-cyan, #00d4ff) 0%, var(--accent-primary, #4a90e2) 100%);
    border-radius: 2px;
    animation: eqload 1s ease-in-out infinite;
}
#loadingScreen .loader-eq .eq-bar:nth-child(1) { height: 30%; animation-delay: 0s; }
#loadingScreen .loader-eq .eq-bar:nth-child(2) { height: 60%; animation-delay: 0.1s; }
#loadingScreen .loader-eq .eq-bar:nth-child(3) { height: 100%; animation-delay: 0.2s; }
#loadingScreen .loader-eq .eq-bar:nth-child(4) { height: 60%; animation-delay: 0.3s; }
#loadingScreen .loader-eq .eq-bar:nth-child(5) { height: 30%; animation-delay: 0.4s; }
@keyframes eqload {
    0%, 100% { transform: scaleY(0.3); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}
#loadingScreen .loader-text {
    color: var(--text-secondary, #7a8299);
    font-size: 14px;
    letter-spacing: 1px;
}

/* ── Mobile Menu ───────────────────────────────────────── */
.mobile-menu-btn {
    display: none;
    background: color-mix(in srgb, var(--accent-primary, #4a90e2) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-primary, #4a90e2) 30%, transparent);
    border-radius: 2px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 10px 14px;
    line-height: 1;
    transition: all 0.2s;
    z-index: 101;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}
.mobile-menu-btn:hover,
.mobile-menu-btn:active {
    background: color-mix(in srgb, var(--accent-primary, #4a90e2) 35%, transparent);
    border-color: color-mix(in srgb, var(--accent-primary, #4a90e2) 50%, transparent);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.99) 0%, rgba(15, 15, 25, 0.99) 100%);
    z-index: 999;
    padding: 90px 24px 30px;
    overflow-y: auto;
}
.mobile-menu-overlay.active {
    display: block;
    animation: menuSlideIn 0.3s ease-out;
}
@keyframes menuSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-menu-close {
    position: absolute;
    top: 20px; right: 20px;
    background: color-mix(in srgb, var(--accent-primary, #4a90e2) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-primary, #4a90e2) 30%, transparent);
    border-radius: 2px;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 8px 12px;
    line-height: 1;
    transition: all 0.2s;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}
.mobile-menu-links a {
    color: var(--text-heading, #e2e6ef);
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    padding: 18px 20px;
    text-align: left;
    border-radius: 2px;
    background: rgba(25, 25, 35, 0.5);
    border: 1px solid var(--border-primary, #1a2444);
    transition: all 0.2s;
}
.mobile-menu-links a:hover,
.mobile-menu-links a:active {
    background: color-mix(in srgb, var(--accent-primary, #4a90e2) 15%, transparent);
    border-color: color-mix(in srgb, var(--accent-primary, #4a90e2) 30%, transparent);
    color: #fff;
}

.mobile-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.mobile-menu-buttons .btn {
    width: 100%;
    padding: 18px 28px;
    font-size: 18px;
    font-weight: 600;
    min-height: 58px;
    border-radius: 2px;
}

/* ── Utility: content wrapper ──────────────────────────── */
.main-content {
    padding-top: 80px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Utility: cards ────────────────────────────────────── */
.theme-card {
    background: var(--bg-card, rgba(15, 18, 37, 0.8));
    border: 1px solid var(--border-primary, #1a2444);
    border-radius: var(--radius-md, 4px);
    padding: 24px;
    transition: border-color 0.2s;
}
.theme-card:hover {
    border-color: var(--border-hover, #2a3a5a);
}

/* ── Utility: code ─────────────────────────────────────── */
code {
    font-family: var(--font-mono, 'IBM Plex Mono', 'Consolas', monospace);
    font-size: 0.9em;
    background: rgba(74, 144, 226, 0.1);
    padding: 2px 6px;
    border-radius: var(--radius-sm, 2px);
}
.code-block {
    background: var(--bg-secondary, #0f1225);
    border: 1px solid var(--border-primary, #1a2444);
    border-radius: var(--radius-md, 4px);
    padding: 16px;
    margin: 16px 0;
    font-family: var(--font-mono, 'IBM Plex Mono', 'Consolas', monospace);
    font-size: 13px;
    overflow-x: auto;
    color: var(--text-primary, #c8cdd8);
}

/* ── Utility: section labels ───────────────────────────── */
.section-label {
    font-family: var(--font-mono, 'IBM Plex Mono', 'Consolas', monospace);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary, #7a8299);
}

/* ── Utility: info/alert boxes ─────────────────────────── */
.box-info {
    background: rgba(74, 144, 226, 0.06);
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: var(--radius-md, 4px);
    padding: 24px;
    margin: 32px 0;
}
.box-info h3 {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary, #4a90e2);
    margin-bottom: 12px;
}

/* ── Inline SVG icon sizing ────────────────────────────── */
/* Standard 24×24 icon SVGs get 1em sizing (matches design-system.css).
   Data-viz SVGs use different viewBox values and are untouched. */
svg[viewBox="0 0 24 24"] {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    vertical-align: middle;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .header {
        padding: 12px 20px;
    }
    .nav-links {
        display: none !important;
    }
    .mobile-menu-btn {
        display: block;
    }
    .logo {
        font-size: 20px;
        gap: 10px;
    }
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    .btn {
        padding: 10px 18px;
        font-size: 12px;
    }
    .footer {
        padding: 40px 20px;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 14px;
        text-align: center;
    }
    .main-content {
        padding: 40px 20px;
        padding-top: 80px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 10px 16px;
    }
    .logo {
        font-size: 18px;
    }
    .logo-icon {
        width: 28px;
        height: 28px;
    }
    .footer {
        padding: 32px 16px;
    }
    .footer-bottom {
        font-size: 11px;
    }
}

/* ── Common page sections ──────────────────────────────── */
.hero {
    padding: 140px 40px 80px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 16px;
    color: var(--text-heading, #e2e6ef);
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary, #7a8299);
    max-width: 600px;
    margin: 0 auto 32px;
}

.section {
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.section h2 {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 24px;
    color: var(--text-heading, #e2e6ef);
}

@media (max-width: 768px) {
    .hero {
        padding: 100px 20px 40px;
    }
    .hero h1 {
        font-size: 28px;
        line-height: 1.25;
    }
    .hero p {
        font-size: 16px;
    }
    .section {
        padding: 40px 20px;
    }
    .section h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 90px 16px 32px;
    }
    .hero h1 {
        font-size: 24px;
    }
}
