/* ===================================
   IMPALEO - Design System
   Elegant Technology & Software House
   =================================== */

/* ===== CSS Custom Properties ===== */
:root {
    /* Colors - Elegant Monochromatic Palette */
    --color-black: #000000;
    --color-dark: #0f0f0f;
    --color-gray-900: #1a1a1a;
    --color-gray-800: #2a2a2a;
    --color-gray-700: #3a3a3a;
    --color-gray-600: #5a5a5a;
    --color-gray-400: #8a8a8a;
    --color-gray-300: #b0b0b0;
    --color-gray-200: #d0d0d0;
    --color-white: #ffffff;

    /* Subtle Accent Colors */
    --color-accent-primary: #2a2a2a;
    --color-accent-secondary: #404040;
    --color-accent-light: #e8e8e8;

    /* Gradients - Subtle and Elegant */
    --gradient-primary: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    --gradient-secondary: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);
    --gradient-dark: linear-gradient(180deg, #000000 0%, #1a1a1a 100%);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;

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

    /* 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 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(255, 255, 255, 0.05);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

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

    /* Z-index */
    --z-base: 1;
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-fixed: 30;
    --z-modal: 40;
    --z-popover: 50;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--text-6xl);
    margin-bottom: var(--space-6);
}

h2 {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-5);
}

h3 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

p {
    margin-bottom: var(--space-4);
    color: var(--color-gray-300);
}

a {
    color: var(--color-gray-300);
    text-decoration: none;
    transition: color var(--transition-base);
}

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

/* ===== Layout Components ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

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

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 1);
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-6);
    max-width: 1280px;
    margin: 0 auto;
}

.logo {
    height: 40px;
    transition: transform var(--transition-base);
}

.logo:hover {
    transform: scale(1.05);
}

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

.nav-links a {
    color: var(--color-gray-700);
    font-weight: 500;
    font-size: var(--text-base);
    position: relative;
    transition: color var(--transition-base);
}

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

.nav-links a:hover {
    color: var(--color-black);
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-black);
    font-size: var(--text-2xl);
    cursor: pointer;
    padding: var(--space-2);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-dark);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: var(--z-base);
    text-align: center;
    max-width: 900px;
    padding: var(--space-8);
}

.hero-title {
    font-size: var(--text-7xl);
    font-weight: 800;
    margin-bottom: var(--space-6);
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: var(--text-2xl);
    color: var(--color-gray-300);
    margin-bottom: var(--space-8);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--color-white);
    color: var(--color-black);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ===== Cards ===== */
.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-xl);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-4);
    color: var(--color-white);
}

.card-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-3);
    color: var(--color-white);
}

.card-description {
    color: var(--color-gray-400);
    line-height: 1.7;
}

/* ===== Grid Layouts ===== */
.grid {
    display: grid;
    gap: var(--space-8);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ===== Section Headers ===== */
.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-title {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-4);
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: var(--text-xl);
    color: var(--color-gray-400);
    max-width: 700px;
    margin: 0 auto;
}

/* ===== Technology Tags ===== */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
    margin-top: var(--space-8);
}

.tech-tag {
    padding: var(--space-3) var(--space-6);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-gray-300);
    transition: all var(--transition-base);
    cursor: default;
}

.tech-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-white);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* Language Switcher - Minimalist */
.language-switcher {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: var(--space-6);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--color-gray-400);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    padding: var(--space-1);
    transition: color var(--transition-base);
}

.lang-btn:hover {
    color: var(--color-black);
}

.lang-btn.active {
    color: var(--color-black);
    font-weight: 700;
}

.lang-separator {
    color: var(--color-gray-300);
    font-size: var(--text-xs);
    margin: 0 2px;
}

/* ===== Contact Section ===== */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--color-gray-300);
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-white);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

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

/* ===== Footer ===== */
.footer {
    background: var(--color-white);
    color: var(--color-black);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Keep distinct separator from dark section above */
    padding: var(--space-12) 0 var(--space-6);
    margin-top: var(--space-24);
}

/* Override for Services Grid to center the last row */
#services .grid-2 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#services .card {
    flex: 1 1 300px;
    max-width: 500px;
    /* Prevent cards from getting too wide on large screens */
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.footer-section h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
    color: var(--color-black);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: var(--color-gray-600);
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: var(--color-black);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-6);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--color-gray-600);
    font-size: var(--text-sm);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

.fade-in-up {
    animation: fadeInUp 1s ease-out;
}

/* Scroll animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    :root {
        --text-7xl: 3rem;
        --text-6xl: 2.5rem;
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--space-6);
        gap: var(--space-4);
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        transform: translateX(0);
    }

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

    .hero-title {
        font-size: var(--text-5xl);
    }

    .hero-subtitle {
        font-size: var(--text-lg);
    }

    .hero-cta {
        flex-direction: column;
    }

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

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-4);
    }

    .card {
        padding: var(--space-6);
    }

    .btn {
        width: 100%;
    }
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-8 {
    margin-bottom: var(--space-8);
}