:root {
    --bg-color: #f2f7ff;
    --text-color: #002244;
    --primary-color: #0055ff;
    --secondary-color: #4d88ff;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: rgba(0, 85, 255, 0.15);
}

[data-theme="dark"] {
    --bg-color: #001122;
    --text-color: #ffffff;
    --primary-color: #4488ff;
    --secondary-color: #99bbff;
    --glass-bg: rgba(0, 25, 51, 0.85);
    --glass-border: rgba(68, 136, 255, 0.2);
    --shadow: rgba(0, 0, 0, 0.5);
}

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

body { 
    font-family: 'Segoe UI', sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    transition: background-color 0.4s, color 0.4s; 
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
#content-area { flex: 1; }

/* Анимированный фон */
.animated-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; animation: float 20s infinite alternate; }
.blob-1 { width: 400px; height: 400px; background: var(--primary-color); top: -100px; left: -100px; }
.blob-2 { width: 500px; height: 500px; background: var(--secondary-color); bottom: -150px; right: -100px; animation-delay: -5s; }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(100px, 100px) scale(1.2); } }

/* Глассморфизм и Шапка */
.glass-header { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 1rem 5%; background: var(--glass-bg); backdrop-filter: blur(16px); 
    position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid var(--glass-border); 
    box-shadow: 0 4px 30px var(--shadow); 
}
.glass-panel { background: var(--glass-bg); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: 0 8px 32px var(--shadow); }
.glass-btn { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 50%; width: 45px; height: 45px; cursor: pointer; backdrop-filter: blur(4px); color: var(--text-color); transition: 0.3s; font-size: 1.2rem; }
.glass-btn:hover { transform: rotate(15deg) scale(1.1); border-color: var(--primary-color); }

.logo { font-size: 2rem; font-weight: 900; z-index: 1001; } 
.logo span { color: var(--primary-color); }

nav { display: flex; align-items: center; }
nav a { color: var(--text-color); text-decoration: none; margin: 0 1rem; font-weight: 600; position: relative; padding-bottom: 5px; transition: color 0.3s; }
nav a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0; background-color: var(--primary-color); transition: width 0.3s; }
nav a:hover::after, nav a.active::after { width: 100%; }
nav a:hover, nav a.active { color: var(--primary-color); }

/* Мобильное меню */
.mobile-toggle { display: none; flex-direction: column; cursor: pointer; z-index: 1001; gap: 5px; }
.mobile-toggle span { width: 25px; height: 3px; background-color: var(--text-color); transition: 0.3s; border-radius: 3px; }

/* Секции лендинга */
.scroll-section { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; padding: 4rem 0; border-bottom: 1px solid var(--glass-border); }
.section-container { padding: 0 5%; max-width: 1200px; margin: 0 auto; width: 100%; }
h2 { text-align: center; font-size: 2.8rem; margin-bottom: 3rem; background: linear-gradient(45deg, var(--primary-color), var(--text-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Hero */
.hero { display: flex; align-items: center; justify-content: space-between; padding: 0 5%; max-width: 1200px; margin: 0 auto; width: 100%; }
.hero-content { flex: 1; max-width: 600px; }
.badge { display: inline-block; padding: 0.4rem 1rem; background: rgba(0, 85, 255, 0.1); border: 1px solid var(--primary-color); border-radius: 20px; color: var(--primary-color); font-weight: 600; margin-bottom: 1rem; }
.hero h1 { font-size: 3.5rem; margin-bottom: 1.5rem; font-weight: 800; line-height: 1.1; }
.highlight { color: var(--primary-color); position: relative; }
.highlight::after { content: ''; position: absolute; bottom: 5px; left: 0; width: 100%; height: 10px; background: var(--primary-color); opacity: 0.2; z-index: -1; }
.hero p { font-size: 1.25rem; margin-bottom: 2.5rem; opacity: 0.9; }

/* Кнопки */
.btn { padding: 1rem 2.5rem; font-size: 1.1rem; font-weight: 700; background: var(--primary-color); color: #fff; border: none; border-radius: 12px; cursor: pointer; transition: 0.3s; box-shadow: 0 10px 20px var(--shadow); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 15px 25px var(--shadow); }
.btn.outline { background: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); }
.btn.outline:hover { background: var(--primary-color); color: #fff; }
.pulse-btn { animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 85, 255, 0.4); } 70% { box-shadow: 0 0 0 15px rgba(0, 85, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 85, 255, 0); } }

/* Куб */
.hero-image { flex: 1; display: flex; justify-content: center; perspective: 1000px; }
.floating-cube { width: 200px; height: 200px; position: relative; transform-style: preserve-3d; animation: cubeRotate 20s infinite linear; }
.cube-face { position: absolute; width: 200px; height: 200px; border: 2px solid var(--primary-color); background: rgba(0, 85, 255, 0.15); backdrop-filter: blur(5px); box-shadow: inset 0 0 20px rgba(0, 85, 255, 0.2); }
.front{transform:translateZ(100px)}.back{transform:rotateY(180deg) translateZ(100px)}.right{transform:rotateY(90deg) translateZ(100px)}.left{transform:rotateY(-90deg) translateZ(100px)}.top{transform:rotateX(90deg) translateZ(100px)}.bottom{transform:rotateX(-90deg) translateZ(100px)}
@keyframes cubeRotate { 100% { transform: rotateX(360deg) rotateY(360deg); } }

/* Карточки услуг */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.tilt-card { padding: 3rem 2rem; text-align: center; border-radius: 20px; transition: 0.3s; cursor: pointer; position: relative; overflow: hidden; background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); }
.tilt-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px var(--shadow); border-color: var(--primary-color); }
.card-icon { font-size: 4rem; margin-bottom: 1.5rem; transition: 0.3s; }
.tilt-card:hover .card-icon { transform: scale(1.1); }
.click-hint { display: block; margin-top: 1.5rem; font-size: 0.8rem; color: var(--primary-color); opacity: 0; transition: 0.3s; }
.tilt-card:hover .click-hint { opacity: 1; }

/* Галерея */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.gallery-item { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 4/3; cursor: pointer; }
.img-placeholder { width: 100%; height: 100%; background: linear-gradient(45deg, var(--border-color), var(--glass-border)); display: flex; align-items: center; justify-content: center; color: var(--text-color); font-weight: bold; font-size: 1.2rem; transition: 0.5s; text-align: center; padding: 1rem; border: 1px dashed var(--primary-color); }
.gallery-item:hover .img-placeholder { transform: scale(1.05); filter: brightness(0.7); }
.gallery-info { position: absolute; bottom: -60px; left: 0; width: 100%; padding: 1.5rem; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: white; transition: 0.3s; text-align: center; font-weight: bold; }
.gallery-item:hover .gallery-info { bottom: 0; }

/* Каталог */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.catalog-item { overflow: hidden; transition: 0.3s; display: flex; flex-direction: column; }
.catalog-item:hover { transform: translateY(-5px); box-shadow: 0 15px 30px var(--shadow); }
.catalog-item .img-placeholder { height: 220px; border: none; border-bottom: 1px solid var(--glass-border); }
.cat-content { padding: 1.5rem; text-align: center; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.cat-content h3 { font-size: 1.2rem; margin-bottom: 1rem; }
.price { font-size: 1.5rem; font-weight: 800; color: var(--primary-color); margin-bottom: 1.5rem; }
.btn-small { padding: 0.8rem 1.5rem; font-size: 1rem; }

/* Контакты */
.contact-card { padding: 4rem 2rem; text-align: center; max-width: 700px; margin: 0 auto; }
.contact-card p { font-size: 1.2rem; margin-bottom: 2rem; }
.contact-links { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.hover-lift { transition: 0.3s; text-decoration: none; } .hover-lift:hover { transform: translateY(-5px); }

/* Модалка */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,17,34,0.6); backdrop-filter: blur(5px); align-items: center; justify-content: center; padding: 1rem; }
.modal.active { display: flex; animation: fadeIn 0.3s; }
.modal-content { width: 100%; max-width: 500px; padding: 3rem; position: relative; text-align: center; }
.close-btn { position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem; cursor: pointer; color: var(--text-color); transition: 0.3s; }
.close-btn:hover { color: var(--primary-color); transform: rotate(90deg); }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

footer { text-align: center; padding: 2rem; font-weight: bold; opacity: 0.7; }

/* Адаптив для мобильных (Media Queries) */
@media(max-width: 900px) {
    .hero { flex-direction: column; text-align: center; padding-top: 4rem; }
    .hero-image { margin-top: 4rem; }
    h2 { font-size: 2.2rem; }
    .hero h1 { font-size: 2.8rem; }
}

@media(max-width: 768px) {
    /* Мобильное меню */
    .mobile-toggle { display: flex; }
    nav { 
        position: fixed; top: 70px; left: -100%; width: 100%; height: calc(100vh - 70px); 
        background: var(--glass-bg); backdrop-filter: blur(20px); flex-direction: column; 
        justify-content: flex-start; padding-top: 2rem; transition: left 0.3s ease; 
        border-top: 1px solid var(--glass-border);
    }
    nav.open { left: 0; }
    nav a { margin: 1.5rem 0; font-size: 1.5rem; }
    #theme-toggle { margin-left: auto; margin-right: 1rem; }
    
    .scroll-section { padding: 3rem 0; min-height: auto; }
    .contact-links { flex-direction: column; }
    .cards, .gallery-grid, .catalog-grid { grid-template-columns: 1fr; }
}
