/* ==========================================================================
   DEEPLOYALTY — основні стилі
   1. Шрифти   2. Токени   3. База   4. Типографіка   5. Розкладка
   6. Компоненти   7. Хедер/футер   8. Попап і форми
   10. Декор   11. Анімації (9 — колишні мокапи телефона, видалено)
   Секції сторінок — у sections.css
   ========================================================================== */

/* 1. Шрифти (локальні файли, без зовнішніх CDN) ------------------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-cyrillic-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-cyrillic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 2. Токени (з Figma «Iteration 4») ----------------------------------- */
:root {
  /* Поверхні */
  --surface-ink: #05060c;
  --surface-dark: #0a0b14;
  --surface-dark-2: #12131f;
  --surface-white: #ffffff;
  --surface-mist: #f5f6fa;
  --surface-lavender: #eef0f6;

  /* Бренд */
  --brand-blue: #547ff2;
  --brand-blue-bright: #3d6bff;
  --brand-violet: #7c9bff;
  --button-primary-bg: #3864f5;
  --button-primary-hover: #4a74ff;
  --theme-accent: #2f5bef;
  --band-blue: #2143e0;
  --band-blue-end: #3e5cf5;

  /* Текст */
  --text-on-dark: #f4f5fa;
  --text-on-dark-2: #a4a8bf;
  --text-on-dark-3: #7a7f9c;   /* ≥ 4.5:1 на темних фонах (WCAG AA) */
  --text-on-light: #0a0b14;
  --text-on-light-2: #4b4f63;
  --text-on-light-mute: #9599ad;
  --text-on-brand: #ffffff;
  --text-on-brand-2: rgba(255, 255, 255, 0.8);
  --text-on-brand-mute: rgba(255, 255, 255, 0.6);

  /* Лінії та накладки */
  --line-on-dark: rgba(255, 255, 255, 0.1);
  --line-on-light: #e2e4ec;
  --overlay-white-6: rgba(255, 255, 255, 0.06);
  --overlay-white-12: rgba(255, 255, 255, 0.1);
  --overlay-blue-12: rgba(61, 107, 255, 0.12);
  --overlay-ink-60: rgba(5, 6, 12, 0.6);

  /* Промені */
  --beam-wide-0: rgba(27, 47, 208, 0);
  --beam-wide-lo: rgba(27, 47, 208, 0.19);
  --beam-wide-hi: rgba(27, 47, 208, 0.55);
  --beam-mid-0: rgba(51, 88, 255, 0);
  --beam-mid-lo: rgba(51, 88, 255, 0.25);
  --beam-mid-hi: rgba(51, 88, 255, 0.7);
  --beam-inner-0: rgba(143, 176, 255, 0);
  --beam-inner-lo: rgba(143, 176, 255, 0.3);
  --beam-inner-hi: rgba(143, 176, 255, 0.85);
  --beam-core-0: rgba(234, 241, 255, 0);
  --beam-core-lo: rgba(234, 241, 255, 0.35);
  --beam-core-hi: #eaf1ff;

  /* Відступи */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-96: 96px;
  --space-128: 128px;

  /* Радіуси */
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Сітка */
  --content: 1200px;
  --gutter: clamp(16px, 8.333vw, 120px);
  --section-y: clamp(80px, 8.9vw, 128px);
  --header-h: 76px;

  /* Шрифти */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Рух */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.35s;
  /* Інтерфейси в мокапах (чеки, панелі, телефони) та світлі акценти на темному */
  --accent-soft: #9fb6ff;        /* блакитний акцент на темному тлі: лінії, цифри, підписи */
  --accent-pale: #c9d6ff;
  --accent-pale-2: #b9c9ff;
  --ui-ink: #0d0f17;             /* текст у світлих панелях */
  --ui-text-2: #4a5068;
  --ui-mute: #7a8099;
  --ui-mute-dark: #a3abc6;       /* другорядний текст у темних панелях */
  --ui-line: #eef0f5;            /* розділювачі у світлих панелях */
  --ui-panel-dark: #11131d;      /* фон темних панелей */
  --ui-text-on-dark: #f2f4fa;

  /* Зелений — ЛИШЕ для статусів («Активна», «Підключено», «Оплачено», «Повернувся»). Один відтінок у трьох яскравостях */
  --success: #10b981;            /* крапки й іконки статусів */
  --success-on-light: #0c8a60;   /* текст статусу на світлому */
  --success-on-dark: #34d399;    /* текст статусу на темному */
  --success-soft: rgba(16, 185, 129, 0.12);
  --success-ring: rgba(16, 185, 129, 0.18);
}

/* Тема секції: світла або темна. Компоненти беруть кольори звідси. */
[data-theme="dark"] {
  --fg: var(--text-on-dark);
  --fg-2: var(--text-on-dark-2);
  --fg-3: var(--text-on-dark-3);
  --fg-mute: var(--text-on-dark-3);
  --line: var(--line-on-dark);
  --card-subtle: var(--overlay-white-6);
  color: var(--fg);
}
[data-theme="light"] {
  --fg: var(--text-on-light);
  --fg-2: var(--text-on-light-2);
  --fg-3: var(--text-on-light-mute);
  --fg-mute: var(--text-on-light-mute);
  --line: var(--line-on-light);
  --card-subtle: var(--surface-mist);
  color: var(--fg);
}
[data-theme="brand"] {
  --fg: var(--text-on-brand);
  --fg-2: var(--text-on-brand-2);
  --fg-3: var(--text-on-brand-mute);
  --fg-mute: var(--text-on-brand-mute);
  --line: rgba(255, 255, 255, 0.16);
  --card-subtle: rgba(255, 255, 255, 0.08);
  color: var(--fg);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
  background: var(--surface-ink);
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  font-feature-settings: "cv11", "ss03";
  color: var(--text-on-dark);
  background: var(--surface-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
em { font-style: normal; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--brand-blue-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: rgba(61, 107, 255, 0.35); color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--button-primary-bg);
  color: #fff;
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* 4. Типографіка -------------------------------------------------------- */
.display-xl,
.display-l,
.heading-l,
.heading-m,
.heading-s { font-weight: 500; color: var(--fg, inherit); }

.display-xl   { font-size: clamp(36px, 4.45vw, 64px); line-height: 1.0625; letter-spacing: -0.03em; }
.display-l    { font-size: clamp(32px, 3.34vw, 48px); line-height: 1.125; letter-spacing: -0.025em; }
.heading-l    { font-size: clamp(24px, 2.23vw, 32px); line-height: 1.1875; letter-spacing: -0.015em; }
.heading-m    { font-size: clamp(20px, 1.67vw, 24px); line-height: 1.25; letter-spacing: -0.01em; }
.heading-s    { font-size: 18px; line-height: 26px; letter-spacing: -0.005em; }

.lead    { font-size: clamp(18px, 1.53vw, 22px); line-height: 1.4545; letter-spacing: -0.005em; }
.body-l  { font-size: 18px; line-height: 28px; }
.body-m  { font-size: 16px; line-height: 24px; }
.caption { font-size: 13px; line-height: 18px; font-weight: 500; }

.metric-xl {
  font-size: clamp(64px, 7.78vw, 112px);
  line-height: 0.93;
  letter-spacing: -0.045em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.metric-m {
  font-size: clamp(44px, 4.45vw, 64px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.label-text {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--fg-3, var(--text-on-dark-3));
}

/* Сіра частина заголовків: <em>…</em> у мовних файлах */
.display-xl em,
.display-l em,
.heading-l em { color: var(--fg-mute); }

/* <br class="br-d"> — перенос лише на широких екранах */
@media (max-width: 960px) { br.br-d { display: none; } }

.text-2 { color: var(--fg-2); }
.text-3 { color: var(--fg-3); }
.text-accent { color: var(--theme-accent); }

/* 5. Розкладка --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--content) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}
.section--ink      { background: var(--surface-ink); }
.section--dark     { background: var(--surface-dark); }
.section--white    { background: var(--surface-white); }
.section--mist     { background: var(--surface-mist); }
.section--lavender { background: var(--surface-lavender); }
.section--band     { background: linear-gradient(180deg, var(--band-blue) 0%, var(--band-blue-end) 100%); }

/* Заголовок секції: великий текст + опис/кнопка праворуч */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-24);
}
.section-head__title { flex: 1 1 auto; max-width: 792px; text-wrap: balance; }
.section-head__title--wide { max-width: 1000px; text-wrap: balance; }
.section-head__aside { flex: 0 0 384px; }
.section-head__aside--action { flex: 0 0 auto; padding-bottom: 6px; }

.stack-48 { display: flex; flex-direction: column; gap: var(--space-48); }
.stack-64 { display: flex; flex-direction: column; gap: var(--space-64); }

@media (max-width: 960px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: var(--space-24); }
  .section-head__aside { flex-basis: auto; max-width: 560px; }
  .stack-64 { gap: var(--space-48); }
}

/* 6. Компоненти -------------------------------------------------------- */

/* Кнопка-пігулка */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text-on-dark);
  --btn-line: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  height: 46px;
  padding: 0 var(--space-24);
  border-radius: var(--radius-pill);
  border: 1px solid var(--btn-line);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn--s { height: 36px; padding: 0 var(--space-16); }
.btn--block { width: 100%; }
.btn__label { position: relative; z-index: 1; }
.btn__icon { position: relative; z-index: 1; flex: none; }   /* іконка в кнопці — кольору тексту */
.btn__arrow { position: relative; z-index: 1; flex: none; transition: transform 0.45s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn:active { transform: scale(0.98); }

/* Відблиск, що пробігає по кнопці при наведенні */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); transition: transform 0.8s var(--ease-out); }

.btn--primary {
  --btn-bg: var(--button-primary-bg);
  --btn-fg: var(--text-on-brand);
  box-shadow: 0 0 0 0 rgba(56, 100, 245, 0);
}
.btn--primary:hover {
  --btn-bg: var(--button-primary-hover);
  box-shadow: 0 10px 30px -10px rgba(56, 100, 245, 0.75);
}
.btn--dark  { --btn-line: var(--line-on-dark); --btn-fg: var(--text-on-dark); }
.btn--dark:hover  { --btn-bg: var(--overlay-white-6); --btn-line: rgba(255, 255, 255, 0.28); }
/* Контурна кнопка — єдиний другорядний стиль; кольори беруться з теми секції (світла / темна / синя).
   Варіанти кнопок: primary, outline, dark (див. button() у app/bootstrap.php). */
.btn--outline { --btn-line: var(--fg, var(--text-on-light)); --btn-fg: var(--fg, var(--text-on-light)); }
[data-theme="dark"] .btn--outline,
[data-theme="brand"] .btn--outline { --btn-line: rgba(255, 255, 255, 0.32); }
.btn--outline:hover { --btn-bg: var(--fg, var(--text-on-light)); --btn-fg: var(--surface-white); --btn-line: var(--fg, var(--text-on-light)); }
[data-theme="dark"] .btn--outline:hover,
[data-theme="brand"] .btn--outline:hover { --btn-bg: #fff; --btn-fg: var(--text-on-light); --btn-line: #fff; }

/* Стан відправки */
.btn__spinner {
  display: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
.btn.is-loading .btn__arrow { display: none; }
.btn.is-loading .btn__spinner { display: block; }
.btn.is-loading { pointer-events: none; opacity: 0.85; }

/* Мітки. Одна система на весь сайт:
   .label — синій квадратик + текст (над заголовками, підписи груп);
   .tag   — та сама мітка в тонкій капсулі (картки сценаріїв; так само виглядає мітка в першому екрані);
   .label-text — сірий службовий текст і номери «01», «02»… */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: 6px 12px 6px 10px;
  border-radius: var(--radius-pill);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--fg-2);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  white-space: nowrap;
}
.tag::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--brand-blue); }

/* Мітка з синім квадратиком */
.label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--fg-2);
  white-space: nowrap;
}
.label::before {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  background: var(--brand-blue);
}

/* Список з галочками */
.check-list { border-bottom: 1px solid var(--line); }
.check-list li {
  display: flex;
  gap: var(--space-16);
  padding-block: var(--space-16);
  border-top: 1px solid var(--line);
  font-size: 18px;
  line-height: 28px;
}
.check-list li img { flex: none; width: 24px; height: 24px; margin-top: 2px; }


/* 7. Хедер ------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding: var(--space-16) var(--gutter) 0;
  pointer-events: none;
}
.site-header__bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  max-width: var(--content);
  margin-inline: auto;
  padding: var(--space-12) var(--space-12) var(--space-12) var(--space-24);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-on-dark);
  background: var(--overlay-white-6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.site-header.is-scrolled .site-header__bar {
  background: rgba(5, 6, 12, 0.8);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 12px 40px -16px rgba(0, 0, 0, 0.6);
}

.site-header__brand { flex: none; display: flex; }
.site-header__brand img { width: 132px; height: 24px; }

.site-header__nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;   /* роздільник між напрямками й розділами — по центру висоти меню */
  justify-content: center;
  gap: var(--space-4);
}
.nav-link {
  position: relative;
  padding: var(--space-8) var(--space-12);
  border-radius: var(--radius-pill);
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text-on-dark-2);
  white-space: nowrap;
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.nav-link:hover { color: var(--text-on-dark); }
.nav-sep { width: 1px; height: 16px; margin: 0 6px; background: var(--line-on-dark); }
@media (max-width: 1320px) { .nav-sep, .nav-link--anchor { display: none; } }
.nav-link.is-active { color: var(--text-on-dark); background: var(--overlay-white-12); }

.site-header__actions {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-12);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: var(--space-8) var(--space-12);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-on-dark-2);
}
.lang-switch__item { position: relative; transition: color var(--dur) var(--ease-out); }
.lang-switch__item:hover { color: var(--text-on-dark); }
.lang-switch__item.is-active { color: var(--text-on-dark); }
.lang-switch__sep { opacity: 0.6; }

/* Круглі кнопки в хедері на телефоні: «Вхід» і меню */
.site-header__icon-btn {
  display: none;
  flex: none;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-on-dark);
  background: var(--overlay-white-6);
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.site-header__icon-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }
.site-header__icon-btn img,
.site-header__icon-btn svg { width: 20px; height: 20px; }
.site-header__burger { position: relative; }
/* дві риски по центру кнопки; у відкритому меню сходяться в хрестик */
.burger-line {
  position: absolute;
  left: 50%; top: 50%;
  width: 16px; height: 1.5px;
  margin: -0.75px 0 0 -8px;
  border-radius: 2px;
  background: var(--text-on-dark);
  transition: transform 0.45s var(--ease-out);
}
.burger-line--top { transform: translateY(-3.5px); }
.burger-line--bottom { transform: translateY(3.5px); }
.menu-open .burger-line--top { transform: rotate(45deg); }
.menu-open .burger-line--bottom { transform: rotate(-45deg); }

/* Мобільне меню: панель під хедером + затемнення сторінки */
.mobile-menu { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.mobile-menu__scrim {
  position: absolute; inset: 0;
  background: rgba(5, 6, 12, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}
.mobile-menu__panel {
  position: absolute;
  left: var(--gutter); right: var(--gutter);
  top: calc(var(--header-h) + 8px);
  max-height: calc(100dvh - var(--header-h) - 24px);
  overflow: auto;
  display: flex; flex-direction: column; gap: 24px;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  border-radius: var(--radius-l);
  border: 1px solid var(--line-on-dark);
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(61, 107, 255, 0.16), transparent 60%),
    rgba(14, 15, 26, 0.94);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transform-origin: 50% 0;
  clip-path: inset(0 0 100% 0 round var(--radius-l));
  transition: opacity 0.35s var(--ease-out), transform 0.55s var(--ease-out), clip-path 0.6s var(--ease-out);
}
.menu-open .mobile-menu { pointer-events: auto; }
.menu-open .mobile-menu__scrim { opacity: 1; }
.menu-open .mobile-menu__panel { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round var(--radius-l)); }

.mobile-menu__nav { display: flex; flex-direction: column; }
.mobile-menu__group { margin: 4px 0 6px; }
.mobile-menu__group:not(:first-child) { margin-top: 18px; }
.mobile-menu__link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-on-dark);
  font-size: 18px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-on-dark);
  transition: color 0.3s;
}
.mobile-menu__link--anchor { font-size: 16px; color: var(--text-on-dark-2); }
.mobile-menu__link .btn__arrow { color: var(--text-on-dark-3); transition: transform 0.4s var(--ease-out), color 0.3s; }
.mobile-menu__link:hover .btn__arrow { color: var(--text-on-dark); transform: translateX(3px); }
.mobile-menu__link.is-active { color: var(--accent-soft); }
.mobile-menu__link.is-active .btn__arrow { color: var(--accent-soft); }
.mobile-menu__foot { display: flex; flex-direction: column; gap: 12px; }
.mobile-menu__foot > .btn { width: 100%; }
.mobile-menu__row { display: flex; align-items: center; justify-content: space-between; }
/* пункти зʼявляються каскадом після панелі */
.mobile-menu :is(.mobile-menu__group, .mobile-menu__link, .mobile-menu__foot) {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out), color 0.3s;
}
.menu-open .mobile-menu :is(.mobile-menu__group, .mobile-menu__link, .mobile-menu__foot) {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.12s + var(--i, 0) * 0.035s), calc(0.12s + var(--i, 0) * 0.035s), 0s;
}

@media (max-width: 1024px) {
  .site-header__nav { display: none; }
  .site-header__actions { margin-left: auto; }
}
@media (max-width: 720px) {
  :root { --header-h: 68px; }
  .site-header { padding-top: 12px; }
  .site-header__bar { padding: 8px 8px 8px 18px; }
  .site-header__brand img { width: 116px; height: auto; }
  .site-header__actions { gap: 8px; }
  .site-header__actions > .lang-switch,
  .site-header__login,
  .site-header__actions > .btn--primary { display: none; }
  .site-header__icon-btn { display: grid; }
}

/* Футер --------------------------------------------------------------- */
.site-footer {
  position: relative;
  overflow: hidden;
  padding: var(--space-96) 0 40px;
  background: var(--surface-ink);
  border-top: 1px solid var(--line-on-dark);
}
.site-footer__top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-48);
}
.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-24);
  width: 384px;
  flex: none;
}
.site-footer__brand > a img { width: 154px; height: 28px; }
.site-footer__links {
  display: flex;
  gap: var(--space-64);
}
.site-footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-16);
  white-space: nowrap;
}
/* заголовок групи: на десктопі — звичайний підпис, на телефоні — кнопка акордеона */
.site-footer__head { display: flex; align-items: center; justify-content: space-between; width: 100%; pointer-events: none; text-align: left; }
.site-footer__chev { display: none; }
.site-footer__items { display: grid; grid-template-rows: 1fr; }
.site-footer__list { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-16); min-height: 0; }
.site-footer__col a,
.site-footer__link-btn {
  font-size: 16px;
  line-height: 24px;
  color: var(--text-on-dark);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.45s var(--ease-out), color 0.3s;
}
.site-footer__col a:hover,
.site-footer__link-btn:hover { background-size: 100% 1px; }
.site-footer__wordmark {
  margin-top: var(--space-64);
  overflow: hidden;
  opacity: 0.04;   /* непрозорість 4% (на контейнері: opacity самого img анімує GSAP) */
}
.site-footer__wordmark img { width: 100%; height: auto; }
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-24);
  margin-top: var(--space-64);
  padding-top: var(--space-24);
  border-top: 1px solid var(--line-on-dark);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}
.site-footer__legal,
.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-12) var(--space-32);
}
.site-footer__legal a,
.site-footer__social a { color: var(--text-on-dark-2); transition: color 0.3s; }
.site-footer__legal a:hover,
.site-footer__social a:hover { color: var(--text-on-dark); }
.site-footer__social .lang-switch { padding: 0; color: var(--text-on-dark-2); }

/* на середніх ширинах — вужчий блок з логотипом і менші проміжки, щоб колонки не виходили за поле */
@media (max-width: 1360px) {
  .site-footer__brand { width: 300px; }
  .site-footer__links { gap: 40px; }
}
@media (max-width: 1240px) {
  .site-footer__top { flex-direction: column; }
  .site-footer__links { flex-wrap: wrap; gap: var(--space-48) var(--space-64); }
}
@media (max-width: 720px) {
  .site-footer { padding-top: var(--space-64); padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .site-footer__top { gap: var(--space-32); }
  .site-footer__brand { width: 100%; gap: var(--space-16); }
  .site-footer__brand .btn { width: 100%; margin-top: var(--space-8); }

  /* групи посилань — акордеон: чотири рядки, розкриваються тапом */
  .site-footer__links { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line-on-dark); }
  .site-footer__col { gap: 0; white-space: normal; border-bottom: 1px solid var(--line-on-dark); }
  .site-footer__head { pointer-events: auto; padding: 18px 0; cursor: pointer; }
  .site-footer__head .label-text { font-size: 16px; line-height: 22px; color: var(--text-on-dark); }
  .site-footer__chev { display: block; color: var(--text-on-dark-3); transition: transform 0.45s var(--ease-out), color 0.3s; }
  .site-footer__col.is-open .site-footer__chev { transform: rotate(180deg); color: var(--text-on-dark); }
  .site-footer__items { grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease-out); }
  .site-footer__col.is-open .site-footer__items { grid-template-rows: 1fr; }
  .site-footer__list { gap: 14px; padding-left: 2px; overflow: hidden; }
  .site-footer__col.is-open .site-footer__list { padding-bottom: 20px; }
  .site-footer__col a { font-size: 15px; line-height: 20px; color: var(--text-on-dark-2); }
  .site-footer__link-btn--dup { display: none; }   /* кнопка «Запланувати дзвінок» уже є вгорі футера */

  .site-footer__wordmark { margin-top: var(--space-48); }
  /* низ: соцмережі й мова → документи → копірайт */
  .site-footer__bottom { flex-direction: column-reverse; align-items: stretch; gap: var(--space-16); margin-top: var(--space-32); padding-top: var(--space-24); }
  .site-footer__social { justify-content: space-between; gap: var(--space-24); }
  .site-footer__legal { gap: var(--space-8) var(--space-24); }
  .site-footer__legal > span { order: 2; flex-basis: 100%; margin-top: var(--space-8); }   /* копірайт — останнім рядком */
}

/* 8. Попап і форми ------------------------------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: var(--space-16);
}
.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 12, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}
.modal__panel {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 40px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-on-dark);
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(61, 107, 255, 0.16), transparent 60%),
    var(--surface-dark-2);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition: opacity 0.45s var(--ease-out), transform 0.6s var(--ease-out);
}
.modal.is-open .modal__scrim { opacity: 1; }
.modal.is-open .modal__panel { opacity: 1; transform: none; }

.modal__view { display: flex; flex-direction: column; gap: var(--space-32); }
.modal__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-on-dark);
  background: var(--overlay-white-6);
  transition: background-color 0.3s, transform 0.5s var(--ease-out);
}
.modal__close img { transform: rotate(45deg); }
.modal__close:hover { background: rgba(255, 255, 255, 0.12); transform: rotate(90deg); }
.modal__form { display: flex; flex-direction: column; gap: var(--space-16); }
.modal__form .btn { margin-top: var(--space-16); }
.modal__consent { margin-top: 4px; }
.modal__consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.modal__form-error:empty { display: none; }
.modal__form-error { color: #ff8a8a; font-size: 14px; line-height: 20px; }

.modal__success { align-items: center; text-align: center; gap: var(--space-16); padding-top: var(--space-16); }
.modal__success .modal__close { position: absolute; top: 24px; right: 24px; }
.modal__success .btn { margin-top: var(--space-16); }
.modal__success h2:focus { outline: none; }
.modal__success-mark { color: var(--brand-blue-bright); margin-bottom: var(--space-8); }
.success-ring { stroke-dasharray: 220; stroke-dashoffset: 220; transform: rotate(-90deg); transform-origin: center; }
.success-check { stroke-dasharray: 40; stroke-dashoffset: 40; }
.modal__success:not([hidden]) .success-ring { animation: draw 0.9s var(--ease-out) 0.1s forwards; }
.modal__success:not([hidden]) .success-check { animation: draw 0.5s var(--ease-out) 0.6s forwards; }

@media (max-width: 520px) {
  .modal { align-items: end; padding: 0; }
  .modal__panel {
    width: 100%;
    padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
    border-radius: var(--radius-l) var(--radius-l) 0 0;
    transform: translateY(100%);
  }
}

/* Попап з календарем: ліворуч — про зустріч, праворуч — календар і слоти, далі — контакти */
.modal__panel.booking {
  width: min(1040px, 100%);
  padding: 0;
  transition: opacity 0.45s var(--ease-out), transform 0.6s var(--ease-out), width 0.5s var(--ease-out);
}
.booking[data-step="done"] { width: min(480px, 100%); padding: 40px; }
.booking__view { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 0; }
.booking__info {
  position: relative;
  display: flex; flex-direction: column; gap: var(--space-24);
  padding: 40px;
  border-right: 1px solid var(--line-on-dark);
  background: radial-gradient(120% 70% at 0% 0%, rgba(61, 107, 255, 0.14), transparent 60%);
}
.booking__mark {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.booking__mark img { width: 26px; height: auto; }
.booking__copy { display: flex; flex-direction: column; gap: var(--space-12); }
.booking__facts { display: flex; flex-direction: column; gap: var(--space-12); padding-top: var(--space-24); border-top: 1px solid var(--line-on-dark); }
.booking__facts li { display: flex; align-items: center; gap: var(--space-12); font-size: 15px; line-height: 22px; color: var(--text-on-dark-2); }
.booking__facts svg { flex: none; color: var(--brand-violet); }
.booking__picked {
  display: flex; align-items: center; gap: var(--space-12);
  padding: 14px 16px;
  border-radius: var(--radius-m);
  background: rgba(61, 107, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(124, 155, 255, 0.35);
  color: var(--text-on-dark);
  animation: booking-in 0.5s var(--ease-out);
}
.booking__picked svg { flex: none; color: var(--brand-violet); }
.booking__picked > span { display: flex; flex-direction: column; font-size: 14px; line-height: 20px; }
.booking__picked b { font-weight: 500; font-size: 15px; }
.booking__picked b::first-letter { text-transform: uppercase; }
.booking__picked > span > span { color: var(--text-on-dark-2); }

.booking__main { position: relative; min-width: 0; min-height: 540px; padding: 40px; }
.booking__main > .modal__close { position: absolute; top: 24px; right: 24px; z-index: 2; }
.booking__label { font-size: 15px; line-height: 22px; font-weight: 500; color: var(--text-on-dark); }
.booking__label::first-letter { text-transform: uppercase; }
.booking__step { animation: booking-in 0.5s var(--ease-out); }
@keyframes booking-in { from { opacity: 0; transform: translateY(8px); } }

.booking__step--time { display: grid; grid-template-columns: minmax(0, 1fr) 208px; gap: 40px; min-height: 440px; }
.booking__status { grid-column: 1 / -1; align-self: center; text-align: center; }
.booking__cta { display: none; }
.booking__status:empty { display: none; }
.booking__notice { grid-column: 1 / -1; order: -1; }   /* «час щойно зайняли» — над календарем */
.booking__step--time.is-loading .booking__cal,
.booking__step--time.is-loading .booking__slots { display: none; }
.booking__step--time:not(.is-loading) .booking__status { display: none; }

/* Календар */
.booking__cal { display: flex; flex-direction: column; gap: var(--space-16); min-width: 0; }
.cal__head { display: flex; flex-direction: column; gap: var(--space-24); padding-right: 56px; }
.cal__nav { display: flex; align-items: center; gap: var(--space-8); }
.cal__title { order: -1; flex: 1; font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: -0.01em; }
.cal__title::first-letter { text-transform: uppercase; }
.cal__arrow {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--text-on-dark);
  background: rgba(255, 255, 255, 0.06);
  transition: background-color 0.25s, opacity 0.25s;
}
.cal__arrow:hover { background: rgba(255, 255, 255, 0.12); }
.cal__arrow:disabled { opacity: 0.3; cursor: default; background: rgba(255, 255, 255, 0.06); }
.cal__arrow--next svg { transform: scaleX(-1); }
.cal__week, .cal__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal__week span { padding-block: 6px; text-align: center; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-on-dark-3); }
.cal__week span::first-letter { text-transform: uppercase; }
.cal__day {
  position: relative;
  display: grid; place-items: center;
  width: 100%; max-width: 52px;
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  font-size: 15px; line-height: 1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-on-dark-3);
  transition: background-color 0.25s, color 0.25s, box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.cal__day:disabled { cursor: default; opacity: 0.55; }
.cal__day.is-open { color: var(--accent-pale); background: rgba(61, 107, 255, 0.14); }
.cal__day.is-open:hover { background: rgba(61, 107, 255, 0.26); }
.cal__day.is-today::after { content: ""; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.cal__day[aria-selected="true"] {
  color: #fff;
  background: var(--button-primary-bg);
  box-shadow: 0 10px 24px -10px rgba(56, 100, 245, 0.9);
}

/* Слоти */
.booking__slots { display: flex; flex-direction: column; gap: var(--space-16); min-width: 0; padding-top: 2px; }
.booking__slots .booking__label { min-height: 22px; }
.slots {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 424px;
  overflow-y: auto;
  margin-right: -8px; padding: 2px 8px 24px 0;
  overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 32px), transparent);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.slot {
  display: grid;
  grid-template-columns: 1fr 0fr;
  gap: 0;
  flex: none;
  animation: booking-in 0.45s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 25ms);
  transition: grid-template-columns 0.45s var(--ease-out), gap 0.45s var(--ease-out);
}
.slot__time, .slot__next {
  height: 48px;
  border-radius: var(--radius-m);
  font-size: 15px; font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}
.slot__time {
  color: var(--accent-pale);
  box-shadow: inset 0 0 0 1px rgba(124, 155, 255, 0.35);
  transition: background-color 0.25s, box-shadow 0.25s, color 0.25s;
}
.slot__time:hover { box-shadow: inset 0 0 0 1.5px rgba(124, 155, 255, 0.85); }
.slot__next { min-width: 0; color: #fff; background: var(--button-primary-bg); opacity: 0; transition: opacity 0.3s, background-color 0.25s; }
.slot__next:hover { background: var(--button-primary-hover); }
.slot.is-selected { grid-template-columns: 1fr 1fr; gap: 8px; }
.slot.is-selected .slot__time { color: var(--text-on-dark); background: rgba(255, 255, 255, 0.1); box-shadow: none; }
.slot.is-selected .slot__next { opacity: 1; }

/* Крок «контакти» */
.booking__step--details { max-width: 440px; }
.booking__back {
  display: inline-flex; align-items: center; gap: 4px;
  align-self: flex-start;
  margin: -6px 0 var(--space-8) -6px;
  padding: 6px 10px 6px 4px;
  border-radius: var(--radius-pill);
  font-size: 14px; line-height: 20px; font-weight: 500;
  color: var(--brand-violet);
  transition: background-color 0.25s;
}
.booking__back:hover { background: rgba(124, 155, 255, 0.1); }
.field__optional { font-weight: 400; color: var(--text-on-dark-3); }
.booking__picked--success { align-self: stretch; text-align: left; margin-block: var(--space-8); }

@media (max-width: 960px) {
  .booking__view { grid-template-columns: minmax(0, 1fr); }
  .booking__info { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-16); padding: 32px 32px 24px; border-right: 0; border-bottom: 1px solid var(--line-on-dark); }
  .booking__mark { width: 44px; height: 44px; border-radius: 14px; }
  .booking__copy { flex: 1 1 260px; padding-right: 48px; }
  .booking__facts { flex-direction: row; flex-wrap: wrap; gap: 8px 20px; width: 100%; padding-top: 0; border-top: 0; }
  .booking__facts li { font-size: 14px; }
  .booking__picked { width: 100%; }
  .booking__main { position: static; min-height: 0; padding: 32px; }
  .booking > .booking__view .booking__main > .modal__close { top: 24px; right: 24px; }
  .cal__head { padding-right: 0; }
}
@media (max-width: 760px) {
  .booking__step--time { grid-template-columns: minmax(0, 1fr); gap: var(--space-32); min-height: 0; }
  .slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; overflow: visible; margin: 0; padding: 0; -webkit-mask-image: none; mask-image: none; }
  /* на телефоні слот не розкривається — обраний час підсвічується, «Далі» закріплена внизу */
  .slot, .slot.is-selected { grid-template-columns: 1fr; gap: 0; }
  .slot__next { display: none; }
  .slot__time { height: 44px; font-size: 14px; }
  .slot.is-selected .slot__time { color: #fff; background: var(--button-primary-bg); }
  .booking__cta:not([hidden]) {
    position: sticky; bottom: 0; z-index: 3;
    display: block;
    margin: 0 -32px -32px;
    padding: 16px 32px 24px;
    background: linear-gradient(180deg, rgba(18, 19, 31, 0), var(--surface-dark-2) 30%);
    animation: booking-in 0.35s var(--ease-out);
  }
}
@media (max-width: 520px) {
  .modal__panel.booking { max-height: calc(100dvh - 24px); }
  .booking[data-step="done"] { padding: 28px 20px calc(24px + env(safe-area-inset-bottom)); }
  .booking__info { padding: 24px 20px 20px; }
  .booking__copy .body-m { display: none; }
  .booking__copy .heading-l { font-size: 24px; line-height: 30px; }
  .booking__main { padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
  .booking__main > .modal__close { top: 16px !important; right: 16px !important; }
  .booking__cta:not([hidden]) { margin: 0 -20px calc(-24px - env(safe-area-inset-bottom)); padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); }
  .cal__week, .cal__days { gap: 4px; }
  .cal__day { font-size: 14px; }
}

.field { display: flex; flex-direction: column; gap: var(--space-8); }
.field__label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text-on-dark-2); }
.field__input {
  width: 100%;
  height: 52px;
  padding: 0 var(--space-16);
  border-radius: var(--radius-m);
  border: 1px solid var(--line-on-dark);
  background: var(--overlay-white-6);
  color: var(--text-on-dark);
  font-size: 16px;
  line-height: 24px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}
.field__input::placeholder { color: var(--text-on-dark-3); }
.field__input:hover { border-color: rgba(255, 255, 255, 0.2); }
.field__input:focus {
  border-color: var(--brand-blue-bright);
  box-shadow: 0 0 0 0.5px var(--brand-blue-bright), 0 0 0 4px rgba(61, 107, 255, 0.15);
}
.field.is-invalid .field__input { border-color: #ff6b6b; box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12); }
.field__error { min-height: 0; font-size: 13px; line-height: 18px; color: #ff8a8a; }
.field__error:empty { display: none; }
.field__password { position: relative; }
.field__password .field__input { padding-right: 52px; }
.field__toggle {
  position: absolute;
  right: 6px; top: 6px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--text-on-dark-3);
  transition: color 0.2s;
}
.field__toggle:hover { color: var(--text-on-dark); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 10. Декор ------------------------------------------------------------- */
/* Промінь світла (4 шари: широкий, середній, внутрішній, ядро) */
.beam {
  position: absolute;
  left: var(--beam-x, -120px);
  top: var(--beam-y, 440px);
  width: 1400px;
  height: 0;
  transform: rotate(var(--beam-angle, -38deg));
  transform-origin: 50% 50%;
  pointer-events: none;
}
.beam > i {
  position: absolute;
  left: 0;
  width: 100%;
  top: 0;
  transform: translateY(-50%);
}
.beam__wide  { height: 315px; filter: blur(130px); background: linear-gradient(90deg, var(--beam-wide-0), var(--beam-wide-lo) 35%, var(--beam-wide-hi)); }
.beam__mid   { height: 108px; filter: blur(55px); background: linear-gradient(90deg, var(--beam-mid-0), var(--beam-mid-lo) 35%, var(--beam-mid-hi)); }
.beam__inner { height: 28.8px; filter: blur(18px); background: linear-gradient(90deg, var(--beam-inner-0), var(--beam-inner-lo) 35%, var(--beam-inner-hi)); }
.beam__core  { height: 4px; filter: blur(1.5px); background: linear-gradient(90deg, var(--beam-core-0), var(--beam-core-lo) 35%, var(--beam-core-hi)); }
.beam__core::after {
  /* світлова «іскра», що ковзає вздовж ядра */
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 160px; height: 8px;
  border-radius: 8px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), transparent);
  filter: blur(1px);
  animation: beam-spark 7s var(--ease-in-out) infinite;
  opacity: 0;
}
.beam--drift { animation: beam-drift 14s var(--ease-in-out) infinite alternate; }

/* Шум (зернистість) поверх темних секцій */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Горизонт планети та атмосфера (героїчні блоки, фінальний CTA, логін) */
.horizon {
  position: absolute;
  left: 50%;
  width: calc(100vw * 4000 / 1440);
  min-width: 1500px;
  transform: translateX(-50%);
  pointer-events: none;
}
.horizon img { width: 100%; height: auto; }
.atmosphere {
  position: absolute;
  left: 50%;
  width: calc(100vw * 4160 / 1440);
  min-width: 1560px;
  transform: translateX(-50%);
  pointer-events: none;
}
.atmosphere img { width: 100%; height: auto; }

/* 11. Анімації ---------------------------------------------------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes sheen {
  0%, 55% { transform: translateX(-60%); }
  100% { transform: translateX(60%); }
}
@keyframes beam-spark {
  0%, 20% { left: 0; opacity: 0; }
  30% { opacity: 1; }
  75% { opacity: 1; }
  90%, 100% { left: calc(100% - 160px); opacity: 0; }
}
@keyframes beam-drift {
  from { translate: 0 0; }
  to { translate: 40px -24px; }
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.85; scale: 1; }
  50% { opacity: 1; scale: 1.04; }
}
@keyframes float-y {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

/* Початковий стан для анімацій появи — лише коли JS працює */
.js [data-reveal],
.js [data-reveal-group] > * {
  opacity: 0;
  transform: translateY(28px);
}
.js [data-split] { opacity: 0; }
.js [data-reveal].is-visible,
.js [data-reveal-group].is-visible > * { opacity: 1; transform: none; }
.js.no-motion [data-reveal],
.js.no-motion [data-reveal-group] > *,
.js.no-motion [data-split] { opacity: 1; transform: none; }

/* Заголовки, розбиті на слова (main.js) */
.split-word { display: inline-block; will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal],
  .js [data-reveal-group] > *,
  .js [data-split] { opacity: 1; transform: none; }
}


/* Логотип партнера (logo_mark() в app/bootstrap.php): SVG як маска, колір — currentColor */
.logo-mark {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
          mask: var(--logo) center / contain no-repeat;
}

/* Банер згоди на cookies (templates/partials/cookie-consent.php) ------------------------------------------- */
.cookie {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 140;                       /* під попапом запису (150), над шапкою (100) */
  width: min(492px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-l);
  background: rgba(10, 11, 20, 0.92);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  color: var(--text-on-dark);
  animation: cookie-in 0.6s var(--ease-out);
}
.cookie[hidden] { display: none; }
@keyframes cookie-in { from { opacity: 0; transform: translateY(16px); } }
.cookie__title { font-size: 17px; line-height: 24px; font-weight: 500; }
.cookie__text { margin-top: 6px; color: var(--text-on-dark-2); font-size: 14px; line-height: 21px; }
.cookie__text a { color: var(--text-on-dark); text-decoration: underline; text-underline-offset: 3px; }
.cookie__prefs { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-on-dark); }
.cookie__prefs[hidden] { display: none; }
.cookie__opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.cookie__opt b { display: block; font-size: 14px; line-height: 20px; font-weight: 500; }
.cookie__opt small { display: block; margin-top: 2px; color: var(--text-on-dark-3); font-size: 12.5px; line-height: 18px; }
.cookie__opt input { position: absolute; opacity: 0; pointer-events: none; }
.cookie__opt i { position: relative; flex: none; width: 40px; height: 24px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.14); transition: background-color 0.25s; }
.cookie__opt i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.3s var(--ease-out); }
.cookie__opt input:checked + i { background: var(--button-primary-bg); }
.cookie__opt input:checked + i::after { transform: translateX(16px); }
.cookie__opt input:disabled + i { opacity: 0.45; }
.cookie__opt:has(input:disabled) { cursor: default; }
.cookie__opt input:focus-visible + i { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.cookie__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.cookie__actions .btn[hidden] { display: none; }
.cookie__link { padding: 0 6px; border: 0; background: none; color: var(--text-on-dark-2); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cookie__link:hover { color: var(--text-on-dark); }
.site-footer__cookies { padding: 0; border: 0; background: none; color: var(--text-on-dark-2); font: inherit; cursor: pointer; transition: color 0.3s; }
.site-footer__cookies:hover { color: var(--text-on-dark); }
@media (max-width: 600px) {
  .cookie { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; padding: 20px; }
  .cookie__actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .cookie { animation: none; } }
