/**
 * Резервная тема: срабатывает, если основной CSS из /_next/static не подгрузился
 * (встроенный превью, блокировка, mixed content). Не зависит от PostCSS/Tailwind.
 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #0f172a;
  background: #f8fafc;
}

[data-yv-header] {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(248, 250, 252, 0.96);
  backdrop-filter: blur(8px);
}

[data-yv-header-inner] {
  width: 100%;
  padding: 0.75rem 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 0.75rem;
  align-items: center;
}

[data-yv-header-inner] > div:first-child {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  [data-yv-header-inner] {
    grid-template-columns: auto 1fr auto;
  }
}

[data-yv-header] a {
  text-decoration: none;
  color: inherit;
}

[data-yv-nav] {
  display: none;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  justify-content: flex-end;
  align-items: center;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  [data-yv-nav] {
    display: flex;
  }
}

[data-yv-nav] a {
  font-weight: 500;
  color: #64748b;
}

[data-yv-nav] a:hover {
  color: #0f172a;
}

[data-yv-main] {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

[data-yv-footer] {
  margin-top: 2rem;
  border-top: 1px solid #e2e8f0;
  background: #f1f5f9;
}

[data-yv-footer-inner] {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: block;
}

[data-yv-footer-bottom] {
  border-top: 1px solid #e2e8f0;
  padding: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
}

[data-yv-footer-bottom] a {
  color: #475569;
}

[data-yv-section-head] {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto;
}

[data-yv-section-head] h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0.35rem 0 0;
  color: #0f172a;
}

[data-yv-section-head] p {
  margin: 0.5rem 0 0;
  color: #64748b;
}

[data-yv-hero] {
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
}

[data-yv-hero] h1 {
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0.75rem 0;
  color: #0f172a;
}

[data-yv-hero] p {
  color: #475569;
}

[data-yv-hero-actions] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

[data-yv-hero-actions] > a,
[data-yv-hero-actions] > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid transparent;
}

[data-yv-hero-actions] > a:first-child,
[data-yv-hero-actions] > button:first-of-type {
  background: #0284c7;
  color: #fff;
  border-color: #0369a1;
}

[data-yv-hero-actions] > a:nth-child(2),
[data-yv-hero-actions] > button:nth-child(2) {
  background: #fff;
  color: #0f172a;
  border-color: #cbd5e1;
}

[data-yv-services-grid] {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

[data-yv-card] {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-yv-card] > div:nth-child(1) {
  padding: 1.25rem 1.25rem 0.5rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

[data-yv-card] > div:nth-child(2) {
  flex: 1;
  padding: 0 1.25rem 1rem;
}

[data-yv-card] > div:nth-child(3) {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

[data-yv-card] h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

[data-yv-card] p {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
}

[data-yv-card] button,
[data-yv-card] a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}

[data-yv-card] a[href="/#lead"],
[data-yv-card] a[href*="#lead"] {
  background: #0284c7;
  border-color: #0369a1;
  color: #fff;
}

[data-yv-dialog-overlay] {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(15, 23, 42, 0.55);
}

[data-yv-dialog-panel] {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  width: min(calc(100vw - 2rem), 32rem);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

[data-yv-dialog-panel] h2 {
  margin: 0 2rem 0 0;
  font-size: 1.125rem;
  font-weight: 600;
}

[data-yv-dialog-panel] button[type="button"] {
  font: inherit;
}

[data-yv-main] input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
[data-yv-main] textarea,
[data-yv-main] select {
  width: 100%;
  max-width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font: inherit;
  background: #fff;
}

[data-yv-main] label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}
