/* Эффекты 2026 для варианта 2. Всё работает только при .fx на <html>
   (ставится, если не включено «уменьшить движение»); без этого страница как раньше. */

/* 1. первый экран: фото раскрывается из круга, заголовок выезжает по словам */
@keyframes fx-iris { from { clip-path: circle(6% at 55% 42%); } to { clip-path: circle(150% at 55% 42%); } }
.fx .hero-media img { animation: fx-iris 1500ms cubic-bezier(0.77, 0, 0.175, 1) both; }
@supports (animation-timeline: view()) {
  .fx .hero-media img { animation: fx-iris 1500ms cubic-bezier(0.77, 0, 0.175, 1) both, hero-dim linear both; animation-timeline: auto, view(); animation-range: normal, exit 0% exit 100%; }
}
.fx #hero-title:not(.is-split) { visibility: hidden; }
.fx-w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0 0.16em; margin: -0.04em 0 -0.16em; }
.fx-w > span { display: inline-block; transform: translateY(115%); }
#hero-title .fx-w > span { animation: fx-up 950ms cubic-bezier(0.23, 1, 0.32, 1) both; animation-delay: calc(700ms + var(--i, 0) * 120ms); }
@keyframes fx-up { to { transform: none; } }

/* 2. полоска прогресса прокрутки под шапкой */
.fx-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--red); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; }
@supports (animation-timeline: scroll()) {
  .fx-progress { animation: fx-progress linear both; animation-timeline: scroll(root); }
  @keyframes fx-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
html:not(.fx) .fx-progress { display: none; }

/* 3. бегущая строка: ускоряется, наклоняется и разворачивается от прокрутки */
/* тонкая светлая лента с иконками услуг; края растворяются */
.fx-marquee { max-width: 1920px; margin: clamp(20px, 3vw, 40px) auto 0; overflow: hidden; background: var(--soft); color: var(--ink); padding: clamp(14px, 1.4vw, 20px) 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.mq-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.fx-marquee-track { display: flex; width: max-content; animation: fx-marquee 45s linear infinite; }
.fx-marquee-track span { display: inline-flex; align-items: center; gap: 12px; font-size: clamp(1rem, 0.92rem + 0.35vw, 1.25rem); font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; white-space: nowrap; padding-right: clamp(40px, 4.5vw, 72px); }
.fx-marquee-track svg { flex: none; width: 1.35em; height: 1.35em; fill: none; stroke: var(--red); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fx-marquee-skew { transform: skewX(var(--skew, 0deg)); transition: transform 500ms cubic-bezier(0.23, 1, 0.32, 1); }
@keyframes fx-marquee { to { transform: translateX(-50%); } }
html:not(.fx) .fx-marquee-track { animation: none; }

/* 4. крупные цифры, считают от нуля при появлении */
.fx-facts { padding-block: clamp(56px, 7vw, 104px) 0; }
.fx-facts-in { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.fx-fact b { display: block; font-size: clamp(3.25rem, 2rem + 4.5vw, 6.5rem); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; color: var(--red); font-variant-numeric: tabular-nums; }
.fx-fact span { display: block; margin-top: 12px; color: var(--ink-2); max-width: 22ch; }

/* 5. номера стопкой карточек: следующий наезжает, предыдущий уменьшается и темнеет.
   .fx-stack ставит fx.js, только если каждая карточка целиком помещается в окно */
@media (min-width: 1101px) {
  .fx .rooms.fx-stack .room { position: sticky; top: calc(var(--head-h) + 20px); background: #fff; border-radius: 14px; padding: 24px; margin-inline: -24px; transform-origin: 50% 0; transform: scale(calc(1 - var(--stack, 0) * 0.07)); filter: brightness(calc(1 - var(--stack, 0) * 0.3)); box-shadow: 0 -24px 48px -28px rgba(29, 36, 48, 0.35); } /* taste-skill-ignore: карточка парит над предыдущей */
}

/* 6. фото раскрываются «шторкой» при прокрутке */
@supports (animation-timeline: view()) {
  .fx .about-photo img, .fx .map-fig { animation: fx-curtain linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
  @keyframes fx-curtain { from { clip-path: inset(0 0 100% 0 round var(--r)); } to { clip-path: inset(0 0 0% 0 round var(--r)); } }
}

@media (hover: hover) and (pointer: fine) {
  /* 7. фото номера наклоняется за курсором */
  .fx .room-main { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--rs, 1)); transition: transform 500ms cubic-bezier(0.23, 1, 0.32, 1), opacity 260ms ease; }
  /* 8. магнитные кнопки */
  .fx .btn-red { transition: transform 350ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms ease; }
  .fx .map-fig { cursor: pointer; }
}

/* 9. курсор-кружок: над фото вырастает в подпись */
.fx-cursor { position: fixed; left: 0; top: 0; z-index: 60; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--red); color: #fff; pointer-events: none; display: grid; place-items: center; font-size: 0.8125rem; font-weight: 700; opacity: 0; transform: translate3d(var(--cx, -100px), var(--cy, -100px), 0); transition: width 260ms cubic-bezier(0.23, 1, 0.32, 1), height 260ms cubic-bezier(0.23, 1, 0.32, 1), margin 260ms cubic-bezier(0.23, 1, 0.32, 1), opacity 200ms ease; }
.fx-cursor span { opacity: 0; transition: opacity 160ms ease; white-space: nowrap; }
.fx-cursor.is-on { opacity: 1; }
.fx-cursor.is-big { width: 92px; height: 92px; margin: -46px 0 0 -46px; }
.fx-cursor.is-big span { opacity: 1; }
.fx-cursor.is-on.is-ctl { opacity: 0; }
@media not ((hover: hover) and (pointer: fine)) { .fx-cursor { display: none; } }
dialog[open] ~ .fx-cursor { display: none; }

/* 10. «прожектор» за курсором в блоке услуг */
.fx .services { background-image: radial-gradient(560px circle at var(--mx, -999px) var(--my, -999px), rgba(163, 35, 42, 0.14), transparent 60%); } /* taste-skill-ignore: подсветка за курсором */

/* 11. иконки услуг прорисовываются линией */
.fx .svc svg :is(path, circle, rect) { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1400ms cubic-bezier(0.77, 0, 0.175, 1); transition-delay: var(--d, 0ms); }
.fx .svc li.is-drawn svg :is(path, circle, rect) { stroke-dashoffset: 0; }

/* 12. заголовки разделов выезжают по словам */
.fx h2.is-split .fx-w > span { transition: transform 900ms cubic-bezier(0.23, 1, 0.32, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.fx h2.is-split.is-in .fx-w > span { transform: none; }

/* ---------- телефон и планшет (палец вместо мыши) ---------- */
@media (pointer: coarse) {
  /* 14. фото номера наклоняется вслед за наклоном телефона (гироскоп; класс ставит fx.js) */
  .fx.fx-gyro .room-main { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 160ms linear, opacity 260ms ease; }
  /* 15. кнопка проседает под пальцем, отпустили — пружинит (fx.js) */
  .fx .btn:active { transform: scale(0.94); }
  /* 19. фото ждут загрузки прозрачными и проявляются из размытия (fx.js) */
  .fx img.is-loading { opacity: 0; }
  /* 20. кнопка звонка в панели брони мягко пульсирует кольцом */
  .fx .mbar-call::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(163, 35, 42, 0.45); animation: fx-ring 2.6s ease-out infinite; } /* taste-skill-ignore: кольцо звонка */
  @keyframes fx-ring { 0% { box-shadow: 0 0 0 0 rgba(163, 35, 42, 0.45); } 70%, 100% { box-shadow: 0 0 0 12px rgba(163, 35, 42, 0); } }
  @supports (animation-timeline: view()) {
    /* 16. услуга в середине экрана подсвечивается, её иконка становится красной */
    .fx .svc li { padding: 12px; margin: -12px; border-radius: 14px; animation: rv-in linear both, fx-lit linear both; animation-timeline: view(), view(); animation-range: entry 0% entry 85%, cover 0% cover 100%; }
    .fx .svc li svg { animation: fx-lit-ico linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    /* горит только та услуга, что сейчас в середине экрана */
    @keyframes fx-lit { 0%, 40% { background-color: rgba(247, 233, 234, 0); } 46%, 56% { background-color: var(--red-soft); } 62%, 100% { background-color: rgba(247, 233, 234, 0); } }
    @keyframes fx-lit-ico { 0%, 41% { background-color: var(--red-soft); stroke: var(--red); } 46%, 56% { background-color: var(--red); stroke: #fff; } 61%, 100% { background-color: var(--red-soft); stroke: var(--red); } }
  }
  /* 17. на фото галереи, которое пересекает середину экрана, появляется «Смотреть» (класс ставит fx.js) */
  .fx .shot { position: relative; }
  .fx .shot::after {
    content: "Смотреть"; position: absolute; left: 50%; top: 50%; padding: 7px 14px; border-radius: 999px;
    background: rgba(163, 35, 42, 0.94); color: #fff; font-size: 0.8125rem; font-weight: 700; white-space: nowrap; pointer-events: none;
    opacity: 0; transform: translate(-50%, -50%) scale(0.85); transition: opacity 220ms ease, transform 280ms cubic-bezier(0.23, 1, 0.32, 1);
  }
  .fx .shot.is-center::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 13. фото из галереи «вылетает» в окно просмотра */
::view-transition-group(photo-zoom) { animation-duration: 600ms; animation-timing-function: cubic-bezier(0.77, 0, 0.175, 1); }

@media (max-width: 1100px) { .fx-facts-in { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; } }
@media (max-width: 420px) { .fx-fact b { font-size: 3rem; } }
