/*
Theme Name: Velarium
Theme URI: https://velarium.io
Author: Velarium
Author URI: https://velarium.io
Description: A modern, dark theme for Velarium - Parallel Execution Fabric. Fully compatible with Elementor page builder.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: velarium
Tags: dark, modern, one-column, custom-menu, featured-images, theme-options, elementor-ready

Velarium WordPress Theme, Copyright 2026 Velarium
Velarium is distributed under the terms of the GNU GPL
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    --bg-primary: #08080c;
    --bg-secondary: #0d0d12;
    --bg-tertiary: #121218;
    --text-primary: #f4f4f6;
    --text-secondary: #9a9aa8;
    --text-muted: #5c5c6d;
    --accent: #4a9eff;
    --accent-dim: rgba(74, 158, 255, 0.12);
    --border: rgba(255, 255, 255, 0.4);
    --border-accent: rgba(74, 158, 255, 0.25);
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Grid Background
   ========================================================================== */

.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    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 80% 60% at 50% 0%, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 70%);
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 2rem;
    background: rgba(8, 8, 12, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-bar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-mark {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links .current-menu-item a,
.nav-links .current_page_item a {
    color: var(--text-primary);
}

.nav-links .current-menu-item a::after,
.nav-links .current_page_item a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    width: 20px;
    height: 1.5px;
    background: var(--text-secondary);
    transition: all 0.2s ease;
}

@media (min-width: 769px) {
    .nav-links {
        position: absolute;
        right: 2rem;
        top: 50%;
        transform: translateY(-50%);
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 0;
    }

    .nav-bar {
        position: relative;
        z-index: 20;
        padding: 1rem 1.5rem;
        background: rgba(8, 8, 12, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
    }

    .nav-links {
        position: relative;
        z-index: 10;
        background: rgba(13, 13, 18, 0.98);
        flex-direction: column;
        padding: 0 1.5rem;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .nav-links.open {
        max-height: 300px;
        padding: 1.5rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open li {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links.open li:nth-child(1) { transition-delay: 0.05s; }
    .nav-links.open li:nth-child(2) { transition-delay: 0.1s; }
    .nav-links.open li:nth-child(3) { transition-delay: 0.15s; }
    .nav-links.open li:nth-child(4) { transition-delay: 0.2s; }

    .menu-toggle {
        display: flex;
    }
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.site-main {
    position: relative;
    z-index: 1;
}

/* Elementor full-width support */
.elementor-page .site-main,
.elementor-page .entry-content {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   Section Styles
   ========================================================================== */

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.section-header {
    margin-bottom: 4rem;
}

.section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.02em;
    max-width: 700px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(244, 244, 246, 0.15);
}

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

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn svg {
    width: 16px;
    height: 16px;
}

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

.site-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 4rem 2rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1rem;
    margin-bottom: 0;
    max-width: 320px;
    line-height: 1.6;
    display: block;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-col h4 {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
    }

    .footer-links {
        gap: 2rem;
        flex-wrap: wrap;
    }
}

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

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

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

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

.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   WordPress Core Styles
   ========================================================================== */

.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
}

/* Screen reader text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* ==========================================================================
   Elementor Overrides
   ========================================================================== */

.elementor-kit-* {
    --e-global-color-primary: #4a9eff;
    --e-global-color-secondary: #f4f4f6;
    --e-global-color-text: #9a9aa8;
    --e-global-color-accent: #4a9eff;
}

.elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 1200px;
}

.elementor-widget-heading .elementor-heading-title {
    color: var(--text-primary);
}

.elementor-widget-text-editor {
    color: var(--text-secondary);
}
