/* --- Site header / nav --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--color-bg) 92%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid color-mix(in srgb, var(--color-ink) 8%, transparent);
}
.site-header__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    height: var(--header-height);
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.site-header__logo img { height: 40px; width: auto; }

.site-nav { display: none; }
@media (min-width: 1024px) {
    .site-nav { display: block; }
}
.site-nav__list { display: flex; gap: 1.75rem; font-weight: 600; font-size: 0.92rem; }
.site-nav__list a:hover { color: var(--color-brand); }

.site-header__actions { display: flex; align-items: center; gap: 0.9rem; }
.site-header__phone {
    display: none;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}
@media (min-width: 1280px) {
    .site-header__phone { display: flex; }
}
.site-header__actions .btn { display: none; }
@media (min-width: 640px) {
    .site-header__actions .btn { display: inline-flex; }
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px; height: 36px;
    background: none; border: none;
}
@media (min-width: 1024px) {
    .mobile-menu-toggle { display: none; }
}
.mobile-menu-toggle span {
    display: block; height: 2px; width: 100%;
    background: var(--color-ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}
/* Восстанавливаем реальный размер sr-only спана: без этого он наследует width:100%
   от правила выше (выше специфичность .mobile-menu-toggle span, чем .sr-only) и
   раздувает document scrollWidth на мобильных, вызывая горизонтальный оверфлоу. */
.mobile-menu-toggle span.sr-only { width: 1px; height: 1px; }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
    border-top: 1px solid color-mix(in srgb, var(--color-ink) 8%, transparent);
    background: var(--color-bg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.mobile-menu[hidden] { display: none; }
@media (min-width: 1024px) {
    .mobile-menu { display: none !important; }
}
.mobile-menu__list { display: flex; flex-direction: column; gap: 0.9rem; font-weight: 600; }
.mobile-menu__phone { font-weight: 700; }

/* --- Sticky mobile CTA --- */
.sticky-mobile-cta {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--color-bg) 96%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid color-mix(in srgb, var(--color-ink) 10%, transparent);
}
@media (min-width: 1024px) {
    .sticky-mobile-cta { display: none; }
}

/* --- Placeholder visual --- */
.ph {
    position: relative;
    aspect-ratio: var(--ph-aspect, 4/3);
    width: 100%;
    border-radius: var(--radius-lg);
    background:
        repeating-linear-gradient(0deg, color-mix(in srgb, var(--color-brand) 6%, transparent) 0, color-mix(in srgb, var(--color-brand) 6%, transparent) 1px, transparent 1px, transparent 28px),
        repeating-linear-gradient(90deg, color-mix(in srgb, var(--color-brand) 6%, transparent) 0, color-mix(in srgb, var(--color-brand) 6%, transparent) 1px, transparent 1px, transparent 28px),
        var(--color-surface-muted);
    border: 1.5px dashed color-mix(in srgb, var(--color-brand) 35%, transparent);
    color: var(--color-brand);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    overflow: hidden;
    text-align: center;
    padding: 1.5rem;
}
.ph__icon { width: 25%; min-width: 40px; max-width: 72px; opacity: 0.55; }
.ph__badge {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--color-brand);
    color: #fff;
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.8rem;
}
.ph__label {
    font-size: 0.8rem;
    color: var(--color-ink-muted);
    max-width: 26ch;
}

/* --- Реальное фото (тот же --ph-aspect, что и у .ph) --- */
.photo {
    display: block;
    width: 100%;
    aspect-ratio: var(--ph-aspect, 4/3);
    object-fit: cover;
    border-radius: var(--radius-lg);
    background: var(--color-surface-muted);
}

/* --- Floating card (hero) --- */
.floating-card {
    position: absolute;
    left: -1rem;
    bottom: -1.5rem;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1.1rem 1.3rem;
    max-width: 230px;
}
@media (min-width: 1024px) {
    .floating-card { left: -2.5rem; bottom: 2rem; }
}
.floating-card__title { font-weight: 800; font-size: 0.9rem; margin-bottom: 0.6rem; }
.floating-card ul { display: flex; flex-direction: column; gap: 0.4rem; }
.floating-card li {
    font-size: 0.8rem;
    color: var(--color-ink-muted);
    padding-left: 1.1rem;
    position: relative;
}
.floating-card li::before {
    content: "";
    position: absolute; left: 0; top: 0.45em;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--color-brand);
}

/* --- Object context strip (marquee, брендовый фон) --- */
.context-strip {
    padding: 1.1rem 0;
    overflow: hidden;
    background: var(--color-brand);
}
.context-strip__track {
    display: flex;
    width: max-content;
    align-items: center;
    gap: 1rem;
    animation: marquee-scroll-3 42s linear infinite;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    color: #fff;
}
.context-strip__track:hover { animation-play-state: paused; }
.context-strip__item { color: rgba(255, 255, 255, 0.92); }
.context-strip__dot { color: rgba(255, 255, 255, 0.45); font-size: 0.6rem; }
@keyframes marquee-scroll-3 {
    from { transform: translateX(0); }
    to { transform: translateX(-33.3333%); }
}
@media (prefers-reduced-motion: reduce) {
    .context-strip__track { animation: none; }
}

/* --- Бегущая строка документов (та же механика, вид плашек) --- */
.documents__marquee {
    margin-top: 2rem;
    overflow: hidden;
    -webkit-mask-image: none;
}
.documents__marquee-track {
    display: flex;
    width: max-content;
    gap: 0.75rem;
    animation: marquee-scroll-3 50s linear infinite;
}
.documents__marquee-track:hover { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
    .documents__marquee-track { animation: none; }
}
.doc-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--color-surface);
    border: 1px solid color-mix(in srgb, var(--color-ink) 10%, transparent);
    border-radius: var(--radius-pill);
    padding: 0.7rem 1.25rem;
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
    box-shadow: var(--shadow-card);
}
.doc-pill .icon { color: var(--color-brand); flex-shrink: 0; }

/* --- Плашки "кому предназначено" --- */
.documents__audiences {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}
.audience-pill {
    background: var(--color-audience-bg);
    color: var(--color-audience-ink);
    border-radius: var(--radius-pill);
    padding: 0.45rem 1.1rem;
    font-size: 0.82rem;
    font-weight: 700;
}

/* --- Details/accordion base (used by FAQ + mobile objects) --- */
details > summary {
    cursor: pointer;
    list-style: none;
}
details > summary::-webkit-details-marker { display: none; }

/* Вращающийся "+" вместо мгновенной смены "+"/"−" — плавнее на открытии/закрытии. */
.faq__marker,
.objects__accordion-marker {
    position: relative;
    flex-shrink: 0;
    width: 18px; height: 18px;
    transition: transform 0.3s ease;
}
.faq__marker::before, .faq__marker::after,
.objects__accordion-marker::before, .objects__accordion-marker::after {
    content: "";
    position: absolute;
    background: var(--color-brand);
    border-radius: 2px;
    transition: opacity 0.2s ease;
}
.faq__marker::before, .objects__accordion-marker::before {
    left: 0; top: 50%; width: 100%; height: 2px; transform: translateY(-50%);
}
.faq__marker::after, .objects__accordion-marker::after {
    top: 0; left: 50%; height: 100%; width: 2px; transform: translateX(-50%);
}
details[open] > summary .faq__marker,
details[open] > summary .objects__accordion-marker {
    transform: rotate(45deg);
}

/* --- Иконки --- */
.icon { flex-shrink: 0; }

/* --- Мягкий hover-lift для карточек (решения/кейсы/документы) --- */
.solution-card, .case-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.solution-card:hover, .case-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid color-mix(in srgb, var(--color-ink) 10%, transparent);
    padding: 3.5rem 1.25rem 2rem;
}
.site-footer__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr;
}
@media (min-width: 900px) {
    .site-footer__inner { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
}
.site-footer__brand img { height: 44px; width: auto; margin-bottom: 0.9rem; }
.site-footer__brand p { color: var(--color-ink-muted); font-size: 0.9rem; max-width: 32ch; }
.site-footer__title { font-weight: 800; margin-bottom: 0.7rem; }
.site-footer__col { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; }
.site-footer__col a { color: var(--color-ink-muted); }
.site-footer__col a:hover { color: var(--color-ink); }
.site-footer__legal {
    max-width: var(--container-width);
    margin: 2.5rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid color-mix(in srgb, var(--color-ink) 8%, transparent);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--color-ink-muted);
}

/* --- Legal pages (privacy/consent) --- */
.legal-page { padding: 4rem 0 6rem; }
.legal-page__inner { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }
.legal-page__inner h1 { margin-top: 1rem; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); }
.legal-page__lead { margin-top: 1rem; color: var(--color-ink-muted); font-size: 0.95rem; }
.legal-page__inner section { padding: 1.75rem 0 0; }
.legal-page__inner h2 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.legal-page__inner p, .legal-page__inner li { color: var(--color-ink-muted); font-size: 0.92rem; line-height: 1.6; }
.legal-page__inner ul { padding-left: 1.2rem; list-style: disc; display: flex; flex-direction: column; gap: 0.3rem; }
.legal-page__published { margin-top: 2.5rem; font-size: 0.78rem; color: var(--color-ink-muted); }
