/* Cross-browser reset and normalization */
* {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* IE10+ box-sizing fix */
*, *::before, *::after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Performance optimizations */
img, video {
    max-width: 100%;
    height: auto;
}

/* GPU acceleration for animations - Cross-browser */
.hero-video,
.hero-overlay,
.project-item,
.service-item,
.about-text,
.section-title {
    will-change: transform, opacity;
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    -moz-perspective: 1000;
    perspective: 1000;
}

:root {
    --primary-color: #2A2A2A;
    --secondary-color: #FFFFFF;
    --accent-color: #D4AF37;
    --text-color: #FFFFFF;
    --text-secondary: #D0D0D0;
    --bg-color: #2A2A2A;
    --gray-light: #3A3A3A;
    --gray-dark: #1F1F1F;
    --section-bg: #2F2F2F;
    --cta-primary: #2563EB;
    --cta-secondary: #1FA971;
    --shadow-gold: rgba(212, 175, 55, 0.15);
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-scroll-behavior: smooth;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    background-color: var(--primary-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(42, 42, 42, 0.98);
    color: #FFFFFF;
    padding: 30px;
    z-index: 10000;
    -webkit-transform: translateY(100%);
    -moz-transform: translateY(100%);
    -ms-transform: translateY(100%);
    -o-transform: translateY(100%);
    transform: translateY(100%);
    -webkit-transition: -webkit-transform 0.4s ease, transform 0.4s ease;
    -moz-transition: -moz-transform 0.4s ease, transform 0.4s ease;
    -o-transition: -o-transform 0.4s ease, transform 0.4s ease;
    transition: transform 0.4s ease;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 175, 55, 0.2);
    border-top: 2px solid var(--accent-color);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    /* Fallback for browsers without backdrop-filter */
    background: rgba(42, 42, 42, 0.98);
}

.cookie-consent.show {
    -webkit-transform: translateY(0);
    -moz-transform: translateY(0);
    -ms-transform: translateY(0);
    -o-transform: translateY(0);
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-content p {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.cookie-buttons {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-gap: 15px;
    gap: 15px;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.cookie-btn:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.cookie-btn.accept {
    background: var(--cta-primary);
    color: var(--secondary-color);
    border-color: var(--cta-primary);
}

.cookie-btn.accept:hover {
    background: var(--cta-secondary);
    border-color: var(--cta-secondary);
    color: var(--secondary-color);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(42, 42, 42, 0.9);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    /* Fallback */
    background: rgba(42, 42, 42, 0.9);
    z-index: 1000;
    padding: 0;
    height: 65px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -moz-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    height: 100%;
}

.nav-logo {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    height: 100%;
    margin: 0;
    padding: 0;
}

.logo-image {
    height: 80px;
    width: auto;
    display: block;
    margin-top: 10px;
    margin-left: -7px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.nav-logo:hover .logo-image {
    -webkit-transform: scale(1.05) translateY(-2px);
    -moz-transform: scale(1.05) translateY(-2px);
    -ms-transform: scale(1.05) translateY(-2px);
    -o-transform: scale(1.05) translateY(-2px);
    transform: scale(1.05) translateY(-2px);
}

.logo-text {
    display: inline-block;
    animation: fadeInDown 0.6s ease;
}

.nav-menu {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    list-style: none;
    -webkit-box-gap: 40px;
    gap: 40px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 15px;
    position: relative;
    transition: all 0.3s ease;
}

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

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.5);
}

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

.nav-toggle {
    display: none;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    cursor: pointer;
    -webkit-box-gap: 5px;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
}

/* Language Switcher */
.language-switcher {
    position: relative;
    margin-left: 20px;
}

.language-switcher-btn {
    width: 44px;
    height: 44px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    background: rgba(42, 42, 42, 0.85);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--secondary-color);
    position: relative;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.language-switcher-btn:hover {
    border-color: var(--accent-color);
    background: rgba(212, 175, 55, 0.14);
    color: var(--accent-color);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.18), 0 0 0 1px rgba(212, 175, 55, 0.12);
    transform: translateY(-1px);
}

.language-switcher-btn.active {
    border-color: var(--accent-color);
    background: rgba(212, 175, 55, 0.18);
    box-shadow: 0 8px 22px rgba(212, 175, 55, 0.22), 0 0 0 1px rgba(212, 175, 55, 0.15);
}

.language-switcher-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.35);
}

.language-switcher-btn .language-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.language-switcher-btn .language-icon svg {
    width: 20px;
    height: 20px;
    display: block;
    stroke: currentColor;
    fill: none;
}

.language-switcher-btn .lang-badge {
    position: absolute;
    bottom: -7px;
    right: -7px;
    background: var(--accent-color);
    color: var(--primary-color);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 3px 7px;
    border-radius: 999px;
    border: 1px solid rgba(42, 42, 42, 0.85);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(212, 175, 55, 0.15);
    text-transform: uppercase;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: rgba(42, 42, 42, 0.98);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 12px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 
                0 0 0 1px rgba(212, 175, 55, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    z-index: 1001;
    overflow: hidden;
    padding: 4px;
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.language-option {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    width: 100%;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 12px 16px;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    border-radius: 8px;
    margin: 2px 0;
    min-height: 48px;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.language-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent-color);
    transform: scaleY(0);
    transition: transform 0.25s ease;
}

.language-option:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--accent-color);
    padding-left: 20px;
    transform: translateX(4px);
}

.language-option:hover::before {
    transform: scaleY(1);
}

.language-option.active {
    background: rgba(212, 175, 55, 0.25);
    color: var(--accent-color);
    font-weight: 600;
    padding-left: 20px;
}

.language-option.active::before {
    transform: scaleY(1);
}

.language-option .lang-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 12px;
    min-width: 52px;
    height: 28px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.9px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 999px;
}

.language-option.active .lang-code {
    color: var(--accent-color);
    background: rgba(212, 175, 55, 0.16);
    border-color: rgba(212, 175, 55, 0.35);
}

.language-option .lang-name {
    flex: 1;
    font-weight: 500;
}

/* Hero Section - Mobile First */
.hero {
    min-height: 100vh;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 80px 20px 60px;
    position: relative;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    /* object-fit fallback for IE/Edge */
    object-fit: cover;
    -o-object-fit: cover;
    object-position: center;
    -o-object-position: center;
    -webkit-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    -o-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    -webkit-filter: brightness(1.05) contrast(1.1) saturate(1.1);
    filter: brightness(1.05) contrast(1.1) saturate(1.1);
}

/* Fallback background if video doesn't load */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Cross-browser gradient support */
    background: rgba(42, 42, 42, 0.4);
    background: -webkit-linear-gradient(top, rgba(42, 42, 42, 0.6) 0%, rgba(42, 42, 42, 0.15) 30%);
    background: -moz-linear-gradient(top, rgba(42, 42, 42, 0.6) 0%, rgba(42, 42, 42, 0.15) 30%);
    background: -o-linear-gradient(top, rgba(42, 42, 42, 0.6) 0%, rgba(42, 42, 42, 0.15) 30%);
    background: 
        /* Светлый градиент сверху */
        linear-gradient(to bottom, rgba(42, 42, 42, 0.6) 0%, rgba(42, 42, 42, 0.15) 30%),
        /* Светлый градиент снизу */
        linear-gradient(to top, rgba(42, 42, 42, 0.6) 0%, rgba(42, 42, 42, 0.15) 30%),
        /* Мягкое затемнение по краям */
        radial-gradient(ellipse at center, rgba(42, 42, 42, 0.1) 0%, rgba(42, 42, 42, 0.5) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Плавный переход от hero к следующей секции */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* Fallback for browsers without clamp() */
    height: 100px;
    height: clamp(100px, 15vh, 150px);
    background: -webkit-linear-gradient(top, transparent, var(--primary-color));
    background: -moz-linear-gradient(top, transparent, var(--primary-color));
    background: -o-linear-gradient(top, transparent, var(--primary-color));
    background: linear-gradient(to bottom, transparent, var(--primary-color));
    z-index: 2;
    pointer-events: none;
}

/* Video scaling improvements - Cross-browser */
.hero-video {
    -webkit-filter: brightness(1.05) contrast(1.1) saturate(1.1);
    filter: brightness(1.05) contrast(1.1) saturate(1.1);
    will-change: transform;
    -webkit-transform: translate(-50%, -50%) scale(1);
    -moz-transform: translate(-50%, -50%) scale(1);
    -ms-transform: translate(-50%, -50%) scale(1);
    -o-transform: translate(-50%, -50%) scale(1);
    transform: translate(-50%, -50%) scale(1);
}

/* Ensure video covers properly on all screens */
@media (min-width: 1024px) and (max-width: 1680px) {
    .hero-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        -o-object-fit: cover;
        object-position: center;
        -o-object-position: center;
    }
}

.hero-content {
    text-align: center;
    max-width: 100%;
    width: 100%;
    padding: 0 20px;
    animation: fadeInUp 1s ease;
    position: relative;
    z-index: 2;
    color: #fff;
    margin: 0 auto;
}

.hero-title {
    /* Fallback for browsers without clamp() */
    font-size: 32px;
    font-size: clamp(32px, 8vw, 64px);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 30px;
    letter-spacing: -1px;
    -webkit-text-shadow: 0 4px 30px rgba(212, 175, 55, 0.3), 0 2px 10px rgba(0, 0, 0, 0.5);
    text-shadow: 0 4px 30px rgba(212, 175, 55, 0.3), 0 2px 10px rgba(0, 0, 0, 0.5);
}

.x-gold {
    color: #D4AF37;
}

.title-line {
    display: block;
    animation: smoothFadeIn 1.2s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    opacity: 0;
}

.title-line:nth-child(1) {
    animation-delay: 0.2s;
}

.title-line:nth-child(2) {
    animation-delay: 0.4s;
}

@keyframes smoothFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    /* Fallback for browsers without clamp() */
    font-size: 16px;
    font-size: clamp(16px, 3.5vw, 24px);
    line-height: 1.5;
    font-weight: 400;
    margin-bottom: 30px;
    -webkit-animation: smoothFadeIn 1.4s cubic-bezier(0.25, 0.1, 0.25, 1) 0.6s forwards;
    -moz-animation: smoothFadeIn 1.4s cubic-bezier(0.25, 0.1, 0.25, 1) 0.6s forwards;
    -o-animation: smoothFadeIn 1.4s cubic-bezier(0.25, 0.1, 0.25, 1) 0.6s forwards;
    animation: smoothFadeIn 1.4s cubic-bezier(0.25, 0.1, 0.25, 1) 0.6s forwards;
    opacity: 0;
    color: var(--accent-color);
    -webkit-text-shadow: 0 2px 20px rgba(212, 175, 55, 0.4), 0 1px 5px rgba(0, 0, 0, 0.3);
    text-shadow: 0 2px 20px rgba(212, 175, 55, 0.4), 0 1px 5px rgba(0, 0, 0, 0.3);
}

.hero-subtitle p {
    margin: 0;
}

.hero-description {
    /* Fallback for browsers without clamp() */
    font-size: 14px;
    font-size: clamp(14px, 2.2vw, 20px);
    line-height: 1.6;
    font-weight: 300;
    opacity: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-description p {
    margin: 8px 0;
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
    position: relative;
    z-index: 2;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    -o-transform: translateX(-50%);
    transform: translateX(-50%);
    -webkit-animation: bounce 2s infinite;
    -moz-animation: bounce 2s infinite;
    -o-animation: bounce 2s infinite;
    animation: bounce 2s infinite;
    z-index: 2;
}

/* About Section - Mobile First */
.about {
    padding: 80px 20px;
    background: linear-gradient(to bottom, var(--section-bg), var(--primary-color));
    position: relative;
    margin-top: -100px;
    padding-top: 180px;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Fallback for browsers without clamp() */
    height: 100px;
    height: clamp(100px, 15vh, 150px);
    background: -webkit-linear-gradient(top, var(--primary-color), var(--section-bg));
    background: -moz-linear-gradient(top, var(--primary-color), var(--section-bg));
    background: -o-linear-gradient(top, var(--primary-color), var(--section-bg));
    background: linear-gradient(to bottom, var(--primary-color), var(--section-bg));
    z-index: 0;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.about-text {
    /* Fallback for browsers without clamp() */
    font-size: 16px;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
    margin-bottom: 30px;
    opacity: 0;
    -webkit-transition: all 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
    -moz-transition: all 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
    -o-transition: all 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: all 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text-secondary);
}

.about-text:nth-child(1) {
    transform: translateX(-80px);
    transition-delay: 0.1s;
}

.about-text:nth-child(2) {
    transform: translateX(80px);
    transition-delay: 0.3s;
}

.about-text:nth-child(3) {
    transform: translateX(-80px);
    transition-delay: 0.5s;
}

.about-text.visible {
    opacity: 1;
    -webkit-transform: translateX(0);
    -moz-transform: translateX(0);
    -ms-transform: translateX(0);
    -o-transform: translateX(0);
    transform: translateX(0);
}

/* Portfolio Section */
.portfolio {
    padding: 100px 20px;
    background: linear-gradient(to bottom, var(--primary-color), var(--section-bg));
    position: relative;
}

.portfolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top center, var(--shadow-gold), transparent 70%);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.section-title {
    /* Fallback for browsers without clamp() */
    font-size: 28px;
    font-size: clamp(28px, 4.5vw, 56px);
    font-weight: 800;
    margin-bottom: 50px;
    text-align: center;
    opacity: 0;
    -webkit-transform: scale(0.8) rotate(-5deg);
    -moz-transform: scale(0.8) rotate(-5deg);
    -ms-transform: scale(0.8) rotate(-5deg);
    -o-transform: scale(0.8) rotate(-5deg);
    transform: scale(0.8) rotate(-5deg);
    -webkit-transition: all 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
    -moz-transition: all 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
    -o-transition: all 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: all 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--secondary-color);
    position: relative;
    z-index: 1;
    -webkit-text-shadow: 0 2px 20px rgba(212, 175, 55, 0.2);
    text-shadow: 0 2px 20px rgba(212, 175, 55, 0.2);
}

.section-title.visible {
    opacity: 1;
    -webkit-transform: scale(1) rotate(0deg);
    -moz-transform: scale(1) rotate(0deg);
    -ms-transform: scale(1) rotate(0deg);
    -o-transform: scale(1) rotate(0deg);
    transform: scale(1) rotate(0deg);
}

.project-item {
    margin-bottom: 80px;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.project-item:nth-child(odd) {
    transform: translateX(-100px) rotateY(-15deg);
    transform-style: preserve-3d;
}

.project-item:nth-child(even) {
    transform: translateX(100px) rotateY(15deg);
    transform-style: preserve-3d;
}

.project-item.visible {
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
}

.project-item.visible .project-image {
    animation: projectReveal 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes projectReveal {
    from {
        opacity: 0;
        transform: scale(0.9) translateZ(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateZ(0);
    }
}

.project-image {
    width: 100%;
    height: 600px;
    background: #E5E5E5;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(212, 175, 55, 0.1);
}

.project-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}


.project-image:hover {
    border-color: var(--accent-color);
    box-shadow: 0 12px 48px rgba(212, 175, 55, 0.3), 0 0 0 1px rgba(212, 175, 55, 0.3);
    transform: translateY(-8px);
}

.project-item:nth-child(2) .project-image {
    background: #E5E5E5;
}

.project-item:nth-child(3) .project-image {
    background: #E5E5E5;
}


.project-image:hover {
    transform: scale(1.02);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20%;
    padding: 20px 40px 20px 15px;
    background: linear-gradient(to top, rgba(27, 27, 27, 0.97) 0%, rgba(27, 27, 27, 0.92) 50%, rgba(27, 27, 27, 0.7) 100%);
    color: var(--secondary-color);
    transform: translateY(20px);
    transition: transform 0.4s ease;
    border-top: 2px solid var(--accent-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-image:hover .project-overlay {
    transform: translateY(0);
}

.project-client {
    font-size: clamp(12px, 2vw, 24px);
    font-weight: 900;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    line-height: 1.2;
}

.project-type {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.project-description {
    font-size: 10px;
    font-weight: 300;
    color: var(--text-secondary);
}

/* Services Section */
.services {
    padding: 120px 20px;
    background: linear-gradient(to bottom, var(--section-bg), var(--primary-color));
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at bottom center, var(--shadow-gold), transparent 70%);
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}

.services-intro {
    font-size: clamp(32px, 5vw, 64px);
    line-height: 1.4;
    max-width: 900px;
    margin: 0 auto 60px;
    text-align: center;
    opacity: 0;
    transform: translateY(60px) scale(0.9);
    filter: blur(10px);
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--secondary-color);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.services-intro.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.services-grid {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 40px 1fr;
    grid-template-columns: repeat(2, 1fr);
    -webkit-box-gap: 40px;
    -ms-grid-gap: 40px;
    gap: 40px;
    max-width: 600px;
    margin: 0 auto 60px;
}

.service-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E5E5E5;
    border-radius: 20px;
    font-size: 120px;
    font-weight: 900;
    opacity: 0;
    transition: all 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), inset 0 0 0 rgba(212, 175, 55, 0);
    position: relative;
    z-index: 1;
}

.service-item:nth-child(1) {
    transform: scale(0.3) rotate(-180deg);
    transition-delay: 0.1s;
}

.service-item:nth-child(2) {
    transform: scale(0.3) rotate(180deg);
    transition-delay: 0.3s;
}

.service-item.visible {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.service-item.visible:nth-child(1) {
    animation: bounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

.service-item.visible:nth-child(2) {
    animation: bounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3) rotate(180deg);
    }
    50% {
        transform: scale(1.15) rotate(-10deg);
    }
    70% {
        transform: scale(0.95) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.service-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5), inset 0 0 0 rgba(212, 175, 55, 0);
    border-color: var(--accent-color);
}

.service-item:nth-child(1) { animation-delay: 0.2s; }
.service-item:nth-child(2) { animation-delay: 0.4s; }

.services-description {
    font-size: clamp(20px, 3vw, 36px);
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    opacity: 0;
    transform: translateY(60px) rotateX(90deg);
    transform-style: preserve-3d;
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    perspective: 1000px;
    font-weight: 400;
}

.services-description.visible {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

.services-description strong {
    font-weight: 700;
    color: var(--accent-color);
}

/* Contact Section */
.contact {
    padding: 120px 20px;
    background: linear-gradient(to bottom, var(--primary-color), var(--section-bg));
    position: relative;
}

.contact-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    line-height: 1.4;
    opacity: 0;
    transform: translateX(-150px) skewX(-15deg);
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--secondary-color);
    position: relative;
}

.contact-title.visible {
    opacity: 1;
    transform: translateX(0) skewX(0deg);
}

.contact-title strong {
    font-weight: 900;
    color: var(--accent-color);
    display: inline-block;
    opacity: 0;
    transform: translateX(150px) skewX(15deg);
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s;
}

.contact-title.visible strong {
    opacity: 1;
    transform: translateX(0) skewX(0deg);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    transform: translateX(100px) rotateY(-20deg);
    transform-style: preserve-3d;
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
    perspective: 1000px;
}

.contact-form.visible {
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
}

.contact-form.visible .form-group {
    animation: formSlideIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.contact-form.visible .form-group:nth-child(2) { 
    animation: formSlideIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}
.contact-form.visible .form-group:nth-child(3) { 
    animation: formSlideIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
}
.contact-form.visible .form-group:nth-child(4) { 
    animation: formSlideIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}
.contact-form.visible .submit-btn { 
    animation: buttonPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
}

@keyframes formSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes buttonPop {
    from {
        opacity: 0;
        transform: scale(0) rotate(180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.form-group {
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 20px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--gray-light);
    color: var(--secondary-color);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2), inset 0 2px 8px rgba(0, 0, 0, 0.1);
    background: var(--section-bg);
    transform: translateY(-2px);
}

.submit-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--cta-primary) 0%, #1d4ed8 100%);
    color: var(--secondary-color);
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--cta-secondary) 0%, #16a085 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 48px rgba(31, 169, 113, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2);
    filter: brightness(1.1);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 80px 20px 40px;
    border-top: 2px solid var(--accent-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: (minmax(300px, 1fr))[auto-fit];
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    -webkit-box-gap: 60px;
    -ms-grid-gap: 60px;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-section {
    opacity: 0;
    transition: all 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-section:nth-child(1) {
    transform: translateY(50px) rotateX(45deg);
    transform-style: preserve-3d;
    transition-delay: 0.1s;
}

.footer-section:nth-child(2) {
    transform: translateY(50px) scale(0.8);
    transition-delay: 0.2s;
}

.footer-section:nth-child(3) {
    transform: translateY(50px) rotateZ(-5deg);
    transition-delay: 0.3s;
}

.footer-section.visible {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) rotateZ(0deg) scale(1);
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }

.footer-tagline {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.6;
}

.footer-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-emoji {
    font-size: 40px;
    margin-bottom: 15px;
}

.footer-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
    transition: all 0.3s ease;
}

.footer-link:hover {
    border-bottom-color: var(--secondary-color);
    color: var(--secondary-color);
}

.footer-text {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-text-small {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.footer-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

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

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

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 40px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 30px;
}

.footer-logo .logo-x {
    height: 30px;
    width: auto;
    display: block;
}

.footer-logo .logo-bit {
    font-size: 18px;
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: 1px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Animations */
@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@-moz-keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@-webkit-keyframes fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translateY(30px);
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}
@-moz-keyframes fadeInUp {
    from {
        opacity: 0;
        -moz-transform: translateY(30px);
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        -moz-transform: translateY(0);
        transform: translateY(0);
    }
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translateY(30px);
        -moz-transform: translateY(30px);
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        -moz-transform: translateY(0);
        transform: translateY(0);
    }
}

@-webkit-keyframes fadeInDown {
    from {
        opacity: 0;
        -webkit-transform: translateY(-30px);
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}
@-moz-keyframes fadeInDown {
    from {
        opacity: 0;
        -moz-transform: translateY(-30px);
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        -moz-transform: translateY(0);
        transform: translateY(0);
    }
}
@keyframes fadeInDown {
    from {
        opacity: 0;
        -webkit-transform: translateY(-30px);
        -moz-transform: translateY(-30px);
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        -moz-transform: translateY(0);
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes smoothFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes smoothTextReveal {
    from {
        opacity: 0;
        transform: translateY(8px);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@-webkit-keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        -webkit-transform: translateX(-50%) translateY(0);
        transform: translateX(-50%) translateY(0);
    }
    40% {
        -webkit-transform: translateX(-50%) translateY(-10px);
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        -webkit-transform: translateX(-50%) translateY(-5px);
        transform: translateX(-50%) translateY(-5px);
    }
}
@-moz-keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        -moz-transform: translateX(-50%) translateY(0);
        transform: translateX(-50%) translateY(0);
    }
    40% {
        -moz-transform: translateX(-50%) translateY(-10px);
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        -moz-transform: translateX(-50%) translateY(-5px);
        transform: translateX(-50%) translateY(-5px);
    }
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        -webkit-transform: translateX(-50%) translateY(0);
        -moz-transform: translateX(-50%) translateY(0);
        transform: translateX(-50%) translateY(0);
    }
    40% {
        -webkit-transform: translateX(-50%) translateY(-10px);
        -moz-transform: translateX(-50%) translateY(-10px);
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        -webkit-transform: translateX(-50%) translateY(-5px);
        -moz-transform: translateX(-50%) translateY(-5px);
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reveal animation for text */
@keyframes revealText {
    from {
        opacity: 0;
        transform: translateY(20px);
        clip-path: inset(0 0 100% 0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 0 0 0);
    }
}

/* Responsive Design - Mobile First */
/* Small Laptops and Tablets (768px - 1024px) */
@media (min-width: 768px) {
    .hero {
        padding: 100px 40px 80px;
    }

    .hero-content {
        max-width: 900px;
        padding: 0 40px;
    }

    .hero-title {
        font-size: clamp(40px, 6vw, 72px);
        margin-bottom: 40px;
        letter-spacing: -1.5px;
    }

    .hero-subtitle {
        font-size: clamp(18px, 2.8vw, 28px);
        margin-bottom: 35px;
    }

    .hero-description {
        font-size: clamp(16px, 2vw, 22px);
    }

    .hero-description p {
        margin: 10px 0;
    }
}

/* Medium Laptops (1024px - 1440px) - MacBook 15" range */
@media (min-width: 1024px) {
    .hero {
        padding: 120px 60px 100px;
    }

    .hero-content {
        max-width: 1000px;
        padding: 0 60px;
    }

    .hero-title {
        font-size: clamp(48px, 5.5vw, 80px);
        margin-bottom: 50px;
        letter-spacing: -2px;
    }

    .hero-subtitle {
        font-size: clamp(20px, 2.5vw, 30px);
        margin-bottom: 40px;
    }

    .hero-description {
        font-size: clamp(18px, 1.8vw, 24px);
        line-height: 1.7;
    }

    .hero-description p {
        margin: 12px 0;
    }

    .container {
        padding: 0 40px;
    }

    .about {
        padding-top: 220px;
        padding-bottom: 100px;
        padding-left: 40px;
        padding-right: 40px;
    }

    .about-text {
        font-size: clamp(18px, 1.6vw, 20px);
    }

    .portfolio, .services, .contact {
        padding: 100px 40px;
    }

    .section-title {
        font-size: clamp(40px, 4vw, 56px);
        margin-bottom: 60px;
    }

    .project-image {
        height: 500px;
    }

    .service-item {
        font-size: 100px;
    }
}

/* Large Desktops (1440px+) */
@media (min-width: 1440px) {
    .hero {
        padding: 140px 80px 120px;
    }

    .hero-content {
        max-width: 1200px;
        padding: 0 80px;
    }

    .hero-title {
        font-size: clamp(64px, 6vw, 96px);
        margin-bottom: 60px;
    }

    .hero-subtitle {
        font-size: clamp(24px, 2.2vw, 32px);
        margin-bottom: 50px;
    }

    .hero-description {
        font-size: clamp(20px, 1.6vw, 28px);
        line-height: 1.8;
    }

    .hero-description p {
        margin: 14px 0;
    }

    .about {
        padding-top: 250px;
        padding-bottom: 120px;
    }

    .about-text {
        font-size: 20px;
    }

    .section-title {
        font-size: clamp(48px, 4.5vw, 64px);
    }
}

/* Mobile Large - Keep existing styles but ensure proper scaling */
@media (max-width: 767px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        padding: 40px 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        border-top: 2px solid var(--accent-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

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

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

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

    /* Hide language switcher in desktop nav on mobile */
    .nav-container > .language-switcher {
        display: none !important;
    }
    
    /* Show language switcher inside mobile menu */
    .nav-menu .nav-lang-item {
        list-style: none;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .nav-menu .language-switcher {
        margin-left: 0;
        margin-top: 20px;
        width: 100%;
        display: -webkit-box;
        display: -webkit-flex;
        display: -moz-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        -moz-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        padding: 0 20px;
    }

    .nav-menu .language-switcher-btn {
        width: 56px;
        height: 56px;
    }

    .language-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px) scale(0.95);
        min-width: 200px;
        max-width: 90vw;
    }

    .language-dropdown.active {
        transform: translateX(-50%) translateY(0) scale(1);
    }

    .hero {
        min-height: 100vh;
        padding: 100px 20px 60px;
    }

    .hero-video {
        width: 100%;
        height: 100%;
        min-width: 100%;
        min-height: 100%;
        object-fit: cover;
    }

    .hero-content {
        padding: 0 20px;
    }

    .hero-title {
        font-size: clamp(32px, 9vw, 48px);
        margin-bottom: 30px;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: clamp(16px, 4vw, 20px);
        margin-bottom: 25px;
    }

    .hero-description {
        font-size: clamp(14px, 3.5vw, 18px);
        line-height: 1.6;
    }

    .hero-description p {
        margin: 8px 0;
    }

    .about {
        padding-top: 180px;
        padding-bottom: 60px;
        margin-top: -100px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .about::before {
        height: clamp(80px, 12vh, 120px);
    }

    .hero::after {
        height: clamp(80px, 12vh, 120px);
    }

    .portfolio, .services, .contact {
        padding: 80px 20px;
    }

    .about-text {
        font-size: 18px;
        margin-bottom: 25px;
    }

    .section-title {
        font-size: clamp(28px, 8vw, 48px);
        margin-bottom: 60px;
    }

    .project-image {
        height: 400px;
    }

    .project-overlay {
        padding: 40px 25px;
        justify-content: center;
    }

    .project-client {
        font-size: clamp(28px, 6vw, 40px);
    }

    .project-type {
        font-size: 20px;
    }

    .project-description {
        font-size: 18px;
    }

    .services-intro {
        font-size: 20px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .service-item {
        font-size: clamp(60px, 15vw, 100px);
    }

    .services-description {
        font-size: 20px;
    }

    .contact-title {
        font-size: clamp(28px, 8vw, 42px);
        margin-bottom: 40px;
    }

    .form-group input,
    .form-group textarea {
        padding: 18px;
        font-size: 16px;
    }

    .submit-btn {
        padding: 18px;
        font-size: 16px;
    }

    .footer {
        padding: 60px 20px 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-tagline {
        font-size: 18px;
    }

    .footer-text {
        font-size: 16px;
    }

    .footer-nav {
        flex-direction: column;
        gap: 20px;
        padding: 30px 0;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding-top: 30px;
    }

    .cookie-content {
        padding: 20px;
    }

    .cookie-content p {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .cookie-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .cookie-btn {
        width: 100%;
        padding: 14px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        min-height: 100vh;
        padding: 100px 15px 60px;
    }

    .hero-title {
        font-size: clamp(32px, 12vw, 48px);
        margin-bottom: 30px;
    }

    .hero-description {
        font-size: clamp(14px, 5vw, 20px);
    }

    .hero-description p {
        margin: 8px 0;
    }

    .about {
        padding-top: 160px;
        padding-bottom: 50px;
        margin-top: -80px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .about::before {
        height: clamp(60px, 10vh, 100px);
    }

    .hero::after {
        height: clamp(60px, 10vh, 100px);
    }

    .portfolio, .services, .contact {
        padding: 60px 15px;
    }

    .about-text {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: 20px;
    }

    .section-title {
        font-size: clamp(24px, 10vw, 36px);
        margin-bottom: 40px;
    }

    .project-image {
        height: 300px;
    }

    .project-overlay {
        padding: 30px 20px;
        justify-content: center;
    }

    .project-client {
        font-size: clamp(24px, 8vw, 32px);
        margin-bottom: 8px;
    }

    .project-type {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .project-description {
        font-size: 16px;
    }

    .services-intro {
        font-size: 18px;
        margin-bottom: 40px;
    }

    .service-item {
        font-size: clamp(50px, 20vw, 80px);
        border-radius: 15px;
    }

    .services-description {
        font-size: 18px;
    }

    .contact-title {
        font-size: clamp(24px, 10vw, 32px);
        margin-bottom: 30px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group input,
    .form-group textarea {
        padding: 16px;
        font-size: 15px;
    }

    .submit-btn {
        padding: 16px;
        font-size: 15px;
        letter-spacing: 1px;
    }

    .footer {
        padding: 50px 15px 25px;
    }

    .footer-tagline {
        font-size: 16px;
    }

    .footer-title {
        font-size: 20px;
    }

    .footer-text {
        font-size: 15px;
    }

    .footer-text-small {
        font-size: 13px;
    }

    .footer-nav {
        gap: 15px;
        padding: 25px 0;
    }

    .footer-nav a {
        font-size: 14px;
    }

    .cookie-consent {
        padding: 20px 15px;
    }

    .cookie-content p {
        font-size: 12px;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-description {
        font-size: 14px;
    }

    .about-text {
        font-size: 15px;
    }

    .project-image {
        height: 250px;
    }

    .service-item {
        font-size: 50px;
    }
}

/* Landscape Mobile and Small Screens */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 60px 20px 40px;
    }

    .hero-title {
        font-size: clamp(28px, 6vw, 40px);
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: clamp(14px, 2.5vw, 18px);
        margin-bottom: 15px;
    }

    .hero-description {
        font-size: clamp(12px, 2.2vw, 16px);
    }

    .hero-description p {
        margin: 4px 0;
    }
}

/* Medium height screens (MacBook 15" typical) */
@media (min-width: 1024px) and (max-width: 1680px) and (min-height: 800px) and (max-height: 1100px) {
    .hero {
        padding: 100px 50px 80px;
    }

    .hero-content {
        max-width: 950px;
        padding: 0 50px;
    }

    .hero-title {
        font-size: clamp(52px, 5vw, 72px);
        margin-bottom: 45px;
    }

    .hero-subtitle {
        font-size: clamp(22px, 2.3vw, 28px);
        margin-bottom: 35px;
    }

    .hero-description {
        font-size: clamp(18px, 1.7vw, 22px);
        line-height: 1.7;
    }

    .hero-description p {
        margin: 10px 0;
    }

    .about {
        padding-top: 200px;
        padding-bottom: 90px;
    }

    .about-text {
        font-size: clamp(17px, 1.5vw, 19px);
    }

    .section-title {
        font-size: clamp(42px, 3.8vw, 52px);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-menu a,
    .footer-nav a,
    .footer-link {
        padding: 10px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cookie-btn,
    .submit-btn {
        min-height: 44px;
    }

    .project-item {
        margin-bottom: 60px;
    }
}

/* Page Transition Animation - Optimized */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: opacity;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Ultra-early anti-flash for cross-page video transitions.
   Applied via a tiny inline <head> script before CSS/DOM is ready. */
html.vt-enter {
    background: var(--primary-color);
}

html.vt-enter body {
    opacity: 0 !important;
    transition: none !important;
}

.page-transition.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.page-transition.fade-out {
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.page-transition video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

/* Page fade in on load */
body.page-loading {
    opacity: 0;
    will-change: opacity;
    /* Hide immediately to avoid a brief flash before JS finishes init */
    transition: none;
}

body.page-loaded {
    opacity: 1;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

body.page-fade-out {
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Used only during cross-page video transitions: make the new page visible
   behind the overlay without animating the whole document opacity (reduces jank). */
body.vt-instant {
    opacity: 1 !important;
    transition: none !important;
}

/* Scroll progress bar (transform-based to avoid layout jank) */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: 0 0;
    transform: scaleX(0);
    background: linear-gradient(90deg, var(--accent-color), var(--cta-primary));
    z-index: 10001;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    will-change: transform;
    pointer-events: none;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    body.page-fade-out {
        transition: opacity 0.3s ease;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .page-transition {
        transition: opacity 0.4s ease, visibility 0.4s;
    }
    
    .page-transition.fade-out {
        transition: opacity 0.5s ease;
    }
    
    body.page-loading {
        transition: opacity 0.5s ease;
    }
}

