/* ============================================
   Смарт.Прожектс — основные стили
   ============================================ */

:root {
    color-scheme: dark;

    /* Светлая тема (по умолчанию) */
    --bg-0: #f4f6fb;
    --bg-1: #eef1f9;
    --bg-2: #e6eaf5;
    --bg-3: #dce2ef;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: rgba(255, 255, 255, 0.92);
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.14);

    --text: #121826;
    --text-2: #475569;
    --text-3: #64748b;
    --text-4: #94a3b8;

    --accent: #7c5cff;
    --accent-2: #00d4ff;
    --accent-3: #ff5cc8;
    --accent-warm: #ffb84d;
    --success: #36e1a3;
    --danger: #ff5e7e;

    /* 90deg — без светлых/тёмных полос по бокам pill и кругов */
    --grad-main: linear-gradient(90deg, #7c5cff 0%, #6374ff 42%, #00d4ff 100%);
    --grad-main-from: #7c5cff;
    --grad-main-to: #00d4ff;
    --grad-warm: linear-gradient(135deg, #ff5cc8 0%, #ffb84d 100%);
    --grad-glass: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.65) 100%);
    --grad-radial: radial-gradient(circle at top, rgba(124,92,255,0.18), transparent 60%);

    --grad-spot-1: rgba(124, 92, 255, 0.18);
    --grad-spot-2: rgba(0, 212, 255, 0.12);
    --grad-spot-3: rgba(255, 92, 200, 0.08);

    --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 12px 40px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 48px rgba(124, 92, 255, 0.22);

    --header-scrolled-bg: rgba(244, 246, 251, 0.82);
    --toast-bg: rgba(255, 255, 255, 0.96);
    --toast-icon-fg: #0f172a;
    --modal-overlay-bg: rgba(15, 23, 42, 0.45);
    --modal-window-bg: linear-gradient(180deg, #ffffff 0%, #eef2fb 100%);
    --footer-fade: rgba(244, 246, 251, 0.97);
    --mobile-nav-bg: rgba(244, 246, 251, 0.98);
    --bg-canvas-opacity: 0.28;

    --hero-card-bg: rgba(255, 255, 255, 0.82);
    --hero-card-badge-bg: rgba(255, 255, 255, 0.94);
    --hero-chart-bg: linear-gradient(180deg, rgba(124,92,255,0.12), transparent);
    --case-card-overlay: linear-gradient(180deg, transparent 40%, rgba(244,246,251,0.95));
    --case-tag-bg: rgba(255, 255, 255, 0.9);
    --form-bg: rgba(255, 255, 255, 0.75);
    --cta-form-bg: rgba(255, 255, 255, 0.88);
    --post-card-type-bg: rgba(255, 255, 255, 0.92);
    --cta-block-bg: linear-gradient(135deg, rgba(124,92,255,0.12), rgba(0,212,255,0.06));
    --cta-orb-1: radial-gradient(circle, rgba(124,92,255,0.28), transparent 60%);
    --cta-orb-2: radial-gradient(circle, rgba(0,212,255,0.22), transparent 60%);
    --service-cta-bg: linear-gradient(135deg, rgba(124,92,255,0.12), rgba(255,92,200,0.08));
    --service-cta-border: rgba(124,92,255,0.22);
    --pattern-grid-line: rgba(15, 23, 42, 0.055);

    --scrollbar-track: rgba(15, 23, 42, 0.06);
    --cursor-dot: #121826;
    --cursor-ring: rgba(18, 24, 38, 0.35);

    /* Геометрия */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 32px;
    --radius-full: 999px;

    --t-fast: 0.18s;
    --t-base: 0.3s;
    --t-slow: 0.6s;
    --easing: cubic-bezier(0.4, 0, 0.2, 1);
    --easing-back: cubic-bezier(0.34, 1.56, 0.64, 1);

    --container: 1280px;
    --container-padding: 32px;

    /* Высота шапки и viewport — обновляются в main.js */
    --header-height: 72px;
    --hero-top-gap: 8px;
    --hero-bottom-gap: 24px;
    --viewport-height: 100svh;

    --font-sans: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-display: 'Unbounded', 'Manrope', sans-serif;
}

html[data-theme="dark"] {
    color-scheme: dark;

    --bg-0: #06081a;
    --bg-1: #0a0e27;
    --bg-2: #111531;
    --bg-3: #1a1f3f;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --text: #ffffff;
    --text-2: #b8bfd8;
    --text-3: #7e87a8;
    --text-4: #565d7d;

    --accent-2: #00d4ff;

    --grad-glass: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    --grad-radial: radial-gradient(circle at top, rgba(124,92,255,0.25), transparent 60%);

    --grad-spot-1: rgba(124, 92, 255, 0.25);
    --grad-spot-2: rgba(0, 212, 255, 0.18);
    --grad-spot-3: rgba(255, 92, 200, 0.12);

    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 48px rgba(124, 92, 255, 0.35);

    --header-scrolled-bg: rgba(6, 8, 26, 0.7);
    --toast-bg: rgba(20, 24, 50, 0.95);
    --toast-icon-fg: #06081a;
    --modal-overlay-bg: rgba(6, 8, 26, 0.7);
    --modal-window-bg: linear-gradient(180deg, #1a1f3f 0%, #111531 100%);
    --footer-fade: rgba(6, 8, 26, 0.95);
    --mobile-nav-bg: rgba(6, 8, 26, 0.97);
    --bg-canvas-opacity: 0.5;

    --hero-card-bg: rgba(20, 24, 50, 0.6);
    --hero-card-badge-bg: rgba(20, 24, 50, 0.85);
    --hero-chart-bg: linear-gradient(180deg, rgba(124,92,255,0.05), transparent);
    --case-card-overlay: linear-gradient(180deg, transparent 40%, rgba(6,8,26,0.85));
    --case-tag-bg: rgba(6, 8, 26, 0.6);
    --form-bg: rgba(6, 8, 26, 0.6);
    --cta-form-bg: rgba(6, 8, 26, 0.7);
    --post-card-type-bg: rgba(6, 8, 26, 0.7);
    --cta-block-bg: linear-gradient(135deg, rgba(124,92,255,0.15), rgba(0,212,255,0.08));
    --cta-orb-1: radial-gradient(circle, rgba(124,92,255,0.4), transparent 60%);
    --cta-orb-2: radial-gradient(circle, rgba(0,212,255,0.3), transparent 60%);
    --service-cta-bg: linear-gradient(135deg, rgba(124,92,255,0.15), rgba(255,92,200,0.1));
    --service-cta-border: rgba(124,92,255,0.3);
    --pattern-grid-line: rgba(255, 255, 255, 0.04);

    --scrollbar-track: rgba(255, 255, 255, 0.03);
    --cursor-dot: #ffffff;
    --cursor-ring: #ffffff;
}

html {
    scroll-behavior: smooth;
}

html[data-theme="light"] ::selection {
    background: rgba(124, 92, 255, 0.22);
    color: var(--text);
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

body {
    font-family: var(--font-sans);
    background: var(--bg-0);
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: clip;
    max-width: 100%;
    position: relative;
}

body.no-scroll { overflow: hidden; }

/* ============== Утилиты ============== */
.container {
    width: 100%;
    max-width: calc(var(--container) + var(--container-padding) * 2);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.text-gradient {
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* ============== Декоративный фон ============== */
.bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: var(--bg-canvas-opacity);
}

.bg-gradient {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 50% at 20% 0%, var(--grad-spot-1), transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 30%, var(--grad-spot-2), transparent 60%),
        radial-gradient(ellipse 50% 30% at 50% 100%, var(--grad-spot-3), transparent 60%),
        var(--bg-0);
}

/* ============== Шапка ============== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 12px 0;
    transition: background var(--t-base) var(--easing),
        border-color var(--t-base) var(--easing),
        backdrop-filter var(--t-base) var(--easing);
    background: var(--header-scrolled-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid transparent;
    overflow-x: clip;
}

.header.scrolled {
    border-bottom-color: var(--border);
}

/* Админ-панель Битрикс: шапка сайта сразу под ней, без полосы над меню */
body:has(#bx-panel.bx-panel-fixed) {
    --bx-panel-offset: 39px;
}

body:has(#bx-panel.bx-panel-fixed:not(.bx-panel-folded)) {
    --bx-panel-offset: 147px;
}

body:has(#bx-panel.bx-panel-fixed) .header {
    top: var(--bx-panel-offset, 39px);
}

/* Фоны первых секций тянем под шапку — один тон до верхнего края viewport */
:is(
    .post-hero__bg,
    .service-hero__bg,
    .case-hero__bg,
    .blog__ambient--page,
    .legal-page__ambient
) {
    top: calc(-1 * var(--header-height, 72px));
    height: calc(100% + var(--header-height, 72px));
}

.header__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(12px, 1.6vw, 28px);
}

.logo {
    grid-column: 1;
    justify-self: start;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform var(--t-base) var(--easing);
}

.logo:hover { transform: translateY(-2px); }

.logo__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 12px rgba(124, 92, 255, 0.5));
    transition: transform var(--t-slow) var(--easing);
}

.logo:hover .logo__icon { transform: rotate(8deg) scale(1.04); }

.logo__icon svg { width: 100%; height: 100%; }

.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.02em;
}
.logo__sub {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav {
    grid-column: 2;
    justify-self: center;
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 2px;
}

.nav__link {
    position: relative;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    font-weight: 500;
    color: var(--text-2);
    border-radius: var(--radius-full);
    transition: all var(--t-base) var(--easing);
    overflow: hidden;
}

.nav__link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--surface);
    border-radius: var(--radius-full);
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--t-base) var(--easing);
    z-index: -1;
}

.nav__link:hover {
    color: var(--text);
}

.nav__link:hover::before {
    opacity: 1;
    transform: scale(1);
}

.nav__link.active {
    color: var(--text);
}

.nav__link.active::before {
    opacity: 1;
    transform: scale(1);
    background: var(--surface-strong);
}

/* Подменю «Услуги» */
.nav__item {
    position: relative;
    display: flex;
    align-items: center;
}

.nav__link--parent {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-right: 12px;
}

.nav__link-text {
    white-space: nowrap;
}

.nav__chevron {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    color: inherit;
    opacity: 0.7;
    transition: transform var(--t-base) var(--easing), opacity var(--t-base) var(--easing);
}

.nav__item--dropdown:hover .nav__chevron,
.nav__item--dropdown.is-open .nav__chevron,
.nav__link--parent:hover .nav__chevron,
.nav__link--parent.active .nav__chevron {
    opacity: 1;
}

.nav__item--dropdown.is-open .nav__chevron,
.nav__item--dropdown:hover .nav__chevron {
    transform: rotate(180deg);
}

.nav__dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 300px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-0) 95%, transparent);
    backdrop-filter: blur(12px);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.06),
        0 20px 40px -12px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity var(--t-base) var(--easing),
        transform var(--t-base) var(--easing),
        visibility var(--t-base) var(--easing);
    z-index: 120;
}

.nav__dropdown::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
}

.nav__item--dropdown:hover .nav__dropdown,
.nav__item--dropdown:focus-within .nav__dropdown,
.nav__item--dropdown.is-open .nav__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav__dropdown-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--text-2);
    text-decoration: none;
    transition: background var(--t-fast) var(--easing), color var(--t-fast) var(--easing);
}

.nav__dropdown-link:hover {
    background: var(--surface);
    color: var(--text);
}

.nav__dropdown-link.active {
    background: var(--surface-strong);
    color: var(--text);
}

.nav__dropdown-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface);
    color: var(--accent);
}

.nav__dropdown-icon--all {
    color: var(--text-2);
}

.nav__dropdown-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nav__dropdown-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

.nav__dropdown-desc {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-3);
}

.nav__dropdown-link--all {
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    border-radius: 0 0 12px 12px;
}

.nav__dropdown-link--all:hover .nav__dropdown-icon--all {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.header__actions {
    grid-column: 3;
    justify-self: end;
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: clamp(8px, 1.2vw, 16px);
}

.header__phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
    transition: color var(--t-base) var(--easing);
}

.header__actions .btn--small {
    flex-shrink: 0;
    white-space: nowrap;
}

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

.header__phone svg {
    color: var(--accent);
    transition: color var(--t-base) var(--easing), filter var(--t-base) var(--easing);
}

.header__phone:hover svg {
    color: #9b7dff;
    filter: drop-shadow(0 0 8px rgba(124, 92, 255, 0.45));
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border);
    gap: 5px;
}

.burger span {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--t-base) var(--easing);
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============== Переключатель темы ============== */
.theme-toggle {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--t-base) var(--easing), background var(--t-base) var(--easing), border-color var(--t-base) var(--easing), box-shadow var(--t-base) var(--easing);
}

.theme-toggle:hover {
    background: var(--surface-strong);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 92, 255, 0.18);
}

.theme-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.35);
}

.theme-toggle__icon {
    width: 20px;
    height: 20px;
}

html[data-theme="light"] .theme-toggle__icon--moon,
html[data-theme="dark"] .theme-toggle__icon--sun {
    display: none;
}

/* ============== Кнопки ============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--t-base) var(--easing);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-decoration: none;
}

.btn--small { padding: 10px 20px; font-size: 14px; }
.btn--large { padding: 18px 36px; font-size: 16px; }
.btn--block { width: 100%; }

.btn__arrow {
    display: inline-block;
    transition: transform var(--t-base) var(--easing);
}

.btn:hover .btn__arrow { transform: translateX(4px); }

.btn__play {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 2px;
}

/* Primary */
.btn--primary {
    color: #fff;
    border-color: var(--grad-main-from);
    box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 52%);
    opacity: 0;
    transition: opacity var(--t-base) var(--easing);
}

.btn--primary > * { position: relative; z-index: 1; }

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(124, 92, 255, 0.5);
}

.btn--primary:hover::before { opacity: 1; }

/* Ghost */
.btn--ghost {
    background: var(--surface-strong);
    color: var(--text);
    border: 1px solid var(--border-strong);
}

.btn--ghost:hover {
    background: var(--bg-2);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* ============== Section Head ============== */
.section-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 60px;
}

.section-head--left { text-align: left; margin-left: 0; margin-right: auto; }
.section-head--between { text-align: left; max-width: 100%; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 48px; }

.section-head__tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 16px;
}

.section-head__title {
    font-family: var(--font-display);
    font-size: clamp(32px, 4.2vw, 56px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.section-head__desc {
    font-size: 17px;
    color: var(--text-2);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.55;
}

.section-head--left .section-head__desc,
.section-head--between .section-head__desc { margin: 0; }

.section-head__btn { align-self: flex-end; }

/* ============== Хлебные крошки ============== */
.breadcrumbs {
    margin-bottom: 24px;
}

.breadcrumbs__list {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 6px 12px 6px 8px;
    max-width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
}

.breadcrumbs__item {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    line-height: 1.3;
}

.breadcrumbs__item:not(:first-child)::before {
    content: '';
    display: inline-block;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin: 0 2px 0 4px;
    background-color: var(--text-4);
    opacity: 0.65;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M6 4l4 4-4 4' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M6 4l4 4-4 4' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.breadcrumbs__link {
    color: var(--text-3);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    transition: color var(--t-base) var(--easing), background var(--t-base) var(--easing);
}

@media (hover: hover) {
    .breadcrumbs__link:hover {
        color: var(--accent);
        background: rgba(124, 92, 255, 0.1);
    }
}

.breadcrumbs__link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.breadcrumbs__current {
    color: var(--text);
    font-weight: 600;
    padding: 4px 10px;
    max-width: min(280px, 55vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-theme="light"] .breadcrumbs__list {
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .breadcrumbs__list {
    background: rgba(255, 255, 255, 0.04);
}

/* ============== Кастомный курсор (отключён — нативный, без лагов) ============== */
.cursor {
    display: none !important;
}

html[data-theme="light"] .cursor {
    mix-blend-mode: normal;
}

.cursor__dot {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 8px;
    height: 8px;
    background: var(--cursor-dot);
    border-radius: 50%;
    transition: transform var(--t-fast) var(--easing);
}

.cursor__ring {
    position: absolute;
    top: -18px;
    left: -18px;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--cursor-ring);
    border-radius: 50%;
    transition: transform var(--t-base) var(--easing), opacity var(--t-base) var(--easing);
}

.cursor.cursor--hover .cursor__ring {
    transform: scale(1.6);
    opacity: 0.5;
}

/* ============== Preloader ============== */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-0);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.preloader__logo {
    width: 120px;
    height: 120px;
}

.preloader__text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.1em;
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseText 2s ease-in-out infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ============== Scroll to top ============== */
.to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(124, 92, 255, 0.4);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--t-base) var(--easing);
}

.to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(124, 92, 255, 0.55);
}

/* ============== Toast ============== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--toast-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 9000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--t-base) var(--easing);
    max-width: 360px;
}

.toast.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--success);
    color: var(--toast-icon-fg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast__title { font-weight: 700; font-size: 15px; }
.toast__desc { font-size: 13px; color: var(--text-2); margin-top: 2px; }

/* ============== Modal ============== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--t-base) var(--easing);
}

.modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: var(--modal-overlay-bg);
    backdrop-filter: blur(8px);
}

.modal__window {
    position: relative;
    background: var(--modal-window-bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 460px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95) translateY(20px);
    transition: transform var(--t-base) var(--easing-back);
}

.modal.open .modal__window {
    transform: scale(1) translateY(0);
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-base) var(--easing);
}

.modal__close:hover {
    background: var(--surface-strong);
    color: var(--text);
    transform: rotate(90deg);
}

/* ============== Footer ============== */
.footer {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, transparent, var(--footer-fade));
    padding-top: 80px;
    margin-top: 80px;
    border-top: 1px solid var(--border);
}

.footer__container {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 48px;
    padding-bottom: 60px;
}

.footer__col {}

.footer__col--main { max-width: 360px; }

.footer__desc {
    margin-top: 20px;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.6;
}

.footer__title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 20px;
}

.footer__list { display: flex; flex-direction: column; gap: 10px; }

.footer__list li a,
.footer__list li {
    font-size: 14px;
    color: var(--text-2);
    transition: color var(--t-base) var(--easing);
}

.footer__list a:hover { color: var(--accent-2); }

.footer__list--contacts { gap: 12px; }
.footer__list--contacts li { color: var(--text-2); font-size: 14px; }

.footer__socials { display: flex; gap: 10px; margin-top: 20px; }

.footer__bottom {
    border-top: 1px solid var(--border);
    padding: 24px 0;
}

.footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    font-size: 13px;
    color: var(--text-3);
    flex-wrap: wrap;
}

.footer__copy {
    margin: 0;
    line-height: 1.45;
}

.footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.footer__legal a {
    line-height: 1.45;
    transition: color var(--t-base) var(--easing);
}

.footer__legal a:hover { color: var(--text); }

/* ============== Соц. сети ============== */
.social {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    transition: all var(--t-base) var(--easing);
}

.social--sm { width: 36px; height: 36px; }

.social:hover {
    color: #fff;
    border-color: var(--grad-main-from);
    transform: translateY(-2px);
}
