@font-face {
    font-family: 'Akrobat';
    src: url('../fonts/Akrobat-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Akrobat';
    src: url('../fonts/Akrobat-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* --- VARIABLES & BASE --- */
:root {
    --bg-dark: #07090f;
    --primary-orange: #ff9d00;
    --primary-orange-hover: #ff6f00;
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-light: #ffffff;
    --text-muted: #a0a5b5;
    --scrollbar-color: #ff9d00;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: 115px;
    scrollbar-width: none; /* Скрываем скроллбар в Firefox */
    -ms-overflow-style: none; /* Скрываем в IE/Edge */
    overscroll-behavior-y: none;
}

body {
    font-family: 'Akrobat', sans-serif;
    font-weight: 300;
    letter-spacing: 0.02em;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    overscroll-behavior-y: none;
}

/* --- SCROLL PROGRESS BAR --- */
#scroll-progress {
    position: fixed; top: 0; left: 0; min-height: 3px; height: 3px;
    background: var(--scrollbar-color); width: 0%;
    z-index: 10001; transition: width 0.1s linear, background 0.5s ease, box-shadow 0.5s ease;
    box-shadow: 0 0 10px var(--scrollbar-color);
}

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

.text-center { text-align: center; }

h1, h2, h3 { line-height: 1.2; margin-bottom: 1rem; }
.section-title { font-size: 2.5rem; margin-top: 3rem; margin-bottom: 3rem; color: var(--primary-orange); }

/* --- GLASSMORPHISM --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.glass-btn {
    display: inline-block;
    background: linear-gradient(135deg, rgba(255,157,0,0.8), rgba(255,111,0,0.8));
    color: white;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}
.glass-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255,157,0,0.3);
}

/* --- BACKGROUND SHAPES --- */
.bg-shapes {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100dvh;
    overflow: visible; z-index: -1; pointer-events: none;
}
.shape-wrapper {
    position: absolute; width: 100%; height: 100%;
}
.shape {
    position: absolute;
    filter: blur(200px);
    -webkit-filter: blur(200px);
    border-radius: 50%;
    z-index: -1;
}
.shape-1 { width: 45rem; height: 45rem; top: 0; left: 0; background: #6200ea; opacity: 0.4; animation: slow-float 20s infinite ease-in-out; }
.shape-2 { width: 35rem; height: 35rem; top: 0; left: 0; background: #ff6f00; opacity: 0.3; border-radius: 20%; animation: slow-float 25s -5s infinite ease-in-out; }
.shape-3 { width: 40rem; height: 40rem; top: 0; left: 0; background: #00b0ff; opacity: 0.3; animation: slow-rotate 15s infinite linear; }
.shape-4 { width: 25rem; height: 25rem; top: 0; left: 0; background: #ff007f; opacity: 0.2; animation: slow-float 18s -2s infinite ease-in-out; }

@keyframes slow-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5rem, -5rem) scale(1.1); }
}
@keyframes slow-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- HEADER & NAV (ISLAND) --- */
.header {
    position: absolute; top: 20px; width: 90%; left: 5%; z-index: 50;
    padding: 15px 30px; transition: all 0.4s ease;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.header.scrolled {
    position: fixed; top: 15px; padding: 15px 30px;
    background: rgba(30, 32, 40, 0.6);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8rem; font-weight: 800; letter-spacing: 1px; display: inline-block; cursor: pointer; flex-shrink: 0; }
.logo span { color: var(--primary-orange); }
.desktop-burger {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    margin-left: 15px;
    vertical-align: middle;
}
.desktop-burger span {
    display: block;
    height: 3px;
    background: var(--primary-orange);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 157, 0, 0.8), 0 0 20px rgba(255, 157, 0, 0.4);
    transform-origin: left center;
}
.desktop-burger span:nth-child(1) { width: 18px; transform: rotate(27deg); }
.desktop-burger span:nth-child(2) { width: 18px; transform: translateY(8px) rotate(-27deg); }
.desktop-burger span:nth-child(3) { width: 10px; transform: translateX(18px); }

@media (max-width: 768px) { .desktop-burger { display: none; } }
.nav-links a { 
    color: var(--primary-orange) !important; 
    font-weight: 600; 
    font-size: 1.1rem; 
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(255, 157, 0, 0.4);
    position: relative; 
    text-decoration: none; 
    display: inline-block; 
}
.nav-links a .typed-text { position: absolute; left: 0; top: 0; height: 100%; white-space: nowrap; display: inline-flex; align-items: center; pointer-events: none; }
.nav-links a .typed-text::after { content: '_'; display: inline-block; visibility: hidden; margin-left: 2px; color: var(--primary-orange); opacity: 1; }
.nav-links a.typing .typed-text::after { visibility: visible; }
.nav-links a.done-blinking .typed-text::after { visibility: visible; animation: blink-cursor 0.8s step-end infinite; }
@keyframes blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.nav-links { display: flex; list-style: none; gap: 0; align-items: center; margin-left: 20px; order: 1; }
.nav-links li { padding: 0 1rem; }
.lang-btn { display: inline-block; margin-left: auto; padding: 6px 15px; border-radius: 20px; font-size: 0.9rem; flex-shrink: 0; order: 2; }
/* --- BURGER (mobile toggle) --- */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    overflow: visible;
    transition: all 0.4s ease;
}
.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-orange); /* Orange initially */
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left center;
}

/* Active state: 3 bars transform into ">_" */
.menu-toggle.is-active span {
    background: var(--primary-orange);
    box-shadow: 0 0 10px rgba(255, 157, 0, 0.8), 0 0 20px rgba(255, 157, 0, 0.4); /* Glow effect */
}
.menu-toggle.is-active span:nth-child(1) {
    /* Top arm of ">" */
    width: 18px;
    transform: rotate(27deg);
}
.menu-toggle.is-active span:nth-child(2) {
    /* Bottom arm of ">": shifts down to bar 3's level, rotates up */
    width: 18px;
    transform: translateY(8px) rotate(-27deg);
}
.menu-toggle.is-active span:nth-child(3) {
    /* Underscore "_" stays flat at the bottom, slides right */
    width: 10px;
    transform: translateX(18px);
}

/* --- LINKS --- */
.link-center { position: relative; text-decoration: none; color: white; font-size: 1.1rem; padding: 5px 0; }
.link-center::before {
    content: ''; position: absolute; width: 100%; height: 2px; bottom: 0; left: 0;
    background-color: var(--primary-orange);
    transform: scaleX(0); transform-origin: center; transition: transform 0.3s ease-in-out;
}
.link-center:hover::before { transform: scaleX(1); }

/* --- SECTIONS SPACING --- */
section { padding: 90px 0; }

/* --- HERO --- */
.hero {
    display: flex; align-items: center; justify-content: center;
    min-height: 100svh; text-align: center; position: relative; z-index: 1;
}
.hero-content { padding: 4rem 2rem; max-width: 800px; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.hero h1 { font-family: 'Akrobat', sans-serif; font-weight: 600; font-size: 3.5rem; letter-spacing: 0.05em; background: linear-gradient(120deg, #fff, #b0b0b0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; border-right: none; padding-right: 5px; animation: none; }
.hero h1.done { border-right: none; animation: none; }
.hero p { font-size: 1.2rem; color: var(--text-muted); }

/* --- SERVICES GRID --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.service-card {
    padding: 2.5rem 2rem; text-align: center; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: linear-gradient(145deg, rgba(20, 22, 30, 0.9), rgba(10, 12, 18, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}
.service-card:hover, .service-card.mobile-focus {
    transform: translateY(-8px);
    border-color: transparent;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 20px rgba(255, 157, 0, 0.15);
}
/* Временно отключены рамка и подсветка
.service-card::before, .orbit-center::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 157, 0, 0.15), transparent 40%);
    opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
.service-card::after, .orbit-center::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255,157,0,1), rgba(255,255,255,0.8), #9d00ff);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
.service-card:hover::before, .orbit-center:hover::before, .service-card.mobile-focus::before { opacity: 1; }
.service-card:hover::after, .orbit-center:hover::after, .service-card.mobile-focus::after { opacity: 1; filter: drop-shadow(0 0 8px rgba(255,157,0,0.8)); }
*/
.service-icon { color: var(--primary-orange); margin-bottom: 1.5rem; transition: transform 0.4s ease; display: inline-flex; justify-content: center; align-items: center; width: 64px; height: 64px; }
.service-icon svg { width: 100%; height: 100%; stroke-width: 1.5; filter: drop-shadow(0 0 0 transparent); transition: filter 0.4s ease; }
.service-card:hover .service-icon, .service-card.mobile-focus .service-icon { transform: scale(1.1); }
.service-card:hover .service-icon svg, .service-card.mobile-focus .service-icon svg { filter: drop-shadow(0 0 12px var(--primary-orange)); }
.service-card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--text-light); }
.orbit-center:hover {
    border-color: transparent !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 20px rgba(255, 157, 0, 0.15) !important;
    cursor: default;
}

/* --- ORBIT (PROJECTS) --- */
.orbit-container {
    position: relative; width: 60rem; height: 60rem;
    margin: -4rem 0 3rem 0; border-radius: 50%;
    left: 50%; transform: translateX(-50%);
    z-index: 20;
}
.orbit-container:has(.item:hover) {
    z-index: 200;
}
.orbit-path {
    position: absolute; top: 50%; left: 50%;
    width: var(--desk-size, 100%);
    height: var(--desk-size, 100%);
    border: 1px dashed rgba(255, 255, 255, 0.15); border-radius: 50%;
    transform: translate(-50%, -50%) rotateZ(var(--tilt, 0deg)) rotateX(60deg);
    pointer-events: none;
}
.orbit-center {
    position: absolute;
    top: 50% !important;
    left: 50% !important;
    width: 12rem; height: 12rem;
    display: flex; justify-content: center; align-items: center; z-index: -1;
    font-weight: 800; font-size: 1.5rem; color: var(--text-light);
    text-align: center; border-radius: 50%;
    transform: translate(-50%, -50%) !important;
    background: rgba(30,32,45, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 0 40px rgba(0,0,0,0.6), 0 0 20px rgba(255,157,0,0.1);
    transition: all 0.4s ease;
    pointer-events: auto;
}
.item {
    position: absolute; top: 50%; left: 50%;
    /* Dynamic sizing */
    width: max-content; height: 5rem;
    border-radius: 2.5rem;
    cursor: pointer; z-index: 2;
    animation: spin var(--duration, 30s) var(--delay) linear infinite;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(30, 32, 40, 0.65);
    backdrop-filter: blur(20px);
    padding: 0 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.item-inner {
    display: flex; align-items: center; justify-content: flex-start; width: 100%; height: 100%; gap: 0;
}
.item-img {
    width: 0; height: 0; opacity: 0; overflow: hidden; border-radius: 12px; transition: all 0.4s ease; flex-shrink: 0;
}
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.item-content-wrapper {
    display: flex; flex-direction: column; justify-content: center;
    white-space: nowrap; transition: all 0.4s ease; flex: 1; padding: 0.2rem 0;
    overflow: hidden;
}
.item-props {
    display: flex; align-items: center; gap: 6px; margin-top: 2px; margin-bottom: 0;
}
.item-props svg { width: 18px; height: 18px; color: rgba(255,255,255,0.4); transition: all 0.4s ease; }
.luxe-badge { font-size: 0.7rem; font-weight: 500; padding: 2px 6px; border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.5); border-radius: 12px; transition: all 0.4s ease; }

.item-title { font-size: 1.05rem; margin: 0; color: var(--text-light); transition: all 0.4s ease; text-overflow: ellipsis; overflow: hidden; letter-spacing: 0.03em;}
.item-desc { height: 0; opacity: 0; margin: 0; font-size: 0.85rem; color: var(--text-muted); white-space: normal; transition: all 0.4s ease; overflow: hidden; line-height: 1.4; max-width: 0px; }

/* Specific item hover logic */
.item:hover {
    animation-play-state: paused;
    z-index: 1000;
    translate: 0 0 1000px;
    max-width: 32rem; height: 12.5rem;
    border-radius: 20px;
    background: rgba(18, 20, 26, 0.95);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 25px rgba(255, 157, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}
.item:hover .item-inner { border-radius: 20px; }
.item:hover .item-img { width: 10rem; height: 10rem; opacity: 1; margin: 0 0.8rem 0 0; }
.item:hover .item-content-wrapper { padding: 0.5rem 0; }
.item:hover .item-title { font-size: 1.35rem; margin-bottom: 0px; white-space: normal; color: var(--primary-orange); }
.item:hover .item-desc { height: 4.5rem; opacity: 1; margin-bottom: 4px; margin-top: 4px; max-width: 20rem; }
.item:hover .item-props { margin-top: 4px; margin-bottom: 4px; }
.item:hover .item-props svg { color: var(--primary-orange); filter: drop-shadow(0 0 8px rgba(255,157,0,0.6)); }
.item:hover .luxe-badge { border-color: var(--primary-orange); color: var(--primary-orange); box-shadow: 0 0 8px rgba(255,157,0,0.2); }

@keyframes spin {
    0% { transform: rotateZ(var(--tilt, 30deg)) rotateX(60deg) rotate(0deg) translate(var(--radius)) rotate(0deg) rotateX(-60deg) rotateZ(calc(-1 * var(--tilt, 30deg))) translate(-50%, -50%); }
    100% { transform: rotateZ(var(--tilt, 30deg)) rotateX(60deg) rotate(1turn) translate(var(--radius)) rotate(-1turn) rotateX(-60deg) rotateZ(calc(-1 * var(--tilt, 30deg))) translate(-50%, -50%); }
}

/* --- STATS COUNTERS --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.stat-card { padding: 2rem; text-align: center; }
.stat-icon { font-size: 2.5rem; margin-bottom: 10px; }
.stat-number { font-size: 3rem; font-weight: 800; color: var(--primary-orange); transition: color 0.3s; }
.stat-number.finished { text-shadow: 0 0 15px var(--primary-orange); }
.stat-label { font-size: 1.1rem; color: var(--text-muted); }

/* --- ABOUT --- */
.about-card { padding: 3rem; text-align: center; font-size: 1.2rem; }

/* --- CONTACT SEC --- */
.contact-centered { display: flex; justify-content: center; }
.contact-card { padding: 2rem; position: relative; width: 100%; max-width: 600px; border-radius: 20px; transition: border-color 0.4s ease, box-shadow 0.4s ease; }
/* Временно отключены рамка и подсветка
.contact-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(255, 157, 0, 0.04), transparent 60%); opacity: 0; transition: opacity 0.4s ease; pointer-events: none; border-radius: inherit; }
.contact-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2px; background: linear-gradient(135deg, rgba(255, 157, 0, 1), rgba(255, 255, 255, 0.8), #9d00ff); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.4s ease; pointer-events: none; }
.contact-card:focus-within { border-color: transparent; box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px rgba(255,157,0,0.1); }
.contact-card:focus-within::before, .contact-card:focus-within::after { opacity: 1; }
.contact-card:focus-within::after { filter: drop-shadow(0 0 8px rgba(255, 157, 0, 0.6)); }
*/
.form-group { margin-bottom: 1.5rem; text-align: left; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--text-muted); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 12px 15px; border-radius: 10px;
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.2);
    color: white; font-family: 'Akrobat', sans-serif; font-weight: 300; font-size: 1rem; transition: border-color 0.3s;
}

/* File Attachment Styles */
.textarea-wrapper { position: relative; width: 100%; }
.textarea-wrapper textarea { padding-bottom: 40px; }
.file-attach-container { position: absolute; bottom: 10px; right: 15px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.hidden-file-input { display: none; }
.file-attach-btn { pointer-events: auto; cursor: pointer; color: rgba(255, 255, 255, 0.4); transition: all 0.3s ease; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; }
.file-attach-btn svg { width: 100%; height: 100%; }
.file-attach-btn:hover { color: var(--primary-orange); transform: scale(1.1); }
.textarea-wrapper:focus-within .file-attach-btn { color: var(--primary-orange); filter: drop-shadow(0 0 3px rgba(255, 157, 0, 0.6)); }
.file-attach-container.has-file .file-attach-btn { color: #4caf50; filter: drop-shadow(0 0 3px rgba(76, 175, 80, 0.6)); }
.file-name-display { pointer-events: auto; font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-attach-container.has-file .file-name-display { color: #4caf50; }
.remove-file-btn { pointer-events: auto; background: transparent; border: none; color: rgba(255, 255, 255, 0.5); font-size: 1.2rem; cursor: pointer; line-height: 1; padding: 0; outline: none; transition: color 0.3s; }
.remove-file-btn:hover { color: #ff1744; }

.form-group select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 1em;
    padding-right: 30px;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--primary-orange);
}
.form-group option { background: var(--bg-dark); }
.btn-submit { display: flex; justify-content: center; align-items: center; width: 100%; border: none; font-size: 1.1rem; }
.social-links { margin-top: 2rem; text-align: center; }

/* Success Overlay */
.form-success {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(10, 11, 16, 0.9); z-index: 10; border-radius: 20px;
}
.success-content { text-align: center; }
.success-icon { font-size: 4rem; color: #4caf50; margin-bottom: 1rem; }
.success-content h3 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.success-content button { margin-top: 1.5rem; border: none; }

/* MAP */
.map-wrapper { overflow: hidden; border-radius: 20px; line-height: 0; height: 100%; min-height: 400px; display: flex; }
.google-map {
    width: 100%; height: 100%; min-height: 400px;
    filter: grayscale(1) invert(0.9) opacity(0.8); transition: all 0.5s ease;
}
.map-wrapper:hover .google-map { filter: grayscale(0.3) invert(0.9) opacity(1); }

/* --- FOOTER --- */
.footer { padding: 2rem 0; border-top: 1px solid var(--glass-border); margin-top: 3rem; color: var(--text-muted); }

/* --- SCROLL REVEAL --- */
.reveal { opacity: 0; transform: translateY(50px); transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease; will-change: transform, opacity; }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* --- SCROLLBAR --- */
::-webkit-scrollbar { 
    display: none; /* Скрываем нативный скроллбар для Chrome/Safari/Opera */
}


/* --- BACK TO TOP --- */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem; width: 50px; height: 50px;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.4s ease;
    border: none; color: white; z-index: 99;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-orange); }

/* --- MEDIA QUERIES --- */
@media (max-width: 1024px) {
    .orbit-container { width: 45rem; height: 45rem; }
    .orbit-path {
        width: var(--tab-size, 100%);
        height: var(--tab-size, 100%);
        transform: translate(-50%, -50%) rotateZ(var(--tilt, 0deg)) rotateX(50deg);
    }
    @keyframes spin {
        0% { transform: rotateZ(var(--tilt, 30deg)) rotateX(50deg) rotate(0deg) translate(var(--mobile-radius)) rotate(0deg) rotateX(-50deg) rotateZ(calc(-1 * var(--tilt, 30deg))) translate(-50%, -50%); }
        100% { transform: rotateZ(var(--tilt, 30deg)) rotateX(50deg) rotate(1turn) translate(var(--mobile-radius)) rotate(-1turn) rotateX(-50deg) rotateZ(calc(-1 * var(--tilt, 30deg))) translate(-50%, -50%); }
    }
}
@media (max-width: 768px) {
    .nav-container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        width: 100%;
        padding: 0;
    }
    .menu-toggle { display: flex; flex-direction: column; grid-column: 1; grid-row: 1; justify-self: start; position: relative; z-index: 200; pointer-events: auto; }
    .logo { grid-column: 2; grid-row: 1; justify-self: center; font-size: 1.5rem; position: relative; z-index: 200; }
    .lang-btn { grid-column: 3; grid-row: 1; justify-self: end; margin-left: 0; position: relative; z-index: 200; order: 0; }
    .header {
        max-height: 74px; /* Fixed height for closed state */
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .header.nav-active {
        max-height: 400px; /* Large enough for menu */
    }

    .nav-links {
        display: none; /* Hidden by default on mobile */
        grid-column: 1 / span 3; /* Take full width of nav-container grid */
        grid-row: 2; /* explicitly reserve row 2 below the header buttons */
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08); /* Separator line */
        gap: 0;
    }

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

    .nav-links li { 
        padding: 0.6rem 0; 
        width: 100%; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.03); 
    }
    .nav-links li:last-child { border-bottom: none; }
    
    .nav-links.mobile-active {
        /* Keep class for typewriter trigger but remove positioning hacks */
        transform: none;
        opacity: 1;
        visibility: visible;
    }

    .nav-links a { font-size: 1.05rem; padding: 0.2rem 0; color: var(--primary-orange) !important; display: block; }

    @keyframes blink-cursor {
        0%, 100% { opacity: 1; }
        50% { opacity: 0; }
    }

    /* --- Mobile: Reduce shapes for GPU savings --- */
    .shape { filter: blur(120px) !important; -webkit-filter: blur(120px) !important; animation: none !important; }
    .shape-wrapper:nth-child(n+6) { display: none !important; } /* Keep only 5 shapes */

    /* --- Mobile: Disable heavy GPU filters and animations on Services --- */
    .service-card.glass {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(20, 22, 30, 0.95); /* Fallback to solid color without blur */
    }
    .service-card {
        transition: none !important;
        transform: none !important;
        box-shadow: none !important;
        border: 1px solid rgba(255, 255, 255, 0.08); /* slight border */
    }
    /* --- Mobile: Disable all reveal transitions to prevent iOS scroll anchor snapping --- */
    .reveal {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
        animation: none !important;
    }
    
    /* --- Mobile: Hide noise overlay --- */
    .noise-overlay { display: none; }

    /* --- Mobile: Disable parallax on section titles --- */
    .section-title { transition: none; transform: none !important; }

    .orbit-container { width: 30rem; height: 30rem; margin: 2rem 0; }
    .orbit-path {
        display: block;
        width: var(--mob-size, 100%);
        height: var(--mob-size, 100%);
        transform: translate(-50%, -50%) rotateZ(var(--tilt, 0deg)) rotateX(40deg);
    }
    .orbit-center { width: 8rem; height: 8rem; font-size: 1rem; }
    .item { height: 3.5rem; padding: 0 1rem; border-radius: 1.75rem; animation-timing-function: steps(60, end); }
    .item-title { font-size: 0.8rem; }
    .item-props svg { width: 16px; height: 16px; }
    .luxe-badge { font-size: 0.6rem; padding: 1px 4px; }
    .item:hover { max-width: 22rem; height: 9rem; border-radius: 12px; }
    .item:hover .item-img { width: 7rem; height: 7rem; margin: 0 0.5rem 0 0; border-radius: 8px;}
    .item:hover .item-content-wrapper { padding: 5px; }
    .item:hover .item-title { font-size: 1rem; margin-bottom: 2px;}
    .item:hover .item-desc { height: 3rem; font-size: 0.75rem; margin-bottom: 5px; }
    @keyframes spin {
        0% { transform: rotateZ(var(--tilt, 30deg)) rotateX(40deg) rotate(0deg) translate(var(--mobile-radius)) rotate(0deg) rotateX(-40deg) rotateZ(calc(-1 * var(--tilt, 30deg))) translate(-50%, -50%); }
        100% { transform: rotateZ(var(--tilt, 30deg)) rotateX(40deg) rotate(1turn) translate(var(--mobile-radius)) rotate(-1turn) rotateX(-40deg) rotateZ(calc(-1 * var(--tilt, 30deg))) translate(-50%, -50%); }
    }

    /* Stats mobile centering */
    .stats-grid { grid-template-columns: 1fr; justify-items: center; }
    .stat-card { width: 100%; max-width: 320px; }
}

/* AI CHAT WIDGET */
.chat-toggle-btn {
    position: fixed; bottom: 20px; right: 20px; width: 60px; height: 60px;
    border-radius: 50%; background: var(--primary-orange); color: white;
    font-size: 24px; border: none; cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
    z-index: 1000; transition: all 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.chat-toggle-btn:hover { transform: scale(1.1); }
.chat-toggle-btn.active { box-shadow: 0 0 20px var(--primary-orange), 0 0 40px rgba(255, 157, 0, 0.4); }

#ai-chat-widget {
    position: fixed; bottom: 90px; right: 20px; width: 350px;
    max-width: calc(100% - 40px); height: 500px;
    max-height: calc(100vh - 110px); display: flex; flex-direction: column;
    z-index: 1000; overflow: hidden; font-family: 'Inter', sans-serif;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#ai-chat-widget.hidden { opacity: 0; pointer-events: none; transform: translateY(20px); }

.chat-header {
    padding: 15px; background: rgba(0, 0, 0, 0.5);
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--glass-border);
}
.chat-header h3 { font-size: 16px; margin: 0; font-family: 'Inter', sans-serif;}
#close-chat { background: transparent; border: none; color: white; font-size: 24px; cursor: pointer; }

.chat-messages { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 3px; }

.message { padding: 10px 15px; border-radius: 15px; max-width: 85%; font-size: 14px; line-height: 1.4; word-wrap: break-word; }
.message.assistant { background: rgba(255, 255, 255, 0.1); align-self: flex-start; border-bottom-left-radius: 5px; }
.message.user { background: var(--primary-orange); align-self: flex-end; border-bottom-right-radius: 5px; }

.chat-input-area { padding: 15px; border-top: 1px solid var(--glass-border); display: flex; gap: 10px; background: rgba(10, 11, 16, 0.8); }
#chat-input {
    flex: 1; padding: 12px 15px; border-radius: 20px; border: none;
    background: rgba(255, 255, 255, 0.1); color: white; outline: none; font-size: 14px; transition: background 0.3s;
}
#chat-input:focus { background: rgba(255, 255, 255, 0.15); }
#chat-input::placeholder { color: rgba(255,255,255,0.6); }

#send-chat-btn {
    background: var(--primary-orange); color: white; border: none; padding: 10px 20px;
    border-radius: 20px; cursor: pointer; font-weight: bold; transition: background 0.3s;
}
#send-chat-btn:hover { background: #e68d00; }

/* --- PRELOADER --- */
#preloader {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh;
    background: var(--bg-dark); z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 150;
    opacity: 0; visibility: hidden; transition: all 0.4s ease;
}
.nav-overlay.active { opacity: 1; visibility: visible; }
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-spinner {
    width: 50px; height: 50px;
    border: 4px solid rgba(255,157,0,0.2);
    border-top-color: var(--primary-orange);
    border-radius: 50%;
    animation: loader-spin 0.8s linear infinite;
}
@keyframes loader-spin {
    to { transform: rotate(360deg); }
}

/* --- NOISE OVERLAY --- */
.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.025; pointer-events: none; z-index: 0;
}

/* --- PARALLAX SECTION TITLES --- */
.section-title {
    transition: transform 0.1s linear;
}

/* --- ORBIT PAUSE (IntersectionObserver) --- */
.orbit-paused .item {
    animation-play-state: paused;
}

/* --- ACCESSIBILITY: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .item { animation: none; }
    .shape { animation: none; }
    .reveal { transition-duration: 0.01s; }
    .preloader-spinner { animation-duration: 2s; }
}

/* --- TYPEWRITER --- */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-orange); }
}
.hero h1.typed { border-right: none; }
