/* ============================================
   FREELANCE IT PROFESSIONAL - STYLE.CSS
   Dark Mode First | Modern | Accessible
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* Color Palette - Dark Mode First */
    --color-background: #0f1115;
    --color-surface: #1a1d24;
    --color-surface-elevated: #22262f;
    --color-border: #2a2f3a;

    /* Text Colors */
    --color-text-primary: #e6e8ee;
    --color-text-secondary: #b5b9c6;
    --color-text-muted: #6b7280;

    /* Accent Colors */
    --color-accent: #4da3ff;
    --color-accent-hover: #6bb3ff;
    --color-accent-glow: rgba(77, 163, 255, 0.15);
    --color-accent-secondary: #6ee7b7;

    /* Functional Colors */
    --color-success: #10b981;
    --color-error: #ef4444;

    /* Typography */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

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

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--color-accent-glow);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --max-width: 1200px;
    --nav-height: 72px;
}

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Focus states for accessibility */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Remove default focus for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
    color: var(--color-text-secondary);
}

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

a:hover {
    color: var(--color-accent-hover);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-4xl) 0;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Fade-in animation for scroll reveal */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

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

/* Staggered animation delays */
.fade-in-delay-1 { transition-delay: 100ms; }
.fade-in-delay-2 { transition-delay: 200ms; }
.fade-in-delay-3 { transition-delay: 300ms; }
.fade-in-delay-4 { transition-delay: 400ms; }
.fade-in-delay-5 { transition-delay: 500ms; }
.fade-in-delay-6 { transition-delay: 600ms; }
.fade-in-delay-7 { transition-delay: 700ms; }
.fade-in-delay-8 { transition-delay: 800ms; }
.fade-in-delay-9 { transition-delay: 900ms; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
}

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

.btn-primary:hover {
    background: var(--color-accent-hover);
    color: var(--color-background);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-2px);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 17, 21, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition-base);
}

.nav.scrolled {
    background: rgba(15, 17, 21, 0.95);
    border-bottom-color: var(--color-border);
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-decoration: none;
}

.nav-logo:hover {
    color: var(--color-text-primary);
}

.nav-logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary));
    border-radius: var(--radius-md);
}

.nav-logo-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--color-background);
}

.nav-logo-img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.nav-link {
    position: relative;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--color-text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu button */
.nav-mobile-toggle {
    display: none;
    padding: var(--space-sm);
    background: none;
    border: none;
    cursor: pointer;
}

.nav-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    margin: 6px 0;
    transition: all var(--transition-base);
}

.nav-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.nav-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-switcher:hover {
    background: var(--color-surface);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.lang-switcher i {
    font-size: 1rem;
}

.lang-switcher-current {
    min-width: 1.5rem;
    text-align: center;
}

/* Mobile navigation */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: var(--space-lg);
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

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

    .nav-links li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: var(--space-md);
        border-radius: var(--radius-md);
    }

    .nav-link:hover {
        background: var(--color-surface-elevated);
    }

    .nav-link::after {
        display: none;
    }

    .nav-mobile-toggle {
        display: block;
    }

    .lang-switcher {
        position: absolute;
        right: 60px;
        padding: var(--space-xs) var(--space-sm);
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    overflow: hidden;
}

/* Video Background */
.hero-video-wrapper {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 17, 21, 0.85);
}

/* Decorative background elements */
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-bg-gradient {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}

.hero-bg-gradient--1 {
    top: -200px;
    right: -100px;
    background: var(--color-accent);
}

.hero-bg-gradient--2 {
    bottom: -200px;
    left: -100px;
    background: var(--color-accent-secondary);
}

.hero-content {
    position: relative;
    max-width: 800px;
}

.hero-headline {
    margin-bottom: var(--space-lg);
}

.hero-subheadline {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2xl);
    max-width: 600px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    animation: bounce 2s infinite;
}

.hero-scroll-indicator svg,
.hero-scroll-indicator i {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    font-size: 1.25rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-8px);
    }
    60% {
        transform: translateX(-50%) translateY(-4px);
    }
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services {
    background: var(--color-surface);
}

.services-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.services-header p {
    font-size: 1.125rem;
    margin-top: var(--space-md);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
}

/* Service Card */
.service-card {
    position: relative;
    padding: var(--space-xl);
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-lg), 0 0 40px var(--color-accent-glow);
}

.service-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-glow);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.service-card-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-accent);
    fill: none;
    stroke-width: 1.5;
}

.service-card-icon i {
    font-size: 1.75rem;
    color: var(--color-accent);
}

.service-card-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.service-card-description {
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ============================================
   TRUST SECTION - Why Self-Hosted?
   ============================================ */
.trust {
    background: var(--color-background);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.trust-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 900px) {
    .trust-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

/* Trust Card */
.trust-card {
    text-align: center;
    padding: var(--space-xl);
}

.trust-card-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.trust-card-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--color-text-secondary);
    fill: none;
    stroke-width: 1.5;
}

.trust-card-icon i {
    font-size: 3rem;
    color: var(--color-text-secondary);
}

.trust-card-title {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.trust-card-description {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    background: var(--color-background);
    position: relative;
    overflow: hidden;
}

/* Decorative background */
.contact-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.contact-bg-gradient {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.2;
}

.contact-bg-gradient--1 {
    top: 0;
    left: 20%;
    background: var(--color-accent);
}

.contact-bg-gradient--2 {
    bottom: 0;
    right: 20%;
    background: var(--color-accent-secondary);
}

.contact-container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}

.contact-content h2 {
    margin-bottom: var(--space-lg);
}

.contact-content p {
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Contact Form */
.contact-form {
    padding: var(--space-2xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text-primary);
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-muted);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* Form validation states */
.form-input.error,
.form-textarea.error {
    border-color: var(--color-error);
}

.form-error {
    display: none;
    font-size: 0.8125rem;
    color: var(--color-error);
    margin-top: var(--space-xs);
}

.form-group.has-error .form-error {
    display: block;
}

.form-submit {
    width: 100%;
}

/* Form success message */
.form-success {
    display: none;
    padding: var(--space-xl);
    text-align: center;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--color-success);
    border-radius: var(--radius-lg);
}

.form-success.visible {
    display: block;
}

.form-success-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    background: var(--color-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-success-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
    fill: none;
}

.form-success-icon i {
    font-size: 1.5rem;
    color: white;
}

.form-success h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.form-success p {
    color: var(--color-text-secondary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: var(--space-2xl) 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text-primary);
    text-decoration: none;
}

.footer-logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary));
    border-radius: var(--radius-sm);
}

.footer-logo-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--color-background);
}

.footer-logo-img {
    height: 64px;
    width: auto;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.footer-link {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.footer-link:hover {
    color: var(--color-accent);
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

@media (max-width: 640px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   ACCESSIBILITY - Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   SKIP LINK (Accessibility)
   ============================================ */
.skip-link {
    position: fixed;
    top: -100px;
    left: var(--space-md);
    z-index: 9999;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-accent);
    color: var(--color-background);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-md);
}
