/* --- Variables & Reset --- */
:root {
    --bg-color: #020202;
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
    --accent: #00f3ff;
    --accent-red: #ff0055; 
    --font-main: 'Inter', 'Noto Sans Georgian', sans-serif;
    --clip-shape: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Фоновая сетка */
.bg-grid {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* --- Header --- */
.header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 25px 4%;
    background: rgba(2, 2, 2, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* --- GLITCH LOGO EFFECT --- */
.logo {
    font-weight: 800;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 3px solid var(--accent);
    padding-left: 12px;
    position: relative;
    color: white;
}

.logo .dot { color: var(--accent); }

.logo:hover { animation: glitch-anim 0.3s infinite; }

.logo:hover::before,
.logo:hover::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 12px; 
    width: 100%; height: 100%;
    background: var(--bg-color);
}

.logo:hover::before {
    left: 14px;
    text-shadow: -2px 0 var(--accent-red);
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

.logo:hover::after {
    left: 10px;
    text-shadow: -2px 0 blue;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}
@keyframes glitch-anim-2 {
    0% { transform: translate(0); }
    20% { transform: translate(2px, -2px); }
    40% { transform: translate(2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(-2px, 2px); }
    100% { transform: translate(0); }
}

/* Центральный слоган */
.header-slogan {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 20px;
    background: rgba(255,255,255,0.03);
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
    white-space: nowrap;
    min-width: 220px; 
    justify-content: center;
}

.status-dot {
    width: 8px; height: 8px;
    background-color: #0f0;
    border-radius: 50%;
    box-shadow: 0 0 5px #0f0;
}

.cursor {
    display: inline-block;
    width: 8px;
    animation: blink 1s infinite;
    color: var(--accent);
    font-weight: 800;
}

@keyframes blink { 50% { opacity: 0; } }

/* Кнопки языков */
.lang-switch { display: flex; gap: 8px; justify-content: flex-end; }

.cyber-btn {
    background: rgba(255,255,255,0.05);
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    font-weight: 700;
    cursor: pointer;
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.75rem;
}
.cyber-btn:hover { background: rgba(255,255,255,0.15); color: white; }
.cyber-btn.active {
    background: var(--accent); color: #000;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

/* --- Main Layout --- */
.container {
    width: 92%; max-width: 1400px;
    margin: 40px auto; flex: 1;
}

/* --- Cards Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    position: relative; height: 320px;
    text-decoration: none; color: white;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.2); 
    clip-path: var(--clip-shape);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex; flex-direction: column; justify-content: flex-end;
}

.card-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    transition: transform 0.6s ease;
    z-index: 1;
    filter: grayscale(100%) brightness(0.6);
}

.card::after {
    content: ''; position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, #000 10%, rgba(0,0,0,0.2) 100%);
    z-index: 2;
}

.card-content {
    position: relative; z-index: 3; padding: 35px;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 40px -10px rgba(0, 243, 255, 0.2);
}

.card:hover .card-bg {
    transform: scale(1.1);
    filter: grayscale(0%) brightness(1);
}

.card:hover .icon-box {
    color: var(--accent);
    transform: scale(1.1) translateX(5px);
}

.icon-box {
    font-size: 2rem; margin-bottom: 20px;
    color: white; transition: all 0.3s ease;
}

.card h3 {
    font-size: 1.6rem; font-weight: 800;
    text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.5px;
}
.card p {
    font-size: 0.95rem; color: #ccc; font-weight: 300;
}

/* Locked Card */
.card.locked { border-style: dashed; border-color: #333; cursor: default;}
.card.locked:hover { transform: none; border-color: #333; box-shadow: none; }
.card.locked:hover .card-bg { transform: none; filter: grayscale(100%) brightness(0.6); }
.card.locked:hover .icon-box { color: white; transform: none; }

.card.locked .status-badge {
    position: absolute; top: 20px; right: 20px; z-index: 4;
    background: var(--accent-red); padding: 5px 12px;
    font-size: 0.7rem; font-weight: 800;
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
}

/* --- Contact Section --- */
.contact-section {
    margin-top: 60px;
    padding: 40px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    clip-path: var(--clip-shape);
    text-align: center;
    backdrop-filter: blur(5px);
}

.contact-section h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--text-main);
    letter-spacing: 2px;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-buttons .cyber-btn {
    font-size: 1rem;
    padding: 12px 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid transparent;
}

.tg-btn { border-color: #0088cc; color: #fff; }
.tg-btn:hover {
    background: rgba(0, 136, 204, 0.15);
    box-shadow: 0 0 20px -5px rgba(0, 136, 204, 0.6);
    color: #0088cc;
}

.wa-btn { border-color: #25D366; color: #fff; }
.wa-btn:hover {
    background: rgba(37, 211, 102, 0.15);
    box-shadow: 0 0 20px -5px rgba(37, 211, 102, 0.6);
    color: #25D366;
}

/* Footer */
.footer {
    padding: 20px; text-align: center;
    font-size: 0.8rem; color: #444; margin-top: auto;
}

/* Mobile Adaptation */
@media (max-width: 900px) {
    .header {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 15px;
    }
    .logo { grid-column: 1 / 2; }
    .lang-switch { grid-column: 2 / 3; }
    .header-slogan { 
        grid-column: 1 / 3; justify-content: center; font-size: 0.8rem;
    }
}