:root {
  /* Кольори та токени */
  --bg: #0b0b10;
  --card: #12121a;
  --muted: #9aa0a6;
  --brand: #8b5cf6;
  /* фіолетовий */
  --brand-2: #22d3ee;
  /* бірюзовий */

  /* FX для фонів */
  --fx-purple: 124, 58, 237;
  --fx-cyan: 34, 211, 238;

  /* Тіні/прозорості */
  --shadow-1: 0 8px 30px rgba(0, 0, 0, .35);
  --shadow-2: 0 16px 40px rgba(0, 0, 0, .45);

  /* Вертикальний ритм секцій */
  --space-section-y: clamp(56px, 8vw, 96px);
  --space-section-head: clamp(20px, 3vw, 32px);
  --space-block-gap: 24px;
}

html,
body {
  background: var(--bg);
  color: #e5e7eb;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ===== Дрібний ресет для стабільних відступів типографіки ===== */
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===== Доступність ===== */
:focus-visible {
  outline: 2px solid color-mix(in oklab, #fff 60%, transparent);
  outline-offset: 2px;
  border-radius: 10px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 12px;
  width: auto;
  height: auto;
  background: #111827;
  color: #fff;
  padding: .5rem .75rem;
  border-radius: .75rem;
  z-index: 9999;
}

/* ===== Заголовок-градієнт ===== */
.headline-gradient {
  background: linear-gradient(92deg, var(--brand) 0%, #7dd3fc 45%, var(--brand-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 8px 28px rgba(139, 92, 246, .22);
}

/* ===== Фон без зображень (легший) ===== */
body {
  isolation: isolate;
}

#fx-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(520px 520px at 12% 18%, rgba(var(--fx-purple), .20), transparent 60%),
    radial-gradient(480px 480px at 88% 78%, rgba(var(--fx-cyan), .18), transparent 60%),
    radial-gradient(380px 380px at 65% 25%, rgba(var(--fx-purple), .10), transparent 60%),
    radial-gradient(340px 340px at 20% 80%, rgba(var(--fx-cyan), .10), transparent 60%);
  filter: blur(1.5px);
  will-change: transform, opacity;
}

#fx-bg::before {
  content: "";
  position: absolute;
  inset: -10% -10%;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .06), transparent 60%),
    linear-gradient(295deg, rgba(255, 255, 255, .05), transparent 65%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 50%, #000 30%, transparent 85%);
  mask-image: radial-gradient(120% 90% at 50% 50%, #000 30%, transparent 85%);
  filter: blur(1.5px);
  opacity: .5;
  animation: beams-drift 60s linear infinite;
}

#fx-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1000px 520px at 50% -10%, rgba(255, 255, 255, .08), transparent 60%),
    radial-gradient(900px 480px at 10% 110%, rgba(255, 255, 255, .06), transparent 65%),
    radial-gradient(900px 480px at 90% 115%, rgba(255, 255, 255, .06), transparent 65%),
    radial-gradient(closest-side at 50% 50%, transparent 60%, rgba(0, 0, 0, .55));
}

@keyframes beams-drift {
  0% {
    transform: translate(0, 0) rotate(0deg)
  }

  50% {
    transform: translate(-2%, 1%) rotate(2deg)
  }

  100% {
    transform: translate(0, 0) rotate(0deg)
  }
}

@media (prefers-reduced-motion: reduce) {
  #fx-bg::before {
    animation: none;
  }
}

/* Сітка-оверлей у hero */
.bg-grid:before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 60% -20%, rgba(0, 0, 0, .6), transparent 55%);
}

/* ===== A/B хвиля ===== */
.wave {
  position: relative;
  height: 140px;
  overflow: hidden;
  border-radius: 12px;
  z-index: 0;
}

.wave svg {
  position: absolute;
  inset: 0;
  width: 200%;
  height: 100%;
  z-index: 0;
  animation: slide 8s linear infinite;
  will-change: transform;
}

@keyframes slide {
  0% {
    transform: translateX(0)
  }

  100% {
    transform: translateX(-50%)
  }
}

@media (prefers-reduced-motion: reduce) {
  .wave svg {
    animation: none;
  }
}

.viz {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: .9;
}

/* Контроли поверх */
.controls-ab {
  position: relative;
  z-index: 2;
}

/* ===== Before/After slider (про запас) ===== */
.ba-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

.ba-img {
  display: block;
  width: 100%;
  height: auto;
}

.ba-handle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(var(--brand), var(--brand-2));
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .2);
}

.ba-overlay {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
}

.ba-grab {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(139, 92, 246, .35);
}

/* ===== UI дрібниці ===== */
* {
  scrollbar-width: thin;
  scrollbar-color: #2a2a37 transparent;
}

::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: #2a2a37;
  border-radius: 999px;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: .6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem .6rem;
  border-radius: .75rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, .18), rgba(34, 211, 238, .18));
  border: 1px solid rgba(255, 255, 255, .1);
  font-weight: 600;
  font-size: .8rem;
}

.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .08);
}

.ring-brand {
  box-shadow: 0 0 0 2px rgba(139, 92, 246, .45), inset 0 0 40px rgba(34, 211, 238, .25);
}

/* ===== Секції / єдиний вертикальний ритм ===== */
.section {
  position: relative;
  isolation: isolate;
  padding-block: var(--space-section-y);
  /* ОДНА СТОРОНА: симетрично зверху/знизу */
}

/* прибрав .section + .section { padding-top: ... } щоб не подвоювати відступи */

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 255, 255, .07), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 35% 65%, rgba(255, 255, 255, .025));
  opacity: .45;
}

.section.alt::before {
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(255, 255, 255, .06), transparent 60%),
    radial-gradient(900px 500px at 90% 100%, rgba(255, 255, 255, .05), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 30% 70%, rgba(255, 255, 255, .025));
  opacity: .55;
}

/* Заголовок секції — однакові відступи скрізь */
.section-head {
  text-align: center;
  margin-bottom: var(--space-section-head);
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -.01em;
}

.section-head .sub {
  color: var(--muted);
  margin-top: 8px;
}

.section-head .underline {
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.section-head .underline::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 18px rgba(139, 92, 246, .35);
}

/* Картки / ховери */
.card {
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .03));
  border-radius: 16px;
  box-shadow: var(--shadow-1);
}

.card-hover {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  border-color: rgba(255, 255, 255, .12);
}

.card-emph {
  border: 1px solid rgba(168, 85, 247, .75);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, .55),
    inset 0 0 56px rgba(34, 211, 238, .22),
    0 14px 46px rgba(139, 92, 246, .25);
}

.card h3 {
  margin-top: 2px;
}

/* About */
.about-list {
  margin-top: 10px;
  color: var(--muted);
}

.about-list li {
  margin: 6px 0;
}

/* Якір */
[id] {
  scroll-margin-top: 88px;
}

/* Кнопки-CTA */
.btn-elev {
  box-shadow: 0 14px 34px rgba(139, 92, 246, .32);
  transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
}

.btn-elev:hover {
  filter: brightness(1.08);
  transform: translateY(-1.5px);
}

/* FAQ caret */
.faq-item {
  display: flex;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.faq-caret {
  font-size: .9rem;
  color: var(--muted);
  transition: transform .2s ease;
}

details[open] .faq-caret {
  transform: rotate(180deg);
}

/* Ціни */
.price {
  display: inline-block;
}

/* Рівномірні прогалини всередині блоків-контейнерів */
.grid.gap-6>* {
  margin: 0;
}

/* гарантія, що margin не «сперечається» з gap */

/* ===== Адаптив не потрібен для секцій — clamp тримає ритм ===== */
/* Якщо треба щільніше на дуже малих екранах, розкоментуй:
@media (max-width: 380px) {
  :root { --space-section-y: clamp(44px, 7vw, 72px); }
}
*/

/* ↑ Контраст у хедері */
header {
  position: relative;
  /* для псевдоелемента */
  z-index: 40;
}

/* Темний скрім за контентом хедера (легка підкладка + blur) */
header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* мʼякий градієнт від більш темного зверху до прозорого знизу */
  background:
    linear-gradient(180deg, rgba(11, 11, 16, .85) 0%, rgba(11, 11, 16, .7) 60%, rgba(11, 11, 16, .0) 100%);
  backdrop-filter: blur(6px) saturate(110%);
  -webkit-backdrop-filter: blur(6px) saturate(110%);
}

/* Яскравіший бренд і навігація */
header .text-white,
header nav a {
  color: #ffffff !important;
  /* прибираємо «сірість» */
  text-shadow: 0 0 8px rgba(0, 0, 0, .25);
  /* легке підсвічення для читабельності */
}

header nav a {
  opacity: .95;
  transition: opacity .15s ease, text-shadow .15s ease;
}

header nav a:hover {
  opacity: 1;
  text-shadow: 0 0 12px rgba(0, 0, 0, .35);
}

/* Кнопка "Швидкий бриф" — ще виразніша */
header a[href="#brief"] {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .04);
}

/* Мобільне меню також з гарним контрастом */
#mobileNav {
  background: rgba(11, 11, 16, .9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Стрілочка для акордеона */
.as-arrow {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 12px;
}

.as-arrow::before,
.as-arrow::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 12px;
  background: currentColor;
  top: 0;
  left: 5px;
  transition: transform .3s ease;
}

.as-arrow::before {
  transform: rotate(45deg);
}

.as-arrow::after {
  transform: rotate(-45deg);
}

details[open] .as-arrow::before {
  transform: rotate(-45deg);
}

details[open] .as-arrow::after {
  transform: rotate(45deg);
}

/* Плюс/мінус для акордеона у #extra-services */
#extra-services details>summary {
  position: relative;
  user-select: none;
}

#extra-services details>summary::after {
  content: "+";
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 16px;
  line-height: 1;
  width: 1em;
  text-align: center;
  color: currentColor;
  opacity: 0.9;
}

#extra-services details[open]>summary::after {
  content: "–";
  /* середнє тире як мінус */
  opacity: 1;
}

/* ===== Privacy page helpers (локально для privacy.html) ===== */
.container {
  max-width: 72rem;          /* ~1152px */
  margin-inline: auto;
  padding-inline: 1rem;
}

.muted { color: var(--muted); }

.policy-hero h1 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
}

.policy-grid {
  display: grid;
  gap: var(--space-block-gap);
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .policy-grid { grid-template-columns: 1fr 1fr; }
}

.policy-card {
  padding: 24px;
}

.policy-updated {
  margin-top: 8px;
  color: var(--muted);
}
