/* ============================================
   PREMIUM AUTO LOCKSMITH WEBSITE
   Mobile-First Responsive Design
   Modern Luxury UI with Glassmorphism
   ============================================ */

/* ========== CSS VARIABLES (Design Tokens) ========== */
:root {
    /* Premium Color Palette */
    --primary-dark: #0A0E27;
    --secondary-dark: #151A30;
    --tertiary-dark: #1A1F38;
    --accent-blue: #3B82F6;
    --accent-cyan: #06B6D4;
    --accent-indigo: #6366F1;
    --accent-purple: #8B5CF6;
    
    /* Text Colors */
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    /* UI Elements */
    --border-color: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-hover: rgba(255, 255, 255, 0.06);
    --glass-bg: rgba(10, 14, 39, 0.7);
    
    /* Spacing System (8px base) */
    --spacing-xs: 0.5rem;    /* 8px */
    --spacing-sm: 1rem;      /* 16px */
    --spacing-md: 1.5rem;    /* 24px */
    --spacing-lg: 2rem;      /* 32px */
    --spacing-xl: 3rem;      /* 48px */
    --spacing-2xl: 5rem;     /* 80px */
    --spacing-3xl: 7.5rem;   /* 120px */
    
    /* Border Radius */
    --radius-sm: 0.5rem;     /* 8px */
    --radius-md: 0.75rem;    /* 12px */
    --radius-lg: 1rem;       /* 16px */
    --radius-xl: 1.5rem;     /* 24px */
    --radius-2xl: 2rem;      /* 32px */
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
    --shadow-md: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 0.625rem 1rem rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 1.25rem 2rem rgba(0, 0, 0, 0.25);
    --shadow-glow-blue: 0 0 2.5rem rgba(59, 130, 246, 0.3);
    --shadow-glow-cyan: 0 0 2.5rem rgba(6, 182, 212, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Typography */
    --font-display: 'Space Grotesk', 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Font Sizes (Mobile-First) */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */
}

/* ========== PERFORMANCE OPTIMIZATIONS ========== */
/* MOBILE FIX: Минимальное использование will-change для предотвращения тряски */

/* Только критические элементы получают will-change при hover/active */
.unlock-button:active {
    will-change: transform;
}

.profile-whatsapp-btn:hover,
.cta-primary:hover,
.cta-secondary:hover {
    will-change: transform;
}

/* Hardware acceleration только где необходимо */
.car-container,
.keyfob-wrapper,
.profile-screen,
#stage1,
#stage2 {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* Optimize rendering for frequently updated elements */
#rainCanvas {
    transform: translate3d(0, 0, 0);
}

/* Contain paint and layout for better performance */
.feature-card,
.testimonial-card,
.instagram-post-item {
    contain: layout style;
}

/* MOBILE OPTIMIZATION: Упрощённые анимации на слабых устройствах */
@media (max-width: 48rem) {
    /* Отключаем will-change на мобильных для стабильности */
    * {
        will-change: auto !important;
    }
    
    /* Упрощаем blur эффекты */
    .profile-avatar-ring::before {
        display: none;
    }
    
    /* Уменьшаем сложность теней */
    .profile-avatar-ring {
        box-shadow: 0 0 2rem rgba(6, 182, 212, 0.5) !important;
    }
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* MOBILE FIX: Предотвращаем горизонтальный скролл */
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--primary-dark);
    /* MOBILE FIX: Предотвращаем overflow и обрезание */
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    margin: 0;
    padding: 0;
    /* Предотвращаем bounce эффект на iOS */
    overscroll-behavior-y: none;
}

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

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    margin-bottom: var(--spacing-sm);
    line-height: 1.7;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ========== STAGE 1: INTRO (KEY UNLOCK) ========== */
#stage1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    width: 100vw;
    height: 100vh;
    /* MOBILE FIX: Используем безопасный viewport */
    height: 100svh; /* Small viewport height - учитывает browser UI */
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 1s ease,
                transform 1s ease,
                filter 1s ease;
    overflow: hidden;
    /* Предотвращаем overflow */
    max-width: 100vw;
}

#stage1.hidden {
    opacity: 0;
    /* MOBILE FIX: Упрощённый эффект для стабильности */
    transform: scale(1.05);
    filter: blur(15px);
    pointer-events: none;
}

/* Упрощённые эффекты на мобильных */
@media (max-width: 48rem) {
    #stage1.hidden {
        transform: scale(1.02);
        filter: blur(8px);
    }
}

#stage1.remove {
    display: none;
}

.scene-background {
    position: absolute;
    inset: 0;
    background: #000000;
    z-index: 1;
}

/* ========== INSTRUCTION TEXT ========== */
.instruction-text {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-size: clamp(1rem, 3.5vw, 1.375rem);
    font-weight: 700;
    color: var(--accent-cyan);
    text-align: center;
    text-shadow: 
        0 0 1.5rem rgba(6, 182, 212, 0.8),
        0 0.25rem 0.5rem rgba(0, 0, 0, 0.5);
    z-index: 10;
    opacity: 1;
    animation: instructionPulse 2s ease-in-out infinite;
    transition: opacity 0.5s ease;
    padding: 0 1rem;
    max-width: 90%;
}

.instruction-text.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes instructionPulse {
    0%, 100% {
        opacity: 0.8;
        transform: translateX(-50%) translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(-0.25rem);
    }
}

/* ========== RAIN CANVAS ========== */
#rainCanvas {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.25;
    will-change: auto; /* GPU acceleration only when needed */
}

/* ========== CAR CONTAINER ========== */
.car-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(80vw, 25rem); /* 400px max on mobile - slightly smaller */
    z-index: 4;
    perspective: 1500px;
    opacity: 1; /* Visible immediately */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -3rem; /* Shift up to make room for key below */
}

.car-video {
    width: 100%;
    height: auto;
    position: relative;
    transform-style: preserve-3d;
    opacity: 1;
    transition: opacity var(--transition-slow);
    display: block;
    object-fit: contain;
    background: transparent;
    visibility: visible;
}

/* Headlight Flash Effects */
.headlight-flash {
    position: absolute;
    top: 50%;
    width: clamp(6rem, 15vw, 9.375rem);
    height: clamp(4rem, 10vw, 6.25rem);
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.9), rgba(59, 130, 246, 0.6) 40%, transparent 70%);
    filter: blur(1.25rem);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

.headlight-flash.left {
    left: 12%;
    transform: translateY(-50%);
}

.headlight-flash.right {
    left: 22%;
    transform: translateY(-50%);
}

@keyframes flashLight {
    0%, 100% { opacity: 0; }
    10%, 30% { opacity: 1; }
    20%, 40% { opacity: 0.3; }
    50% { opacity: 0; }
}

.headlight-flash.flashing {
    animation: flashLight 1.2s ease-in-out;
}

/* ========== UNLOCK MESSAGE ========== */
.unlock-message {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 800;
    color: var(--accent-cyan);
    text-shadow: 0 0 2.5rem rgba(6, 182, 212, 1);
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    letter-spacing: 0.25rem;
}

@keyframes unlockSuccess {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
    60% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}

.unlock-message.show {
    animation: unlockSuccess 2s ease-out;
}

/* ========== KEY BUTTON (CENTERED BELOW CAR) ========== */
.keyfob-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 8rem; /* Position below car */
    z-index: 50;
    opacity: 1; /* Visible immediately */
}

.keyfob-container {
    position: relative;
    perspective: 1500px;
    animation: floatKeyFob 4s ease-in-out infinite;
    width: clamp(10rem, 30vw, 12rem); /* BIGGER: 160px - 192px */
    height: clamp(10rem, 30vw, 12rem);
}

@keyframes floatKeyFob {
    0%, 100% { transform: translateY(0) rotateY(2deg); }
    50% { transform: translateY(-0.75rem) rotateY(-2deg); }
}

.keyfob {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform var(--transition-base);
}

.keyfob:hover,
.keyfob:active {
    transform: scale(1.05) rotateY(-2deg);
}

.keyfob-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1.5rem 4.5rem rgba(59, 130, 246, 0.8));
    transform-style: preserve-3d;
    animation: keyGlow 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes keyGlow {
    0%, 100% { 
        filter: drop-shadow(0 1.5rem 4.5rem rgba(59, 130, 246, 0.8)) brightness(1); 
    }
    50% { 
        filter: drop-shadow(0 2rem 6rem rgba(6, 182, 212, 1)) brightness(1.1); 
    }
}

/* Unlock Button - BIGGER Touch Target */
.unlock-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(4.5rem, 18vw, 5.5rem); /* BIGGER: 72px - 88px */
    height: clamp(4.5rem, 18vw, 5.5rem);
    background: linear-gradient(145deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 50%;
    border: 0.25rem solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 
        0 1rem 3.5rem rgba(59, 130, 246, 1),
        inset 0 -0.375rem 1rem rgba(0, 0, 0, 0.4),
        0 0 4.5rem rgba(6, 182, 212, 0.8);
    animation: pulseGlow 2s ease-in-out infinite;
    z-index: 20;
}

.unlock-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}

.unlock-button:not(:disabled):hover,
.unlock-button:not(:disabled):active {
    transform: translate(-50%, -50%) scale(1.1);
}

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 
            0 1rem 3.5rem rgba(59, 130, 246, 1),
            inset 0 -0.375rem 1rem rgba(0, 0, 0, 0.4),
            0 0 4.5rem rgba(6, 182, 212, 0.8);
    }
    50% { 
        box-shadow: 
            0 1.5rem 5rem rgba(6, 182, 212, 1),
            inset 0 -0.375rem 1rem rgba(0, 0, 0, 0.4),
            0 0 7.5rem rgba(6, 182, 212, 1);
    }
}

.unlock-button-text {
    font-family: var(--font-heading);
    font-size: clamp(0.75rem, 2.5vw, 0.875rem); /* BIGGER text */
    font-weight: 900;
    letter-spacing: 0.125rem;
    color: #ffffff;
    text-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

/* Helper Text (Below Button) */
.helper-text {
    position: absolute;
    top: calc(100% + 1rem);
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: clamp(0.875rem, 3vw, 1rem); /* BIGGER text */
    font-weight: 600;
    letter-spacing: 0.125rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    animation: fadeInOut 3s ease-in-out infinite;
    pointer-events: none;
    text-shadow: 0 0 1.5rem rgba(6, 182, 212, 0.6);
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) translateY(0); }
    50% { opacity: 1; transform: translateX(-50%) translateY(-0.25rem); }
}

/* ========== PROFILE SCREEN ========== */
.profile-screen {
    position: absolute;
    inset: 0;
    z-index: 100;
    background: var(--primary-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
                transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-screen.visible {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
    animation: screenEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes screenEntrance {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
        filter: blur(20px);
    }
    50% {
        opacity: 0.5;
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
}

.profile-avatar-ring {
    width: clamp(10rem, 30vw, 15rem);
    height: clamp(10rem, 30vw, 15rem);
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-cyan), var(--accent-purple), var(--accent-blue));
    background-size: 300% 300%;
    padding: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    /* MOBILE FIX: Упрощённая анимация для стабильности */
    animation: profileRingRotate 6s linear infinite,
               gradientShift 12s ease infinite;
    box-shadow: 
        0 0 3rem rgba(6, 182, 212, 0.6),
        0 0 6rem rgba(99, 102, 241, 0.4),
        inset 0 0 2rem rgba(255, 255, 255, 0.1);
    position: relative;
    /* Стабилизация рендеринга */
    transform: translateZ(0);
}

.profile-avatar-ring::before {
    content: '';
    position: absolute;
    inset: -0.5rem;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-cyan), var(--accent-purple), var(--accent-blue));
    background-size: 300% 300%;
    animation: profileRingRotate 4s linear infinite reverse,
               gradientShift 8s ease infinite;
    filter: blur(1rem);
    opacity: 0.5;
    z-index: -1;
}

@keyframes profileRingRotate {
    0% { transform: rotate(0deg) translateZ(0); }
    100% { transform: rotate(360deg) translateZ(0); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* MOBILE FIX: Упрощённые анимации на слабых устройствах */
@media (max-width: 48rem) and (max-height: 48rem) {
    @keyframes profileRingRotate {
        0% { transform: rotate(0deg) translateZ(0); }
        100% { transform: rotate(360deg) translateZ(0); }
    }
    
    @keyframes gradientShift {
        /* Отключаем на слабых устройствах */
        0%, 100% { background-position: 0% 50%; }
    }
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 0.5rem solid var(--primary-dark);
    object-fit: cover;
    animation: avatarFloat 6s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

@keyframes avatarFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-8px) scale(1.02);
    }
    50% {
        transform: translateY(0) scale(1);
    }
    75% {
        transform: translateY(-4px) scale(1.01);
    }
}

.profile-username {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.125rem;
    animation: usernameGlow 3s ease-in-out infinite;
}

@keyframes usernameGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
    }
    50% {
        text-shadow: 0 0 40px rgba(6, 182, 212, 0.6),
                     0 0 60px rgba(99, 102, 241, 0.4);
    }
}

.verified-badge-profile {
    width: clamp(1.75rem, 5vw, 2.25rem);
    height: clamp(1.75rem, 5vw, 2.25rem);
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(1rem, 3vw, 1.25rem);
    box-shadow: 0 0.25rem 1rem rgba(6, 182, 212, 0.6);
}

.profile-whatsapp-btn {
    margin-top: var(--spacing-md);
    padding: clamp(1rem, 3vw, 1.25rem) clamp(2rem, 6vw, 3rem);
    background: linear-gradient(135deg, #25D366, #128C7E, #25D366);
    background-size: 200% 200%;
    color: white;
    border-radius: var(--radius-xl);
    font-family: var(--font-heading);
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    box-shadow: 
        0 0.75rem 2rem rgba(37, 211, 102, 0.5),
        0 0 2rem rgba(37, 211, 102, 0.3);
    animation: whatsappBtnPulse 2s ease-in-out infinite,
               whatsappGradientMove 3s ease infinite;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.profile-whatsapp-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.profile-whatsapp-btn:hover::before {
    width: 300px;
    height: 300px;
}

.profile-whatsapp-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 
        0 1.5rem 3rem rgba(37, 211, 102, 0.8),
        0 0 4rem rgba(37, 211, 102, 0.6);
}

.profile-whatsapp-btn i {
    font-size: clamp(1.5rem, 4vw, 2rem);
    animation: whatsappIconSpin 4s linear infinite;
}

@keyframes whatsappIconSpin {
    0%, 90% { transform: rotate(0deg); }
    95% { transform: rotate(15deg); }
    100% { transform: rotate(0deg); }
}

@keyframes whatsappBtnPulse {
    0%, 100% {
        box-shadow: 
            0 0.75rem 2rem rgba(37, 211, 102, 0.5),
            0 0 2rem rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 
            0 1rem 2.5rem rgba(37, 211, 102, 0.7),
            0 0 3rem rgba(37, 211, 102, 0.5);
    }
}

@keyframes whatsappGradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.scroll-down-arrow {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.125rem;
    animation: arrowBounce 2s ease-in-out infinite;
    transition: all var(--transition-base);
}

.scroll-down-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2), transparent);
    transform: translate(-50%, -50%);
    animation: arrowRipple 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes arrowRipple {
    0% {
        width: 60px;
        height: 60px;
        opacity: 0.5;
    }
    100% {
        width: 120px;
        height: 120px;
        opacity: 0;
    }
}

.scroll-down-arrow:hover {
    color: var(--text-primary);
    transform: translateX(-50%) scale(1.1);
}

.scroll-down-arrow i {
    font-size: 2rem;
    animation: arrowPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.6));
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(0.5rem);
    }
}

@keyframes arrowPulse {
    0%, 100% {
        opacity: 0.6;
        filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.6));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 20px rgba(6, 182, 212, 1));
    }
}

/* ========== STAGE 2: MAIN SITE ========== */
#stage2 {
    opacity: 0;
    pointer-events: none;
    /* MOBILE FIX: Упрощённые эффекты */
    transform: scale(0.98);
    filter: blur(5px);
    transition: opacity 1s ease,
                transform 1s ease,
                filter 1s ease;
    /* Предотвращаем overflow */
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

#stage2.visible {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
    filter: blur(0);
}

/* Упрощённый entrance на мобильных */
@media (max-width: 48rem) {
    #stage2.visible {
        animation: none;
    }
}

@keyframes stage2Entrance {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
        filter: blur(8px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* ========== NAVIGATION ========== */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(1.25rem);
    -webkit-backdrop-filter: blur(1.25rem);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-sm) 0;
    z-index: 1000;
}

.navbar-content {
    max-width: 87.5rem; /* 1400px */
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    gap: 0.375rem;
    padding: 0.5rem;
}

.mobile-menu-btn:hover {
    background: var(--card-hover);
    border-color: var(--accent-cyan);
}

.hamburger-line {
    width: 100%;
    height: 0.125rem;
    background: var(--text-primary);
    border-radius: 0.125rem;
    transition: all var(--transition-base);
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(0.5rem) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-0.5rem) rotate(-45deg);
}

.nav-links {
    display: none; /* Hidden on mobile by default */
    list-style: none;
    position: fixed;
    top: calc(var(--spacing-sm) * 2 + 2.5rem + 1rem);
    left: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--glass-bg);
    backdrop-filter: blur(1.25rem);
    -webkit-backdrop-filter: blur(1.25rem);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-md);
    z-index: 999;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.nav-links.active {
    display: flex;
}

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

.nav-links a {
    display: block;
    padding: var(--spacing-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    transition: all var(--transition-base);
    border-radius: var(--radius-md);
    text-align: center;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--card-hover);
}

/* ========== HERO SECTION ========== */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) 0;
    overflow: hidden;
    /* MOBILE FIX: Предотвращаем горизонтальный overflow */
    width: 100%;
    max-width: 100vw;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
    pointer-events: none;
    animation: gradientMorph 15s ease-in-out infinite;
}

@keyframes gradientMorph {
    0%, 100% {
        background: 
            radial-gradient(ellipse at 50% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
    }
    33% {
        background: 
            radial-gradient(ellipse at 30% 0%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 70% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 40%);
    }
    66% {
        background: 
            radial-gradient(ellipse at 70% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
            radial-gradient(circle at 30% 25%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 75rem; /* 1200px */
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    text-align: center;
    /* MOBILE FIX */
    width: 100%;
    max-width: calc(100vw - var(--spacing-sm) * 2);
    box-sizing: border-box;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem var(--spacing-sm);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.badge-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #10B981;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 5.25rem); /* 32px - 84px */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subheadline {
    font-size: clamp(1rem, 3vw, 1.375rem); /* 16px - 22px */
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    max-width: 43.75rem; /* 700px */
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.hero-secondary-headline {
    font-family: var(--font-heading);
    font-size: clamp(1.125rem, 3.5vw, 1.5rem); /* 18px - 24px */
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: var(--spacing-xl);
    max-width: 43.75rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-cta-group {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.cta-primary,
.cta-secondary {
    padding: clamp(0.875rem, 3vw, 1.125rem) clamp(1.5rem, 5vw, 2.5rem);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: clamp(0.9375rem, 2vw, 1rem);
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
}

.cta-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: var(--text-primary);
    box-shadow: 0 0.5rem 1.875rem rgba(59, 130, 246, 0.4);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.cta-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.cta-primary:hover::before {
    opacity: 1;
}

.cta-primary:hover {
    transform: translateY(-0.1875rem) scale(1.02);
    box-shadow: 0 0.75rem 2.5rem rgba(6, 182, 212, 0.6);
}

.cta-primary:active {
    transform: translateY(-0.0625rem) scale(0.98);
}

.cta-secondary {
    background: var(--card-bg);
    backdrop-filter: blur(0.625rem);
    -webkit-backdrop-filter: blur(0.625rem);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.cta-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.cta-secondary:hover::before {
    opacity: 1;
}

.cta-secondary:hover {
    border-color: var(--accent-cyan);
    background: var(--card-hover);
    transform: translateY(-0.1875rem) scale(1.02);
    box-shadow: 0 0 1.5rem rgba(6, 182, 212, 0.2);
}

.cta-secondary:active {
    transform: translateY(-0.0625rem) scale(0.98);
}

/* ========== STATS BAR ========== */
.stats-bar {
    background: var(--secondary-dark);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-xl) 0;
}

.stats-content {
    max-width: 87.5rem;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    gap: var(--spacing-md);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-sm);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
    line-height: 1;
}

.stat-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
}

/* ========== SECTION BASE ========== */
.section {
    padding: var(--spacing-2xl) 0;
    position: relative;
    /* MOBILE FIX: Предотвращаем overflow */
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.section-content {
    max-width: 87.5rem;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    /* MOBILE FIX: Предотвращаем overflow */
    width: 100%;
    max-width: calc(100vw - var(--spacing-sm) * 2);
    box-sizing: border-box;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-tag {
    display: inline-block;
    padding: 0.375rem var(--spacing-sm);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.875rem, 6vw, 3.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.section-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    color: var(--text-secondary);
    max-width: 43.75rem;
    margin: 0 auto;
    line-height: 1.7;
}

/* ========== FEATURE CARDS ========== */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: var(--spacing-md);
}

.feature-card {
    background: var(--card-bg);
    backdrop-filter: blur(1.25rem);
    -webkit-backdrop-filter: blur(1.25rem);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.feature-card:hover {
    transform: translateY(-0.5rem) scale(1.02);
    border-color: var(--accent-blue);
    box-shadow: 
        0 1.25rem 3.75rem rgba(59, 130, 246, 0.2),
        0 0 2rem rgba(6, 182, 212, 0.15);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover::after {
    opacity: 1;
    animation: shimmer 2s ease-in-out;
}

@keyframes shimmer {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.feature-icon {
    width: clamp(3.5rem, 12vw, 3.75rem);
    height: clamp(3.5rem, 12vw, 3.75rem);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    box-shadow: 0 0.5rem 1.25rem rgba(59, 130, 246, 0.3);
    transition: all var(--transition-base);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0.75rem 1.875rem rgba(59, 130, 246, 0.5);
}

.feature-icon i {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
    color: var(--text-primary);
    transition: transform var(--transition-base);
}

.feature-card:hover .feature-icon i {
    transform: scale(1.15);
}

.feature-title {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.feature-description {
    font-size: clamp(0.9375rem, 2vw, 1rem);
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ========== PROCESS SECTION ========== */
.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

.process-step {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
}

.process-step:hover {
    transform: translateY(-0.5rem);
    border-color: var(--accent-blue);
    box-shadow: 0 1.25rem 3.75rem rgba(59, 130, 246, 0.2);
}

.process-number {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 auto var(--spacing-md);
    box-shadow: 0 0.5rem 1.25rem rgba(59, 130, 246, 0.4);
}

.process-icon {
    font-size: clamp(2.5rem, 8vw, 3rem);
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.process-title {
    font-size: clamp(1.25rem, 4vw, 1.375rem);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.process-description {
    font-size: clamp(0.9375rem, 2vw, 0.9375rem);
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.process-note {
    font-size: clamp(0.875rem, 2vw, 0.9375rem);
    font-weight: 600;
    color: var(--accent-cyan);
    line-height: 1.6;
    padding: var(--spacing-sm);
    background: rgba(6, 182, 212, 0.1);
    border-left: 0.25rem solid var(--accent-cyan);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-sm);
}

.note-small {
    display: block;
    font-size: clamp(0.75rem, 1.8vw, 0.8125rem);
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-style: italic;
}

/* ========== TESTIMONIALS ========== */
.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.testimonial-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    transition: all 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-0.5rem);
    border-color: var(--accent-cyan);
    box-shadow: 0 1.25rem 3.75rem rgba(6, 182, 212, 0.2);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.testimonial-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
}

.testimonial-info h4 {
    font-size: clamp(1rem, 3vw, 1.125rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.testimonial-info p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
}

.testimonial-stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: var(--spacing-sm);
}

.star {
    color: #F59E0B;
    font-size: var(--text-base);
}

.testimonial-text {
    font-size: clamp(0.9375rem, 2vw, 0.9375rem);
    line-height: 1.7;
    color: var(--text-secondary);
    font-style: italic;
}

/* ========== INSTAGRAM SECTION ========== */
.instagram-widget {
    max-width: 58.4375rem; /* 935px */
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    transition: all var(--transition-base);
}

.instagram-widget:hover {
    transform: translateY(-0.25rem);
    border-color: var(--accent-cyan);
    box-shadow: 0 1.25rem 3.75rem rgba(6, 182, 212, 0.3);
}

.instagram-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.instagram-avatar-container {
    position: relative;
}

.instagram-avatar-ring {
    width: clamp(5rem, 20vw, 7.5rem);
    height: clamp(5rem, 20vw, 7.5rem);
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-cyan));
    padding: 0.1875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rotateRing 3s linear infinite;
}

@keyframes rotateRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.instagram-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 0.25rem solid var(--primary-dark);
    object-fit: cover;
}

.instagram-profile-info {
    flex: 1;
    width: 100%;
}

.instagram-username {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 5vw, 1.75rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.verified-badge {
    width: 1.375rem;
    height: 1.375rem;
    background: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
}

.instagram-stats {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
}

.stat-item-ig {
    display: flex;
    flex-direction: column;
}

.stat-number-ig {
    font-family: var(--font-heading);
    font-size: clamp(1.125rem, 4vw, 1.25rem);
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label-ig {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.instagram-bio {
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.instagram-follow-btn {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: var(--text-primary);
    border: none;
    padding: 0.625rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-block;
}

.instagram-follow-btn:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.625rem 1.875rem rgba(59, 130, 246, 0.4);
}

.instagram-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
    gap: 0.75rem;
}

@media (max-width: 47.99rem) {
    .instagram-post-item:nth-child(n+7) {
        display: none; /* Hide last 2 on mobile to show 6 */
    }
}

.instagram-post-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.instagram-post-item:hover {
    transform: scale(1.03);
}

.instagram-post-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instagram-post-overlay-info {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.instagram-post-item:hover .instagram-post-overlay-info {
    opacity: 1;
}

.overlay-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 600;
    font-size: clamp(0.875rem, 3vw, 1rem);
}

/* ========== CTA SECTION ========== */
.cta-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(6, 182, 212, 0.08));
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-2xl) 0;
    text-align: center;
}

.cta-content {
    max-width: 50rem;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(1.875rem, 6vw, 3.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.cta-subtitle {
    font-size: clamp(1rem, 3vw, 1.125rem);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: var(--text-primary);
    padding: clamp(1rem, 4vw, 1.375rem) clamp(2rem, 8vw, 3.125rem);
    border-radius: var(--radius-lg);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1rem, 3vw, 1.125rem);
    transition: all var(--transition-base);
    box-shadow: 0 0.9375rem 3.125rem rgba(59, 130, 246, 0.5);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: scale(1.03);
    box-shadow: 0 1.5625rem 5rem rgba(6, 182, 212, 0.7);
}

.phone-display {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 6vw, 2.625rem);
    font-weight: 800;
    color: var(--accent-cyan);
    margin: var(--spacing-md) 0;
    letter-spacing: 0.125rem;
}

.response-info {
    font-size: clamp(0.875rem, 2vw, 1rem);
    color: var(--text-muted);
}

/* ========== FOOTER ========== */
.footer {
    background: var(--secondary-dark);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
    max-width: 87.5rem;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.footer-section h3 {
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.625rem;
}

.footer-section a {
    color: var(--text-muted);
    font-size: var(--text-sm);
    transition: color var(--transition-base);
}

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

.footer-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.badge {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.badge i {
    color: var(--accent-cyan);
}

.footer-bottom {
    max-width: 87.5rem;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-sm) 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ========== ANIMATIONS ========== */
.fade-in {
    opacity: 0;
    transform: translateY(1.875rem);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ========== PARTICLE EFFECTS FOR TRANSITIONS ========== */
.transition-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.transition-particles.active {
    opacity: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(6, 182, 212, 1), rgba(59, 130, 246, 0.5));
    border-radius: 50%;
    pointer-events: none;
    animation: particleFade 2s ease-out forwards;
}

@keyframes particleFade {
    0% {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }
    100% {
        opacity: 0;
        transform: scale(0) translate(var(--tx), var(--ty));
    }
}

/* Transition overlay for smooth morphing */
.transition-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.1), rgba(0, 0, 0, 0.9));
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.transition-overlay.active {
    opacity: 1;
}

/* ========== WHATSAPP PORSCHE KEY BUTTON ========== */
.whatsapp-porsche-key {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-base);
    animation: porscheKeyFloat 4s ease-in-out infinite;
}

.whatsapp-porsche-key:hover {
    transform: scale(1.1) translateY(-0.5rem);
}

.porsche-key-container {
    position: relative;
    width: 10rem;
    height: auto;
    filter: drop-shadow(0 1.5rem 4rem rgba(0, 0, 0, 0.4));
}

.porsche-key-image {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(1.1);
}

.whatsapp-pulse-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4.5rem;
    height: 4.5rem;
    background: radial-gradient(circle, rgba(37, 211, 102, 0.9) 0%, rgba(37, 211, 102, 0.6) 50%, rgba(37, 211, 102, 0.2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: whatsappPulseGlow 2s ease-in-out infinite;
    box-shadow: 
        0 0 2rem rgba(37, 211, 102, 0.8),
        inset 0 0 1rem rgba(255, 255, 255, 0.3);
}

.whatsapp-pulse-overlay i {
    font-size: 2.5rem;
    color: #ffffff;
    filter: drop-shadow(0 0.25rem 0.75rem rgba(0, 0, 0, 0.4));
    animation: whatsappIconBounce 2s ease-in-out infinite;
}

.whatsapp-text-label {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    color: #25D366;
    text-transform: uppercase;
    letter-spacing: 0.125rem;
    text-align: center;
    text-shadow: 
        0 0.125rem 0.5rem rgba(0, 0, 0, 0.3),
        0 0 1rem rgba(37, 211, 102, 0.6);
    animation: whatsappTextGlow 2s ease-in-out infinite;
    white-space: nowrap;
}

@keyframes porscheKeyFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-0.75rem);
    }
}

/* Add pulsing ring effect for better visibility */
.whatsapp-pulse-overlay::before {
    content: '';
    position: absolute;
    inset: -0.625rem;
    border-radius: 50%;
    border: 0.1875rem solid rgba(37, 211, 102, 0.6);
    animation: whatsappRingPulse 2s ease-in-out infinite;
}

.whatsapp-pulse-overlay::after {
    content: '';
    position: absolute;
    inset: -1.25rem;
    border-radius: 50%;
    border: 0.125rem solid rgba(37, 211, 102, 0.4);
    animation: whatsappRingPulse 2s ease-in-out infinite 0.5s;
}

@keyframes whatsappRingPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@keyframes whatsappPulseGlow {
    0%, 100% {
        box-shadow: 
            0 0 2rem rgba(37, 211, 102, 0.8),
            inset 0 0 1rem rgba(255, 255, 255, 0.3);
        background: radial-gradient(circle, rgba(37, 211, 102, 0.9) 0%, rgba(37, 211, 102, 0.6) 50%, rgba(37, 211, 102, 0.2) 100%);
    }
    50% {
        box-shadow: 
            0 0 3.5rem rgba(37, 211, 102, 1),
            0 0 1.5rem rgba(37, 211, 102, 0.8),
            inset 0 0 1.5rem rgba(255, 255, 255, 0.5);
        background: radial-gradient(circle, rgba(37, 211, 102, 1) 0%, rgba(37, 211, 102, 0.8) 50%, rgba(37, 211, 102, 0.3) 100%);
    }
}

@keyframes whatsappIconBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes whatsappTextGlow {
    0%, 100% {
        color: #25D366;
        text-shadow: 
            0 0.125rem 0.5rem rgba(0, 0, 0, 0.3),
            0 0 1rem rgba(37, 211, 102, 0.6);
    }
    50% {
        color: #2ecc71;
        text-shadow: 
            0 0.125rem 0.5rem rgba(0, 0, 0, 0.3),
            0 0 2rem rgba(37, 211, 102, 1);
    }
}

/* Porsche Key responsive */
@media (max-width: 48rem) {
    .whatsapp-porsche-key {
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .porsche-key-container {
        width: 8rem;
    }
    
    .whatsapp-pulse-overlay {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .whatsapp-pulse-overlay i {
        font-size: 2rem;
    }
    
    .whatsapp-text-label {
        font-size: 0.75rem;
    }
}

/* Desktop - make it BIGGER */
@media (min-width: 64rem) {
    .porsche-key-container {
        width: 12rem;
    }
    
    .whatsapp-pulse-overlay {
        width: 5.5rem;
        height: 5.5rem;
    }
    
    .whatsapp-pulse-overlay i {
        font-size: 3rem;
    }
    
    .whatsapp-text-label {
        font-size: 1rem;
    }
}

/* ========== MEDIA QUERIES (Progressive Enhancement) ========== */

/* Tablet (768px and up) */
@media (min-width: 48rem) {
    /* Typography adjustments */
    html {
        font-size: 17px;
    }
    
    /* Instruction text - better positioning on tablet */
    .instruction-text {
        top: 12%;
        font-size: clamp(1.125rem, 3vw, 1.5rem);
    }
    
    /* Navigation - Desktop mode */
    .navbar-content {
        padding: 0 var(--spacing-lg);
        justify-content: center;
    }
    
    .mobile-menu-btn {
        display: none; /* Hide hamburger on desktop */
    }
    
    .nav-links {
        display: flex;
        position: static;
        flex-direction: row;
        gap: var(--spacing-lg);
        background: transparent;
        border: none;
        padding: 0;
        backdrop-filter: none;
    }
    
    .nav-links li {
        width: auto;
    }
    
    .nav-links a {
        display: inline-block;
        padding: 0;
        color: var(--text-secondary);
        font-weight: 500;
        font-size: 0.9375rem;
        transition: color var(--transition-base);
        position: relative;
        background: transparent;
    }
    
    .nav-links a::after {
        content: '';
        position: absolute;
        bottom: -0.25rem;
        left: 0;
        width: 0;
        height: 0.125rem;
        background: var(--accent-cyan);
        transition: width var(--transition-base);
    }
    
    .nav-links a:hover {
        color: var(--text-primary);
        background: transparent;
    }
    
    .nav-links a:hover::after {
        width: 100%;
    }
    
    /* Stats */
    .stats-content {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Grids */
    .feature-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Instagram */
    .instagram-profile-header {
        flex-direction: row;
        text-align: left;
    }
    
    .instagram-username {
        justify-content: flex-start;
    }
    
    .instagram-stats {
        justify-content: flex-start;
    }
    
    .instagram-posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Car container */
    .car-container {
        width: min(55vw, 35rem); /* 560px max on tablet */
        margin-top: -2rem; /* Less shift on tablet */
    }
    
    /* Key wrapper */
    .keyfob-wrapper {
        margin-top: 6rem; /* Closer to car on tablet */
    }
    
    .keyfob-container {
        width: clamp(11rem, 20vw, 13rem); /* 176px - 208px */
        height: clamp(11rem, 20vw, 13rem);
    }
}

/* Desktop (1024px and up) */
@media (min-width: 64rem) {
    html {
        font-size: 18px;
    }
    
    /* Instruction text - optimal on desktop */
    .instruction-text {
        top: 15%;
        font-size: 1.5rem;
    }
    
    .section-content,
    .navbar-content,
    .stats-content,
    .footer-content {
        padding-left: var(--spacing-xl);
        padding-right: var(--spacing-xl);
    }
    
    .feature-grid,
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Car container - larger on desktop */
    .car-container {
        width: min(45vw, 35rem); /* 560px max on desktop */
        margin-top: -1.5rem;
    }
    
    /* Key wrapper */
    .keyfob-wrapper {
        margin-top: 5.5rem;
    }
    
    .keyfob-container {
        width: clamp(12rem, 18vw, 14rem); /* 192px - 224px */
        height: clamp(12rem, 18vw, 14rem);
    }
    
    /* Profile screen - better spacing on desktop */
    .profile-avatar-ring {
        width: 15rem;
        height: 15rem;
    }
    
    .scroll-down-arrow {
        bottom: 4rem;
    }
}

/* Large Desktop (1400px and up) */
@media (min-width: 87.5rem) {
    html {
        font-size: 18px;
    }
    
    .hero {
        min-height: 90vh;
    }
}

/* Small mobile landscape (480px-767px) */
@media (min-width: 30rem) and (max-width: 47.99rem) and (orientation: landscape) {
    .instruction-text {
        top: 5%;
        font-size: 1rem;
    }
    
    .car-container {
        margin-top: -2rem;
    }
    
    .keyfob-wrapper {
        margin-top: 6rem;
    }
    
    .profile-avatar-ring {
        width: 8rem;
        height: 8rem;
    }
    
    .scroll-down-arrow {
        bottom: 1.5rem;
    }
}

/* Very small screens (< 375px) */
@media (max-width: 23.4375rem) {
    :root {
        --spacing-xs: 0.375rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.25rem;
    }
    
    .instruction-text {
        font-size: 0.875rem;
        top: 8%;
        padding: 0.5rem 0.75rem;
    }
    
    .car-container {
        width: min(90vw, 22rem);
    }
    
    .keyfob-container {
        width: 8rem;
        height: 8rem;
    }
    
    .profile-avatar-ring {
        width: 8rem;
        height: 8rem;
    }
    
    /* Optimize WhatsApp button for small screens */
    .whatsapp-porsche-key {
        bottom: 1rem;
        right: 1rem;
    }
    
    .porsche-key-container {
        width: 7rem;
    }
    
    .whatsapp-pulse-overlay {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .whatsapp-pulse-overlay i {
        font-size: 2rem;
    }
    
    .whatsapp-text-label {
        font-size: 0.75rem;
    }
    
    /* Reduce particle effects on very small screens */
    .particle {
        width: 3px;
        height: 3px;
    }
}\n\n/* Touch device optimizations */\n@media (hover: none) and (pointer: coarse) {\n    /* Larger touch targets */\n    .unlock-button {\n        min-width: 5rem;\n        min-height: 5rem;\n    }\n    \n    .scroll-down-arrow {\n        padding: 1rem;\n        min-height: 60px;\n    }\n    \n    .profile-whatsapp-btn {\n        min-height: 56px;\n        padding: 1.25rem 2.5rem;\n    }\n    \n    /* Disable hover effects on touch */\n    .feature-card:hover,\n    .testimonial-card:hover,\n    .process-step:hover {\n        transform: none;\n    }\n    \n    /* Optimize animations for mobile performance */\n    .profile-avatar-ring::before {\n        display: none; /* Remove blur effect on mobile */\n    }\n}\n\n/* High refresh rate displays optimization */\n@media (min-resolution: 120dpi) {\n    .profile-avatar-ring,\n    .instagram-avatar-ring {\n        animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n    }\n}\n\n/* Portrait orientation optimizations */\n@media (orientation: portrait) and (max-width: 48rem) {\n    .profile-screen {\n        justify-content: flex-start;\n        padding-top: 15vh;\n    }\n    \n    .scroll-down-arrow {\n        bottom: 2rem;\n    }\n}"}

/* ========== MOBILE STABILITY FIXES ========== */
/* Дополнительные оптимизации для устранения тряски на мобильных */

@media (max-width: 48rem) {
    /* Упрощаем все transitions на мобильных */
    * {
        transition-duration: 0.3s !important;
    }
    
    /* Отключаем сложные pseudo-элементы */
    .scroll-down-arrow::before {
        display: none;
    }
    
    /* Упрощаем анимации кнопок */
    .profile-whatsapp-btn::before {
        display: none;
    }
    
    /* Стабилизация контейнеров */
    .car-container,
    .keyfob-wrapper,
    .profile-container {
        transform: none !important;
    }
    
    /* Отключаем particle animations на слабых устройствах */
    .particle {
        animation-duration: 1s !important;
    }
}

/* Очень слабые устройства - минимальные эффекты */
@media (max-width: 48rem) and (max-height: 48rem) {
    .profile-avatar-ring {
        animation: profileRingRotate 10s linear infinite !important;
        background: linear-gradient(45deg, var(--accent-blue), var(--accent-cyan)) !important;
        background-size: 100% 100% !important;
        box-shadow: 0 0 2rem rgba(6, 182, 212, 0.5) !important;
    }
    
    @keyframes profileRingRotate {
        0% { transform: rotate(0deg) translateZ(0); }
        100% { transform: rotate(360deg) translateZ(0); }
    }
    
    /* Отключаем gradient shift полностью */
    .profile-avatar-ring,
    .profile-whatsapp-btn {
        background-size: 100% 100% !important;
    }
}

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