/* ==========================================================================
   1. DESIGN TOKENS & CONFIGURATION (THEME REGISTRY)
   ========================================================================== */
:root {
    /* --- Color Palette --- */
    --color-navy-950: #020617; /* Main Background */
    --color-navy-900: #0B1120; /* Secondary / Cards */
    --color-navy-800: #1e293b;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-white: #ffffff;

    /* Electric / Cyan Scale (Primary Brand) */
    --color-electric-400: #38BDF8;
    --color-electric-500: #0EA5E9;
    --color-electric-600: #0284C7;
    
    /* Accent Scale (Secondary Brand) */
    --color-accent-cyan: #06b6d4;
    --color-accent-purple: #8b5cf6;
    --color-emerald-400: #34d399;
    --color-emerald-500: #10b981;
    --color-red-500: #ef4444;
    --color-orange-500: #f97316;

    /* --- Typography --- */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* --- Spacing System --- */
    --spacing-4: 1rem;
    
    /* --- Animation Timings --- */
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --duration-normal: 300ms;
}

/* ==========================================================================
   2. PREFLIGHT / RESET
   ========================================================================== */
*, ::before, ::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: #e5e7eb; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; tab-size: 4; font-family: var(--font-sans); scroll-behavior: smooth; }
body { margin: 0; line-height: inherit; background-color: var(--color-navy-950); color: #f8fafc; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
img, svg, video { display: block; vertical-align: middle; max-width: 100%; height: auto; }
button, input { font-family: inherit; font-size: 100%; line-height: inherit; color: inherit; margin: 0; padding: 0; }
a { color: inherit; text-decoration: inherit; }

/* ==========================================================================
   3. GLOBAL UTILITIES & BACKGROUND SYSTEMS
   ========================================================================== */
.bg-noise {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 50; opacity: 0.03;
    background-image: url('images/noise.svg');
    mix-blend-mode: overlay;
}

.fixed-bg-system {
    position: fixed; inset: 0; z-index: -10; width: 100%; height: 100dvh;
    pointer-events: none; background-color: var(--color-navy-950); overflow: hidden;
}

.global-grid {
    background-image: linear-gradient(to right, #1e293b 1px, transparent 1px), linear-gradient(to bottom, #1e293b 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, transparent, 2%, black 20%, black 80%, transparent 98%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, 2%, black 20%, black 80%, transparent 98%);
    opacity: 0.05;
}

/* Performance Optimized Blobs (Hardware Accelerated) */
.blob {
    position: absolute; border-radius: 9999px; filter: blur(128px); opacity: 0.4;
    animation: blob-bounce 25s infinite; mix-blend-mode: screen;
    transform: translate3d(0,0,0); /* Force GPU */
}
.blob-blue { background-color: rgba(2, 132, 199, 0.2); top: -10%; left: -10%; width: 600px; height: 600px; }
.blob-purple { background-color: rgba(139, 92, 246, 0.15); top: 30%; right: -10%; width: 600px; height: 600px; animation-delay: 2s; }
.blob-cyan { background-color: rgba(56, 189, 248, 0.1); bottom: -10%; left: 10%; width: 700px; height: 700px; animation-delay: 4s; }

::selection { background-color: var(--color-electric-500); color: white; }

.container {
    width: 100%; max-width: 80rem; margin-left: auto; margin-right: auto;
    padding-left: 1.5rem; padding-right: 1.5rem;
}
@media (min-width: 1024px) { .container { padding-left: 2rem; padding-right: 2rem; } }

/* ==========================================================================
   4. COMPONENT CLASSES
   ========================================================================== */
/* Buttons */
.btn { display: inline-flex; justify-content: center; align-items: center; font-weight: 600; border-radius: 0.75rem; transition: all var(--duration-normal) var(--ease-out); cursor: pointer; white-space: nowrap; }
.btn-primary { background-color: var(--color-electric-500); color: white; box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.2); position: relative; overflow: hidden; }
.btn-primary:hover { background-color: var(--color-electric-400); transform: translateY(-2px); box-shadow: 0 20px 25px -5px rgba(14, 165, 233, 0.3); }
.btn-secondary { background: rgba(11, 17, 32, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); color: white; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }
.btn-shimmer::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent); transform: skewX(-25deg); animation: shimmer-anim 4s infinite; pointer-events: none; }

/* Cards */
.glass-panel { background: rgba(11, 17, 32, 0.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 1rem; }

/* SPOTLIGHT CARD EFFECT (The Glow) */
.spotlight-card { position: relative; overflow: hidden; transition: border-color 0.3s; }
.spotlight-card:hover { border-color: rgba(14, 165, 233, 0.3); }
.spotlight-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(14, 165, 233, 0.15), transparent 40%); z-index: 1; opacity: 0; transition: opacity 0.5s; pointer-events: none; }
.spotlight-card:hover::before { opacity: 1; }
.spotlight-card > * { position: relative; z-index: 2; }

/* Typography */
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; color: white;
    text-shadow: 0 0 30px rgba(56, 189, 248, 0.2);
    overflow-wrap: break-word;
}
.text-gradient { background: linear-gradient(to right, var(--color-electric-400), var(--color-accent-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.section-title { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.25rem); font-weight: 700; color: white; margin-bottom: 1.5rem; overflow-wrap: break-word;}
.mono-tag { font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.25rem 0.75rem; background: rgba(255,255,255,0.05); border-radius: 0.25rem; color: var(--color-slate-400); }

/* Diagram Styles */
.diagram-node { width: 4rem; height: 4rem; border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; position: relative; }
.diagram-node svg { width: 1.75rem; height: 1.75rem; }
.diagram-connector { position: relative; flex: 1; height: 2px; background: rgba(255,255,255,0.05); overflow: hidden; margin: 0 1rem; }
.diagram-status-row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.75rem; color: var(--color-slate-500); padding: 0.25rem 0; }
.bg-node-navy { background-color: var(--color-navy-900); border: 1px solid rgba(255,255,255,0.1); }
.bg-node-electric { background-color: rgba(14, 165, 233, 0.1); border: 1px solid rgba(14, 165, 233, 0.3); }

/* Layout & Header */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; border-bottom: 1px solid transparent; transition: all 0.5s; }
.site-header.scrolled { background: rgba(2, 6, 23, 0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom-color: rgba(255,255,255,0.1); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 5rem; transition: height 0.5s; }
.site-header.scrolled .header-inner { height: 3rem; }

.desktop-nav { display: none; }
@media (min-width: 768px) { .desktop-nav { display: flex; gap: 2rem; align-items: center; } .desktop-nav a { font-size: 0.875rem; font-weight: 500; color: var(--color-slate-300); transition: color 0.2s; } .desktop-nav a:hover { color: white; } }

#mobile-menu-toggle { display: none; }
.mobile-menu-btn { display: block; padding: 0.5rem; color: var(--color-slate-300); cursor: pointer; }
@media (min-width: 768px) { .mobile-menu-btn { display: none; } }
.mobile-nav-content { display: none; position: absolute; top: 100%; left: 0; right: 0; background: rgba(2, 6, 23, 0.95); backdrop-filter: blur(16px); border-top: 1px solid rgba(255,255,255,0.1); padding: 1rem; flex-direction: column; gap: 1rem; }
#mobile-menu-toggle:checked ~ .container .mobile-nav-content { display: flex; }

/* Sections */
.hero-section { position: relative; padding-top: 8rem; padding-bottom: 5rem; overflow: hidden; }
@media (min-width: 1024px) { .hero-section { padding-top: 14rem; padding-bottom: 8rem; } }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }

.features-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }
.services-grid-override { grid-template-columns: 1fr; }
@media (min-width: 1024px) { .services-grid-override { grid-template-columns: repeat(2, 1fr) !important; } }

/* Calculator */
.calculator-inputs { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 768px) { .calculator-inputs { grid-template-columns: 1fr 1fr; } }
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 20px; width: 20px; border-radius: 50%; background: var(--color-electric-500); margin-top: -6px; cursor: pointer; box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.3); }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 8px; cursor: pointer; background: var(--color-navy-800); border-radius: 4px; }

/* Animations */
@keyframes blob-bounce { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 33% { transform: translate3d(30px, -50px, 0) scale(1.1); } 66% { transform: translate3d(-20px, 20px, 0) scale(0.9); } }
@keyframes shimmer-anim { 0%, 85% { left: -100%; } 100% { left: 200%; } }
.animate-data-flow { animation: flow 2s var(--ease-out) infinite; }
.animate-data-flow-delay { animation: flow 2s var(--ease-out) infinite; animation-delay: 0.3s; }
@keyframes flow { 0% { left: -20%; opacity: 0; } 30% { opacity: 1; } 70% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.pulse-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background-color: var(--color-electric-400); box-shadow: 0 0 10px rgba(56,189,248,0.5); animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.typing-cursor::after { content: '|'; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hidden { display: none; }
@media (min-width: 1024px) { .lg\:block { display: block; } }
@media (min-width: 768px) { .md\:block { display: block; } }

/* About Section Layout */
.about-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
    padding: 2rem;
}

.about-image {
    width: 12rem;
    height: 12rem;
    border-radius: 1rem;
    overflow: hidden;
    border: 4px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .about-card {
        flex-direction: row;
        text-align: left;
        padding: 3rem;
        align-items: center;
    }
}