
/* --- FONTS (self-hosted Manrope v20) --- */
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/manrope-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/manrope-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/manrope-greek.woff2') format('woff2');
    unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/manrope-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/manrope-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/manrope-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- CSS VARIABLES & RESET --- */
:root {
    --bg-color: #0f172a; 
    --card-bg: #1e293b; 
    --text-main: #f8fafc; 
    --text-muted: #94a3b8; 
    --accent-primary: #3b82f6; 
    --accent-secondary: #8b5cf6; 
    --gradient-main: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --radius: 12px;
    --container-width: 1200px;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 { font-weight: 700; line-height: 1.2; }
h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    border: none;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}
.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
}
.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* --- HEADER / NAV --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { font-weight: 700; font-size: 1.2rem; z-index: 1001; }

.nav-links { display: flex; gap: 30px; }
.nav-links a { font-size: 0.95rem; color: var(--text-muted); transition: var(--transition); }
.nav-links a:hover { color: var(--accent-primary); }

/* Mobile Menu Styles */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}
.bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition);
}
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
    z-index: 1000;
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu ul { text-align: center; }
.mobile-menu li { margin: 25px 0; }
.mobile-menu a { font-size: 1.5rem; color: var(--text-main); }

/* Hamburger Animation */
.hamburger.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* --- HERO SECTION --- */
.hero {
    padding: 160px 0 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 90vh;
    position: relative;
    overflow: hidden;
}
.hero-content { flex: 1; max-width: 600px; z-index: 2; }
.hero h1 { font-size: 3.5rem; margin-bottom: 20px; letter-spacing: -1px; }
.hero-offer { font-size: 1.25rem; color: var(--text-main); margin-bottom: 10px; }
.hero-suboffer { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 40px; }
.hero-buttons { display: flex; gap: 20px; }

/* Three.js Container */
#canvas-container {
    flex: 1;
    height: 500px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

/* --- SECTIONS --- */
section { padding: 100px 0; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card {
    background: var(--card-bg); padding: 30px; border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.05); transition: var(--transition);
}
.service-card:hover { transform: translateY(-5px); border-color: var(--accent-primary); }
.service-icon { font-size: 2.5rem; margin-bottom: 20px; display: block; }
.service-card p { color: var(--text-muted); }

/* Cases */
.cases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }
.case-card {
    background: var(--card-bg); border-radius: var(--radius); overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05); transition: var(--transition); cursor: pointer;
}
.case-card:hover { transform: scale(1.02); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.case-img-placeholder {
    height: 280px; background: linear-gradient(45deg, #1e293b, #334155);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 0.9rem; position: relative;
}
/* --- НОВЫЙ КОД (добавьте это) --- */
.case-img {
    width: 100%;
    height: 280px; /* Высота должна совпадать с placeholder */
    object-fit: cover; /* Обрезает лишнее, сохраняя пропорции */
    display: block;
}
/* Click hint overlay */
.case-img-placeholder::after {
    content: "Подробнее"; position: absolute; opacity: 0;
    background: rgba(0,0,0,0.6); padding: 5px 15px; border-radius: 20px;
    transition: var(--transition); color: white; border: 1px solid white;
}

.case-card:hover .case-img-placeholder::after { opacity: 1; }

.case-content { padding: 25px; }
.case-content h3 { margin-bottom: 15px; color: var(--accent-primary); }
.case-row { margin-bottom: 8px; display: flex; align-items: flex-start; font-size: 0.9rem; }
.case-label { font-weight: 700; width: 60px; flex-shrink: 0; }
.label-before { color: #f87171; }
.label-after { color: #4ade80; }

/* Process */
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.step-card { text-align: center; position: relative; }
.step-number { font-size: 3rem; font-weight: 800; color: rgba(255,255,255,0.05); position: absolute; top: -20px; left: 50%; transform: translateX(-50%); }
.step-content { position: relative; z-index: 1; padding-top: 20px; }
.step-title { font-weight: 700; margin-bottom: 10px; color: var(--accent-primary); }

/* Advantages */
.advantages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.adv-card { background: rgba(255,255,255,0.02); padding: 20px; border-radius: var(--radius); border-left: 3px solid var(--accent-secondary); }

/* --- FAQ SECTION --- */
.faq-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    margin-bottom: 15px;
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
}
.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: background 0.3s;
}
.faq-question:hover { background: rgba(255,255,255,0.03); }
.faq-icon { transition: transform 0.3s; font-size: 1.2rem; color: var(--accent-primary); }
.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.faq-item.active .faq-answer { padding-bottom: 20px; }

/* --- MODAL WINDOW --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
    z-index: 2000; opacity: 0; visibility: hidden;
    transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-content {
    background: #1e293b; width: 100%; max-width: 600px;
    border-radius: 16px; padding: 40px; position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    transform: translateY(20px); transition: transform 0.3s ease;
}
.modal-overlay.open .modal-content { transform: translateY(0); }
.close-modal {
    position: absolute; top: 20px; right: 20px;
    font-size: 1.5rem; cursor: pointer; color: var(--text-muted);
    transition: color 0.2s;
}
.close-modal:hover { color: white; }
.modal-details p { margin-bottom: 10px; color: var(--text-muted); }
.modal-details h4 { color: white; margin-top: 20px; margin-bottom: 5px; }

/* --- CONTACTS --- */
.contact-section { background: linear-gradient(to bottom, var(--bg-color), #0b1120); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 20px; }
.contact-card {
    background: var(--card-bg); padding: 40px 20px; border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.05); text-align: center; transition: var(--transition);
}
.contact-card:hover { transform: translateY(-5px); border-color: var(--accent-primary); }
.contact-icon { font-size: 3rem; margin-bottom: 20px; color: var(--accent-primary); }
.contact-value { color: var(--text-muted); font-size: 1.1rem; }

/* --- FOOTER --- */
footer { padding: 50px 0; border-top: 1px solid rgba(255,255,255,0.05); text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.footer-content { display: flex; flex-direction: column; gap: 20px; align-items: center; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .hero { flex-direction: column; padding-top: 100px; text-align: center; }
    .hero h1 { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; width: 100%; }
    #canvas-container { width: 100%; height: 350px; }
    .process-steps { grid-template-columns: 1fr; gap: 40px; }
    .step-number { position: static; transform: none; margin-bottom: 10px; font-size: 2.5rem; display: block; }
}

.fade-up { opacity: 0; transform: translateY(30px); transition: 0.6s ease-out; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* --- CONTACT FORM LAYOUT --- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    max-width: 900px;
    margin: 0 auto;
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    color: var(--text-main);
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.btn-submit { width: 100%; padding: 16px; font-size: 1rem; }
.form-hint { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-top: 12px; }
.form-success { text-align: center; color: #4ade80; font-size: 1.1rem; padding: 40px 20px; }
.form-error { display: none; color: #f87171; font-size: 0.9rem; margin-top: 10px; text-align: center; }
.form-error a { color: var(--accent-primary); }

.contact-info { padding-top: 10px; }
.contact-info-title { font-weight: 600; color: var(--text-muted); margin-bottom: 24px; }
.contact-links { display: flex; flex-direction: column; gap: 16px; }
.contact-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
    color: var(--text-main);
}
.contact-link:hover { border-color: var(--accent-primary); transform: translateX(4px); }
.contact-link-icon { font-size: 1.5rem; }

@media (max-width: 768px) {
    .contact-layout { grid-template-columns: 1fr; gap: 40px; }
}

/* --- LEGAL PAGE (privacy.html) --- */
.legal-hero {
    padding: 140px 0 60px;
    background: linear-gradient(to bottom, var(--bg-color), #0b1120);
}
.legal-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}
.legal-hero p { color: var(--text-muted); font-size: 1rem; }
.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.breadcrumb a { color: var(--text-muted); transition: var(--transition); }
.breadcrumb a:hover { color: var(--accent-primary); }
.legal-meta {
    display: block;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 32px;
    border-left: 3px solid var(--accent-secondary);
    padding-left: 12px;
}
.legal-content { max-width: 800px; padding-bottom: 80px; }
.legal-content h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 2.2rem 0 0.6rem;
    background: none;
    -webkit-text-fill-color: var(--text-main);
    color: var(--text-main);
}
.legal-content p { color: var(--text-muted); margin-bottom: 0.75rem; line-height: 1.7; }
.legal-content ul {
    color: var(--text-muted);
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.7;
}
.legal-content ul li { margin-bottom: 0.25rem; }
.legal-content a { color: var(--accent-primary); }
.legal-content strong { color: var(--text-main); }
