/* ===== Variables ===== */
:root {
  --navy-900: #0a1220;
  --navy-800: #0f1b2d;
  --navy-700: #1a2744;
  --navy-600: #243656;
  --slate-100: #f4f6f9;
  --slate-200: #e8ecf2;
  --slate-400: #94a3b8;
  --slate-600: #64748b;
  --white: #ffffff;
  --orange: #e8941a;
  --orange-hover: #d4830f;
  --orange-light: #f5a623;
  --gold: #fbbf24;
  --success: #22c55e;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(10, 18, 32, 0.12);
  --shadow-lg: 0 12px 48px rgba(10, 18, 32, 0.2);
  --transition: 0.25s ease;
  --topbar-h: 40px;
  --header-h: 72px;
  --header-total: calc(var(--topbar-h) + var(--header-h));
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-total); }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--navy-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.container--narrow { max-width: 800px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(135deg, var(--orange-light), var(--orange));
  color: var(--white);
  box-shadow: 0 4px 16px rgba(232, 148, 26, 0.35);
}
.btn--primary:hover {
  background: linear-gradient(135deg, var(--orange), var(--orange-hover));
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232, 148, 26, 0.45);
}
.btn--outline {
  border: 2px solid var(--navy-700);
  color: var(--navy-700);
  background: transparent;
}
.btn--outline:hover { background: var(--navy-700); color: var(--white); }
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--lg { padding: 18px 36px; font-size: 16px; }
.btn--block { width: 100%; }

/* ===== Top bar ===== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 101;
  height: var(--topbar-h);
  background: var(--navy-900);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}
.topbar__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  transition: color var(--transition);
}
.topbar__phone:hover { color: var(--orange-light); }
.topbar__phone-icon { width: 16px; height: 16px; color: var(--orange-light); flex-shrink: 0; }
.topbar__messengers { display: flex; gap: 16px; }
.topbar__link {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 500;
  transition: color var(--transition);
}
.topbar__link:hover { color: var(--orange-light); }

/* ===== Header ===== */
.header {
  position: fixed;
  top: var(--topbar-h); left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 18, 32, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo__img {
  height: 44px;
  width: auto;
  display: block;
}
.logo__img--footer {
  height: 36px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.nav__phone-mobile { display: none; }
.nav {
  display: flex;
  gap: 32px;
}
.nav__link {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}
.nav__link:hover { color: var(--orange-light); }
.header__contacts {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header__phone {
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  transition: color var(--transition);
}
.header__phone:hover { color: var(--orange-light); }
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}
.burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-total);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(10,18,32,0.92) 0%, rgba(10,18,32,0.75) 45%, rgba(10,18,32,0.4) 100%),
    url('../images/hero-bg.jpg') center/cover no-repeat;
}
.hero__inner {
  position: relative;
  z-index: 1;
  padding: 80px 20px;
}
.hero__content { max-width: 680px; }
.hero__title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 20px;
}
.hero__subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: rgba(255,255,255,0.8);
  margin-bottom: 36px;
  line-height: 1.5;
}
.hero__actions { margin-bottom: 32px; }
.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.badge {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 500;
}

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section--light { background: var(--white); }
.section--gray { background: var(--slate-100); }
.section--dark { background: var(--navy-800); color: var(--white); }
.section--accent {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--white);
}

/* Section backgrounds */
.section--bg {
  position: relative;
  background: var(--navy-800);
  color: var(--white);
  overflow: hidden;
}
.section--bg .section__title { color: var(--white); }
.section--bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(10,18,32,0.92) 0%, rgba(15,27,45,0.88) 100%),
    var(--section-bg) center/cover no-repeat;
  z-index: 0;
}
.section--bg > .container { position: relative; z-index: 1; }

.section--bg-soft {
  position: relative;
  overflow: hidden;
}
.section--bg-soft::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(244,246,249,0.88) 100%),
    var(--section-bg) center/cover no-repeat;
  z-index: 0;
}
.section--bg-soft > .container { position: relative; z-index: 1; }

.section__title--left { text-align: left; }
.section__title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  color: var(--navy-800);
}
.section__title--light { color: var(--white); }
.section__lead {
  text-align: center;
  color: var(--slate-600);
  font-size: 18px;
  max-width: 640px;
  margin: 0 auto 48px;
}
.section__cta { text-align: center; margin-top: 32px; }

/* ===== Grid ===== */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }

/* ===== Cards ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card--risk {
  padding: 0;
  overflow: hidden;
  border-top: none;
  text-align: left;
}
.card__img-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card--risk:hover .card__img-wrap img { transform: scale(1.05); }
.card__body { padding: 20px 24px 24px; }
.card__icon { font-size: 32px; margin-bottom: 12px; }
.card__title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--navy-800); }
.card__arrow { color: var(--orange); font-size: 20px; margin-bottom: 8px; }
.card__solution { font-size: 14px; color: var(--slate-600); font-weight: 500; }

/* ===== Service layout ===== */
.service-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}
.service-layout__visual {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
.service-layout__img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.1);
}

.card--pricing { position: relative; border: 2px solid var(--slate-200); }
.card--pricing-featured {
  border-color: var(--orange);
  box-shadow: 0 8px 32px rgba(232,148,26,0.15);
}
.card__badge {
  position: absolute;
  top: -12px; right: 24px;
  background: var(--orange);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.card__plan {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--slate-600);
  margin-bottom: 12px;
}
.card__price {
  font-size: 36px;
  font-weight: 800;
  color: var(--navy-800);
  margin-bottom: 4px;
}
.card__price span { font-size: 16px; font-weight: 600; color: var(--slate-600); }
.card__hourly { font-size: 14px; color: var(--orange); font-weight: 600; margin-bottom: 24px; }
.card__features { margin-bottom: 28px; }
.card__features li {
  padding: 8px 0;
  border-bottom: 1px solid var(--slate-200);
  font-size: 14px;
  color: var(--slate-600);
  position: relative;
  padding-left: 20px;
}
.card__features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 700;
}

/* ===== Service list ===== */
.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 32px;
}
.service-list__item {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  transition: background var(--transition);
}
.service-list__item:hover { background: rgba(255,255,255,0.08); }
.service-list__icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232,148,26,0.15);
  border-radius: var(--radius-sm);
  color: var(--orange-light);
}
.service-list__icon svg { width: 24px; height: 24px; }
.service-list__item h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--white); }
.service-list__item p { font-size: 14px; color: rgba(255,255,255,0.65); }

/* ===== Calculator ===== */
.calculator {
  background: var(--slate-100);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 48px;
  border: 1px solid var(--slate-200);
}
.calculator__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}
.calculator__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.calculator__result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius-sm);
  font-size: 16px;
}
.calculator__result strong {
  font-size: 24px;
  color: var(--orange);
}

.pricing-note {
  text-align: center;
  color: var(--slate-600);
  font-size: 14px;
  margin-top: 24px;
}
.pricing-cards { margin-top: 0; }

/* ===== Stats ===== */
.stats { margin-top: 48px; }
.stat { text-align: center; padding: 20px; }
.stat__num {
  display: block;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 800;
  color: var(--orange-light);
  margin-bottom: 8px;
}
.stat__text { font-size: 14px; color: rgba(255,255,255,0.75); line-height: 1.4; }

/* ===== Steps ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
  counter-reset: step;
}
.steps__item {
  position: relative;
  padding: 0 0 28px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  overflow: hidden;
}
.steps__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--orange-light), var(--orange));
  color: var(--white);
  font-weight: 800;
  font-size: 20px;
  border-radius: 50%;
  margin: -24px auto 16px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(232,148,26,0.4);
}
.steps__item h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; padding: 0 16px; }
.steps__item p { font-size: 14px; color: var(--slate-600); padding: 0 16px 8px; }

/* ===== FAQ ===== */
.faq { margin-top: 40px; }
.faq__item {
  border-bottom: 1px solid var(--slate-200);
  padding: 4px 0;
}
.faq__question {
  padding: 20px 40px 20px 0;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  position: relative;
  color: var(--navy-800);
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question::after {
  content: '+';
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: var(--orange);
  font-weight: 400;
  transition: transform var(--transition);
}
.faq__item[open] .faq__question::after { content: '−'; }
.faq__answer {
  padding: 0 0 20px;
  color: var(--slate-600);
  font-size: 15px;
  line-height: 1.7;
}

/* ===== Contacts ===== */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contacts-phone {
  display: block;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--orange-light);
  margin: 24px 0 4px;
  transition: color var(--transition);
}
.contacts-phone:hover { color: var(--gold); }
.contacts-phone--secondary { font-size: 20px; font-weight: 600; color: rgba(255,255,255,0.8); margin-top: 8px; }
.contacts-phone-hint { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
.contacts-address { color: rgba(255,255,255,0.65); margin-bottom: 20px; }
.contacts-messengers { display: flex; gap: 12px; margin-bottom: 24px; }
.messenger-link {
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), border-color var(--transition);
}
.messenger-link:hover { background: rgba(255,255,255,0.1); border-color: var(--orange); }

/* ===== Form ===== */
.form {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 32px;
}
.form__title { font-size: 20px; font-weight: 700; margin-bottom: 24px; color: var(--white); }
.field { display: block; margin-bottom: 16px; }
.field__label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: rgba(255,255,255,0.8); }
.required { color: var(--orange-light); }
.field__input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  transition: border-color var(--transition);
}
.field__input:focus {
  outline: none;
  border-color: var(--orange);
}
.field__input::placeholder { color: rgba(255,255,255,0.35); }
.field__textarea { resize: vertical; min-height: 80px; }
.field__input option { color: var(--navy-800); background: var(--white); }

.calculator .field__input {
  background: var(--white);
  color: var(--navy-800);
  border-color: var(--slate-200);
}
.calculator .field__label { color: var(--navy-800); }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
  cursor: pointer;
}
.checkbox input { margin-top: 3px; accent-color: var(--orange); }
.checkbox a { color: var(--orange-light); text-decoration: underline; }
.form__note { text-align: center; font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 12px; }
.form__success {
  text-align: center;
  padding: 16px;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius-sm);
  color: var(--success);
  font-weight: 500;
  margin-top: 16px;
}
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ===== Footer ===== */
.footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.65);
  padding: 40px 0;
  font-size: 14px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
}
.footer__brand p { margin-top: 8px; }
.logo--footer { font-size: 16px; }
.footer__links { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.footer__links a { transition: color var(--transition); }
.footer__links a:hover { color: var(--orange-light); }
.footer__license { text-align: right; }
.license-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 12px;
}
.license-badge svg { width: 18px; height: 18px; color: var(--orange-light); }
.footer__copy { font-size: 12px; }

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}
.modal.active { opacity: 1; visibility: visible; }
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,18,32,0.7);
  backdrop-filter: blur(4px);
}
.modal__dialog {
  position: relative;
  background: var(--navy-800);
  border-radius: var(--radius);
  padding: 40px 32px 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition);
}
.modal.active .modal__dialog { transform: translateY(0); }
.modal__close {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 28px;
  color: rgba(255,255,255,0.6);
  line-height: 1;
  transition: color var(--transition);
}
.modal__close:hover { color: var(--white); }
.modal__title { font-size: 22px; font-weight: 700; color: var(--white); margin-bottom: 24px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .grid--3 { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--5 { grid-template-columns: repeat(3, 1fr); }
  .service-layout { grid-template-columns: 1fr; }
  .service-layout__visual { position: static; max-width: 480px; margin: 0 auto; }
  .service-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .calculator__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; text-align: center; }
  .footer__license { text-align: center; }
}

@media (max-width: 768px) {
  .topbar__messengers { gap: 12px; }
  .topbar__link { font-size: 12px; }
  .nav {
    position: fixed;
    top: var(--header-total); left: 0; right: 0;
    background: var(--navy-900);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav.open { transform: translateY(0); opacity: 1; }
  .nav__phone-mobile {
    display: block;
    color: var(--orange-light);
    font-weight: 700;
    font-size: 16px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 8px;
  }
  .header__contacts { display: none; }
  .burger { display: flex; }
  .grid--2 { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: 1fr; }
  .grid--5 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero__inner { padding: 60px 20px; }
}

@media (max-width: 480px) {
  .grid--5 { grid-template-columns: 1fr; }
  .hero__badges { flex-direction: column; }
}
