/* ============================================================
   Атлант — шаблонный лендинг
   Цвета и шрифты меняются в :root ниже
   ============================================================ */

:root {
  /* --- Примитивы --- */
  --paper: oklch(0.97 0.008 95);
  --paper-2: oklch(0.94 0.01 95);
  --ink: oklch(0.21 0.02 265);
  --ink-2: oklch(0.32 0.02 265);
  --accent: oklch(0.60 0.19 42);
  --accent-hover: oklch(0.54 0.18 42);

  /* --- Семантика --- */
  --bg: var(--paper);
  --bg-alt: var(--paper-2);
  --text: var(--ink);
  --text-muted: oklch(0.42 0.02 265);
  --text-on-dark: oklch(0.95 0.01 95);
  --text-on-dark-muted: oklch(0.78 0.015 265);
  --line: oklch(0.88 0.01 95);
  --line-on-dark: oklch(0.35 0.02 265);

  /* --- Типографика --- */
  --font-body: "Manrope", "Segoe UI", Arial, sans-serif;
  --font-display: "Unbounded", "Manrope", "Segoe UI", sans-serif;

  /* --- Прочее --- */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px oklch(0.21 0.02 265 / 0.08);
  --header-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font: 400 16px/1.65 var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

button { cursor: pointer; font: inherit; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 { line-height: 1.2; text-wrap: balance; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--text-on-dark);
  z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ============ Кнопки ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none !important;
  transition: background-color 0.2s ease-out, color 0.2s ease-out,
              border-color 0.2s ease-out, transform 0.15s ease-out;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: var(--paper);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ink); background: oklch(0.21 0.02 265 / 0.04); }

.btn-block { width: 100%; }

/* ============ Шапка ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(0.97 0.008 95 / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none !important;
  flex-shrink: 0;
}
.logo-mark { color: var(--accent); }

.nav { display: none; }

.nav-link {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 4px;
  transition: color 0.2s ease-out;
  text-decoration: none !important;
}
.nav-link:hover { color: var(--ink); }

.header-cta { display: none; margin-left: auto; min-height: 44px; padding: 10px 22px; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 10px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease-out, opacity 0.2s ease-out;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Мобильное меню */
.nav.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 16px 20px 24px;
  gap: 4px;
  box-shadow: var(--shadow);
}
.nav.is-open .nav-link { padding: 12px 0; font-size: 17px; min-height: 44px; display: flex; align-items: center; }

/* ============ Hero ============ */
.hero {
  padding: 64px 0 56px;
  background:
    radial-gradient(ellipse 60% 50% at 85% 10%, oklch(0.60 0.19 42 / 0.07), transparent 70%),
    var(--bg);
}

.hero-grid { display: grid; gap: 48px; }

.hero-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid oklch(0.60 0.19 42 / 0.35);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 6vw, 56px);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.accent-word {
  position: relative;
  display: inline-block;
  color: var(--accent);
  white-space: nowrap;
}
.accent-word .underline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.18em;
  width: 100%;
  height: 0.28em;
}

.hero-lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: 32px;
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-self: end;
}

.stat { border-top: 3px solid var(--accent); padding-top: 16px; }
.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 40px);
  color: var(--ink);
}
.stat-label { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* ============ Бегущая строка ============ */
.marquee {
  overflow: hidden;
  background: var(--ink);
  color: var(--text-on-dark);
  padding: 14px 0;
}
.marquee-track {
  display: flex;
  gap: 32px;
  width: max-content;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: marquee 24s linear infinite;
}
.marquee .dot { color: var(--accent); }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

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

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 38px);
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 60ch;
  margin-bottom: 40px;
}

.section-dark {
  background: var(--ink);
  color: var(--text-on-dark);
}
.section-dark .section-sub { color: var(--text-on-dark-muted); }

/* Карточки преимуществ */
.cards {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

.card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card-icon { color: var(--accent); margin-bottom: 16px; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--text-muted); }

/* Список услуг */
.services-list { list-style: none; }

.service-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 20px;
  align-items: baseline;
  padding: 28px 0;
  border-top: 1px solid var(--line-on-dark);
}
.service-row:last-child { border-bottom: 1px solid var(--line-on-dark); }

.service-num {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--accent);
}

.service-body h3 { font-size: 20px; margin-bottom: 6px; }
.service-body p { color: var(--text-on-dark-muted); font-size: 15px; max-width: 60ch; }

.service-price {
  grid-column: 2;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-on-dark);
}

/* О компании */
.about-grid { display: grid; gap: 24px; }
.about-text p { margin-bottom: 16px; font-size: 16.5px; max-width: 68ch; }

/* Контакты */
.section-contacts { background: var(--bg-alt); }

.contacts-grid { display: grid; gap: 40px; }

.contact-list { list-style: none; display: grid; gap: 20px; }
.contact-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.contact-list a { font-size: 18px; font-weight: 600; color: var(--ink); }
.contact-list a:hover { color: var(--accent); }

/* Форма */
.contact-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.req { color: var(--accent); }

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: 400 16px/1.5 var(--font-body);
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease-out;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field input.is-invalid,
.field textarea.is-invalid { border-color: oklch(0.55 0.22 25); }
.field textarea { resize: vertical; min-height: 100px; }

.field-error {
  margin-top: 6px;
  font-size: 13.5px;
  color: oklch(0.50 0.20 25);
}

.form-success {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: oklch(0.92 0.06 155);
  color: oklch(0.35 0.10 155);
  font-weight: 600;
  font-size: 15px;
}

.form-note {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Подвал */
.site-footer {
  background: var(--ink);
  color: var(--text-on-dark);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
.logo-footer { color: var(--text-on-dark); }
.logo-footer .logo-mark { color: var(--accent); }

.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-nav a {
  color: var(--text-on-dark-muted);
  font-size: 15px;
  transition: color 0.2s ease-out;
  text-decoration: none !important;
}
.footer-nav a:hover { color: var(--text-on-dark); }

.footer-copy { font-size: 14px; color: var(--text-on-dark-muted); }

/* Анимация появления при прокрутке */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============ Планшет ============ */
@media (min-width: 768px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .service-row { grid-template-columns: 64px 1fr auto; align-items: center; }
  .service-price { grid-column: auto; text-align: right; white-space: nowrap; }
  .about-grid { grid-template-columns: 1fr 1.4fr; gap: 48px; }
  .contacts-grid { grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .hero { padding: 96px 0 80px; }
}

/* ============ Десктоп ============ */
@media (min-width: 1024px) {
  .nav { display: flex; gap: 28px; margin-left: auto; }
  .header-cta { display: inline-flex; margin-left: 0; }
  .nav-toggle { display: none; }
  .hero-grid { grid-template-columns: 1.5fr 1fr; gap: 64px; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .section { padding: 96px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
