/* Публичный сайт Anar. Цвета, шрифт и скругления приходят из «Внешнего вида» через переменные :root. */
:root {
    --surface: color-mix(in srgb, var(--bg) 94%, var(--ink) 6%);
    --muted: color-mix(in srgb, var(--ink) 62%, var(--bg));
    --line: color-mix(in srgb, var(--ink) 12%, var(--bg));
    --primary-soft: color-mix(in srgb, var(--primary) 10%, var(--bg));
    --wrap: 1140px;
}
/* Тёмная тема: «как на телефоне» или выбрана явно. Основной цвет становится светлее, чтобы читался на тёмном. */
@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] { --bg: #141312; --ink: #EDEAE6; --primary: color-mix(in srgb, var(--primary) 70%, white); }
}
html[data-theme="dark"] { --bg: #141312; --ink: #EDEAE6; --primary: color-mix(in srgb, var(--primary) 70%, white); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; color: var(--ink); background: var(--bg); }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.lead { font-size: 1.15rem; }
.rounded { border-radius: calc(var(--radius) + 6px); }
.shadow { box-shadow: 0 20px 50px -20px color-mix(in srgb, var(--ink) 35%, transparent); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .7em 1.3em; border-radius: var(--radius);
       font: inherit; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .1s, filter .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-light { background: #fff; color: var(--primary); }
.btn-lg { font-size: 1.05rem; padding: .85em 1.6em; }
.btn-sm { padding: .45em .9em; font-size: .9rem; }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: baseline; gap: .45em; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-name { font-weight: 700; font-size: 1.35rem; }
.brand-tag { color: var(--muted); font-size: .85rem; }
.brand-logo { max-height: 40px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a.current { color: var(--primary); }
.langs { display: flex; gap: 2px; font-size: .8rem; }
.langs a { padding: 3px 6px; border-radius: 6px; color: var(--muted); font-weight: 600; }
.langs a.current { background: var(--primary-soft); color: var(--primary); }
.menu-toggle { display: none; font-size: 1.5rem; background: none; border: 0; color: var(--ink); cursor: pointer; }
@media (max-width: 860px) {
    .menu-toggle { display: block; }
    .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: flex-start;
                padding: 16px 20px 24px; background: var(--bg); border-bottom: 1px solid var(--line); }
    body.menu-open .site-nav { display: flex; }
}

/* Первый экран */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 9vw, 110px) 0; }
.hero-row { position: relative; display: grid; gap: 40px; align-items: center; }
.hero-image-right .hero-row { grid-template-columns: 1.05fr 1fr; }
.hero-center .hero-row { text-align: center; justify-items: center; }
.hero-center .hero-text { max-width: 820px; }
.hero-center .hero-buttons { justify-content: center; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-video-full { color: #fff; min-height: min(86vh, 760px); display: flex; align-items: center; }
.hero-video-full .hero-text { max-width: 720px; }
.hero-video-full .lead { color: rgba(255,255,255,.9); }
.hero-video-full .btn-ghost { color: #fff; }
.hero-bg { position: absolute; inset: 0; background: #222; }
.hero-bg .hero-video, .hero-bg .hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: #000; }
@media (max-width: 860px) { .hero-image-right .hero-row { grid-template-columns: 1fr; } }

/* Секции и карточки */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-soft { background: var(--surface); }
.cards { display: grid; gap: 18px; margin-top: 28px; }
.cards-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cards-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 24px; }
.section-soft .card { border-color: transparent; }
.card-icon img { width: 44px; height: 44px; object-fit: contain; margin-bottom: 12px; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split-reverse .split-media { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split-reverse .split-media { order: 0; } }
.checks { list-style: none; padding: 0; margin: 1em 0 0; }
.checks li { position: relative; padding-left: 1.7em; margin-bottom: .55em; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

/* Видео */
.video-box { margin-top: 20px; border-radius: calc(var(--radius) + 6px); overflow: hidden; background: #111; aspect-ratio: 16 / 9; }
.video-box.video-vertical { aspect-ratio: 9 / 16; max-width: 380px; margin-inline: auto; }
.video-box video, .video-box iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-lite { width: 100%; height: 100%; border: 0; background: #111 center / cover no-repeat; color: #fff; font-size: 3rem; cursor: pointer;
              display: flex; align-items: center; justify-content: center; text-decoration: none; text-shadow: 0 2px 12px #000; }

/* Тарифы */
.country-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.country-tabs a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--bg); border: 1px solid var(--line); font-size: .9rem; }
.country-tabs a.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.tariff { position: relative; }
.tariff-promo { border: 2px solid var(--primary) !important; }
.badge { display: inline-block; background: var(--primary); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.price { font-size: 1.1rem; margin: 8px 0 12px; }
.price strong { font-size: 2rem; }

/* Вопросы, призыв, текст */
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; }
.faq summary::after { content: "+"; float: right; color: var(--primary); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { margin-top: 10px; white-space: pre-line; }
.cta { text-align: center; padding: clamp(32px, 6vw, 64px) 24px; border-radius: calc(var(--radius) + 10px); background: var(--surface); }
.cta-accent { background: var(--primary); color: #fff; }
.cta .lead { max-width: 640px; margin-inline: auto; }
.prose h2 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }

/* Аида */
.aida-card { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding: clamp(28px, 5vw, 56px);
             border-radius: calc(var(--radius) + 10px); background: linear-gradient(135deg, var(--primary-soft), var(--surface)); }
@media (max-width: 860px) { .aida-card { grid-template-columns: 1fr; } }
.aida-name { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--primary); margin-bottom: 14px; }
.aida-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.aida-dot { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; align-items: center; justify-content: center; font-size: .9rem; }
.aida-button { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 10px 16px 10px 10px;
               background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600;
               box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--ink) 40%, transparent); }
.aida-button img { border-radius: 50%; }

/* Форма заявки */
.lead-form { display: grid; gap: 14px; margin-top: 20px; }
.lead-form label { display: grid; gap: 6px; font-weight: 500; }
.lead-form input, .lead-form select, .lead-form textarea { font: inherit; padding: .75em .9em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); width: 100%; }
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 16px 18px; border-radius: var(--radius); margin-top: 18px; }
.notice-ok { background: color-mix(in srgb, #2E8B57 14%, var(--bg)); }
.notice-error { background: color-mix(in srgb, #C0392B 14%, var(--bg)); }

/* Подвал */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 28px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1.3fr 1fr; gap: 28px; margin-bottom: 20px; }
.footer-nav { display: grid; gap: 8px; align-content: start; }
.footer-nav a, .contact a { color: var(--ink); text-decoration: none; }
.contact { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* Предпросмотр черновика */
.preview-bar { background: #F5C542; color: #222; text-align: center; padding: 6px; font-size: .85rem; font-weight: 600; }
.preview-note { background: #FFF3CD; color: #664D03; font-size: .85rem; padding: 6px 20px; }
.block-wrap.is-hidden > :not(.preview-note) { opacity: .45; }
.fill-me { background: #FFF3CD; color: #664D03; border-radius: 4px; padding: 0 .3em; font-size: .9em; font-weight: 500; }
.fill-box { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; border: 2px dashed #E0B84A; }
