/* =========================================================
   Darkdiamond: стилі лендінгу
   Шрифт: Plus Jakarta Sans (Google Fonts, підключено в index.html)
   ========================================================= */

/* ---------- Змінні ---------- */
:root {
  /* поверхні */
  --bg: #0A0A0D;
  --bg-alt: #0D0D12;
  --bg-card: #101016;
  --bg-btn: #131319;

  /* лінії */
  --line: #1F1F2A;
  --line-strong: #2E2E3C;
  --ring: #3A3660;

  /* текст */
  --text: #F3F3F8;
  --text-soft: #D9D9E4;
  --muted: #9C9CAF;
  --muted-2: #B9B9C8;

  /* акцент (бліда бузкова) */
  --accent: #B9B2FF;
  --accent-rgb: 185, 178, 255;
  --accent-grad: linear-gradient(#D9D4FF, #A79EFF);
  --on-accent: #17133A;

  /* розкладка */
  --page-max: 1440px;
  --content-max: 1100px;
  /* бічний відступ: контент по центру в 1100px, але не менше 16px */
  --gutter: max(16px, calc((100% - var(--content-max)) / 2));

  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--accent); }
a:hover { color: #fff; }

h1, h2, h3, p { margin: 0; }

a:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}

.accent { color: var(--accent); }
.muted  { color: var(--muted); }
.glow   { color: var(--accent); text-shadow: 0 0 40px rgba(var(--accent-rgb), 0.45); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.btn--ghost {
  min-height: 46px;
  padding: 0 22px;
  background: var(--bg-btn);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 10px;
  font-weight: 700;
}
.btn--ghost:hover { color: var(--text); border-color: var(--ring); }

.btn--primary {
  background: var(--accent-grad);
  color: var(--on-accent);
  border-radius: 999px;
}
.btn--primary:hover { color: var(--on-accent); }

.btn--xl {
  min-height: 58px;
  padding: 0 44px;
  font-size: 18px;
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px var(--ring), 0 10px 44px rgba(var(--accent-rgb), 0.38);
}

.btn--form {
  min-height: 56px;
  padding: 0 36px;
  border: 0;
  font: inherit;
  font-weight: 800;
  font-size: 17px;
  align-self: flex-start;
  box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.3);
}

.btn--widget {
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  font-size: 16px;
  box-shadow: 0 8px 28px rgba(var(--accent-rgb), 0.3);
}

/* ---------- Шапка ---------- */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px 24px;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--line);
}

.site-header > .brand {
  justify-self: start;
}

.site-header > .main-nav {
  justify-self: center;
}

.site-header > .btn {
  justify-self: end;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand__divider { width: 1px; height: 18px; background: var(--line-strong); }
.brand__tag { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; color: var(--muted); }

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 28px;
}

.nav-link {
  padding: 12px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.nav-link:hover { color: #fff; }
.nav-link.is-current { color: #fff; }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 40px;
  background: radial-gradient(60% 55% at 50% 0%, rgba(var(--accent-rgb), 0.14), rgba(var(--accent-rgb), 0) 70%);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted-2);
}
.pill b { color: var(--accent); font-weight: 700; }
.pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.hero__title {
  max-width: 900px;
  font-weight: 800;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero__price {
  font-weight: 800;
  font-size: clamp(24px, 3.4vw, 38px);
  letter-spacing: -0.02em;
}

.hero__text { max-width: 520px; color: var(--muted); }

/* ---------- Стрічка карток ---------- */
.marquee {
  padding: 8px 0 24px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

/* Рух задає script.js через transform: translateX().
   Тут @keyframes немає навмисно: так стрічка рухається і при
   увімкненому системному «зменшити анімацію». */
.marquee__track {
  display: flex;
  gap: 14px;
  width: max-content;
  will-change: transform;
}

.mcard {
  flex: none;
  width: 170px;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.mcard__art {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mcard__body { display: flex; flex-direction: column; padding: 10px 12px; }
.mcard__cat  { font-size: 13px; font-weight: 600; color: var(--text-soft); }
.mcard__meta { font-size: 12px; color: var(--muted); }
.mcard__earn { font-size: 12px; font-weight: 700; color: var(--accent); }

/* ---------- CTA + статистика ---------- */
.cta-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 8px var(--gutter) 64px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  margin-top: 24px;
}

.stat {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 26px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: center;
}
.stat__value { font-weight: 800; font-size: 34px; }
.stat__label { font-size: 13px; color: var(--muted); }

/* ---------- Секції ---------- */
.section {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: clamp(48px, 7vw, 88px) var(--gutter);
}
.section--bordered { border-top: 1px solid var(--line); }
.section--alt { background: var(--bg-alt); }

.section__head { display: flex; flex-direction: column; gap: 10px; max-width: 620px; }

.section__title {
  font-weight: 800;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section__title--lg { font-size: clamp(30px, 4.5vw, 50px); }

.grid { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Картки ---------- */
.card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
}
.card--price   { flex: 1 1 300px; gap: 12px; padding: 28px; border-radius: 16px; }
.card--service { flex: 1 1 300px; gap: 10px; padding: 26px; border-radius: 16px; }

.card__price { font-weight: 800; font-size: 34px; }
.card__title { font-size: 22px; font-weight: 700; }
.card__title--sm { font-size: 20px; }

.card__link {
  margin-top: auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.card__link:hover { color: #fff; }

/* ---------- Кроки ---------- */
.step {
  flex: 1 1 230px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 2px solid var(--accent);
}
.step__num   { font-size: 13px; color: var(--accent); font-weight: 800; letter-spacing: 0.1em; }
.step__title { font-size: 21px; font-weight: 700; }

/* ---------- Заявка + FAQ ---------- */
.apply {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding: clamp(48px, 7vw, 96px) var(--gutter);
  background: radial-gradient(50% 60% at 50% 100%, rgba(var(--accent-rgb), 0.10), rgba(var(--accent-rgb), 0) 70%);
}

.apply__left  { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.apply__right { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(20px, 4vw, 32px);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }

.field input,
.field textarea {
  padding: 0 14px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font: inherit;
}
.field input { min-height: 48px; }
.field textarea { padding: 12px 14px; resize: vertical; }

.contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  color: var(--muted);
  font-size: 14px;
}
.contacts b { color: var(--text); }

.faq__title { margin-bottom: 8px; font-weight: 800; font-size: 26px; letter-spacing: -0.01em; }

.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: 0 0 18px; color: var(--muted); }
.faq a { font-weight: 600; }

.faq__plus { flex: none; transition: transform 0.2s; }
.faq[open] .faq__plus { transform: rotate(45deg); }

/* ---------- Футер ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 24px; }

/* ---------- Віджет «Подати заявку» ---------- */
.widget {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 50;
  width: min(360px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background: var(--bg-btn);
  border: 1px solid var(--ring);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(var(--accent-rgb), 0.18);
}
.widget[hidden] { display: none; }

.widget__close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
}
.widget__close:hover { color: #fff; }

.widget__eyebrow { font-size: 12px; letter-spacing: 0.14em; color: var(--accent); font-weight: 700; }
.widget__title   { font-size: 22px; font-weight: 800; line-height: 1.2; padding-right: 36px; color: var(--text); }
.widget__text    { font-size: 15px; color: var(--muted); }

/* ---------- Адаптивність ---------- */
@media (max-width: 860px) {
  .site-header { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .site-header > .brand,
  .site-header > .main-nav,
  .site-header > .btn { justify-self: center; }
  .main-nav { justify-content: center; }
  .stat__value { font-size: 30px; }
  .btn--xl { padding: 0 32px; }
}

@media (max-width: 480px) {
  .brand { font-size: 20px; }
  .brand__divider, .brand__tag { display: none; }
}
