@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    color: white;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent);
}

a:focus {
    outline: none;
    color: var(--accent);
}

a:active {
    color: var(--primary);
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    a {
        padding: 4px 0;
    }
    
    a:active {
        opacity: 0.7;
    }
}

:root {
    --primary: #ff6b6b;
    --secondary: #4ecdc4;
    --accent: #45b7d1;
    --purple: #9b59b6;
    --yellow: #f1c40f;
    --green: #2ecc71;
    --dark: #2c3e50;
    --light: #ecf0f1;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent), var(--purple));
    color: #fff;
    overflow-x: hidden;
    will-change: backgraund-position;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent), var(--purple));
    background-size: 200% 200%; 
    animation: gradientShift 8s ease infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    contain: strict;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s linear infinite;
    will-change: transform, opacity;
}

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Main Content */
.container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 6vw;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.menu-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #fff;
    transition: 0.3s;
}

.menu-line:nth-child(1) { top: 0; }
.menu-line:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-line:nth-child(3) { bottom: 0; }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 40px 40px;
    position: relative;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 0.9;
    margin-bottom: 40px;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
    animation: textGlow 3s ease-in-out infinite alternate;
    will-change: text-shadow;
}

@keyframes textGlow {
    from { text-shadow: 0 0 40px rgba(255, 255, 255, 0.3); }
    to { text-shadow: 0 0 60px rgba(255, 255, 255, 0.6), 0 0 80px rgba(255, 255, 255, 0.3); }
}

.hero-subtitle {
    font-size: clamp(1.4rem, 4vw, 3rem);
    font-weight: 300;
    margin-bottom: 60px;
    opacity: 0.9;
}

.services-bubbles {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.bubble {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    padding: 12px 24px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.bubble::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.bubble.frontend::before { background: #61dafb; }
.bubble.backend::before { background: #68c946; }
.bubble.design::before { background: #ff6b6b; }
.bubble.concepts::before { background: #ffd93d; }

.bubble:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.bubble:hover::before {
    width: 12px;
    height: 12px;
    box-shadow: 0 0 15px currentColor;
}

.bubble .text {
    margin-left: 15px;
}

.cta-button {
    display: inline-block;
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark);
    padding: 20px 50px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.cta-button:hover::before {
    width: 100%;
}

.cta-button span {
    position: relative;
    z-index: 1;
}

/* Sections */
.section {
    padding: 100px 40px;
    position: relative;
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 80px;
    background: linear-gradient(45deg, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    perspective: 1000px;
    perspective-origin: center center;
}

.service-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 50px 40px;
    position: relative;
    transform-style: preserve-3d;
    transition: box-shadow 0.1s ease-out; 
    cursor: pointer;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: none;
}


.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent, rgba(255, 255, 255, 0.05));
    border-radius: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card > * {
    position: relative;
    z-index: 2;
}

.service-number {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 80px;
    font-weight: 700;
    opacity: 0.1;
    line-height: 1;
    z-index: 3;
}


.service-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    z-index: 3; 
    position: relative; 
}

.service-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
    background: linear-gradient(45deg, #fff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-desc {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 30px;
}

.service-tech {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-item {
    margin-bottom: 30px;
}

.contact-label {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-value {
    font-size: 20px;
    font-weight: 500;
}

.contact-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(0); 
    contain: layout; 
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 20px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin-bottom: 10px;
    opacity: 0.8;
}

.footer-content p:first-child {
    font-weight: 500;
    font-size: 16px;
}

.footer-content p:last-child {
    font-size: 14px;
    opacity: 0.6;
}

/* Поддержка Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particles {
        display: none; 
    }
    
    body {
        animation: none;
        background: var(--primary);
    }
    
    .hero-title {
        animation: none;
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
    
    .rotating-text {
        animation: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 20px;
    }

    .hero {
        padding: 120px 20px 40px;
    }

    .hero-subtitle {
        font-size: 22px;
    }    

    .section {
        padding: 20px 20px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .service-card {
        padding: 30px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .services-bubbles {
        gap: 15px;
    }

    .bubble {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .service-card[data-tilt] {
        transform: none !important;
        transition: none !important;
    }
    
    .service-card[data-tilt]:hover {
        transform: translateY(-5px) !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
    }
    
}

/* Базовые стили для анимации появления */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    will-change: transform, opacity;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Анимация для разных элементов с задержками */
.hero-title {
    animation-delay: 0.2s;
}

.hero-subtitle {
    animation-delay: 0.4s;
}

.services-bubbles {
    animation-delay: 0.6s;
}

.service-card:nth-child(1) {
    animation-delay: 0.2s;
}

.service-card:nth-child(2) {
    animation-delay: 0.4s;
}

.service-card:nth-child(3) {
    animation-delay: 0.6s;
}

.contact-info {
    animation-delay: 0.2s;
}

.contact-visual {
    animation-delay: 0.4s;
}


.telegram-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    will-change: transform;
}

.telegram-link svg {
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.telegram-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.telegram-link:hover svg {
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
    transform: scale(1.1);
}

.telegram-link:active {
    transform: translateY(0) scale(0.95);
}

/* Мобильная версия */
@media (max-width: 768px) {
    .telegram-link {
        padding: 12px;
    }
}

/* DEV MODE Button */
.dev-mode-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1a1a1a;
    color: #00ff41;
    border: 2px solid #00ff41;
    padding: 12px 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 65, 0.2);
    text-decoration: none;
}

.dev-mode-btn:hover {
    background: #00ff41;
    color: #1a1a1a;
    box-shadow: 0 6px 25px rgba(0, 255, 65, 0.4);
    transform: translateY(-2px);
}

.dev-mode-btn::before {
    content: '$ ';
}

//

/* ДОБАВИТЬ стили для куба: */
@keyframes animate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.cube-container {
    position: relative;
    transform: skewY(-20deg) scale(1.1) translateY(-50px);
    animation: animate 5s linear infinite;
}

.cube {
    position: relative;
    z-index: 2;
}

.cube:nth-child(2) {
    z-index: 1;
    translate: -45px -45px;
}

.cube:nth-child(3) {
    z-index: 3;
    translate: 45px 45px;
}

.cube div {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 20px;
    translate: calc(-50px * var(--x)) calc(-45px * var(--y));
}

.cube div span {
    position: relative;
    display: inline-block;
    width: 35px;
    height: 35px;
    background: #dcdcdc; 
    z-index: calc(1 * var(--i));
    transition: 1.5s;
    border-radius: 0px 4px 4px 4px;
}

.cube div span:hover {
    transition: 0s;
    background: #ef4149;
    filter: drop-shadow(0 0 20px #ef4149);
}

.cube div span:hover:before,
.cube div span:hover:after {
    transition: 0s;
    background: #ef4149;
}

.cube div span:before {
    content: "";
    position: absolute;
    left: -28px;
    width: 28px;
    height: 100%;
    background: #fff; 
    transform-origin: right;
    transform: skewY(45deg);
    transition: 1.5s;
    border-radius: 3px 0px 3px 3px;
}

.cube div span:after {
    content: "";
    position: absolute;
    top: -28px;
    left: 0px;
    width: 100%;
    height: 28px;
    background: #f2f2f2;
    transform-origin: bottom;
    transform: skewX(45deg);
    transition: 1.5s;
    border-radius: 3px 3px 3px 0px;
}

