/* ========================================================================
   Fahralarm - Energetic Professional GPS Tracking
   Main Stylesheet: Modern Tech Energy
   ======================================================================== */

/* ========================================================================
   CSS Variables - Vibrant Energy System
   ======================================================================== */

:root {
    /* Energetic Color Palette */
    --color-navy: #0a0e27;
    --color-navy-light: #151b3d;
    --color-gray-900: #1e293b;
    --color-gray-700: #334155;
    --color-gray-600: #475569;
    --color-gray-500: #64748b;
    --color-gray-400: #94a3b8;
    --color-gray-300: #cbd5e1;
    --color-gray-200: #e2e8f0;
    --color-gray-100: #f1f5f9;
    --color-gray-50: #f8fafc;
    --color-white: #ffffff;

    /* Vibrant Brand Colors */
    --color-primary: #0ea5e9;
    --color-primary-dark: #0284c7;
    --color-primary-light: #38bdf8;
    --color-accent: #8b5cf6;
    --color-accent-bright: #a78bfa;
    --color-success: #10b981;
    --color-warning: #f59e0b;

    /* Dynamic Gradients */
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    --gradient-hero: linear-gradient(135deg, #0a0e27 0%, #1e1b4b 50%, #312e81 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
    --gradient-mesh: radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.3) 0px, transparent 50%),
                     radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.3) 0px, transparent 50%),
                     radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.2) 0px, transparent 50%),
                     radial-gradient(at 0% 100%, rgba(59, 130, 246, 0.2) 0px, transparent 50%);

    /* Typography */
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Font Sizes */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;

    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Shadows - Enhanced */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 4px 12px rgba(14, 165, 233, 0.15);
    --shadow-glow-accent: 0 4px 16px rgba(139, 92, 246, 0.2);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-Index */
    --z-base: 1;
    --z-dropdown: 10;
    --z-sticky: 100;
    --z-nav: 1000;
    --z-modal: 2000;
    --z-toast: 3000;

    /* Container */
    --container-max: 1200px;
    --container-padding: 1.5rem;
}

@media (max-width: 768px) {
    :root {
        --font-size-3xl: 1.5rem;
        --font-size-4xl: 1.875rem;
        --font-size-5xl: 2.25rem;
        --font-size-6xl: 2.5rem;
    }
}

/* ========================================================================
   Reset & Normalize
   ======================================================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--color-gray-700);
    background: var(--color-white);
    overflow-x: hidden;
    position: relative;
}

/* Animated gradient mesh background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-mesh);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
    animation: meshShift 20s ease-in-out infinite;
}

@keyframes meshShift {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.background-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: gridFlow 30s linear infinite;
}

@keyframes gridFlow {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* ========================================================================
   Typography - Bold & Dynamic
   ======================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: var(--space-4);
    color: var(--color-gray-900);
    letter-spacing: -0.03em;
}

h1 {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-extrabold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-extrabold);
}

h3 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
}

h4 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
}

p {
    margin-bottom: var(--space-4);
    color: var(--color-gray-600);
    line-height: 1.7;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-light);
}

ul, ol {
    list-style: none;
}

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

/* ========================================================================
   Layout System
   ======================================================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    position: relative;
    z-index: 1;
}

.section {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
    position: relative;
}

@media (max-width: 768px) {
    .section {
        padding-top: var(--space-16);
        padding-bottom: var(--space-16);
    }
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

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

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-extrabold);
    color: var(--color-gray-900);
    margin-bottom: var(--space-4);
    letter-spacing: -0.03em;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
    animation: expandWidth 0.8s ease-out 0.3s forwards;
    transform-origin: left;
    transform: scaleX(0);
}

@keyframes expandWidth {
    to {
        transform: scaleX(1);
    }
}

.section-description {
    font-size: var(--font-size-lg);
    color: var(--color-gray-600);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* ========================================================================
   Grid System
   ======================================================================== */

.grid {
    display: grid;
    gap: var(--space-8);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ========================================================================
   Utility Classes
   ======================================================================== */

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

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

/* ========================================================================
   Icon System
   ======================================================================== */

.icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-sm {
    width: 20px;
    height: 20px;
}

.icon-lg {
    width: 32px;
    height: 32px;
}

.icon-xl {
    width: 48px;
    height: 48px;
}

.icon-check {
    width: 20px;
    height: 20px;
    stroke: var(--color-primary);
}

/* ========================================================================
   Responsive Utilities
   ======================================================================== */

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ========================================================================
   Accessibility
   ======================================================================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-navy);
    color: var(--color-white);
    padding: var(--space-2) var(--space-4);
    text-decoration: none;
    z-index: var(--z-toast);
}

.skip-link:focus {
    top: 0;
}

*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================================================
   Print Styles
   ======================================================================== */

@media print {
    .nav,
    .footer,
    .cookie-banner {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    body::before,
    .background-texture {
        display: none;
    }

    a {
        text-decoration: underline;
    }

    .section {
        page-break-inside: avoid;
    }
}
