/* ============================ Компоненты ============================ */

/* ---------- Логотип (маска → перекрашивается через currentColor) ---------- */
.logo-mark {
  display: block;
  aspect-ratio: var(--logo-ratio);
  background-color: currentColor;
  -webkit-mask: var(--logo-mask) center / contain no-repeat;
          mask: var(--logo-mask) center / contain no-repeat;
}

/* ---------- Кнопки ---------- */
.btn {
  --btn-bg: var(--fg);
  --btn-fg: var(--bg);
  --btn-h: 60px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  height: var(--btn-h);
  padding: 0 2em;
  border-radius: var(--pill);
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  color: var(--btn-fg);
  background: var(--btn-bg);
  isolation: isolate;
  overflow: hidden;
  transition: color .45s var(--ease-out), border-color .45s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}
.btn__fill {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  z-index: -1;
  width: 260%;
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  scale: 0;
  background: var(--grad-brand-live);
  background-size: 300% 100%;
  transition: scale .7s var(--ease-out);
  animation: grad-flow 3.2s linear infinite paused;
}
.btn__label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .6em;
  pointer-events: none;
}
.btn--primary:hover, .btn--primary:focus-visible { color: var(--c-black); }
.btn--primary:hover .btn__fill,
.btn--primary:focus-visible .btn__fill { scale: 1; animation-play-state: running; }

.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  border: 1px solid rgb(var(--fg-rgb) / .35);
}
.btn--secondary .btn__fill { background: var(--fg); animation: none; }
.btn--secondary:hover, .btn--secondary:focus-visible { color: var(--bg); border-color: var(--fg); }
.btn--secondary:hover .btn__fill, .btn--secondary:focus-visible .btn__fill { scale: 1; }

.btn--sm { --btn-h: 46px; padding: 0 1.5em; font-size: 14px; }
.btn--light { --btn-bg: var(--c-white); --btn-fg: var(--c-black); }
.btn--dark  { --btn-bg: var(--c-black); --btn-fg: var(--c-white); }

.btn[disabled] { cursor: progress; }
.btn .spinner { display: none; }
.btn.is-loading .btn__text { opacity: 0; }
.btn.is-loading .spinner { display: block; position: absolute; inset: 0; margin: auto; }

@keyframes grad-flow { to { background-position: 300% 0; } }

/* Ролл текста: дубль выезжает снизу (ссылки меню и кнопки) */
.roll {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: 1.25;
}
.roll__a, .roll__b {
  display: block;
  transition: transform .55s var(--ease-out);
}
.roll__b {
  position: absolute;
  inset: 0;
  transform: translateY(105%);
}
a:hover > .roll .roll__a, a:focus-visible > .roll .roll__a,
button:hover > .roll .roll__a,
.btn:hover .roll__a, .btn:focus-visible .roll__a { transform: translateY(-105%); }
a:hover > .roll .roll__b, a:focus-visible > .roll .roll__b,
button:hover > .roll .roll__b,
.btn:hover .roll__b, .btn:focus-visible .roll__b { transform: translateY(0); }

/* ---------- Стрелка-ссылка «→ Текст» ---------- */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
}
.arrow-link__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgb(var(--fg-rgb) / .3);
  overflow: hidden;
  isolation: isolate;
  transition: border-color .4s var(--ease-out), color .4s var(--ease-out);
}
.arrow-link__icon::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--grad-brand-live);
  background-size: 300% 100%;
  border-radius: inherit;
  scale: 0;
  transition: scale .5s var(--ease-out);
  animation: grad-flow 3s linear infinite;
}
.arrow-link__icon svg {
  width: 18px;
  height: 18px;
  transition: transform .5s var(--ease-out);
}
.arrow-link:hover .arrow-link__icon, .arrow-link:focus-visible .arrow-link__icon { border-color: transparent; color: var(--c-black); }
.arrow-link:hover .arrow-link__icon::before, .arrow-link:focus-visible .arrow-link__icon::before { scale: 1; }
.arrow-link:hover .arrow-link__icon svg, .arrow-link:focus-visible .arrow-link__icon svg { transform: translateX(4px); }

/* ---------- Чипсы ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--pill);
  border: 1px solid rgb(var(--fg-rgb) / .22);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: transform .5s var(--ease-out), background-color .3s, color .3s, border-color .3s;
}
.chip--solid { background: var(--c-black); color: var(--c-white); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Плейсхолдер фото ---------- */
.ph {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  background: var(--ph);
  overflow: hidden;
}
.ph__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding: 1em;
}
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ph);
}
.media > img, .media > video, .media > .ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media__inner { position: absolute; inset: -10% 0; }   /* запас под параллакс ±8–10 % */
.media__inner > img, .media__inner > .ph { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Заголовок секции ---------- */
.sec-head {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 28px;
  align-items: end;
  margin-bottom: clamp(48px, 7vw, 120px);
}
.sec-head__main { grid-column: 1 / span 8; display: grid; gap: clamp(18px, 2vw, 28px); }
.sec-head__aside { grid-column: 9 / span 4; }
@media (max-width: 1023px) {
  .sec-head__main, .sec-head__aside { grid-column: 1 / -1; }
}

/* Капли-декор у заголовков */
.drop {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.drop svg { width: 100%; height: auto; overflow: visible; }
.drop__float { animation: drop-float 9s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes drop-float {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33% { transform: translate(6%, -8%) rotate(8deg) scale(1.04); }
  66% { transform: translate(-5%, 4%) rotate(-6deg) scale(.97); }
}

/* ---------- Мягкие размытые пятна на фоне ---------- */
.glow {
  position: absolute;
  z-index: 0;
  width: 42vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  pointer-events: none;
  animation: glow-drift 22s ease-in-out infinite alternate;
}
.glow--t { background: radial-gradient(circle, var(--c-turquoise), transparent 65%); }
.glow--l { background: radial-gradient(circle, var(--c-lime), transparent 65%); animation-duration: 28s; }
@keyframes glow-drift {
  from { transform: translate(-6%, -4%) scale(1); }
  to   { transform: translate(8%, 6%) scale(1.15); }
}

/* ---------- Спиннер ---------- */
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Курсор-шарик ---------- */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: var(--z-cursor);
  pointer-events: none;
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor__ball {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  transition: width .45s var(--ease-out), height .45s var(--ease-out), margin .45s var(--ease-out), background-color .3s, opacity .3s;
  will-change: transform;
}
.cursor__ball::before {                /* градиентная «капля» */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--grad-brand-live);
  background-size: 300% 100%;
  opacity: 0;
  transition: opacity .3s;
  animation: grad-flow 2.4s linear infinite;
}
.cursor__label {
  position: relative;
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .3s, transform .45s var(--ease-out);
}
.cursor.is-hover { mix-blend-mode: multiply; }
.theme-dark .cursor.is-hover { mix-blend-mode: screen; }
.cursor.is-hover .cursor__ball { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
.cursor.is-hover .cursor__ball::before { opacity: 1; }

.cursor.is-view, .cursor.is-play { mix-blend-mode: normal; }
.cursor.is-view .cursor__ball, .cursor.is-play .cursor__ball { width: 104px; height: 104px; margin: -52px 0 0 -52px; }
.cursor.is-view .cursor__ball { background: var(--c-black); color: var(--c-white); }
.cursor.is-play .cursor__ball { background: transparent; color: var(--c-black); }
.cursor.is-play .cursor__ball::before { opacity: 1; }
.cursor.is-view .cursor__label, .cursor.is-play .cursor__label { opacity: 1; transform: scale(1); }
.cursor.is-hidden .cursor__ball { opacity: 0; }
.cursor.is-off { display: none; }

[data-cursor="view"], [data-cursor="play"] { cursor: none; }

/* ---------- Прелоадер ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: var(--z-preloader);
  display: grid;
  grid-template-rows: 1fr auto;
  padding: var(--gutter);
  color: var(--c-white);
  background: var(--c-black);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  will-change: transform;
}
.preloader__logo {
  align-self: center;
  justify-self: center;
  width: min(62vw, 420px);
}
.preloader__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.preloader__tag {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: rgb(255 255 255 / .55);
}
.preloader__count {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(64px, 12vw, 180px);
  line-height: .8;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.preloader__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--grad-brand);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.no-preloader .preloader { display: none; }

/* ---------- Модалка шоурила ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 64px);
  background: rgb(10 10 10 / .96);
  color: var(--c-white);
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s var(--ease-out), visibility 0s linear .45s;
}
.modal.is-open { opacity: 1; visibility: visible; transition: opacity .45s var(--ease-out); }
.modal__box {
  width: min(100%, 1600px);
  aspect-ratio: 16 / 9;
  max-height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #1A1A1A;
  transform: scale(.94);
  transition: transform .6s var(--ease-out);
}
.modal.is-open .modal__box { transform: none; }
.modal__box video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.modal__box .ph { height: 100%; background: #1A1A1A; }
.modal__box .ph__label { color: rgb(255 255 255 / .6); }
.modal__close {
  position: absolute;
  top: clamp(12px, 2vw, 28px);
  right: clamp(12px, 2vw, 28px);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--c-white);
  color: var(--c-black);
}
.modal__close svg { width: 22px; height: 22px; }

/* ---------- Иконки ---------- */
.icon { width: 1em; height: 1em; flex: none; }

/* Капли — всегда под текстом заголовка: при параллаксе они могут заехать под строки, но не закрывают их */
.sec-head > :not(.drop), .faq__head > :not(.drop), .privacy__inner { position: relative; z-index: 1; }
