/* ==========================================================================
   Condigo — статический CSS публичного сайта.
   Заменяет Tailwind Play CDN (cdn.tailwindcss.com, ~120 КБ JS + компиляция
   стилей в браузере). Здесь только те утилиты, которые реально используются
   в index.html и privacy.html, плюс кастомные стили сайта.

   Если добавляете на сайт новые Tailwind-классы — допишите их сюда.
   ========================================================================== */

/* --- 1. Reset (по мотивам preflight) ------------------------------------ */
*, ::before, ::after { box-sizing: border-box; border: 0 solid #3f3f46; }
* { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  line-height: 1.5;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body { line-height: inherit; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
b, strong { font-weight: bolder; }
code, kbd, samp, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1em; }
button, input, optgroup, select, textarea {
  font-family: inherit; font-size: 100%; font-weight: inherit;
  line-height: inherit; color: inherit; margin: 0; padding: 0;
}
button, select { text-transform: none; }
button, [type='button'], [type='submit'] { -webkit-appearance: button; background-color: transparent; background-image: none; cursor: pointer; }
:-moz-focusring { outline: auto; }
ul, ol { list-style: none; }
img, svg, video, canvas, iframe { display: block; vertical-align: middle; max-width: 100%; height: auto; }
input::placeholder, textarea::placeholder { opacity: 1; color: #71717a; }
[hidden] { display: none; }

/* --- 2. Layout ---------------------------------------------------------- */
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shrink-0 { flex-shrink: 0; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.top-3 { top: .75rem; }
.top-4 { top: 1rem; }
.top-5 { top: 1.25rem; }
.right-3 { right: .75rem; }
.right-4 { right: 1rem; }
.right-5 { right: 1.25rem; }
.bottom-4 { bottom: 1rem; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-\[100\] { z-index: 100; }

.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* --- 3. Размеры --------------------------------------------------------- */
.w-5 { width: 1.25rem; }
.w-8 { width: 2rem; }
.w-9 { width: 2.25rem; }
.w-11 { width: 2.75rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-full { width: 100%; }
.h-5 { height: 1.25rem; }
.h-8 { height: 2rem; }
.h-9 { height: 2.25rem; }
.h-11 { height: 2.75rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-32 { height: 8rem; }
.h-44 { height: 11rem; }
.h-72 { height: 18rem; }
.min-h-screen { min-height: 100vh; min-height: 100svh; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-\[calc\(100vw-2rem\)\] { max-width: calc(100vw - 2rem); }
.max-h-\[85vh\] { max-height: 85vh; }
.max-h-\[90vh\] { max-height: 90vh; }

/* --- 4. Отступы --------------------------------------------------------- */
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-10 { margin-top: 2.5rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }

.p-3 { padding: .75rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1 { padding-top: .25rem; padding-bottom: .25rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-2\.5 { padding-top: .625rem; padding-bottom: .625rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-28 { padding-top: 7rem; padding-bottom: 7rem; }

.gap-2 { gap: .5rem; }
.gap-2\.5 { gap: .625rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-10 { gap: 2.5rem; }

.space-y-1 > * + * { margin-top: .25rem; }
.space-y-3 > * + * { margin-top: .75rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-8 > * + * { margin-top: 2rem; }

/* --- 5. Типографика ----------------------------------------------------- */
.text-xs { font-size: .75rem; line-height: 1rem; }
.text-sm { font-size: .875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.tracking-tight { letter-spacing: -.025em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.underline { text-decoration-line: underline; }
.line-through { text-decoration-line: line-through; }
.break-words { overflow-wrap: break-word; }
.whitespace-pre-line { white-space: pre-line; }
.list-disc { list-style-type: disc; }
.list-inside { list-style-position: inside; }
.line-clamp-3 {
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* --- 6. Цвета текста ---------------------------------------------------- */
.text-white { color: #fff; }
.text-black { color: #000; }
.text-zinc-300 { color: #d4d4d8; }
.text-zinc-400 { color: #a1a1aa; }
.text-zinc-500 { color: #8b8b94; }  /* осветлён относительно Tailwind ради контраста WCAG AA */
.text-zinc-600 { color: #7c7c85; }
.text-cyan-400 { color: #22d3ee; }
.text-emerald-400 { color: #34d399; }
.text-red-400 { color: #f87171; }

/* --- 7. Фоны ------------------------------------------------------------ */
.bg-black { background-color: #000; }
.bg-black\/40 { background-color: rgba(0,0,0,.4); }
.bg-black\/50 { background-color: rgba(0,0,0,.5); }
.bg-black\/80 { background-color: rgba(0,0,0,.8); }
.bg-black\/90 { background-color: rgba(0,0,0,.9); }
.bg-zinc-800 { background-color: #27272a; }
.bg-zinc-900 { background-color: #18181b; }
.bg-zinc-950 { background-color: #09090b; }
.bg-cyan-500 { background-color: #06b6d4; }
.bg-cyan-500\/10 { background-color: rgba(6,182,212,.1); }
.bg-emerald-500\/15 { background-color: rgba(16,185,129,.15); }
.bg-red-500 { background-color: #ef4444; }
.bg-red-600 { background-color: #dc2626; }

/* Градиенты */
.bg-gradient-to-b, .bg-gradient-to-br { --tw-from: transparent; --tw-to: transparent; }
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-from), var(--tw-to)); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-from), var(--tw-to)); }
.from-black { --tw-from: #000; }
.from-zinc-800 { --tw-from: #27272a; }
.from-blue-600 { --tw-from: #2563eb; }
.from-purple-600 { --tw-from: #9333ea; }
.from-amber-600 { --tw-from: #d97706; }
.from-emerald-600 { --tw-from: #059669; }
.from-red-600 { --tw-from: #dc2626; }
.to-zinc-900 { --tw-to: #18181b; }
.to-zinc-950 { --tw-to: #09090b; }
.to-cyan-600 { --tw-to: #0891b2; }
.to-pink-600 { --tw-to: #db2777; }
.to-orange-600 { --tw-to: #ea580c; }
.to-teal-600 { --tw-to: #0d9488; }
.to-rose-600 { --tw-to: #e11d48; }

.backdrop-blur-sm { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.backdrop-blur-md { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.accent-cyan-500 { accent-color: #06b6d4; }

/* --- 8. Границы и скругления -------------------------------------------- */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-cyan-500 { border-color: #06b6d4; }
.border-zinc-700 { border-color: #3f3f46; }
.border-zinc-800 { border-color: #27272a; }
.border-zinc-900 { border-color: #18181b; }
.border-white\/50 { border-color: rgba(255,255,255,.5); }
.rounded { border-radius: .25rem; }
.rounded-lg { border-radius: .5rem; }
.rounded-xl { border-radius: .75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-t-3xl { border-top-left-radius: 1.5rem; border-top-right-radius: 1.5rem; }

/* --- 9. Тени, курсор, переходы ------------------------------------------ */
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); }
.shadow-cyan-500\/30 { box-shadow: 0 25px 50px -12px rgba(6,182,212,.3); }
.cursor-pointer { cursor: pointer; }
.transition {
  transition-property: color, background-color, border-color, text-decoration-color,
    fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
  transition-duration: .15s;
}

/* --- 10. Состояния: hover / focus / disabled ----------------------------- */
.hover\:bg-cyan-400:hover { background-color: #22d3ee; }
.hover\:bg-white\/10:hover { background-color: rgba(255,255,255,.1); }
.hover\:bg-black\/60:hover { background-color: rgba(0,0,0,.6); }
.hover\:bg-black\/70:hover { background-color: rgba(0,0,0,.7); }
.hover\:text-cyan-400:hover { color: #22d3ee; }
.hover\:text-cyan-300:hover { color: #67e8f9; }
.hover\:border-cyan-500:hover { border-color: #06b6d4; }
.hover\:underline:hover { text-decoration-line: underline; }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:-translate-y-1:hover { transform: translateY(-.25rem); }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0,0,0,.4), 0 8px 10px -6px rgba(0,0,0,.4); }
.hover\:shadow-black\/40:hover { box-shadow: 0 20px 25px -5px rgba(0,0,0,.4), 0 8px 10px -6px rgba(0,0,0,.4); }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:border-cyan-500:focus { border-color: #06b6d4; }
.disabled\:opacity-40:disabled { opacity: .4; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }
.group:hover .group-hover\:text-cyan-400 { color: #22d3ee; }
.peer:checked ~ .peer-checked\:border-cyan-500 { border-color: #06b6d4; }
.peer:checked ~ .peer-checked\:bg-cyan-500\/10 { background-color: rgba(6,182,212,.1); }
.peer:checked ~ .peer-checked\:text-cyan-400 { color: #22d3ee; }

/* Видимый фокус с клавиатуры (доступность) */
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- 11. Брейкпоинт sm (≥640px) ----------------------------------------- */
@media (min-width: 640px) {
  .sm\:inline { display: inline; }
  .sm\:inline-block { display: inline-block; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:hidden { display: none; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:w-10 { width: 2.5rem; }
  .sm\:w-14 { width: 3.5rem; }
  .sm\:h-10 { height: 2.5rem; }
  .sm\:h-14 { height: 3.5rem; }
  .sm\:h-48 { height: 12rem; }
  .sm\:h-56 { height: 14rem; }
  .sm\:h-96 { height: 24rem; }
  .sm\:top-4 { top: 1rem; }
  .sm\:top-5 { top: 1.25rem; }
  .sm\:top-6 { top: 1.5rem; }
  .sm\:right-4 { right: 1rem; }
  .sm\:right-5 { right: 1.25rem; }
  .sm\:right-6 { right: 1.5rem; }
  .sm\:bottom-6 { bottom: 1.5rem; }
  .sm\:mt-8 { margin-top: 2rem; }
  .sm\:mb-10 { margin-bottom: 2.5rem; }
  .sm\:mb-16 { margin-bottom: 4rem; }
  .sm\:p-4 { padding: 1rem; }
  .sm\:p-7 { padding: 1.75rem; }
  .sm\:p-8 { padding: 2rem; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
  .sm\:px-12 { padding-left: 3rem; padding-right: 3rem; }
  .sm\:py-0 { padding-top: 0; padding-bottom: 0; }
  .sm\:py-3 { padding-top: .75rem; padding-bottom: .75rem; }
  .sm\:py-4 { padding-top: 1rem; padding-bottom: 1rem; }
  .sm\:py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
  .sm\:py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .sm\:py-12 { padding-top: 3rem; padding-bottom: 3rem; }
  .sm\:py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .sm\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }
  .sm\:py-28 { padding-top: 7rem; padding-bottom: 7rem; }
  .sm\:gap-3 { gap: .75rem; }
  .sm\:gap-5 { gap: 1.25rem; }
  .sm\:gap-6 { gap: 1.5rem; }
  .sm\:gap-8 { gap: 2rem; }
  .sm\:space-y-4 > * + * { margin-top: 1rem; }
  .sm\:space-y-10 > * + * { margin-top: 2.5rem; }
  .sm\:text-sm { font-size: .875rem; line-height: 1.25rem; }
  .sm\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .sm\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .sm\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .sm\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:text-5xl { font-size: 3rem; line-height: 1; }
}

/* --- 12. Брейкпоинт md (≥768px) ----------------------------------------- */
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:gap-16 { gap: 4rem; }
  .md\:scale-105 { transform: scale(1.05); }
  .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
  .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .md\:text-7xl { font-size: 4.5rem; line-height: 1; }
}

/* ==========================================================================
   13. Кастомные стили сайта
   ========================================================================== */

.scroll-smooth { scroll-behavior: smooth; }

/* Отступ под липкую шапку при переходе по якорям */
section[id] { scroll-margin-top: 5rem; }

/* --- Первый экран ---
   Раньше здесь грузилась фотография ~600 КБ с Unsplash под затемнением 75–85 %,
   то есть почти невидимая, но она была LCP-элементом и тормозила загрузку.
   Теперь фон рисуется на CSS — 0 запросов, мгновенный рендер.
   Чтобы вернуть фотографию: положите файл в static/img/hero.webp
   и раскомментируйте правило .hero-bg--photo в index.html. */
.hero-bg {
  background-color: #09090b;
  background-image:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(6,182,212,.20), transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 110%, rgba(37,99,235,.16), transparent 60%),
    linear-gradient(160deg, #0b1220 0%, #09090b 45%, #0d1117 100%);
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent 75%);
}

/* Вариант с фотографией (включается классом hero-bg--photo) */
.hero-bg--photo {
  background-image:
    linear-gradient(rgba(0,0,0,.75), rgba(0,0,0,.85)),
    image-set(url("/static/img/hero.webp") type("image/webp"));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero-bg--photo::before { display: none; }

/* --- Иконки (инлайновый SVG-спрайт вместо Font Awesome) --- */
.icon { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; }
.icon-check { color: #34d399; margin-top: .25rem; }

/* --- Модальные окна --- */
#newsModal, #leadModal {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
#newsModal.open, #leadModal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .25s ease, visibility 0s;
}
#newsModalPanel, #leadModalPanel {
  transform: translateY(24px) scale(.97);
  opacity: 0;
  transition: transform .3s cubic-bezier(.22,1,.36,1), opacity .3s ease;
}
#newsModal.open #newsModalPanel,
#leadModal.open #leadModalPanel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* --- Плавающая кнопка «Оставить заявку» --- */
@keyframes leadPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6,182,212,.45); }
  50% { box-shadow: 0 0 0 10px rgba(6,182,212,0); }
}
#leadFab { animation: leadPulse 2.6s ease-in-out infinite; will-change: box-shadow; }

/* --- Мобильное меню --- */
@media (max-width: 767px) {
  #mobileMenu {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows .3s ease;
  }
  #mobileMenu.open { grid-template-rows: 1fr; }
  #mobileMenu > nav { min-height: 0; overflow: hidden; }
}

/* --- Карта: резерв места, чтобы не было сдвига макета (CLS) --- */
#yandexMap, .map-placeholder { min-height: 18rem; }
@media (min-width: 640px) { #yandexMap, .map-placeholder { min-height: 24rem; } }

/* --- Уважение к системной настройке «меньше движения» --- */
@media (prefers-reduced-motion: reduce) {
  .scroll-smooth { scroll-behavior: auto; }
  *, ::before, ::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
