/* ===== CopyClean — общие стили обоих сайтов ===== */
:root {
  --magenta: #e6007e;
  --magenta-2: #ff3fa4;
  --cyan: #00a6d6;
  --cyan-2: #3fd2ff;
  --yellow: #ffcf1a;
  --key: #0f1115;

  --bg: #ffffff;
  --bg-2: #f5f6f8;
  --bg-3: #eceef2;
  --card: #ffffff;
  --ink: #0f1115;
  --ink-2: #474c58;
  --muted: #6b7080;
  --line: #e6e8ed;
  --accent: var(--magenta);
  --accent-2: var(--magenta-2);
  --accent-ink: #fff;
  --accent-text: #c4006b; /* акцент для мелкого текста — контраст 5:1 */
  --ok: #12a150;
  --err: #e5484d;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 17, 21, .06), 0 2px 8px rgba(15, 17, 21, .04);
  --shadow: 0 10px 30px -12px rgba(15, 17, 21, .18), 0 2px 6px rgba(15, 17, 21, .05);
  --shadow-lg: 0 30px 60px -20px rgba(15, 17, 21, .28);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --container: 1240px;
  --header-h: 72px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Unbounded', 'Manrope', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; font-family: var(--font); font-size: 18px; line-height: 1.6; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: none; margin: 0 auto; padding: 0 200px; }
@media (max-width: 1600px) { .container { padding: 0 120px; } }
@media (max-width: 1280px) { .container { padding: 0 48px; } }
@media (max-width: 900px) { .container { padding: 0 24px; } }
.section { padding: 104px 0; position: relative; }
.section-sm { padding: 64px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-text, var(--accent));
}
.eyebrow::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 44px); margin-top: 14px; max-width: 680px; }
.section-head > div { flex: 1 1 520px; max-width: 700px; }
.section-head p { color: var(--ink-2); max-width: 440px; flex: 0 1 400px; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----- Кнопки ----- */
.btn {
  --b-bg: var(--ink); --b-fg: #fff;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px; border: 0; background: var(--b-bg); color: var(--b-fg);
  font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; isolation: isolate;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s, color .25s;
}
.btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .28), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -10px var(--b-shadow, rgba(15, 17, 21, .45)); }
.btn:hover::after { opacity: 1; }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .35s var(--ease); }
.btn:hover svg.arrow { transform: translateX(4px); }
.btn-accent { --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-shadow: color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-ghost { --b-bg: transparent; --b-fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-light { --b-bg: #fff; --b-fg: var(--key); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn.loading { color: transparent !important; }
.btn.loading::before {
  content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--b-fg); border-right-color: transparent; animation: spin .7s linear infinite;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--bg-2); color: var(--ink); transition: background .2s, transform .3s var(--ease);
}
.icon-btn:hover { background: var(--bg-3); }
.icon-btn svg { width: 20px; height: 20px; }

/* ----- Формы ----- */
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input, .field input, .field select, .field textarea {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--card); transition: border-color .2s, box-shadow .2s; outline: none;
}
.field textarea { height: auto; min-height: 96px; padding: 14px 16px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a8f9b' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}
.field.invalid input, .field.invalid textarea { border-color: var(--err); }
.field .err { font-size: 13px; color: var(--err); min-height: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; line-height: 1.45; }
.check input { appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border-radius: 6px; border: 1.5px solid var(--line); background: var(--card); display: grid; place-items: center; transition: .2s; cursor: pointer; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ''; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check.invalid input { border-color: var(--err); }
.check a { text-decoration: underline; text-underline-offset: 2px; }
.hp { position: absolute !important; left: -9999px !important; opacity: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card);
  font-size: 15px; font-weight: 600; color: var(--ink-2); transition: all .25s var(--ease); display: inline-flex; align-items: center; gap: 8px;
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip small { font-size: 13px; opacity: .6; font-weight: 600; }

/* ----- Модальные окна и выезжающие панели ----- */
.overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(10, 12, 16, .45); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
}
.overlay.open { opacity: 1; visibility: visible; }
.modal {
  position: fixed; z-index: 100; left: 50%; top: 50%; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 36px;
  transform: translate(-50%, -46%) scale(.97); opacity: 0; visibility: hidden;
  transition: transform .45s var(--ease), opacity .3s, visibility .45s;
}
.modal.open { transform: translate(-50%, -50%) scale(1); opacity: 1; visibility: visible; }
.modal.wide { width: min(980px, calc(100vw - 32px)); padding: 0; }
.modal h3 { font-size: 24px; margin-bottom: 8px; }
.modal .lead { color: var(--ink-2); margin-bottom: 24px; }
.modal-close { position: absolute; right: 16px; top: 16px; z-index: 2; }
.drawer {
  position: fixed; z-index: 100; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--card);
  box-shadow: var(--shadow-lg); transform: translateX(104%); transition: transform .5s var(--ease); display: flex; flex-direction: column; overflow: hidden;
}
.drawer.open { transform: none; }
body.locked { overflow: hidden; }

.success-state { text-align: center; padding: 12px 0; }
.success-state .tick {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 20px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok);
}
.success-state .tick svg { width: 38px; height: 38px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .6s .15s var(--ease) forwards; }
.success-state h3 { margin-bottom: 10px; }
.success-state p { color: var(--ink-2); margin-bottom: 22px; }

/* ----- Тосты ----- */
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 14px; border-radius: 14px; background: var(--key); color: #fff;
  font-size: 15px; font-weight: 600; box-shadow: var(--shadow-lg); animation: toastIn .45s var(--ease); pointer-events: auto; max-width: calc(100vw - 32px);
}
.toast img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: #fff; }
.toast.err { background: var(--err); }
.toast.out { animation: toastOut .35s var(--ease) forwards; }

/* ----- Cookie ----- */
.cookie {
  position: fixed; z-index: 80; left: 20px; bottom: 20px; max-width: 380px; padding: 16px 18px; border-radius: var(--r);
  background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg); border: 1px solid var(--line); font-size: 14px; line-height: 1.5;
  display: flex; flex-direction: column; gap: 12px; animation: toastIn .6s .8s var(--ease) both; max-width: 420px;
}
.cookie p { margin: 0; }
.cookie-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-btns .btn { flex: 1; }
.map-ph button { margin-top: 6px; }
.map-ph small { max-width: 280px; text-align: center; font-size: 12px; }
.map-ph a { font-size: 13px; text-decoration: underline; }
.cookie a { text-decoration: underline; }

/* ----- Анимации появления ----- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.reveal-l { opacity: 0; transform: translateX(-32px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal-l.in { opacity: 1; transform: none; }
.reveal-zoom { opacity: 0; transform: scale(.94); transition: opacity 1s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
.reveal-zoom.in { opacity: 1; transform: none; }
.split-line { display: block; overflow: hidden; padding-bottom: .08em; }
.split-line > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: var(--d, 0s); }
.in .split-line > span, .split-line.in > span { transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }

.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 300; background: #fff; padding: 8px 14px; border-radius: 8px; }

@media (max-width: 760px) {
  .section { padding: 72px 0; }
  .container { padding: 0 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { padding: 28px 20px; }
  .section-head { margin-bottom: 32px; }
  .cookie { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-l, .reveal-zoom { opacity: 1; transform: none; }
  .split-line > span { transform: none; }
}

/* FAQ */
.faq-head { margin-bottom: 40px; }
.faq h2 { font-size: clamp(28px, 3.2vw, 44px); margin-top: 14px; }
.faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.faq-col { display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  position: relative; border-radius: 20px; background: var(--card); border: 1px solid var(--line); overflow: hidden; isolation: isolate;
  transition: border-color .4s, box-shadow .4s var(--ease), transform .5s var(--ease);
}
.faq-item::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s;
  background: radial-gradient(420px circle at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
}
.faq-item:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.faq-item[open] { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--accent) 60%, transparent); }
.faq-item[open]::before { opacity: 1; }
.faq-item summary { list-style: none; cursor: pointer; display: flex; gap: 16px; align-items: center; padding: 22px 24px; font-weight: 700; font-size: 18px; line-height: 1.35; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-n { flex: none; font-family: var(--font-head); font-size: 14px; font-weight: 600; color: var(--accent-text, var(--accent)); opacity: .8; min-width: 24px; }
.faq-q { flex: 1; }
.faq-item summary i { flex: none; position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--bg-2); transition: transform .5s var(--ease), background .3s; }
.faq-item summary i::before, .faq-item summary i::after { content: ''; position: absolute; left: 10px; right: 10px; top: 16px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .5s var(--ease), background .3s; }
.faq-item summary i::after { transform: rotate(90deg); }
.faq-item:hover summary i { transform: scale(1.08); }
.faq-item[open] summary i { background: var(--accent); transform: rotate(180deg); }
.faq-item[open] summary i::before, .faq-item[open] summary i::after { background: var(--accent-ink, #fff); }
.faq-item[open] summary i::after { transform: rotate(0); }
.faq-a { overflow: hidden; }
.faq-a p { padding: 0 24px 22px 64px; color: var(--ink-2); }
.faq-item.anim .faq-a { transition: height .45s var(--ease); }
.faq-item[open] .faq-a p { animation: faqIn .5s var(--ease) both; }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 900px) { .faq-list { grid-template-columns: 1fr; } .faq-item summary { font-size: 16px; padding: 18px; gap: 12px; } .faq-a p { padding: 0 18px 18px; } .faq-head { margin-bottom: 24px; } }
/* Страховка: никакой горизонтальной прокрутки страницы (в т.ч. в Safari на iPhone) */
html, body { max-width: 100%; overflow-x: clip; }
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }

/* Подпись разработчика */
.footer-bottom { align-items: center; }
.dev-credit { margin-left: auto; }
.dev-credit a { color: inherit; text-decoration: underline; text-underline-offset: 3px; transition: color .2s; }
.dev-credit a:hover { color: var(--accent); }
@media (max-width: 760px) { .dev-credit { margin-left: 0; } }

/* Несколько телефонов с одной подписью — в одну строку */
.phones-row { display: flex; flex-wrap: wrap; gap: 2px 22px; }
.phones-row a { white-space: nowrap; }

/* Телефоны на первом экране */
.hero-phones { display: flex; gap: 14px; align-items: flex-start; margin: -12px 0 36px; }
.hero-phones > svg { width: 22px; height: 22px; flex: none; margin-top: 4px; color: var(--accent-text, var(--accent)); }
.hero-phones > div { display: flex; flex-wrap: wrap; gap: 10px 30px; }
.hero-phones a { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.hero-phones b { font-size: 19px; font-weight: 700; white-space: nowrap; }
.hero-phones a:hover b { color: var(--accent-text, var(--accent)); }
.hero-phones small { font-size: 13px; opacity: .65; }
@media (max-width: 600px) { .hero-phones { margin: -16px 0 28px; } .hero-phones > div { gap: 8px 22px; } .hero-phones b { font-size: 17px; } }

/* Список телефонов в контактах и значок MAX */
.ph-list { display: flex; flex-direction: column; gap: 10px; }
.ph-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ph-row small { flex-basis: 100%; margin-top: -2px; }
.max-badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px 0 6px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .04em;
  color: var(--accent-text, var(--accent)); background: color-mix(in srgb, var(--accent) 14%, transparent); text-decoration: none; line-height: 1; }
.max-badge svg { width: 13px !important; height: 13px !important; margin: 0 !important; }
a.max-badge:hover { background: var(--accent); color: #fff; }
.hero-phones .hph { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
.hero-phones .hph small { flex-basis: 100%; }
.hero-phones .hph > a { color: inherit; text-decoration: none; }
.hero-phones a.max-badge, .max-badge { flex-direction: row !important; align-items: center; white-space: nowrap; }
.hero-phones .max-badge { color: var(--accent-text, var(--accent)); }
/* Знак MAX из официального брендбука, в фирменном градиенте */
.max-badge { gap: 5px; padding: 0 9px 0 4px; color: #fff !important; background: linear-gradient(135deg, #3fb7ff 0%, #4b5bff 50%, #a24bff 100%) !important; }
.max-badge .max-ico { width: 15px !important; height: 15px !important; display: block !important; }
a.max-badge:hover { filter: brightness(1.1); }
.gf-ph .max-badge .max-ico { display: block !important; }
/* MAX — только знак в кружке цвета сайта */
.max-badge { width: 26px; height: 26px !important; padding: 0 !important; justify-content: center; border-radius: 50%; background: var(--accent) !important; color: #fff !important; flex: none; }
.service .max-badge { color: #071318 !important; }
.max-badge .max-ico { width: 15px !important; height: 15px !important; }
a.max-badge:hover { filter: brightness(1.12); transform: scale(1.08); }
/* MAX — родной цвет логотипа в тонком ободке цвета сайта */
.max-badge { width: 30px; height: 30px !important; padding: 0 !important; background: transparent !important; border: 1.5px solid var(--accent); box-sizing: border-box; }
.max-badge .max-ico { width: 16px !important; height: 16px !important; }
.max-badge .max-ico path { fill: url(#mxg); }
a.max-badge:hover { filter: none; transform: none; background: color-mix(in srgb, var(--accent) 12%, transparent) !important; }
/* MAX — просто логотип, без обводки */
.max-badge { border: 0 !important; width: 24px; height: 24px !important; border-radius: 0; }
.max-badge .max-ico { width: 22px !important; height: 22px !important; }
a.max-badge:hover { background: none !important; transform: scale(1.1); }
