/* ═══════════════════════════════════════════════
   neuralXcipher — $20K Premium Design System
   ═══════════════════════════════════════════════ */

:root {
    /* Core Palette – Deeper, richer, more sophisticated */
    --bg-primary: #040811;
    --bg-secondary: #0a101f;
    --bg-tertiary: #111827;

    /* Accent Colors */
    --blue-400: #60A5FA;
    --blue-500: #3B82F6;
    --blue-600: #2563EB;
    --purple-400: #A78BFA;
    --purple-500: #8B5CF6;
    --purple-600: #7C3AED;
    --cyan-400: #22D3EE;
    --cyan-500: #06B6D4;
    --emerald-400: #34D399;

    /* Text */
    --text-white: #FFFFFF;
    --text-100: #F1F5F9;
    --text-200: #CBD5E1;
    --text-300: #94A3B8;
    --text-400: #64748B;
    --text-500: #475569;

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.015);
    --glass-bg-hover: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(255, 255, 255, 0.12);

    /* Glow */
    --glow-blue: 0 0 80px rgba(59, 130, 246, 0.15);
    --glow-purple: 0 0 80px rgba(139, 92, 246, 0.15);

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --section-gap: 8rem;
    --card-radius: 24px;

    /* Timing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Reset & Base ─────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-100);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Typography ───────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-white);
}

h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.text-gradient {
    background: linear-gradient(135deg, var(--cyan-400) 0%, var(--blue-500) 40%, var(--purple-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-subtle {
    background: linear-gradient(135deg, var(--text-100) 0%, var(--text-300) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--blue-400);
    margin-bottom: 1.5rem;
}

.section-label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1px;
    background: var(--blue-500);
}

.section-desc {
    font-size: 1.2rem;
    color: var(--text-300);
    max-width: 600px;
    line-height: 1.8;
}

p {
    color: var(--text-300);
    font-size: 1.05rem;
    line-height: 1.8;
}

a {
    text-decoration: none;
    color: var(--text-white);
    transition: 0.3s var(--ease-out-expo);
}

ul {
    list-style: none;
}

/* ─── Layout ───────────────────────────────── */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

section {
    padding: var(--section-gap) 0;
    position: relative;
}

/* ─── Header & Navigation ──────────────────── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.8rem 0;
    z-index: 1000;
    transition: 0.5s var(--ease-out-expo);
    background: transparent;
}

.header.scrolled {
    background: rgba(4, 8, 17, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1001;
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--blue-500);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-400);
    position: relative;
    letter-spacing: 0.02em;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-white);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--blue-500);
    border-radius: 1px;
    transition: 0.4s var(--ease-out-expo);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-cta {
    padding: 0.6rem 1.5rem !important;
    background: rgba(59, 130, 246, 0.1) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    border-radius: 8px !important;
    color: var(--blue-400) !important;
    font-weight: 600 !important;
    transition: 0.3s var(--ease-out-expo) !important;
}

.nav-cta:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: var(--text-white) !important;
}

.nav-cta::after {
    display: none !important;
}

/* ─── Buttons ──────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--purple-600) 100%);
    color: white;
    box-shadow: 0 4px 25px rgba(59, 130, 246, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.btn-primary:hover {
    box-shadow: 0 8px 40px rgba(139, 92, 246, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transform: translateY(-3px);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: 0.6s;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-200);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-3px);
    color: var(--text-white);
}

/* ─── Hamburger ────────────────────────────── */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0.5rem;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-white);
    margin: 5px 0;
    transition: 0.4s var(--ease-out-expo);
    border-radius: 2px;
}

/* ─── Glass Panel — Liquid Premium ─────────── */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(30px) saturate(130%);
    -webkit-backdrop-filter: blur(30px) saturate(130%);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.5s var(--ease-out-expo);
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(255, 255, 255, 0.04),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.6s;
    pointer-events: none;
}

.glass-panel:hover::before {
    opacity: 1;
}

.glass-panel:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Animated gradient border for premium cards */
.gradient-border {
    position: relative;
    z-index: 1;
}

.gradient-border::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--blue-500), var(--purple-500), var(--cyan-500));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s var(--ease-out-expo);
    z-index: -1;
}

.gradient-border:hover::after {
    opacity: 1;
}

/* ─── Footer ───────────────────────────────── */
footer {
    background-color: rgba(2, 4, 8, 0.8);
    padding: 5rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-about p {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    max-width: 300px;
    color: var(--text-400);
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-white);
    letter-spacing: -0.01em;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links ul li a {
    color: var(--text-400);
    font-size: 0.9rem;
    transition: 0.3s;
}

.footer-links ul li a:hover {
    color: var(--blue-400);
    padding-left: 6px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-500);
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-400);
    transition: 0.3s var(--ease-out-expo);
}

.social-links a:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--blue-400);
    transform: translateY(-3px);
}

/* ─── Forms ────────────────────────────────── */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-300);
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: 0.4s var(--ease-out-expo);
}

.form-control:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), var(--glow-blue);
    background: rgba(255, 255, 255, 0.05);
}

.form-control::placeholder {
    color: var(--text-500);
}

textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

/* ─── Cursor Glow (applied via JS) ─────────── */
.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
}

/* ─── Utility ──────────────────────────────── */
.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* ═══════════════════════════ CASE STUDY STYLES ════════════════════════ */
.cs-gallery {
    padding: 2rem 0 6rem;
}

.cs-gallery-header {
    text-align: center;
    margin-bottom: 4rem;
}

.cs-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 991px) {
    .cs-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cs-gallery-grid {
        grid-template-columns: 1fr;
    }
}

.cs-screen {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    aspect-ratio: 9/19;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-screen::before {
    content: '';
    position: absolute;
    top: 15px;
    width: 30%;
    height: 6px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    z-index: 10;
}

.cs-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    transition: 0.5s var(--ease-out-expo);
}

.cs-screen:hover img {
    transform: scale(1.05);
}

.cs-hero {
    position: relative;
    padding: 200px 0 120px;
    background-size: cover;
    background-position: center bottom;
    background-color: var(--bg-100);
    overflow: hidden;
}

.cs-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 4, 9, 0.9) 0%, rgba(3, 4, 9, 0.7) 40%, rgba(3, 4, 9, 0.95) 100%);
    z-index: 1;
}

.cs-hero .container {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.cs-hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

@media (max-width: 768px) {
    .cs-hero h1 {
        font-size: 2.8rem;
    }
}

.cs-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 4rem;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--card-radius);
    text-align: left;
}

@media (max-width: 768px) {
    .cs-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .cs-meta-grid {
        grid-template-columns: 1fr;
    }
}

.cs-meta-item h4 {
    font-size: 0.85rem;
    color: var(--text-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.cs-meta-item p {
    font-size: 1.05rem;
    color: var(--text-100);
    font-weight: 500;
}

.cs-section {
    padding: 5rem 0;
}

.cs-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 768px) {
    .cs-grid-2 {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.cs-text-block h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cs-text-block p {
    font-size: 1.1rem;
    color: var(--text-300);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.cs-feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

@media (max-width: 576px) {
    .cs-feature-list {
        grid-template-columns: 1fr;
    }
}

.cs-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.cs-feature-item i {
    font-size: 1.5rem;
    color: var(--blue-400);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
}

.cs-feature-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.cs-feature-item p {
    font-size: 0.9rem;
    color: var(--text-400);
    margin: 0;
}

.cs-image-box img {
    width: 100%;
    border-radius: var(--card-radius);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.pf-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--blue-400);
    font-weight: 500;
    margin-top: 1.25rem;
}

.pf-link:hover {
    color: var(--text-white);
    gap: 0.6rem;
}