/* ============================================================
   Кибернетика — общие стили сайта
   ============================================================ */

:root {
  --bg: #0b1c18;
  --bg-soft: #0e231e;
  --bg-card: #122a24;
  --border: #1d3a33;
  --text: #e7f4ef;
  --text-dim: #9bbab0;
  --accent: #10b981;
  --accent-2: #0ea5a5;
  --accent-grad: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  --header-bg: rgba(11, 28, 24, 0.85);
  --radius: 14px;
  --maxw: 1140px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #ddeae3;
  --bg-card: #edf6f1;
  --border: #b6cdc3;
  --text: #04190f;
  --text-dim: #38554c;
  --accent: #0a7d56;
  --accent-2: #0b7d72;
  --accent-grad: linear-gradient(135deg, #10b981 0%, #0e9d6e 100%);
  --header-bg: rgba(255, 255, 255, 0.88);
  --shadow: 0 10px 40px rgba(12, 42, 34, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #34d399;
}

h1, h2, h3 {
  font-family: "Russo One", "Nunito", "Inter", sans-serif;
  line-height: 1.5;
  margin: 0 0 0.5em;
  font-weight: 700;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.accent-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--accent-grad);
  color: #04221a;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
  color: #04221a;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  color: #04221a;
  font-weight: 800;
  font-size: 18px;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.footer-logo .logo-img {
  height: 46px;
}

.logo-light {
  display: none;
}

html[data-theme="light"] .logo-dark {
  display: none;
}

html[data-theme="light"] .logo-light {
  display: block;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 15px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
  color: #04221a;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 9px;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -160px;
  left: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.16), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  margin-bottom: 20px;
}

.hero .lead {
  font-size: 19px;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Секции ---------- */
.section {
  padding: 80px 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-head .eyebrow {
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.section-head p {
  color: var(--text-dim);
  font-size: 17px;
}

.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ---------- Сетка карточек ---------- */
.grid {
  display: grid;
  gap: 22px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.5);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.14);
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 20px;
}

.card p {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 0;
}

/* ---------- Список преимуществ ---------- */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  color: var(--text-dim);
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Полоса статистики ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  text-align: center;
}

.stat-num {
  font-size: 40px;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--text-dim);
  font-size: 15px;
}

/* ---------- CTA-блок ---------- */
.cta {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 56px 24px;
}

.cta h2 {
  font-size: clamp(26px, 4vw, 36px);
}

.cta p {
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 17px;
}

/* ---------- Подвал ---------- */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-grid h4 {
  font-size: 15px;
  margin-bottom: 16px;
  color: var(--text);
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li {
  margin-bottom: 10px;
}

.footer-grid a {
  color: var(--text-dim);
  font-size: 15px;
}

.footer-grid a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-dim);
  font-size: 15px;
}

.footer-legal {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 18px;
}

.form-consent input {
  margin-top: 3px;
  flex-shrink: 0;
}

.form-consent label {
  font-size: 15px;
  color: var(--text-dim);
}

/* ---------- Форма ---------- */
.form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  color: var(--text);
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-note {
  font-size: 15px;
  color: var(--text-dim);
}

.form-error {
  color: #f87171;
  font-size: 15px;
  margin-top: 6px;
  display: none;
}

#consent-error {
  margin-bottom: 16px;
}

.form-success {
  display: none;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--accent);
  border-radius: 9px;
  padding: 14px;
  color: var(--accent);
  margin-bottom: 18px;
}

/* ---------- Контактные карточки ---------- */
.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.contact-item .ic {
  font-size: 22px;
}

.contact-item .label {
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

/* ---------- Хлебный hero для внутренних страниц ---------- */
.page-hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -80px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2), transparent 70%);
}

.page-hero h1 {
  font-size: clamp(30px, 4.5vw, 46px);
  position: relative;
}

.page-hero-center {
  text-align: center;
}

/* ---------- Заголовочный блок правовых документов ---------- */
.doc-header {
  text-align: center;
  margin-bottom: 36px;
}

.doc-header p {
  font-weight: 500;
  margin-bottom: 4px;
}

.doc-header .doc-title {
  font-family: "Russo One", "Nunito", sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

.doc-lead {
  margin-bottom: 32px;
}

.page-hero p {
  color: var(--text-dim);
  font-size: 18px;
  max-width: 640px;
  position: relative;
}

/* ---------- Блок услуги (детально) ---------- */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.service-block:last-child {
  border-bottom: none;
}

.service-block .visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 260px;
  display: grid;
  place-items: center;
  font-size: 84px;
}

.service-block.reverse .text {
  order: 2;
}

.service-block .tag {
  display: inline-block;
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .service-block { grid-template-columns: 1fr; }
  .service-block.reverse .text { order: 0; }
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 18px 24px;
    gap: 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}
