/* =========================================================
   TMes — style.css
   Дизайн-система нового сайта. Мобайл-фёрст, без фреймворков.
   ========================================================= */

:root {
    --font-base: 'Manrope', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    --color-bg: #ffffff;
    --color-bg-alt: #f4f5f8;
    --color-bg-dark: #12182b;
    --color-bg-dark-2: #1b2340;

    --color-text: #1a1e2b;
    --color-text-muted: #5c6274;
    --color-text-on-dark: #eef0f7;
    --color-text-on-dark-muted: #aab1c9;

    --color-accent: #e2472a;
    --color-accent-dark: #c23a20;
    --color-accent-light: #ffe3db;

    --color-border: #e3e5ec;
    --color-border-dark: #2b3357;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --shadow-sm: 0 1px 2px rgba(18, 24, 43, 0.06), 0 1px 1px rgba(18, 24, 43, 0.04);
    --shadow-md: 0 8px 24px rgba(18, 24, 43, 0.10);
    --shadow-lg: 0 20px 48px rgba(18, 24, 43, 0.16);

    --container-w: 1180px;
    --header-h: 116px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
    margin: 0;
    font-family: var(--font-base);
    color: var(--color-text);
    background: var(--color-bg);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
button { font: inherit; cursor: pointer; }
address { font-style: normal; }
.icon { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; }

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--color-accent);
    color: #fff;
    padding: 10px 16px;
    z-index: 200;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

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

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

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 15px;
    border: 2px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.btn--accent { background: var(--color-accent); color: #fff; }
.btn--accent:hover { background: var(--color-accent-dark); box-shadow: var(--shadow-md); }
.btn--ghost-light { border-color: rgba(255,255,255,0.35); color: #fff; }
.btn--ghost-light:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.6); }
.btn--outline { border-color: var(--color-border); color: var(--color-text); }
.btn--outline:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn--block { width: 100%; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header { position: sticky; top: 0; z-index: 100; }

.topbar {
    background: var(--color-bg-dark);
    color: var(--color-text-on-dark-muted);
    font-size: 13px;
    display: none;
}
@media (min-width: 780px) { .topbar { display: block; } }
.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    gap: 20px;
}
.topbar__address { display: inline-flex; align-items: center; gap: 6px; }
.topbar__address:hover { color: var(--color-text-on-dark); }
.topbar__address .icon { color: var(--color-accent); }
.topbar__phones { display: flex; gap: 20px; }
.topbar__phone:hover { color: var(--color-text-on-dark); }

.navbar {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--color-border);
    /* Внимание: backdrop-filter здесь намеренно не используется — на элементе-предке
       он создаёт containing block для потомков с position:fixed, из-за чего мобильное
       меню (.nav, position:fixed) обрезалось по границам .navbar вместо всего экрана. */
}
.navbar__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 72px;
}

.logo { display: flex; flex-direction: column; line-height: 1; margin-right: auto; }
.logo__mark { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--color-text); }
.logo__mark-accent { color: var(--color-accent); }
.logo__tag { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); margin-top: 2px; }
.logo--footer .logo__mark { color: #fff; font-size: 24px; }

.nav { display: none; }
@media (min-width: 960px) { .nav { display: block; } }
.nav__list { display: flex; align-items: center; gap: 4px; }
.nav__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    background: none;
    border: none;
}
.nav__link:hover, .nav__link.is-active { color: var(--color-accent); }
.icon--chevron { width: 16px; height: 16px; transition: transform 0.15s ease; }

.nav__item--dropdown { position: relative; }
.nav__item--dropdown:hover .icon--chevron,
.nav__dropdown-toggle[aria-expanded="true"] .icon--chevron { transform: rotate(180deg); }

.dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.nav__item--dropdown:hover .dropdown,
.nav__item--dropdown:focus-within .dropdown,
.dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}
.dropdown a:hover, .dropdown a.is-active { background: var(--color-bg-alt); color: var(--color-accent); }

.navbar__cta { display: none; }
@media (min-width: 960px) {
    .navbar__cta:not(.mobile-cta) { display: inline-flex; }
    .navbar__cta.mobile-cta { display: none !important; }
}

/* mobile toggle */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
@media (min-width: 960px) { .nav-toggle { display: none; } }
.nav-toggle span { display: block; height: 2px; width: 20px; margin-inline: auto; background: var(--color-text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile drawer (reuses .nav / .nav__list) */
@media (max-width: 959.98px) {
    .nav {
        display: block;
        position: fixed;
        inset: 0;
        top: var(--header-h);
        background: #fff;
        overflow-y: auto;
        padding: 20px 24px 32px;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        visibility: hidden;
    }
    .nav.is-open { transform: translateX(0); visibility: visible; }
    .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
    .nav__link { width: 100%; padding: 14px 10px; font-size: 17px; justify-content: space-between; border-bottom: 1px solid var(--color-border); border-radius: 0; }
    .nav__item--dropdown .nav__link { display: flex; }
    .dropdown {
        position: static;
        opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: none; padding: 0 0 0 14px;
        max-height: 0; overflow: hidden;
        transition: max-height 0.2s ease;
    }
    .dropdown.is-open { max-height: 400px; }
    .dropdown a { padding: 12px 10px; font-size: 16px; border-bottom: 1px dashed var(--color-border); }
    .navbar__cta.mobile-cta { display: flex; margin: 18px 0 0; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
    position: relative;
    background: radial-gradient(1200px 600px at 85% -10%, #2a3562 0%, transparent 60%), linear-gradient(160deg, var(--color-bg-dark) 0%, var(--color-bg-dark-2) 100%);
    color: var(--color-text-on-dark);
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 85%);
    pointer-events: none;
}
/* padding-block (не padding) — .hero__inner всегда используется вместе с .container
   на одном элементе, а обычный padding-шортхенд обнулил бы горизонтальные отступы .container */
.hero__inner { position: relative; padding-block: 64px 76px; display: grid; gap: 32px; }
@media (min-width: 860px) { .hero__inner { padding-block: 96px 108px; grid-template-columns: 1.1fr 0.9fr; align-items: center; } }

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
    background: rgba(226, 71, 42, 0.12);
    border: 1px solid rgba(226, 71, 42, 0.3);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); margin-bottom: 18px; }
.hero__lead { font-size: 18px; color: var(--color-text-on-dark-muted); max-width: 46ch; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero__stats { display: grid; grid-template-columns: repeat(3, auto); gap: 28px; }
.hero__stat-num { font-size: 26px; font-weight: 800; color: #fff; }
.hero__stat-label { font-size: 13px; color: var(--color-text-on-dark-muted); }

.hero__panel {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-lg);
    padding: 28px;
    backdrop-filter: blur(6px);
}
.hero__panel h2 { font-size: 18px; color: #fff; margin-bottom: 6px; }
.hero__panel p { color: var(--color-text-on-dark-muted); font-size: 14px; margin-bottom: 20px; }
.hero__brand-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.hero__brand-chip {
    font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
    padding: 8px 14px; border-radius: 999px;
    border: 1px solid var(--color-border-dark);
    color: var(--color-text-on-dark);
}
.hero__panel-list { display: grid; gap: 10px; }
.hero__panel-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--color-text-on-dark); }
.hero__panel-list .icon { color: var(--color-accent); margin-top: 3px; }

/* =========================================================
   SECTIONS shared
   ========================================================= */
.section { padding: 64px 0; }
.section--alt { background: var(--color-bg-alt); }
.section__head { max-width: 640px; margin: 0 0 40px; }
.section__eyebrow { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-accent); margin-bottom: 10px; }
.section__head h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 12px; }
.section__head p { color: var(--color-text-muted); font-size: 16px; }
.section__head--center { margin-inline: auto; text-align: center; }

/* ---------- service cards ---------- */
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card__icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--color-accent-light);
    color: var(--color-accent-dark);
}
.card__icon .icon { width: 26px; height: 26px; }
.card h3 { font-size: 19px; }
.card p { color: var(--color-text-muted); font-size: 14.5px; }
.card__link { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--color-accent); }
.card__link .icon { width: 16px; height: 16px; transition: transform 0.15s ease; }
.card__link:hover .icon { transform: translateX(3px); }

/* ---------- advantages ---------- */
.adv-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.adv-item { display: flex; gap: 16px; }
.adv-item__num { font-size: 15px; font-weight: 800; color: var(--color-accent); border: 2px solid var(--color-accent); width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.adv-item h3 { font-size: 16.5px; margin-bottom: 6px; }
.adv-item p { color: var(--color-text-muted); font-size: 14.5px; }

/* ---------- about / split ---------- */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }
.split__media {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 30% 20%, rgba(226,71,42,0.35), transparent 55%),
        linear-gradient(150deg, var(--color-bg-dark) 0%, var(--color-bg-dark-2) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.split__media .icon { width: 96px; height: 96px; color: rgba(255,255,255,0.85); }
.split__body h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 16px; }
.split__body p { color: var(--color-text-muted); margin-bottom: 16px; }
.split__body p:last-of-type { margin-bottom: 24px; }

/* ---------- CTA band ---------- */
.cta-band {
    background: linear-gradient(120deg, var(--color-bg-dark) 0%, var(--color-bg-dark-2) 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 40px;
    display: grid;
    gap: 24px;
    align-items: center;
}
@media (min-width: 780px) { .cta-band { grid-template-columns: 1fr auto; padding: 48px 56px; } }
.cta-band h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 8px; }
.cta-band p { color: var(--color-text-on-dark-muted); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- contact section ---------- */
.contact-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.contact-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 24px; }
.contact-card .icon { width: 24px; height: 24px; color: var(--color-accent); margin-bottom: 12px; }
.contact-card h3 { font-size: 15px; margin-bottom: 8px; }
.contact-card p, .contact-card a { font-size: 14.5px; color: var(--color-text-muted); }
.contact-card a:hover { color: var(--color-accent); }

/* =========================================================
   BREADCRUMBS + inner page content
   ========================================================= */
.breadcrumbs { padding: 18px 0; font-size: 13.5px; color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-accent); }
.breadcrumbs__sep { margin: 0 6px; opacity: 0.6; }

.page-hero {
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    padding: 36px 0 44px;
}
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.page-hero p { color: var(--color-text-muted); font-size: 17px; max-width: 60ch; }

.prose { max-width: 74ch; font-size: 16.5px; color: var(--color-text); }
.prose p { margin-bottom: 1.15em; }
.prose a { color: var(--color-accent-dark); font-weight: 600; text-decoration: underline; text-decoration-color: var(--color-accent-light); text-underline-offset: 3px; }
.prose a:hover { color: var(--color-accent); }

.model-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 28px 0; }
.model-chip {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--color-border);
    border-radius: var(--radius-sm); padding: 12px 14px;
    font-size: 14.5px; font-weight: 600;
}
.model-chip .icon { width: 16px; height: 16px; color: var(--color-accent); flex-shrink: 0; }

.inner-layout { display: grid; gap: 48px; }
@media (min-width: 960px) { .inner-layout { grid-template-columns: 1fr 300px; } }

.side-card { background: var(--color-bg-alt); border-radius: var(--radius-md); padding: 24px; margin-bottom: 20px; }
.side-card h3 { font-size: 15px; margin-bottom: 14px; }
.side-card ul { display: grid; gap: 4px; }
.side-card a { display: block; padding: 9px 10px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 600; color: var(--color-text); }
.side-card a:hover, .side-card a.is-active { background: #fff; color: var(--color-accent); }
.side-card--dark { background: var(--color-bg-dark); color: #fff; }
.side-card--dark h3 { color: #fff; }
.side-card--dark p { color: var(--color-text-on-dark-muted); font-size: 14px; margin-bottom: 16px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--color-bg-dark); color: var(--color-text-on-dark-muted); margin-top: 40px; }
.footer__grid {
    display: grid;
    gap: 36px;
    padding-block: 56px 40px; /* .footer__grid тоже сидит на одном элементе с .container — см. комментарий у .hero__inner */
    grid-template-columns: 1fr;
}
@media (min-width: 700px) { .footer__grid { grid-template-columns: 1.3fr 1fr 1fr 1.2fr; } }
.footer__col--about p { font-size: 14px; margin-top: 14px; max-width: 32ch; }
.footer__heading { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; margin-bottom: 16px; }
.footer__list { display: grid; gap: 10px; }
.footer__list a { font-size: 14.5px; }
.footer__list a:hover { color: #fff; }
.footer__col--contacts address p { font-size: 14.5px; margin-bottom: 8px; }
.footer__col--contacts a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid var(--color-border-dark); }
.footer__bottom-inner { padding-block: 18px; font-size: 13px; }
