/*
  Desktop motion for Сектор Икс.
  Loaded after club.css. Every rule is scoped to
  html[data-sx-profile="desktop"] so the mobile profile is unchanged.
  Accents are gold #B48E3D / #D4AF37 and graphite #2D2D2D.
  Laser lines stay gold, with a little #499F37. No crimson.
*/

/* The desktop hook owns the transition. Drop the shared fade on this
   profile so it cannot double up with the clip wipe. */
html[data-sx-profile="desktop"] .page.sx-enter {
    animation: none;
}

html[data-sx-profile="desktop"] .page.sx-leave {
    opacity: 1;
    transition: none;
}

/* In-section reveals. Delays are per element, from that element's
   own box — nothing is parked on a fixed column. */
html[data-sx-profile="desktop"] .page.sx-d-on .sx-d-reveal {
    animation-name: sx-desk-rise;
    animation-duration: 0.72s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: backwards;
    animation-delay: calc(var(--sx-i, 0) * 52ms + 180ms);
}

html[data-sx-profile="desktop"] .page.sx-d-on .sx-d-title {
    animation-name: sx-desk-title;
    animation-duration: 0.78s;
    animation-timing-function: cubic-bezier(0.76, 0, 0.18, 1);
}

html[data-sx-profile="desktop"] .page.sx-d-on .sx-d-shot {
    animation-name: sx-desk-shot;
    animation-duration: 0.7s;
    animation-timing-function: cubic-bezier(0.76, 0, 0.18, 1);
}

html[data-sx-profile="desktop"] .page.sx-d-on h2.section-subheading span::before {
    transform-origin: left center;
    animation: sx-desk-rule 0.55s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: calc(var(--sx-i, 0) * 52ms + 260ms);
}

@keyframes sx-desk-rise {
    from {
        opacity: 0;
        transform: translate3d(14px, 16px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes sx-desk-title {
    from {
        opacity: 0;
        clip-path: polygon(0 0, 0 0, -14% 100%, 0 100%);
    }
    to {
        opacity: 1;
        clip-path: polygon(0 0, 120% 0, 106% 100%, 0 100%);
    }
}

@keyframes sx-desk-shot {
    from {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    to {
        opacity: 1;
        clip-path: inset(0);
    }
}

@keyframes sx-desk-rule {
    from { transform: scaleX(0); }
    to { transform: none; }
}

/* Corner ticks on inner stages. Out of flow. */
html[data-sx-profile="desktop"] .lower-page .sx-stage {
    position: relative;
}

html[data-sx-profile="desktop"] .lower-page .sx-stage::before {
    content: "";
    position: absolute;
    inset: 58px 0 4px;
    pointer-events: none;
    opacity: 0.5;
    background:
        linear-gradient(#D4AF37, #D4AF37) left top / 14px 1px no-repeat,
        linear-gradient(#D4AF37, #D4AF37) left top / 1px 14px no-repeat,
        linear-gradient(#D4AF37, #D4AF37) right top / 14px 1px no-repeat,
        linear-gradient(#D4AF37, #D4AF37) right top / 1px 14px no-repeat,
        linear-gradient(#D4AF37, #D4AF37) left bottom / 14px 1px no-repeat,
        linear-gradient(#D4AF37, #D4AF37) left bottom / 1px 14px no-repeat,
        linear-gradient(#D4AF37, #D4AF37) right bottom / 14px 1px no-repeat,
        linear-gradient(#D4AF37, #D4AF37) right bottom / 1px 14px no-repeat;
}

html[data-sx-profile="desktop"] .page.sx-d-on .sx-stage::before {
    animation: sx-desk-hud 0.6s ease 0.08s backwards;
}

@keyframes sx-desk-hud {
    from { opacity: 0; }
    to { opacity: 0.5; }
}

/* Laser beam and crosshair live in a fixed, clipped layer. */
html[data-sx-profile="desktop"] .sx-d-layer {
    position: fixed;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    pointer-events: none;
}

html[data-sx-profile="desktop"] .sx-d-beam {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    transform-origin: center top;
    background: linear-gradient(to bottom,
        transparent 0%,
        #F3D77A 16%,
        #ffffff 38%,
        #D4AF37 58%,
        #B48E3D 78%,
        transparent 100%);
    box-shadow:
        0 0 8px 1px rgba(255, 255, 255, 0.85),
        0 0 16px 3px rgba(212, 175, 55, 0.75),
        0 0 22px 6px rgba(73, 159, 55, 0.22);
    opacity: 0;
    transform: translate3d(-20vw, 0, 0) skewX(-14deg);
}

html[data-sx-profile="desktop"] .sx-d-cross {
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    opacity: 0;
    background:
        linear-gradient(#D4AF37, #D4AF37) center top / 1px 12px no-repeat,
        linear-gradient(#D4AF37, #D4AF37) center bottom / 1px 12px no-repeat,
        linear-gradient(#D4AF37, #D4AF37) left center / 12px 1px no-repeat,
        linear-gradient(#D4AF37, #D4AF37) right center / 12px 1px no-repeat,
        radial-gradient(circle at center, #D4AF37 0 1.6px, transparent 2.2px);
}

html[data-sx-profile="desktop"] .sx-d-cross.is-on {
    opacity: 0.9;
}

html[data-sx-profile="desktop"] .sx-d-cross.is-hot {
    opacity: 1;
    background:
        linear-gradient(#D4AF37, #D4AF37) center top / 1px 13px no-repeat,
        linear-gradient(#D4AF37, #D4AF37) center bottom / 1px 13px no-repeat,
        linear-gradient(#D4AF37, #D4AF37) left center / 13px 1px no-repeat,
        linear-gradient(#D4AF37, #D4AF37) right center / 13px 1px no-repeat,
        radial-gradient(circle at center, #499F37 0 1.7px, transparent 2.3px);
}

/* Burger items. Opacity and a short slide live on an inner span so
   they add to each item's own transform (the shell may offset items
   along the skewed panel). No top/left column is set here.
   The index only staggers time, in source order. */
html[data-sx-profile="desktop"] #menu-mobile.activated ul li:nth-child(1) { --sx-i: 0; }
html[data-sx-profile="desktop"] #menu-mobile.activated ul li:nth-child(2) { --sx-i: 1; }
html[data-sx-profile="desktop"] #menu-mobile.activated ul li:nth-child(3) { --sx-i: 2; }
html[data-sx-profile="desktop"] #menu-mobile.activated ul li:nth-child(4) { --sx-i: 3; }
html[data-sx-profile="desktop"] #menu-mobile.activated ul li:nth-child(5) { --sx-i: 4; }
html[data-sx-profile="desktop"] #menu-mobile.activated ul li:nth-child(6) { --sx-i: 5; }
html[data-sx-profile="desktop"] #menu-mobile.activated ul li:nth-child(7) { --sx-i: 6; }
html[data-sx-profile="desktop"] #menu-mobile.activated ul li:nth-child(8) { --sx-i: 7; }

html[data-sx-profile="desktop"] #menu-mobile.activated a.menu-state,
html[data-sx-profile="desktop"] #menu-mobile.activated .credits > a {
    animation: sx-desk-menu-fade 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--sx-i, 0) * 70ms + 0.2s);
}

html[data-sx-profile="desktop"] #menu-mobile.activated .sx-d-mi {
    display: inline-block;
    animation: sx-desk-menu-slide 0.58s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--sx-i, 0) * 70ms + 0.2s);
}

@keyframes sx-desk-menu-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes sx-desk-menu-slide {
    from { transform: translate3d(18px, -8px, 0); }
    to { transform: none; }
}

html[data-sx-profile="desktop"] #menu-mobile a.menu-state:hover,
html[data-sx-profile="desktop"] #menu-mobile .credits a:hover {
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
}

/* Hovers. Transform stays on the element that does not carry the
   shell's menu skew. */
html[data-sx-profile="desktop"] .sx-card {
    position: relative;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-sx-profile="desktop"] .sx-card::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 42px;
    height: 1px;
    background: #B48E3D;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

html[data-sx-profile="desktop"] .sx-card:hover {
    transform: translate3d(7px, -2px, 0);
}

html[data-sx-profile="desktop"] .sx-card:hover::after {
    transform: scaleX(1);
}

html[data-sx-profile="desktop"] .sx-shots figure img {
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-sx-profile="desktop"] .sx-shots figure::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    transition: border-color 0.35s ease;
    pointer-events: none;
}

html[data-sx-profile="desktop"] .sx-shots figure:hover img {
    transform: scale(1.045);
}

html[data-sx-profile="desktop"] .sx-shots figure:hover::after {
    border-color: rgba(212, 175, 55, 0.9);
}

html[data-sx-profile="desktop"] .sx-link {
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-sx-profile="desktop"] .sx-link::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 38%;
    background: linear-gradient(90deg, transparent, rgba(243, 215, 122, 0.55), transparent);
    transform: translate3d(-130%, 0, 0) skewX(-14deg);
    pointer-events: none;
}

html[data-sx-profile="desktop"] .sx-link:hover {
    transform: translate3d(0, -2px, 0);
}

html[data-sx-profile="desktop"] .sx-link:hover::after {
    animation: sx-desk-scan 0.55s ease;
}

@keyframes sx-desk-scan {
    from { transform: translate3d(-130%, 0, 0) skewX(-14deg); }
    to { transform: translate3d(320%, 0, 0) skewX(-14deg); }
}

/* Home actions: the gold booking control and the phone control.
   Matched by role, not by their labels, so a slogan under the title
   and a second button do not depend on the current copy. */
html[data-sx-profile="desktop"] a.sx-d-action,
html[data-sx-profile="desktop"] button.sx-d-action {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, text-shadow 0.35s ease;
}

html[data-sx-profile="desktop"] a.sx-d-action:hover,
html[data-sx-profile="desktop"] button.sx-d-action:hover {
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 8px 20px rgba(45, 45, 45, 0.55), 0 0 16px rgba(180, 142, 61, 0.45);
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

html[data-sx-profile="desktop"] a.link-underline:hover {
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

html[data-sx-profile="desktop"] ul.social-icons a.vk-link:hover,
html[data-sx-profile="desktop"] ul.social-icons a.max-link:hover {
    color: #D4AF37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.45);
}

html[data-sx-profile="desktop"] .request-form input:focus-visible,
html[data-sx-profile="desktop"] .request-form textarea:focus-visible {
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35), 0 0 16px rgba(212, 175, 55, 0.28);
}

html[data-sx-profile="desktop"] .c-btn.fullwidth-liquid:hover {
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    html[data-sx-profile="desktop"] .page.sx-d-on .sx-d-reveal,
    html[data-sx-profile="desktop"] .page.sx-d-on .sx-d-title,
    html[data-sx-profile="desktop"] .page.sx-d-on .sx-d-shot,
    html[data-sx-profile="desktop"] .page.sx-d-on h2.section-subheading span::before,
    html[data-sx-profile="desktop"] .page.sx-d-on .sx-stage::before,
    html[data-sx-profile="desktop"] #menu-mobile.activated a.menu-state,
    html[data-sx-profile="desktop"] #menu-mobile.activated .credits > a,
    html[data-sx-profile="desktop"] #menu-mobile.activated .sx-d-mi,
    html[data-sx-profile="desktop"] .sx-link:hover::after {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
    }

    html[data-sx-profile="desktop"] .sx-d-beam,
    html[data-sx-profile="desktop"] .sx-d-cross {
        display: none !important;
    }
}

html[data-sx-reduced="true"][data-sx-profile="desktop"] .page.sx-d-on .sx-d-reveal,
html[data-sx-reduced="true"][data-sx-profile="desktop"] #menu-mobile.activated .sx-d-mi,
html[data-sx-reduced="true"][data-sx-profile="desktop"] #menu-mobile.activated a.menu-state,
html[data-sx-reduced="true"][data-sx-profile="desktop"] #menu-mobile.activated .credits > a {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}
