﻿/* =========================================
   1. Variables & Configuration
   ========================================= */
:root {
    /* Brand Colors */
    --brand-dark: #111827;
    --brand-dark-lighter: #1F2937;
    --brand-primary: #0D6EFD;
    --brand-primary-hover: #0b5ed7;
    --brand-accent: #10B981;
    --brand-purple: #8B5CF6;

    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-100: #F3F4F6;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Spacing & Sizing */
    --container-width: 1280px;
    --header-height: 80px;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* =========================================
   2. Reset & Base Styles
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--brand-dark);
    color: var(--gray-300);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img,
svg {
    display: block;
    max-width: 100%;
}

main {
    min-height: calc(100vh - var(--header-height));
}

:target {
    scroll-margin-top: calc(var(--header-height) + 1rem);
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    background: var(--brand-primary);
    color: var(--white);
    padding: 0.65rem 0.95rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.skip-link:focus-visible {
    top: 1rem;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 3px;
}

/* =========================================
   3. Utility Classes (Mapping Old Classes)
   ========================================= */
/* Container */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Flexbox */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.space-x-8>*+* {
    margin-left: 2rem;
}

.space-x-6>*+* {
    margin-left: 1.5rem;
}

.space-y-4>*+* {
    margin-top: 1rem;
}

.space-y-8>*+* {
    margin-top: 2rem;
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-12 {
    gap: 3rem;
}

.gap-16 {
    gap: 4rem;
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:flex-row {
        flex-direction: row;
    }

    .md\:hidden {
        display: none;
    }

    .md\:block {
        display: block;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Colors & Backgrounds */
.bg-brand-dark {
    background-color: var(--brand-dark);
}

.bg-gray-900 {
    background-color: var(--gray-900);
}

.bg-gray-800 {
    background-color: var(--gray-800);
}

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

.text-white {
    color: var(--white);
}

.text-gray-300 {
    color: var(--gray-300);
}

.text-gray-400 {
    color: var(--gray-400);
}

.text-brand-primary {
    color: var(--brand-primary);
}

.text-transparent {
    color: transparent;
}

/* Gradients */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-brand-primary {
    --tw-gradient-from: var(--brand-primary);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(13, 110, 253, 0));
}

.from-blue-400 {
    --tw-gradient-from: #60a5fa;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(96, 165, 250, 0));
}

.to-purple-600 {
    --tw-gradient-to: #7c3aed;
}

.to-emerald-400 {
    --tw-gradient-to: #34d399;
}

.to-purple-400 {
    --tw-gradient-to: #a78bfa;
}

/* Display & Position */
.hidden {
    display: none;
}

.block {
    display: block;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-50 {
    z-index: 50;
}

.z-10 {
    z-index: 10;
}

/* Typography */
.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.font-semibold {
    font-weight: 600;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-5xl {
    font-size: 3rem;
}

.uppercase {
    text-transform: uppercase;
}

.text-center {
    text-align: center;
}

/* Spacing */
.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-24 {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

/* Borders & Rounding */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-full {
    border-radius: 9999px;
}

.border {
    border-width: 1px;
}

.border-gray-700 {
    border-color: var(--gray-700);
}

.border-b {
    border-bottom-width: 1px;
}

/* Effects */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.backdrop-blur-lg {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.opacity-30 {
    opacity: 0.3;
}

/* Transitions & Micro-interactions */
.transition {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}

.hover\:text-brand-primary:hover {
    color: var(--brand-primary);
}

.hover\:text-white:hover {
    color: var(--white);
}

.hover\:bg-blue-600:hover {
    background-color: var(--brand-primary-hover);
}

.hover\:-translate-y-2:hover {
    transform: translateY(-0.5rem);
}

.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:text-brand-primary {
    color: var(--brand-primary);
}

/* =========================================
   4. Component Specific Styles
   ========================================= */

/* Hero Animations */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Glass Card */
.glass-card {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Service Cards */
article.group {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid rgba(55, 65, 81, 0.5);
    transition: all 0.3s ease;
}

article.group:hover {
    border-color: rgba(13, 110, 253, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Mobile Menu */
@media (max-width: 768px) {
    #mobile-menu {
        display: none;
    }

    #mobile-menu:not(.hidden) {
        display: block;
    }
}
