/* ==========================================================
   SmartNodes — style.css
   Версия 2.0 (24.11.2026): доступность, мобильное меню,
   контраст, юридические страницы.
   ========================================================== */

/* Базовые настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0f1115;
    --bg-soft: #12151a;
    --card: #1a1d24;
    --border: #2d333b;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #2563eb;        /* затемнён для контраста 4.5:1 с белым текстом */
    --accent-hover: #1d4ed8;
    --accent-light: #93c5fd;  /* для бейджей на тёмном фоне */
    --focus: #60a5fa;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

img, svg {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--focus);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: 4px;
}

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

/* Ссылка «к содержимому» для клавиатуры и скринридеров */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--accent);
    color: #fff;
    padding: 12px 20px;
    border-radius: 0 0 8px 0;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    left: 0;
}

/* Навигация */
header {
    padding: 20px 0;
    border-bottom: 1px solid #1f2229;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    text-decoration: none;
    line-height: 1.2;
}

.logo span {
    color: #3b82f6; /* синий акцент в логотипе */
}

.site-nav {
    display: flex;
    align-items: center;
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 30px;
    font-weight: 400;
    transition: color 0.3s;
}

.site-nav a:hover {
    color: #fff;
}

/* Кнопка мобильного меню (на десктопе скрыта) */
.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.burger,
.burger::before,
.burger::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.burger {
    position: relative;
}

.burger::before,
.burger::after {
    content: "";
    position: absolute;
    left: 0;
}

.burger::before {
    top: -6px;
}

.burger::after {
    top: 6px;
}

.menu-toggle[aria-expanded="true"] .burger {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .burger::before {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .burger::after {
    transform: translateY(-6px) rotate(-45deg);
}

/* Главный экран */
.hero {
    padding: 120px 0;
    background: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f1115 70%);
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-wrap: balance;
}

.hero p {
    font-size: 18px;
    color: var(--muted);
    max-width: 620px;
    margin: 0 auto 40px auto;
}

/* Кнопки */
.btn {
    display: inline-block;
    background-color: var(--accent);
    color: #fff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--accent-hover);
}

.btn-sm {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
}

/* Секции */
section {
    padding: 80px 0;
}

h2 {
    font-size: 32px;
    margin-bottom: 40px;
    text-align: center;
}

/* Сетка услуг */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform 0.3s, border-color 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #3b82f6;
}

.card .icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.card p {
    color: var(--muted);
    font-size: 15px;
}

/* Портфолио */
.portfolio {
    background-color: var(--bg-soft);
}

.portfolio-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    background-color: var(--card);
    padding: 40px;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid var(--border);
}

.portfolio-info h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.portfolio-info p {
    color: var(--muted);
    margin-bottom: 20px;
}

.tag {
    display: inline-block;
    background-color: #1e293b;
    color: var(--accent-light);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 5px;
    margin-bottom: 5px;
}

.portfolio-image {
    font-size: 80px;
    line-height: 1;
}

/* Строка с кнопкой в карточке портфолио */
.cta-row {
    margin: 20px 0 12px;
}

/* Контакты */
.contact {
    text-align: center;
}

.contact > p {
    color: var(--muted);
    margin-bottom: 30px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--card);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.contact-btn:hover {
    border-color: #3b82f6;
    background-color: #1e293b;
}

/* Мелкий юридический текст (ссылки на политику/согласие) */
.legal-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    margin-top: 16px;
}

.legal-note a {
    color: var(--accent-light);
}

/* Подвал */
footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #1f2229;
    color: var(--muted);
    font-size: 14px;
}

/* ЗАМЕНА: раньше тут был #64748b (контраст ~4.0:1), теперь #94a3b8 (~7.4:1) */
.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-legal {
    font-size: 13px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 20px;
    font-size: 13px;
}

.footer-links a {
    color: var(--accent-light);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-copy {
    font-size: 13px;
    color: #7c8aa0;
}

/* ==========================================================
   Юридические страницы (privacy.html, consent.html, 404.html)
   ========================================================== */

.legal-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 60px 20px 80px;
}

.legal-page h1 {
    font-size: 32px;
    line-height: 1.25;
    margin-bottom: 8px;
}

.legal-page .legal-meta {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 32px;
}

.legal-page h2 {
    font-size: 22px;
    text-align: left;
    margin: 36px 0 12px;
}

.legal-page h3 {
    font-size: 17px;
    margin: 22px 0 8px;
}

.legal-page p,
.legal-page li {
    color: #cbd5e1;
    font-size: 15px;
}

.legal-page p {
    margin-bottom: 12px;
}

.legal-page ul,
.legal-page ol {
    margin: 0 0 16px 22px;
}

.legal-page li {
    margin-bottom: 6px;
}

.legal-page .back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--accent-light);
    text-decoration: none;
    font-size: 14px;
}

.legal-page .back-link:hover {
    text-decoration: underline;
}

.legal-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px;
    font-size: 14px;
}

.legal-page th,
.legal-page td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    color: #cbd5e1;
}

.legal-page th {
    background: #1a1d24;
    color: var(--text);
    font-weight: 600;
}

/* Страница 404 */
.error-page {
    text-align: center;
    padding: 120px 20px;
}

.error-page .error-code {
    font-size: 72px;
    font-weight: 800;
    color: #3b82f6;
    line-height: 1;
    margin-bottom: 16px;
}

.error-page h1 {
    font-size: 32px;
    margin-bottom: 16px;
}

.error-page p {
    color: var(--muted);
    margin-bottom: 28px;
}

/* Адаптив для телефонов */
@media (max-width: 768px) {
    .menu-toggle {
        display: inline-flex;
    }

    .header-inner {
        flex-wrap: wrap;
    }

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding-top: 12px;
        border-top: 1px solid #1f2229;
        margin-top: 12px;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        margin-left: 0;
        padding: 10px 0;
        width: 100%;
        font-size: 17px;
    }

    .hero {
        padding: 72px 0;
    }

    .hero h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 26px;
        margin-bottom: 28px;
    }

    section {
        padding: 56px 0;
    }

    .portfolio-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 28px;
    }

    .portfolio-image {
        margin-top: 8px;
        font-size: 56px;
    }

    .contact-links {
        flex-direction: column;
        align-items: stretch;
    }

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

    .legal-page {
        padding: 40px 20px 60px;
    }

    .legal-page h1,
    .error-page h1 {
        font-size: 26px;
    }

    .error-page {
        padding: 80px 20px;
    }
}
