/* ==========================================================================
   Avtomateflow Site v2 — основная таблица стилей
   --------------------------------------------------------------------------
   Дизайн-система перенесена из portfolio.avtomateflow.com (css/style.css)
   без изменения визуального языка: те же токены, тот же градиент CTA,
   тот же glassmorphism. Оранжево-золотые акценты — только в фирменной
   графике и дозированном декоре, не в кнопках.

   Порядок секций:
     1. Токены и база
     2. Типографика и утилиты
     3. Кнопки и ссылки
     4. Шапка, меню, тема
     5. Hero
     6. Секции: услуги, продукты, процесс, FAQ
     7. Формы и CTA-блок
     8. Подвал
     9. Страницы (услуга, продукт, о нас, контакты, 404)
    10. Планшет (>=768)
    11. Десктоп (>=1024)
    12. Широкий (>=1440)
   ========================================================================== */

/* ==========================================================================
   1. ТОКЕНЫ И БАЗА
   ========================================================================== */

:root {
    --bg-dark: #0F172A;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-border: rgba(255, 255, 255, 0.1);
    --bg-overlay: rgba(15, 23, 42, 0.78);

    --primary: #38BDF8;
    --primary-hover: #0EA5E9;
    --accent: #818CF8;

    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --danger: #F87171;
    --success: #34D399;

    --font-main: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-code: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --gradient-hero: linear-gradient(135deg, #38BDF8 0%, #818CF8 100%);
    --blur-glass: blur(12px);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 20px;

    --shadow-glow: 0 10px 20px rgba(56, 189, 248, 0.25);
    --shadow-drawer: -10px 0 30px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.35);

    --header-bg: rgba(15, 23, 42, 0.8);
    --input-bg: rgba(15, 23, 42, 0.6);
    --tag-bg: rgba(255, 255, 255, 0.03);
    --glass-fill: rgba(255, 255, 255, 0.05);
    --glass-fill-hover: rgba(255, 255, 255, 0.1);
    --code-text: #E2E8F0;

    --focus-ring: 2px solid var(--primary);

    /* Дозированный фирменный декор из баннеров */
    --brand-gold: #E8B44A;
    --brand-gold-soft: rgba(232, 180, 74, 0.12);
    --brand-orange: #F08A3C;

    --maxw: 1200px;
    --header-h: 72px;
    color-scheme: dark;
}

html[data-theme="light"] {
    --bg-dark: #F8FAFC;
    --bg-card: rgba(255, 255, 255, 0.86);
    --bg-card-border: rgba(15, 23, 42, 0.12);
    --bg-overlay: rgba(248, 250, 252, 0.9);

    --text-main: #0F172A;
    --text-muted: #475569;

    --shadow-drawer: -10px 0 30px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 16px 40px rgba(15, 23, 42, 0.1);

    --header-bg: rgba(248, 250, 252, 0.9);
    --input-bg: #FFFFFF;
    --tag-bg: rgba(15, 23, 42, 0.04);
    --glass-fill: rgba(15, 23, 42, 0.04);
    --glass-fill-hover: rgba(15, 23, 42, 0.08);
    --code-text: #1E293B;

    --brand-gold: #A9761B;
    --brand-gold-soft: rgba(169, 118, 27, 0.1);
    --brand-orange: #C25E12;

    color-scheme: light;
}

/* Локальные шрифты. Inter — вариативный, один файл на все веса. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/Inter-subset.woff2') format('woff2-variations'),
         url('/assets/fonts/Inter-subset.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/JetBrainsMono-subset.woff2') format('woff2');
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.no-scroll {
    overflow: hidden;
}

img,
picture {
    max-width: 100%;
    height: auto;
    display: block;
}

picture {
    display: block;
}

/* ==========================================================================
   2. ТИПОГРАФИКА И УТИЛИТЫ
   ========================================================================== */

h1, h2, h3, h4 {
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5.2vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 1.9vw, 1.35rem); }

p { text-wrap: pretty; }

a {
    color: var(--primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--primary-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}

.container--narrow {
    max-width: 820px;
}

.section {
    padding: 48px 0;
}

.section--tight {
    padding: 32px 0;
}

.section-title {
    margin-bottom: 24px;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary); /* fallback без background-clip */
    text-align: left;
}

.section-title.center {
    text-align: center;
}

.section-lead {
    color: var(--text-muted);
    max-width: 68ch;
    margin: -8px 0 24px;
    font-size: 1.0625rem;
}

.section-lead.center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-code);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
}

.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }

.glass {
    background: var(--bg-card);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Статус продукта: честная маркировка */
.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-code);
    letter-spacing: 0.02em;
    border: 1px solid var(--bg-card-border);
    background: var(--tag-bg);
    color: var(--text-muted);
}

.status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.status--idea { color: var(--brand-gold); border-color: var(--brand-gold-soft); }
.status--research { color: var(--accent); }
.status--dev { color: var(--primary); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 2000;
    padding: 12px 20px;
    background: var(--primary);
    color: #0F172A;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
    color: #0F172A;
}

/* Сетки */
.grid {
    display: grid;
    gap: 20px;
}

.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

/* ==========================================================================
   3. КНОПКИ — сохранён вид портфолио
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-main);
    line-height: 1.3;
    text-decoration: none;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease,
        color 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    border: none;
    min-height: 48px;          /* touch target */
    min-width: 48px;
    will-change: transform;
}

/* Основной CTA: тот же градиент, что на портфолио */
.btn--primary {
    background: var(--gradient-hero);
    color: #0F172A;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: #0F172A;
}

.btn--primary:active {
    transform: translateY(0);
}

.btn--glass {
    background: var(--glass-fill);
    color: var(--text-main);
    border: 1px solid var(--bg-card-border);
}

.btn--glass:hover {
    background: var(--glass-fill-hover);
    color: var(--text-main);
}

.btn--outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn--outline:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
}

.btn--block {
    width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Текстовая ссылка со стрелкой */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    min-height: 44px;
}

.link-arrow::after {
    content: "→";
    transition: transform 0.2s ease;
}

.link-arrow:hover::after {
    transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .link-arrow::after {
        transition: none;
    }
    .btn--primary:hover {
        transform: none;
    }
    .link-arrow:hover::after {
        transform: none;
    }
}

/* ==========================================================================
   4. ШАПКА, МЕНЮ, ТЕМА
   ========================================================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    background: var(--header-bg);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border-bottom: 1px solid var(--bg-card-border);
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.0625rem;
    min-height: 44px;
    flex-shrink: 0;
}

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

.logo__mark {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo__sub {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header__btn {
    display: none;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--bg-card-border);
    background: var(--glass-fill);
    color: var(--text-main);
    cursor: pointer;
}

.theme-toggle:hover {
    background: var(--glass-fill-hover);
}

.theme-toggle__icon::before {
    content: "☀";
    font-size: 1.1rem;
    line-height: 1;
}

html[data-theme="light"] .theme-toggle__icon::before {
    content: "☾";
}

.burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: var(--glass-fill);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.burger span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background-color: var(--text-main);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger--active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger--active span:nth-child(2) {
    opacity: 0;
}

.burger--active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Мобильная панель */
.nav {
    position: fixed;
    top: 0;
    right: 0;
    /* Уводим панель за экран трансформом, а не отрицательным right:
       отрицательный right расширяет scrollWidth документа и рождает
       горизонтальный скролл на мобильных. */
    transform: translateX(100%);
    width: min(85%, 360px);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    border-left: 1px solid var(--bg-card-border);
    padding: 88px 24px 32px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-drawer);
    z-index: 1000;
    overflow-y: auto;
    visibility: hidden;
}

.nav.nav--active {
    transform: translateX(0);
    visibility: visible;
}

.nav__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: none;
}

.nav__link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 8px 0;
    transition: color 0.2s ease;
    border-bottom: 1px solid var(--bg-card-border);
}

.nav__link:hover,
.nav__link[aria-current="page"] {
    color: var(--primary);
}

.nav__cta {
    margin-top: 24px;
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    border: none;
    padding: 0;
    cursor: pointer;
}

.nav-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
    .nav,
    .nav-backdrop,
    .burger span {
        transition: none;
    }
}

/* ==========================================================================
   5. HERO
   ========================================================================== */

.hero {
    padding: 40px 0 32px;
    position: relative;
    overflow: hidden;
}

/* Мягкое свечение — без перегруза */
.hero::before {
    content: "";
    position: absolute;
    top: -30%;
    left: 50%;
    width: 780px;
    height: 780px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(56, 189, 248, 0.1), transparent 62%);
    pointer-events: none;
    z-index: 0;
}

.hero__container {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 32px;
}

.hero__title {
    margin-bottom: 16px;
}

.hero__title em {
    font-style: normal;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary);
}

.hero__subtitle {
    color: var(--text-muted);
    font-size: clamp(1rem, 2vw, 1.125rem);
    margin-bottom: 20px;
    max-width: 56ch;
}

.hero__list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.hero__list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9375rem;
    color: var(--text-main);
}

.hero__list li::before {
    content: "✓";
    color: var(--primary);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.hero__note {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.hero__media {
    margin: 0;
}

.hero__media img {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--bg-card-border);
    box-shadow: var(--shadow-card);
}

.hero__caption {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* Чипы технологий */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}

.chip {
    padding: 7px 14px;
    background: var(--tag-bg);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-pill);
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.stack-strip {
    padding: 24px 0;
    border-top: 1px solid var(--bg-card-border);
    border-bottom: 1px solid var(--bg-card-border);
}

.stack-strip__inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stack-strip__label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ==========================================================================
   6. СЕКЦИИ: УСЛУГИ, ПРОДУКТЫ, ПРОЦЕСС, FAQ
   ========================================================================== */

/* Карточка-ссылка */
.card {
    padding: 24px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.35);
}

.card__icon {
    display: block;
    width: 88px;
    height: auto;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
}

.card__title {
    font-size: 1.1875rem;
    margin-bottom: 10px;
}

.card__desc {
    color: var(--text-muted);
    font-size: 0.9375rem;
    flex-grow: 1;
    margin-bottom: 16px;
}

.card__link {
    margin-top: auto;
}

/* Карточка-ссылка целиком */
a.card {
    text-decoration: none;
    color: inherit;
}

a.card:hover .card__title {
    color: var(--primary);
}

a.card:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 3px;
}

/* Продукты */
.product-card {
    position: relative;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.product-card__num {
    font-family: var(--font-code);
    font-size: 0.8125rem;
    color: var(--primary);
}

.product-card__title {
    font-size: 1.0625rem;
    margin-bottom: 2px;
}

.product-card__desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    flex-grow: 1;
}

.product-card__note {
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--bg-card-border);
    padding-top: 12px;
}

/* Процесс */
.steps {
    list-style: none;
    display: grid;
    gap: 16px;
    counter-reset: step;
}

.step-item {
    padding: 20px 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-item__num {
    font-family: var(--font-code);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    opacity: 0.55;
    flex-shrink: 0;
    min-width: 2ch;
}

.step-item__title {
    font-size: 1.0625rem;
    margin-bottom: 4px;
}

.step-item__desc {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* Проблемы / «для кого» */
.problem-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.problem-list li {
    padding: 16px 18px;
    border-left: 2px solid var(--primary);
    background: rgba(56, 189, 248, 0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.9375rem;
    color: var(--text-main);
}

.problem-list--gold li {
    border-left-color: var(--brand-gold);
    background: var(--brand-gold-soft);
}

/* FAQ */
.faq {
    display: grid;
    gap: 12px;
}

.faq__item {
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    overflow: hidden;
}

.faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    list-style: none;
    min-height: 44px;
}

.faq__q::-webkit-details-marker {
    display: none;
}

.faq__q::after {
    content: "+";
    font-size: 1.35rem;
    color: var(--primary);
    flex-shrink: 0;
    transition: transform 0.2s ease;
    line-height: 1;
}

.faq__item[open] .faq__q::after {
    transform: rotate(45deg);
}

.faq__a {
    padding: 0 20px 20px;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.faq__a p + p {
    margin-top: 10px;
}

/* Изображение-баннер внутри секции */
.banner-figure {
    margin: 0 0 24px;
}

.banner-figure img {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--bg-card-border);
}

.banner-figure figcaption {
    margin-top: 10px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ==========================================================================
   7. ФОРМЫ И CTA-БЛОК
   ========================================================================== */

.cta-band {
    position: relative;
    padding: 40px 0;
    background-image: url("/assets/img/interactive-bg-1280.webp");
    background-size: cover;
    background-position: center;
    border-top: 1px solid var(--bg-card-border);
    border-bottom: 1px solid var(--bg-card-border);
}

.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--bg-overlay);
}

.cta-band .container {
    position: relative;
    z-index: 1;
}

.cta-band__inner {
    max-width: 720px;
}

.cta-band h2 {
    margin-bottom: 12px;
}

.cta-band p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.contact-layout {
    display: grid;
    gap: 28px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form__label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form__label .req {
    color: var(--primary);
}

.form__input,
.form__textarea,
.form__select {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    min-height: 48px;
    transition: border-color 0.2s ease;
}

.form__input::placeholder,
.form__textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
    border-color: var(--primary);
    outline: none;
}

.form__input:focus-visible,
.form__textarea:focus-visible,
.form__select:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

.form__input.is-invalid,
.form__textarea.is-invalid {
    border-color: var(--danger);
}

.form__textarea {
    min-height: 120px;
    resize: vertical;
}

.form__error {
    min-height: 1.15em;
    color: var(--danger);
    font-size: 0.8125rem;
}

.form__hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form__status {
    min-height: 1.25em;
    font-size: 0.9rem;
    padding: 0;
}

.form__status.is-error { color: var(--danger); }
.form__status.is-success { color: var(--success); }
.form__status.is-pending { color: var(--primary); }

/* Согласие: не предустановлено */
.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.checkbox input {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 1px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox label {
    cursor: pointer;
}

.checkbox a {
    color: var(--primary);
}

/* Honeypot: скрыто от людей, видно ботам */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-list a,
.contact-list span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    text-decoration: none;
    min-height: 44px;
    font-size: 1rem;
}

.contact-list a:hover {
    color: var(--primary);
}

.contact-list .lbl {
    color: var(--text-muted);
    font-size: 0.8125rem;
    display: block;
}

.info-box {
    padding: 16px 18px;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-left: 2px solid var(--brand-gold);
    background: var(--brand-gold-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.info-box--blue {
    border-left-color: var(--primary);
    background: rgba(56, 189, 248, 0.06);
}

/* ==========================================================================
   8. ПОДВАЛ
   ========================================================================== */

.footer {
    margin-top: auto;
    padding: 40px 0 28px;
    border-top: 1px solid var(--bg-card-border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer__grid {
    display: grid;
    gap: 28px;
    margin-bottom: 28px;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-main);
    font-weight: 700;
}

.footer__brand img {
    width: 32px;
    height: 32px;
}

.footer__about {
    max-width: 42ch;
    line-height: 1.6;
}

.footer__heading {
    color: var(--text-main);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.footer__links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer__links a {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
}

.footer__links a:hover {
    color: var(--primary);
}

.footer__bottom {
    padding-top: 20px;
    border-top: 1px solid var(--bg-card-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.8125rem;
}

.footer__requisites {
    font-size: 0.75rem;
    line-height: 1.6;
    opacity: 0.85;
}

/* ==========================================================================
   9. СТРАНИЦЫ
   ========================================================================== */

/* Хлебные крошки */
.crumbs {
    padding: 16px 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.crumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.crumbs li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.crumbs li:not(:last-child)::after {
    content: "/";
    opacity: 0.45;
}

.crumbs a {
    color: var(--text-muted);
    text-decoration: none;
}

.crumbs a:hover {
    color: var(--primary);
}

.crumbs [aria-current="page"] {
    color: var(--text-main);
}

/* Заголовок внутренней страницы */
.page-head {
    padding: 32px 0 8px;
}

.page-head h1 {
    margin-bottom: 14px;
}

.page-head .lead {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-muted);
    max-width: 68ch;
}

/* Контент статьи */
.prose {
    max-width: 72ch;
}

.prose > * + * {
    margin-top: 16px;
}

.prose h2 {
    margin-top: 36px;
    font-size: clamp(1.4rem, 2.6vw, 1.85rem);
}

.prose h3 {
    margin-top: 26px;
}

.prose ul,
.prose ol {
    padding-left: 1.25rem;
    display: grid;
    gap: 8px;
    color: var(--text-muted);
}

.prose li::marker {
    color: var(--primary);
}

.prose p {
    color: var(--text-muted);
}

.prose strong {
    color: var(--text-main);
}

.prose a {
    color: var(--primary);
}

/* Список «что входит» */
.check-list {
    list-style: none;
    display: grid;
    gap: 10px;
}

.check-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.9375rem;
    color: var(--text-main);
}

.check-list li::before {
    content: "✓";
    color: var(--primary);
    font-weight: 700;
    flex-shrink: 0;
}

.cross-list {
    list-style: none;
    display: grid;
    gap: 10px;
}

.cross-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.cross-list li::before {
    content: "—";
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Две колонки контента */
.split {
    display: grid;
    gap: 24px;
}

/* Карточка «Обо мне» */
.about-card {
    padding: 24px;
}

.about-card__row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.about-card__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid var(--bg-card-border);
    object-fit: cover;
    flex-shrink: 0;
}

.about-card__name {
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--text-main);
}

.about-card__role {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Смежная навигация */
.prevnext {
    display: grid;
    gap: 12px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--bg-card-border);
}

.prevnext a {
    display: block;
    padding: 16px 18px;
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-main);
    background: var(--tag-bg);
    transition: border-color 0.2s ease;
}

.prevnext a:hover {
    border-color: var(--primary);
    color: var(--text-main);
}

.prevnext .dir {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

/* Заглушка продукта */
.placeholder-note {
    padding: 24px;
    border: 1px dashed rgba(56, 189, 248, 0.4);
    border-radius: var(--radius-md);
    background: rgba(56, 189, 248, 0.04);
}

.placeholder-note h2 {
    font-size: 1.0625rem;
    margin-bottom: 8px;
}

.placeholder-note p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.placeholder-note p + p {
    margin-top: 10px;
}

/* Страница 404 */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    padding: 48px 0;
    gap: 16px;
}

.error-page__code {
    font-family: var(--font-code);
    font-size: clamp(3.5rem, 14vw, 7rem);
    font-weight: 700;
    line-height: 1;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary);
}

/* Оглавление услуги */
.toc {
    padding: 18px 20px;
    font-size: 0.9375rem;
}

.toc__title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 700;
}

.toc ul {
    list-style: none;
    display: grid;
    gap: 2px;
}

.toc a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 0;
}

.toc a:hover {
    color: var(--primary);
}

/* ==========================================================================
   10. ПЛАНШЕТ
   ========================================================================== */

@media (min-width: 768px) {
    .section { padding: 64px 0; }
    .section--tight { padding: 40px 0; }

    .section-title { margin-bottom: 32px; }

    .grid--2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .grid--3 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .grid--4 { grid-template-columns: repeat(2, 1fr); gap: 24px; }

    .btn-row {
        flex-direction: row;
    }

    .hero { padding: 56px 0 48px; }

    .hero__actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .steps { grid-template-columns: repeat(2, 1fr); }

    .footer__grid {
        grid-template-columns: 1.5fr 1fr 1fr;
    }

    .footer__bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .prevnext { grid-template-columns: 1fr 1fr; }

    .split { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   11. ДЕСКТОП
   ========================================================================== */

@media (min-width: 1024px) {
    .header { padding: 14px 0; }
    .header__btn { display: inline-flex; }

    .burger { display: none; }

    .nav {
        position: static;
        right: auto;
        transform: none;
        width: auto;
        max-width: none;
        height: auto;
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
        overflow: visible;
        visibility: visible;
        transition: none;
    }

    .nav__list {
        flex-direction: row;
        gap: 22px;
        align-items: center;
    }

    .nav__link {
        font-size: 0.9375rem;
        font-weight: 500;
        padding: 0;
        min-height: 44px;
        border-bottom: none;
    }

    .nav__cta { display: none; }
    .nav-backdrop { display: none; }

    .grid--3 { grid-template-columns: repeat(3, 1fr); }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }

    .hero {
        padding: 72px 0 64px;
    }

    .hero__container {
        grid-template-columns: 1.02fr 0.98fr;
        gap: 48px;
        align-items: center;
    }

    .steps { grid-template-columns: repeat(4, 1fr); }

    .contact-layout {
        grid-template-columns: 1fr 0.85fr;
        gap: 48px;
        align-items: start;
    }

    .cta-band { padding: 64px 0; }

    .stack-strip__inner {
        flex-direction: row;
        align-items: center;
        gap: 28px;
    }

    .stack-strip__label {
        white-space: nowrap;
    }

    .footer__grid {
        grid-template-columns: 1.7fr 1fr 1fr;
        gap: 40px;
    }

    .page-head { padding: 48px 0 12px; }

    .section-lead { font-size: 1.125rem; }
}

/* ==========================================================================
   12. ШИРОКИЙ ЭКРАН
   ========================================================================== */

@media (min-width: 1440px) {
    .grid--4 { grid-template-columns: repeat(4, 1fr); }
    :root { --maxw: 1240px; }
}

/* Отключение анимаций для тех, кто просил */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Печать — базовая читаемость */
@media print {
    .header, .footer, .btn, .nav, .theme-toggle, .burger { display: none !important; }
    body { background: #fff; color: #000; }
    a { color: #000; text-decoration: underline; }
}
