/*
 * CX Interiors shared visual system
 * Loaded last by index.html, products.html and gallery.html.
 * Global design changes belong here so the three active pages stay aligned.
 */

:root {
    --cx-bg: #030405;
    --cx-surface: rgba(5, 7, 9, 0.58);
    --cx-surface-strong: rgba(5, 7, 9, 0.82);
    --cx-line: rgba(235, 242, 250, 0.12);
    --cx-line-bright: rgba(235, 242, 250, 0.2);
    --cx-text: rgba(248, 251, 255, 0.95);
    --cx-muted: rgba(207, 218, 230, 0.66);
    --cx-gold: #ffb700;
    --cx-ice: #9ed8ff;
    --cx-font: "Manrope", system-ui, sans-serif;
    --cx-display: "Space Grotesk", "Manrope", system-ui, sans-serif;
    --cx-mono: "JetBrains Mono", ui-monospace, monospace;
    --cx-radius: clamp(20px, 2vw, 32px);
    --cx-page-pad: clamp(24px, 4vw, 62px);
    --ease-premium: cubic-bezier(0.19, 1, 0.22, 1);
}

@view-transition {
    navigation: auto;
}

::view-transition-group(root) {
    animation-duration: 220ms;
    animation-timing-function: var(--ease-premium);
}

::view-transition-old(root) {
    animation: cx-route-out 120ms ease-out both;
}

::view-transition-new(root) {
    animation: cx-route-in 220ms var(--ease-premium) both;
}

@keyframes cx-route-out {
    to {
        opacity: 0;
    }
}

@keyframes cx-route-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

html[lang="en"] .cx-contact-fab::after {
    content: " Call";
}

* {
    box-sizing: border-box;
}

html {
    background: var(--cx-bg);
}

body.cx-page {
    margin: 0;
    background:
        radial-gradient(circle at 78% 18%, rgba(255, 183, 0, 0.07), transparent 34rem),
        radial-gradient(circle at 18% 70%, rgba(158, 216, 255, 0.045), transparent 30rem),
        var(--cx-bg);
    color: var(--cx-text);
    font-family: var(--cx-font);
    text-rendering: geometricPrecision;
}

body.cx-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    opacity: 0.055;
    background-image:
        repeating-radial-gradient(circle at 17% 33%, rgba(255,255,255,0.34) 0 0.45px, transparent 0.8px 3px),
        repeating-linear-gradient(117deg, transparent 0 7px, rgba(255,255,255,0.08) 8px, transparent 9px 15px);
    background-size: 7px 7px, 19px 19px;
    mix-blend-mode: soft-light;
}

body.cx-page a {
    color: inherit;
    text-decoration: none;
}

body.cx-page button {
    font: inherit;
}

html[data-cx-session="returning"] .cx-ai.is-intro {
    opacity: 0;
    visibility: hidden;
}

/* Shared header */
.cx-page .cx-topbar {
    position: fixed;
    z-index: 100;
    top: clamp(22px, 3.5vh, 38px);
    left: var(--cx-page-pad);
    right: var(--cx-page-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: visible;
    pointer-events: none;
}

.cx-page .cx-brand,
.cx-page .cx-actions {
    display: flex;
    align-items: center;
    pointer-events: auto;
}

.cx-page .cx-brand {
    gap: 14px;
}

.cx-page .cx-logo {
    position: relative;
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    transform: rotate(45deg);
    overflow: visible;
    border: 1px solid rgba(255, 183, 0, 0.74);
    border-radius: 2px;
    background: rgba(5, 6, 8, 0.72);
    color: #f7fbff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 0 24px rgba(255,183,0,0.18);
}

.cx-page .cx-logo::after {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(255,255,255,0.16);
}

.cx-page .cx-logo > span {
    display: block;
    transform: rotate(-45deg);
    font: 800 0.78rem/1 var(--cx-display);
    letter-spacing: 0.03em;
}

.cx-page .cx-logo b,
.cx-page .cx-brand-name b {
    color: var(--cx-gold);
}

.cx-page .cx-brand-name {
    display: grid;
    gap: 4px;
}

.cx-page .cx-brand-name strong {
    color: var(--cx-text);
    font: 750 0.9rem/1 var(--cx-display);
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.cx-page .cx-brand-name small {
    max-width: 340px;
    overflow: hidden;
    color: rgba(207,218,230,0.58);
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cx-page .cx-actions {
    gap: 0.25rem;
    height: 50px;
    padding: 0.35rem 0.45rem;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 999px;
    background: rgba(5,7,9,0.56);
    backdrop-filter: blur(28px) saturate(1.1);
    box-shadow: 0 18px 48px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.04);
}

.cx-page .cx-link,
.cx-page .cx-sound {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(240,245,250,0.62);
    cursor: pointer;
    padding: 0 13px;
    font: 750 0.66rem/1 var(--cx-font);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 320ms var(--ease-premium), background 320ms var(--ease-premium);
}

.cx-page .cx-link:hover,
.cx-page .cx-link[aria-current="page"],
.cx-page .cx-sound:hover {
    background: rgba(255,183,0,0.075);
    color: var(--cx-text);
}

.cx-page .cx-link[aria-current="page"]::after {
    content: "";
    position: absolute;
    right: 13px;
    bottom: 4px;
    left: 13px;
    height: 1px;
    background: var(--cx-gold);
    box-shadow: 0 0 10px rgba(255,183,0,0.48);
}

.cx-page .cx-sound {
    width: 38px;
    flex: 0 0 38px;
    padding: 0;
    border: 1px solid rgba(255,183,0,0.2);
    background: rgba(255,183,0,0.045);
    color: var(--cx-gold);
    font-size: 0;
    letter-spacing: 0;
}

.cx-page .cx-sound-icon {
    display: block !important;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.cx-page .cx-sound.is-muted .cx-sound-wave,
.cx-page .cx-sound:not(.is-muted) .cx-sound-mute {
    display: none;
}

.cx-page .cx-contact-fab {
    position: fixed;
    z-index: 110;
    right: clamp(22px, 3vw, 44px);
    bottom: 49px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid rgba(255,183,0,0.22);
    border-radius: 999px;
    background: rgba(4,6,8,0.62);
    color: rgba(255,255,255,0.82);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 48px rgba(0,0,0,0.36), inset 0 1px 0 rgba(255,255,255,0.05);
    font: 650 0.64rem/1 var(--cx-mono);
    letter-spacing: 0.08em;
    transition: transform 240ms var(--ease-premium), border-color 240ms, color 240ms;
}

.cx-page .cx-contact-fab::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cx-gold);
    box-shadow: 0 0 14px rgba(255,183,0,0.72);
}

.cx-page .cx-contact-fab:hover {
    transform: translateY(-2px);
    border-color: rgba(255,183,0,0.5);
    color: var(--cx-gold);
}

/* Fullscreen experience shared by Home and Products */
.cx-page--experience .cx-experience {
    --cx-cinema-inset: clamp(22rem, 34vw, 39rem);
    background:
        radial-gradient(circle at 72% 36%, color-mix(in srgb, var(--stage-accent, var(--cx-gold)) 10%, transparent), transparent 34rem),
        #030405;
}

.cx-page--experience .cx-experience::before {
    opacity: 0.1;
    background-size: 92px 92px;
    mask-image: linear-gradient(90deg, black, transparent 76%);
}

.cx-page--experience .cx-experience::after {
    display: none;
}

.cx-page--experience #stars-canvas {
    z-index: 8;
    opacity: 0.4;
    filter: saturate(0.78) brightness(1.12);
    mix-blend-mode: screen;
}

.cx-page--experience #cx-experience-canvas {
    opacity: 0.12;
    mix-blend-mode: screen;
}

.cx-page--experience .cx-orbital-field,
.cx-page--experience .cx-smart-orb,
.cx-page--experience .cx-hero-art,
.cx-page--experience .cx-aura,
.cx-page--experience .cx-scan,
.cx-page--experience .cx-transition-fog {
    display: none !important;
}

.cx-page--experience .cx-cinematic-light,
.cx-page--experience .cx-cinematic-wipe {
    position: fixed;
    pointer-events: none;
}

.cx-page--experience .cx-cinematic-light {
    z-index: 8;
    left: 61%;
    top: 42%;
    width: min(46vw, 700px);
    height: min(46vw, 700px);
    border-radius: 50%;
    transform: translate(-50%, -50%) translate3d(calc(var(--mx, 0) * 42px), calc(var(--my, 0) * 30px), 0);
    background: radial-gradient(circle, color-mix(in srgb, var(--stage-accent, var(--cx-gold)) 17%, transparent), transparent 67%);
    filter: blur(22px);
    mix-blend-mode: screen;
    opacity: 0.58;
}

.cx-page--experience .cx-cinematic-grain {
    display: none;
}

.cx-page--experience .cx-cinematic-wipe {
    inset: 0;
    z-index: 12;
    opacity: 0;
    transform: translateX(-105%) skewX(-10deg);
    background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.03) 42%, color-mix(in srgb, var(--stage-accent, var(--cx-gold)) 22%, transparent) 50%, rgba(255,255,255,0.04) 58%, transparent 80%);
    filter: blur(18px);
}

.cx-page--experience .cx-experience.is-transitioning .cx-cinematic-wipe {
    animation: cx-system-wipe 1050ms var(--ease-premium);
}

@keyframes cx-system-wipe {
    0% { opacity: 0; transform: translateX(-105%) skewX(-10deg); }
    22% { opacity: 0.78; }
    72% { opacity: 0.36; }
    100% { opacity: 0; transform: translateX(105%) skewX(-10deg); }
}

.cx-page--experience .cx-media-stack {
    position: fixed;
    inset: clamp(20px, 2.5vh, 34px) clamp(18px, 2.4vw, 42px);
    z-index: 5;
    overflow: hidden;
    opacity: 1;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--cx-radius);
    background: rgba(255,255,255,0.018);
    box-shadow: 0 42px 110px rgba(0,0,0,0.48), inset 0 1px 0 rgba(255,255,255,0.04);
}

.cx-page--experience .cx-media-stack::before {
    display: none;
}

.cx-page--experience .cx-media-stack::after {
    content: "";
    position: absolute;
    z-index: 5;
    top: 0;
    bottom: 0;
    left: calc(var(--cx-cinema-inset) - clamp(18px, 2.4vw, 42px));
    width: 1px;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 7%, rgba(255,255,255,0.16) 32%, color-mix(in srgb, var(--stage-accent, var(--cx-gold)) 65%, white) 50%, rgba(255,255,255,0.1) 72%, transparent 93%);
    box-shadow: 0 0 20px color-mix(in srgb, var(--stage-accent, var(--cx-gold)) 24%, transparent);
    opacity: 0.62;
}

.cx-page--experience .cx-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    transform: scale(1.055);
    filter: saturate(0.8) contrast(1.08) brightness(0.76);
    transition: opacity 1000ms var(--ease-premium), transform 6s var(--ease-premium), filter 1200ms var(--ease-premium);
}

.cx-page--experience .cx-media.is-visible[data-media-type="image"],
.cx-page--experience .cx-media.is-visible[data-media-type="video"] {
    opacity: 0.98;
    transform: scale(1);
    filter: saturate(0.88) contrast(1.05) brightness(0.84);
}

.cx-page--experience .cx-media::after {
    content: "";
    position: absolute;
    inset: 0;
    display: block;
    z-index: 3;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(2,3,4,0.82) 0%, rgba(2,3,4,0.62) 26%, rgba(2,3,4,0.24) 43%, transparent 64%),
        linear-gradient(180deg, rgba(2,3,4,0.25) 0%, transparent 22%, transparent 74%, rgba(2,3,4,0.34) 100%);
}

.cx-page--experience .cx-media img,
.cx-page--experience .cx-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 1;
    animation: cx-system-drift 24s ease-in-out infinite alternate;
    will-change: transform;
}

.cx-page--experience .cx-media .cx-media-primary {
    z-index: 2;
}

.cx-page--experience .cx-media .cx-media-backdrop {
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

.cx-page--experience .cx-media.is-portrait .cx-media-backdrop {
    inset: -34px;
    width: calc(100% + 68px);
    height: calc(100% + 68px);
    display: block;
    opacity: 0.88;
    visibility: visible;
    object-fit: cover;
    object-position: center;
    filter: blur(14px) saturate(0.94) brightness(0.7);
    animation: cx-system-backdrop-drift 22s ease-in-out infinite alternate;
}

.cx-page--experience .cx-media.is-portrait .cx-media-primary {
    inset: 0 auto 0 69%;
    width: auto;
    max-width: 100%;
    height: 100%;
    aspect-ratio: var(--media-ratio, 0.5625);
    object-fit: cover;
    object-position: center;
    translate: -50% 0;
    filter: drop-shadow(0 26px 58px rgba(0,0,0,0.42));
    animation: cx-system-portrait-drift 20s ease-in-out infinite alternate;
}

@keyframes cx-system-drift {
    0% {
        transform: scale(1.025) translate3d(calc(-0.45% - var(--mx, 0) * 7px), calc(-0.3% - var(--my, 0) * 5px), 0);
    }
    100% {
        transform: scale(1.065) translate3d(calc(0.7% - var(--mx, 0) * 11px), calc(0.45% - var(--my, 0) * 8px), 0);
    }
}

@keyframes cx-system-portrait-drift {
    0% {
        transform: scale(0.965) translate3d(calc(var(--mx, 0) * -8px), calc(var(--my, 0) * -5px), 0);
    }
    100% {
        transform: scale(1.01) translate3d(calc(var(--mx, 0) * -13px), calc(var(--my, 0) * -9px), 0);
    }
}

@keyframes cx-system-backdrop-drift {
    0% {
        transform: scale(1.16) translate3d(calc(-0.7% - var(--mx, 0) * 14px), calc(-0.4% - var(--my, 0) * 9px), 0);
    }
    100% {
        transform: scale(1.24) translate3d(calc(0.8% - var(--mx, 0) * 21px), calc(0.6% - var(--my, 0) * 14px), 0);
    }
}

.cx-page--experience .cx-shell {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(0, 680px) minmax(210px, 250px);
    align-items: center;
    justify-content: space-between;
    gap: clamp(40px, 6vw, 80px);
    min-height: 100vh;
    padding: clamp(118px,15vh,160px) var(--cx-page-pad) clamp(82px,9vh,112px);
    pointer-events: none;
}

.cx-page--experience .cx-main-copy {
    position: relative;
    z-index: 31;
    width: min(620px, 100%);
    pointer-events: auto;
}

.cx-page--experience .cx-scene-deck {
    position: relative;
    width: min(610px, 100%);
    min-height: clamp(360px, 49vh, 500px);
}

.cx-page--experience .cx-scene-copy {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    gap: 18px;
    opacity: 0;
    transform: translateY(34px);
    filter: blur(10px);
    pointer-events: none;
    transition: opacity 620ms var(--ease-premium), transform 850ms var(--ease-premium), filter 700ms var(--ease-premium);
}

.cx-page--experience .cx-scene-copy.is-reverse {
    transform: translateY(-34px);
}

.cx-page--experience .cx-scene-copy.is-visible,
.cx-page--experience .cx-scene-copy.is-active {
    z-index: 1;
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    pointer-events: auto;
}

.cx-page--experience .cx-kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    color: color-mix(in srgb, var(--stage-accent, var(--cx-gold)) 82%, white);
    font: 600 0.66rem/1 var(--cx-mono);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.cx-page--experience .cx-kicker::before {
    content: "";
    width: 30px;
    height: 1px;
    background: currentColor;
    box-shadow: 0 0 12px currentColor;
}

.cx-page--experience .cx-title {
    max-width: 610px;
    margin: 0;
    color: var(--cx-text);
    font-family: var(--cx-display);
    font-size: clamp(3rem, 5vw, 5.5rem);
    font-weight: 650;
    line-height: 0.96;
    letter-spacing: -0.067em;
    text-align: left;
    text-shadow: 0 22px 55px rgba(0,0,0,0.42);
    text-transform: uppercase;
}

.cx-page--experience .cx-title > span {
    display: block;
}

.cx-page--experience .cx-scene-deck.is-shifting .cx-title,
.cx-page--experience .cx-scene-deck.is-shifting .cx-title .is-outline,
.cx-page--experience .cx-scene-deck.is-shifting .cx-title .is-accent {
    --ca-str: 0px;
}

.cx-page--experience .cx-title .is-outline {
    color: rgba(246,249,252,0.08);
    -webkit-text-stroke: 1px rgba(246,249,252,0.64);
    text-shadow: 0 18px 42px rgba(0,0,0,0.32);
}

.cx-page--experience .cx-title .is-accent {
    color: var(--stage-accent, var(--cx-gold));
    filter: none;
    text-shadow: 0 0 30px color-mix(in srgb, var(--stage-accent, var(--cx-gold)) 18%, transparent);
}

.cx-page--experience .cx-body {
    max-width: 530px;
    margin: 0;
    color: rgba(225,232,240,0.72);
    font-size: clamp(0.92rem, 1vw, 1.02rem);
    line-height: 1.72;
}

.cx-page--experience .cx-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.cx-page--experience .cx-stage-chip {
    padding: 6px 11px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    background: rgba(4,6,8,0.28);
    color: rgba(230,236,243,0.58);
    font: 500 0.62rem/1 var(--cx-mono);
    letter-spacing: 0.04em;
}

.cx-page--experience .cx-stage-chip.is-active {
    border-color: color-mix(in srgb, var(--stage-accent, var(--cx-gold)) 48%, transparent);
    background: color-mix(in srgb, var(--stage-accent, var(--cx-gold)) 8%, rgba(4,6,8,0.42));
    color: color-mix(in srgb, var(--stage-accent, var(--cx-gold)) 82%, white);
    box-shadow: none;
}

.cx-page--experience .cx-stage-chip.cx-app-chip {
    border-color: rgba(255,183,0,0.7);
    background: rgba(255,183,0,0.17);
    color: #ffe3a0;
    font-weight: 750;
    letter-spacing: 0.01em;
    box-shadow: 0 0 20px rgba(255,183,0,0.17);
}

.cx-page--experience .cx-stage-chip.cx-app-chip:hover,
.cx-page--experience .cx-stage-chip.cx-app-chip:focus-visible {
    border-color: var(--cx-gold);
    background: rgba(255,183,0,0.28);
    color: #fff;
}

.cx-page--experience .cx-enter-row {
    display: flex;
    gap: 10px;
    margin-top: 26px;
}

.cx-page--experience .cx-primary,
.cx-page--experience .cx-secondary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.17);
    border-radius: 999px;
    background: rgba(4,6,8,0.48);
    color: var(--cx-text);
    font-size: 0.76rem;
    font-weight: 650;
    backdrop-filter: blur(16px);
    transition: transform 300ms var(--ease-premium), border-color 300ms, background 300ms;
}

.cx-page--experience .cx-primary {
    border-color: color-mix(in srgb, var(--stage-accent, var(--cx-gold)) 34%, transparent);
}

.cx-page--experience .cx-primary i {
    width: 7px;
    height: 7px;
    background: var(--stage-accent, var(--cx-gold));
    box-shadow: 0 0 16px var(--stage-accent, var(--cx-gold));
}

.cx-page--experience .cx-secondary::after {
    content: "→";
    color: var(--stage-accent, var(--cx-gold));
}

.cx-page--experience .cx-primary:hover,
.cx-page--experience .cx-secondary:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--stage-accent, var(--cx-gold)) 52%, transparent);
    background: color-mix(in srgb, var(--stage-accent, var(--cx-gold)) 9%, rgba(4,6,8,0.5));
}

.cx-page--experience .cx-side {
    position: relative;
    z-index: 32;
    align-self: center;
    justify-self: end;
    display: grid !important;
    width: min(238px, 100%);
    gap: 0;
    padding: 14px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    background: rgba(4,6,8,0.58);
    backdrop-filter: blur(22px) saturate(1.08);
    box-shadow: 0 26px 70px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.04);
    pointer-events: auto;
}

.cx-page--experience .cx-card {
    position: relative;
    display: grid;
    grid-template-columns: 26px 1fr;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 8px 12px 14px;
    border: 0;
    border-left: 1px solid rgba(255,255,255,0.08);
    background: transparent;
    color: rgba(190,204,218,0.48);
    cursor: pointer;
    text-align: left;
    transition: color 350ms var(--ease-premium), transform 350ms var(--ease-premium), border-color 350ms;
}

.cx-page--experience .cx-card:hover,
.cx-page--experience .cx-card.is-active {
    transform: translateX(-2px);
    border-left-color: var(--stage-accent, var(--cx-gold));
    color: var(--cx-text);
}

.cx-page--experience .cx-card::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 12px;
    width: 1px;
    height: calc(100% - 24px);
    opacity: 0;
    background: var(--stage-accent, var(--cx-gold));
    box-shadow: 0 0 14px var(--stage-accent, var(--cx-gold));
}

.cx-page--experience .cx-card.is-active::before {
    opacity: 1;
}

.cx-page--experience .cx-card small {
    color: rgba(190,204,218,0.4);
    font: 500 0.58rem/1 var(--cx-mono);
}

.cx-page--experience .cx-card.is-active small {
    color: var(--stage-accent, var(--cx-gold));
}

.cx-page--experience .cx-card strong {
    display: block;
    margin: 0;
    font: 560 0.86rem/1.2 var(--cx-display);
}

.cx-page--experience .cx-stage-counter {
    position: fixed;
    z-index: 34;
    right: var(--cx-page-pad);
    bottom: 31px;
    left: var(--cx-page-pad);
    display: grid;
    grid-template-columns: auto minmax(120px, 1fr) auto;
    align-items: center;
    gap: 18px;
    color: rgba(215,230,246,0.55);
    font: 500 0.6rem/1 var(--cx-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    pointer-events: none;
}

.cx-page--experience .cx-progress {
    height: 1px;
    overflow: hidden;
    background: rgba(215,230,246,0.13);
}

.cx-page--experience .cx-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--cx-ice), var(--stage-accent, var(--cx-gold)));
}

/* Gallery — same shell, adapted for a scrolling archive */
.cx-page--gallery {
    min-height: 100%;
    overflow-x: hidden;
}

.cx-page--gallery #stars-canvas {
    position: fixed;
    inset: 0;
    z-index: 11;
    width: 100%;
    height: 100%;
    opacity: 0.28;
    filter: saturate(0.72) brightness(1.08);
    mix-blend-mode: screen;
    pointer-events: none;
}

.cx-page--gallery .cx-aura {
    display: none;
}

.cx-page--gallery .cx-gallery-shell {
    position: relative;
    z-index: 10;
    width: min(1480px, 100%);
    max-width: none;
    margin: 0 auto;
    padding: clamp(112px,14vh,150px) var(--cx-page-pad) 5rem;
}

.cx-page--gallery .cx-gallery-hero {
    position: relative;
    display: flex;
    min-height: min(720px, 76vh);
    margin: 0 0 3.5rem;
    padding: clamp(32px, 6vw, 82px);
    overflow: hidden;
    align-items: flex-end;
    justify-content: flex-start;
    border: 1px solid rgba(255,255,255,0.11);
    border-radius: var(--cx-radius);
    background:
        linear-gradient(90deg, rgba(2,3,4,0.86) 0%, rgba(2,3,4,0.48) 42%, rgba(2,3,4,0.05) 72%),
        linear-gradient(180deg, rgba(2,3,4,0.1), rgba(2,3,4,0.64)),
        url("../assets/cinematic/interiors-01.webp") center 52% / cover no-repeat;
    box-shadow: 0 42px 110px rgba(0,0,0,0.46), inset 0 1px 0 rgba(255,255,255,0.04);
    text-align: left;
}

.cx-page--gallery .cx-gallery-hero::after {
    content: "SELECTED INTERIORS / 2026";
    position: absolute;
    right: 28px;
    bottom: 24px;
    color: rgba(255,255,255,0.44);
    font: 500 0.55rem/1 var(--cx-mono);
    letter-spacing: 0.18em;
}

.cx-page--gallery .cx-gallery-badge {
    position: absolute;
    top: clamp(32px,5vw,68px);
    left: clamp(32px,6vw,82px);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--cx-gold);
    font: 600 0.66rem/1 var(--cx-mono);
    letter-spacing: 0.18em;
}

.cx-page--gallery .cx-gallery-badge::before {
    width: 30px;
    height: 1px;
    border-radius: 0;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
}

.cx-page--gallery .cx-gallery-title {
    max-width: 820px;
    margin: 0;
    font-family: var(--cx-display);
    font-size: clamp(3.2rem, 6.8vw, 7rem);
    font-weight: 650;
    line-height: 0.91;
    letter-spacing: -0.075em;
    text-align: left;
    text-shadow: 0 28px 60px rgba(0,0,0,0.42);
}

.cx-page--gallery .cx-gallery-title .is-outline {
    color: rgba(246,249,252,0.08);
    -webkit-text-stroke: 1px rgba(246,249,252,0.7);
}

.cx-page--gallery .cx-gallery-title .is-gold {
    color: var(--cx-gold);
    text-shadow: 0 0 30px rgba(255,183,0,0.16);
}

.cx-page--gallery .cx-gallery-divider {
    display: none;
}

.cx-page--gallery .cx-gallery-filters {
    top: 22px;
    z-index: 30;
    margin: 0 auto 1rem;
    padding: 6px;
    border-color: rgba(255,255,255,0.11);
    background: rgba(5,7,9,0.72);
    backdrop-filter: blur(24px);
}

.cx-page--gallery .cx-gallery-filter {
    min-height: 38px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 0.64rem;
}

.cx-page--gallery .cx-gallery-filter.is-active {
    border-color: rgba(255,183,0,0.42);
    background: rgba(255,183,0,0.075);
    box-shadow: none;
}

.cx-page--gallery .cx-gallery-count {
    margin-bottom: 2.5rem;
    color: rgba(255,183,0,0.56);
}

.cx-page--gallery .cx-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 1.25vw, 20px);
}

.cx-page--gallery .cx-gallery-card {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: #080a0d;
    box-shadow: 0 22px 56px rgba(0,0,0,0.2);
}

.cx-page--gallery .cx-gallery-card:nth-child(6n + 1),
.cx-page--gallery .cx-gallery-card:nth-child(6n + 5) {
    aspect-ratio: 4 / 5;
}

.cx-page--gallery .cx-gallery-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,183,0,0.25);
    box-shadow: 0 28px 72px rgba(0,0,0,0.38);
}

.cx-page--gallery .cx-gallery-card img {
    width: 100%;
    height: 100%;
    transform: scale(1.025);
    filter: saturate(0.88) contrast(1.03);
}

.cx-page--gallery .cx-gallery-card:hover img {
    transform: scale(1.08);
}

.cx-page--gallery .cx-gallery-card-overlay {
    padding: clamp(18px, 2vw, 28px);
    background: linear-gradient(to top, rgba(2,3,5,0.92), rgba(2,3,5,0.18) 48%, transparent 76%);
}

.cx-page--gallery .cx-gallery-card-chip {
    border-radius: 999px;
    background: rgba(5,7,9,0.56);
}

.cx-page--gallery .cx-gallery-footer {
    width: min(1480px, calc(100% - var(--cx-page-pad) * 2));
    max-width: none;
    margin-inline: auto;
    border-top-color: rgba(255,255,255,0.1);
}

.cx-page--gallery .cx-lightbox {
    background: rgba(2,3,5,0.88);
    backdrop-filter: blur(30px) saturate(0.9);
}

.cx-page--gallery .cx-lightbox-frame {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--cx-radius);
    box-shadow: 0 42px 120px rgba(0,0,0,0.62);
}

@media (max-width: 1180px) and (min-width: 1024px) {
    .cx-page--experience .cx-experience {
        --cx-cinema-inset: 46vw;
    }

    .cx-page--experience .cx-shell {
        grid-template-columns: 1fr;
    }

    .cx-page--experience .cx-side {
        display: none !important;
    }
}

@media (max-width: 1023px) {
    html,
    body.cx-page--experience {
        width: 100%;
        height: 100%;
        min-height: 100%;
        overflow: hidden;
    }

    .cx-page .cx-topbar {
        top: 16px;
        left: 18px;
        right: 18px;
    }

    .cx-page .cx-brand-name {
        display: none;
    }

    .cx-page .cx-actions {
        height: 44px;
        gap: 0.14rem;
        padding: 0.25rem;
    }

    .cx-page .cx-link {
        height: 32px;
        min-height: 32px;
        padding: 0 9px;
        font-size: 0.58rem;
        letter-spacing: 0.08em;
    }

    .cx-page .cx-sound {
        width: 32px;
        height: 32px;
        min-height: 32px;
        flex-basis: 32px;
    }

    .cx-page .cx-link[aria-current="page"]::after {
        right: 9px;
        left: 9px;
    }

    .cx-page--experience .cx-experience {
        position: fixed !important;
        inset: 0 !important;
        min-height: 100svh;
        overflow: hidden !important;
        touch-action: none;
    }

    .cx-page--experience .cx-media-stack {
        inset: 8px;
        border-radius: 20px;
    }

    .cx-page--experience .cx-media-stack::after {
        display: none;
    }

    .cx-page--experience .cx-media.is-visible[data-media-type="image"],
    .cx-page--experience .cx-media.is-visible[data-media-type="video"] {
        opacity: 0.76;
    }

    .cx-page--experience #stars-canvas {
        opacity: 0.3;
    }

    .cx-page--experience .cx-media.is-portrait .cx-media-primary {
        inset: 50% auto auto 50%;
        width: 100%;
        height: auto;
        max-height: 100%;
        translate: -50% -50%;
    }

    .cx-page--experience .cx-media.is-portrait .cx-media-backdrop {
        inset: -22px;
        width: calc(100% + 44px);
        height: calc(100% + 44px);
        opacity: 0.82;
        filter: blur(12px) saturate(0.9) brightness(0.62);
    }

    .cx-page--experience .cx-media::after {
        background:
            linear-gradient(180deg, rgba(2,3,4,0.48) 0%, transparent 28%, rgba(2,3,4,0.18) 48%, rgba(2,3,4,0.9) 86%, #020304 100%),
            linear-gradient(90deg, rgba(2,3,4,0.28), transparent 78%);
    }

    .cx-page--experience .cx-shell {
        position: fixed !important;
        inset: 0 !important;
        display: grid !important;
        grid-template-columns: 1fr;
        align-items: end;
        width: 100%;
        min-height: 100svh !important;
        padding: 96px 20px 88px;
        pointer-events: auto;
    }

    .cx-page--experience .cx-main-copy,
    .cx-page--experience .cx-scene-deck,
    .cx-page--experience .cx-title,
    .cx-page--experience .cx-body {
        width: 100%;
        max-width: none;
    }

    .cx-page--experience .cx-scene-deck {
        position: relative !important;
        height: min(550px, 66svh) !important;
        min-height: min(550px, 66svh) !important;
    }

    .cx-page--experience .cx-scene-copy {
        position: absolute !important;
        inset: 0 !important;
        display: grid !important;
        align-content: end !important;
        gap: 12px;
        margin: 0;
        padding: 0 0 42px !important;
        border: 0;
        opacity: 0 !important;
        transform: translateY(38px) scale(0.985) !important;
        pointer-events: none !important;
    }

    .cx-page--experience .cx-scene-copy.is-visible,
    .cx-page--experience .cx-scene-copy.is-active {
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
        pointer-events: auto !important;
    }

    .cx-page--experience .cx-title {
        font-size: clamp(2.25rem, 10.5vw, 3.8rem);
        line-height: 0.94;
        letter-spacing: -0.055em;
        text-shadow: none;
    }

    .cx-page--experience .cx-body {
        display: -webkit-box;
        overflow: hidden;
        max-width: 37rem;
        color: rgba(235,239,244,0.76);
        font-size: clamp(0.84rem, 3.7vw, 0.96rem);
        line-height: 1.55;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
    }

    .cx-page--experience .cx-enter-row {
        position: fixed;
        z-index: 58;
        left: 20px;
        bottom: 76px;
        display: flex !important;
        margin-top: 12px;
    }

    .cx-page--experience .cx-side,
    .cx-page--experience .cx-stage-counter,
    .cx-page--experience .cx-ai {
        display: none !important;
    }

    .cx-page--gallery .cx-gallery-shell {
        padding-top: 94px;
    }

    .cx-page--gallery .cx-gallery-hero {
        min-height: 68svh;
        padding: 30px;
    }

    .cx-page--gallery .cx-gallery-title {
        font-size: clamp(2.8rem, 10vw, 5rem);
    }

    .cx-page--gallery .cx-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .cx-page .cx-topbar {
        left: 22px;
        right: 14px;
    }

    .cx-page .cx-logo {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .cx-page .cx-actions {
        height: 38px;
        max-width: calc(100vw - 82px);
        padding: 0.18rem;
    }

    .cx-page .cx-link {
        height: 30px;
        min-height: 30px;
        padding: 0 7px;
        font-size: 0.5rem;
        letter-spacing: 0.055em;
    }

    .cx-page .cx-sound {
        width: 30px;
        height: 30px;
        min-height: 30px;
        flex-basis: 30px;
    }

    .cx-page .cx-contact-fab {
        right: 14px;
        bottom: max(18px, env(safe-area-inset-bottom));
        min-height: 36px;
        padding: 0 12px;
        font-size: 0.54rem;
    }

    .cx-page .cx-contact-fab::after {
        content: " Обади се";
        font-family: var(--cx-font);
        letter-spacing: 0;
    }

    .cx-page--experience .cx-scene-copy {
        padding-bottom: 32px !important;
    }

    .cx-page--experience .cx-title {
        font-size: clamp(1.9rem, 8.7vw, 2.65rem);
        overflow-wrap: normal;
    }

    .cx-page--experience .cx-chips {
        max-width: 94vw;
        overflow: hidden;
        flex-wrap: nowrap;
    }

    .cx-page--experience .cx-primary {
        display: none;
    }

    .cx-page--experience .cx-primary,
    .cx-page--experience .cx-secondary {
        min-height: 42px;
        padding-inline: 14px;
        font-size: 0.7rem;
    }

    .cx-page--gallery .cx-gallery-shell {
        padding: 82px 10px 4rem;
    }

    .cx-page--gallery .cx-gallery-hero {
        min-height: 72svh;
        margin-bottom: 2.5rem;
        padding: 24px 18px 34px;
        border-radius: 20px;
        background:
            linear-gradient(180deg, rgba(2,3,4,0.25), rgba(2,3,4,0.78)),
            url("../assets/cinematic/interiors-01.webp") 58% center / cover no-repeat;
    }

    .cx-page--gallery .cx-gallery-badge {
        top: 26px;
        left: 20px;
    }

    .cx-page--gallery .cx-gallery-title {
        font-size: clamp(2.2rem, 12vw, 3.55rem);
        line-height: 0.92;
    }

    .cx-page--gallery .cx-gallery-hero::after {
        display: none;
    }

    .cx-page--gallery .cx-gallery-filters {
        top: 10px;
        max-width: calc(100vw - 20px);
        border-radius: 16px;
    }

    .cx-page--gallery .cx-gallery-filter {
        min-height: 34px;
        padding: 0 11px;
        font-size: 0.54rem;
    }

    .cx-page--gallery .cx-gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .cx-page--gallery .cx-gallery-card,
    .cx-page--gallery .cx-gallery-card:nth-child(6n + 1),
    .cx-page--gallery .cx-gallery-card:nth-child(6n + 5) {
        aspect-ratio: 4 / 3;
        border-radius: 16px;
    }

    .cx-page--gallery .cx-gallery-footer {
        width: calc(100% - 20px);
    }
}

@media (max-width: 360px) {
    .cx-page .cx-sound {
        display: none;
    }
}

@media (hover: none), (pointer: coarse) {
    html,
    body.cx-page {
        cursor: auto;
    }

    .cx-page #custom-cursor,
    .cx-page #cursor-follower {
        display: none !important;
    }
}

.cx-page :where(a, button, input):focus-visible {
    outline: 2px solid var(--cx-gold);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(root),
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 0.001ms !important;
    }

    .cx-page *,
    .cx-page *::before,
    .cx-page *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

/*
 * CX UX RULE — ACTIVE PAGES ARE VIEWPORT EXPERIENCES
 * index, products and gallery never use ordinary document-level vertical scrolling.
 * Content is explored with scene steps, wheel/swipe/keyboard controls or paginated overlays.
 */
html:has(body.cx-page),
body.cx-page {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

/* Fullscreen gallery experience */
.cx-page--gallery .cx-gallery-experience {
    position: fixed;
    inset: 0;
    z-index: 10;
    padding: clamp(20px, 2.5vh, 34px) clamp(18px, 2.4vw, 42px);
}

.cx-page--gallery .cx-gallery-stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--cx-radius);
    background: #050607;
    box-shadow: 0 42px 110px rgba(0,0,0,0.48), inset 0 1px 0 rgba(255,255,255,0.04);
}

.cx-page--gallery .cx-gallery-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(2,3,4,0.86) 0%, rgba(2,3,4,0.55) 27%, rgba(2,3,4,0.08) 62%, transparent 78%),
        linear-gradient(180deg, rgba(2,3,4,0.34) 0%, transparent 25%, transparent 68%, rgba(2,3,4,0.62) 100%);
}

.cx-page--gallery .cx-gallery-stage::after {
    content: "";
    position: absolute;
    z-index: 3;
    top: 9%;
    bottom: 9%;
    left: 34%;
    width: 1px;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.14) 28%, rgba(255,183,0,0.72) 50%, rgba(255,255,255,0.1) 72%, transparent);
    box-shadow: 0 0 20px rgba(255,183,0,0.2);
}

.cx-page--gallery .cx-gallery-stage-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.9) contrast(1.04) brightness(0.82);
    transform: scale(1.035);
    transition: opacity 240ms var(--ease-premium), transform 680ms var(--ease-premium), filter 300ms ease;
}

.cx-page--gallery .cx-gallery-stage.is-changing .cx-gallery-stage-image {
    opacity: 0.58;
    filter: saturate(0.72) contrast(1.06) brightness(0.7) blur(1.5px);
    transform: scale(1.05);
}

.cx-page--gallery .cx-gallery-stage-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(circle at 74% 42%, rgba(255,183,0,0.06), transparent 32rem);
    mix-blend-mode: screen;
}

.cx-page--gallery .cx-gallery-stage-copy {
    position: absolute;
    z-index: 5;
    left: clamp(26px, 4vw, 64px);
    bottom: clamp(126px, 15vh, 162px);
    width: min(410px, 34vw);
    opacity: 0.78;
}

.cx-page--gallery .cx-gallery-stage-kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 11px;
    color: rgba(255,183,0,0.78);
    font: 600 0.56rem/1 var(--cx-mono);
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.cx-page--gallery .cx-gallery-stage-kicker::before {
    content: "";
    width: 30px;
    height: 1px;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
}

.cx-page--gallery .cx-gallery-stage-title {
    margin: 0;
    font-family: var(--cx-display);
    font-size: clamp(1.45rem, 2.15vw, 2.35rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.045em;
    text-transform: uppercase;
    text-shadow: 0 14px 34px rgba(0,0,0,0.36);
}

.cx-page--gallery .cx-gallery-stage-title > span {
    display: block;
}

.cx-page--gallery .cx-gallery-stage-title .is-outline {
    margin-top: 3px;
    color: rgba(246,249,252,0.08);
    font-size: 0.78em;
    -webkit-text-stroke: 0.6px rgba(246,249,252,0.42);
}

.cx-page--gallery .cx-gallery-stage-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 13px;
    color: rgba(230,237,244,0.48);
    font: 500 0.52rem/1 var(--cx-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cx-page--gallery .cx-gallery-stage-meta span {
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    background: rgba(4,6,8,0.34);
    backdrop-filter: blur(10px);
}

.cx-page--gallery .cx-gallery-stage-meta span:first-child {
    border-color: rgba(255,183,0,0.34);
    color: var(--cx-gold);
}

.cx-page--gallery .cx-gallery-stage-counter {
    position: absolute;
    z-index: 6;
    left: clamp(26px, 4vw, 64px);
    bottom: 32px;
    display: grid;
    grid-template-columns: auto minmax(80px, 170px) auto;
    align-items: center;
    gap: 12px;
    color: rgba(230,237,244,0.55);
    font: 500 0.56rem/1 var(--cx-mono);
    letter-spacing: 0.1em;
}

.cx-page--gallery .cx-gallery-stage-counter-line {
    height: 1px;
    overflow: hidden;
    background: rgba(255,255,255,0.15);
}

.cx-page--gallery .cx-gallery-stage-counter-line i {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--cx-gold), var(--cx-ice));
    box-shadow: 0 0 12px rgba(255,183,0,0.42);
    transition: width 500ms var(--ease-premium);
}

.cx-page--gallery .cx-gallery-archive-pages button {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 50%;
    background: rgba(4,6,8,0.48);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    backdrop-filter: blur(16px);
    transition: transform 280ms var(--ease-premium), color 280ms, border-color 280ms, background 280ms;
}

.cx-page--gallery .cx-gallery-archive-pages button:hover:not(:disabled) {
    transform: scale(1.06);
    border-color: rgba(255,183,0,0.48);
    background: rgba(255,183,0,0.08);
    color: var(--cx-gold);
}

.cx-page--gallery .cx-gallery-filmstrip {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 24px;
    display: flex;
    width: min(720px, 54vw);
    align-items: center;
    justify-content: center;
    gap: 8px;
    transform: translateX(-50%);
}

.cx-page--gallery .cx-gallery-film {
    position: relative;
    width: clamp(62px, 6vw, 92px);
    aspect-ratio: 4 / 3;
    flex: 0 0 auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    background: #07090b;
    color: white;
    cursor: pointer;
    opacity: 0.48;
    transform: translateY(0) scale(0.96);
    transition: opacity 340ms var(--ease-premium), transform 340ms var(--ease-premium), border-color 340ms;
}

.cx-page--gallery .cx-gallery-film:hover {
    opacity: 0.78;
    transform: translateY(-3px) scale(1);
}

.cx-page--gallery .cx-gallery-film.is-active {
    border-color: rgba(255,183,0,0.72);
    opacity: 1;
    transform: translateY(-5px) scale(1);
    box-shadow: 0 12px 30px rgba(0,0,0,0.34), 0 0 18px rgba(255,183,0,0.13);
}

.cx-page--gallery .cx-gallery-film img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cx-page--gallery .cx-gallery-film::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2,3,4,0.72), transparent 62%);
}

.cx-page--gallery .cx-gallery-film span {
    position: absolute;
    z-index: 2;
    right: 6px;
    bottom: 5px;
    color: rgba(255,255,255,0.7);
    font: 500 0.43rem/1 var(--cx-mono);
    letter-spacing: 0.06em;
}

.cx-page--gallery .cx-gallery-archive-open {
    position: absolute;
    z-index: 7;
    left: clamp(26px, 4vw, 64px);
    bottom: 68px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(255,183,0,0.26);
    border-radius: 999px;
    background: rgba(4,6,8,0.5);
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    font: 650 0.66rem/1 var(--cx-font);
    backdrop-filter: blur(16px);
    transition: transform 280ms var(--ease-premium), border-color 280ms, color 280ms;
}

.cx-page--gallery .cx-gallery-archive-open span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cx-gold);
    box-shadow: 0 0 12px rgba(255,183,0,0.68);
}

.cx-page--gallery .cx-gallery-archive-open:hover {
    transform: translateY(-2px);
    border-color: rgba(255,183,0,0.55);
    color: var(--cx-gold);
}

.cx-page--gallery .cx-gallery-gesture-hint {
    position: absolute;
    z-index: 6;
    right: 26px;
    top: 50%;
    display: grid;
    justify-items: center;
    gap: 9px;
    color: rgba(255,255,255,0.4);
    transform: translateY(-50%);
}

.cx-page--gallery .cx-gallery-gesture-hint span {
    position: relative;
    width: 22px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 999px;
    background: rgba(4,6,8,0.2);
    backdrop-filter: blur(8px);
}

.cx-page--gallery .cx-gallery-gesture-hint span::after {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--cx-gold);
    box-shadow: 0 0 8px rgba(255,183,0,0.7);
    transform: translateX(-50%);
    animation: cx-gallery-scroll-dot 1.65s ease-in-out infinite;
}

.cx-page--gallery .cx-gallery-gesture-hint b {
    color: inherit;
    font: 500 0.43rem/1 var(--cx-mono);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
}

@keyframes cx-gallery-scroll-dot {
    0%, 100% {
        opacity: 0.28;
        transform: translate(-50%, 0);
    }
    45% {
        opacity: 1;
    }
    70% {
        opacity: 0;
        transform: translate(-50%, 14px);
    }
}

/* Paginated archive — a list without page scrolling */
.cx-page--gallery .cx-gallery-archive {
    position: fixed;
    inset: clamp(18px, 2.5vw, 36px);
    z-index: 300;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 14px;
    padding: clamp(18px, 2vw, 30px);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--cx-radius);
    background:
        radial-gradient(circle at 78% 12%, rgba(255,183,0,0.08), transparent 28rem),
        rgba(3,4,5,0.94);
    backdrop-filter: blur(34px) saturate(0.92);
    box-shadow: 0 50px 140px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(24px) scale(0.985);
    pointer-events: none;
    transition: opacity 380ms var(--ease-premium), visibility 380ms, transform 520ms var(--ease-premium);
}

.cx-page--gallery .cx-gallery-archive.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.cx-page--gallery .cx-gallery-archive-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cx-page--gallery .cx-gallery-archive-head small {
    display: block;
    margin-bottom: 7px;
    color: var(--cx-gold);
    font: 600 0.56rem/1 var(--cx-mono);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.cx-page--gallery .cx-gallery-archive-head h2 {
    margin: 0;
    font: 650 clamp(1.5rem, 2.5vw, 2.4rem)/1 var(--cx-display);
    letter-spacing: -0.045em;
    text-transform: uppercase;
}

.cx-page--gallery .cx-gallery-archive-close {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.72);
    cursor: pointer;
    font-size: 1.2rem;
}

.cx-page--gallery .cx-gallery-archive-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}

.cx-page--gallery .cx-gallery-archive .cx-gallery-filters {
    position: static;
    top: auto;
    z-index: auto;
    justify-content: flex-start;
    width: fit-content;
    margin: 0;
    padding: 5px;
}

.cx-page--gallery .cx-gallery-archive .cx-gallery-count {
    flex: 0 0 auto;
    margin: 0;
    text-align: right;
}

.cx-page--gallery .cx-gallery-archive .cx-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    min-height: 0;
    gap: 10px;
}

.cx-page--gallery .cx-gallery-archive .cx-gallery-card,
.cx-page--gallery .cx-gallery-archive .cx-gallery-card:nth-child(6n + 1),
.cx-page--gallery .cx-gallery-archive .cx-gallery-card:nth-child(6n + 5) {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 12px;
    opacity: 1 !important;
    transform: none;
}

.cx-page--gallery .cx-gallery-archive .cx-gallery-card[hidden] {
    display: none !important;
}

.cx-page--gallery .cx-gallery-archive .cx-gallery-card img {
    width: 100%;
    height: 100%;
    transform: scale(1.02);
}

.cx-page--gallery .cx-gallery-archive .cx-gallery-card-overlay {
    padding: 14px;
}

.cx-page--gallery .cx-gallery-archive .cx-gallery-card-title {
    font-size: 0.88rem;
}

.cx-page--gallery .cx-gallery-archive .cx-gallery-card-sub {
    display: none;
}

.cx-page--gallery .cx-gallery-archive-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: rgba(255,255,255,0.55);
    font: 500 0.62rem/1 var(--cx-mono);
    letter-spacing: 0.1em;
}

.cx-page--gallery .cx-gallery-archive-pages button {
    width: 38px;
    height: 38px;
}

.cx-page--gallery .cx-gallery-archive-pages button:disabled {
    cursor: default;
    opacity: 0.24;
}

.cx-page--gallery .cx-gallery-archive-pages b {
    color: var(--cx-gold);
    font-weight: 600;
}

.cx-page--gallery .cx-gallery-empty {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
}

.cx-page--gallery .cx-gallery-footer {
    display: none;
}

@media (max-width: 1023px) {
    .cx-page--gallery .cx-gallery-experience {
        padding: 8px;
    }

    .cx-page--gallery .cx-gallery-stage {
        border-radius: 20px;
    }

    .cx-page--gallery .cx-gallery-stage::before {
        background:
            linear-gradient(180deg, rgba(2,3,4,0.46) 0%, transparent 28%, rgba(2,3,4,0.18) 48%, rgba(2,3,4,0.88) 82%, #020304 100%),
            linear-gradient(90deg, rgba(2,3,4,0.28), transparent 78%);
    }

    .cx-page--gallery .cx-gallery-stage::after {
        display: none;
    }

    .cx-page--gallery .cx-gallery-stage-image {
        filter: saturate(0.88) contrast(1.04) brightness(0.76);
    }

    .cx-page--gallery .cx-gallery-stage-copy {
        left: 20px;
        bottom: 164px;
        width: min(58vw, 370px);
    }

    .cx-page--gallery .cx-gallery-stage-title {
        font-size: clamp(1.35rem, 4vw, 2.15rem);
    }

    .cx-page--gallery .cx-gallery-stage-counter {
        display: none;
    }

    .cx-page--gallery .cx-gallery-filmstrip {
        right: auto;
        bottom: 72px;
        left: 50%;
        width: calc(100% - 40px);
        justify-content: center;
        gap: 6px;
        transform: translateX(-50%);
    }

    .cx-page--gallery .cx-gallery-film {
        width: clamp(58px, 11vw, 78px);
    }

    .cx-page--gallery .cx-gallery-archive-open {
        left: 20px;
        bottom: 22px;
    }

    .cx-page--gallery .cx-gallery-gesture-hint {
        display: none;
    }

    .cx-page--gallery .cx-gallery-archive {
        inset: 8px;
        padding: 16px;
        border-radius: 20px;
    }

    .cx-page--gallery .cx-gallery-archive .cx-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .cx-page--gallery .cx-gallery-stage-copy {
        left: 18px;
        bottom: 172px;
        width: min(62vw, 260px);
    }

    .cx-page--gallery .cx-gallery-stage-kicker {
        margin-bottom: 12px;
        font-size: 0.54rem;
    }

    .cx-page--gallery .cx-gallery-stage-title {
        font-size: clamp(1.25rem, 5.4vw, 1.7rem);
        line-height: 1;
        letter-spacing: -0.045em;
    }

    .cx-page--gallery .cx-gallery-stage-meta {
        margin-top: 12px;
    }

    .cx-page--gallery .cx-gallery-filmstrip {
        right: auto;
        left: 50%;
        width: calc(100% - 32px);
        transform: translateX(-50%);
    }

    .cx-page--gallery .cx-gallery-film {
        width: calc((100vw - 64px) / 5);
        max-width: 66px;
        border-radius: 8px;
    }

    .cx-page--gallery .cx-gallery-archive-open {
        min-height: 38px;
        padding-inline: 13px;
        font-size: 0.6rem;
    }

    .cx-page--gallery .cx-gallery-archive {
        grid-template-rows: auto auto minmax(0, 1fr) auto;
        gap: 10px;
        padding: 14px 10px;
    }

    .cx-page--gallery .cx-gallery-archive-head {
        padding-inline: 4px;
    }

    .cx-page--gallery .cx-gallery-archive-head h2 {
        font-size: 1.35rem;
    }

    .cx-page--gallery .cx-gallery-archive-close {
        width: 38px;
        height: 38px;
    }

    .cx-page--gallery .cx-gallery-archive-tools {
        display: grid;
        gap: 7px;
    }

    .cx-page--gallery .cx-gallery-archive .cx-gallery-filters {
        width: 100%;
        justify-content: center;
    }

    .cx-page--gallery .cx-gallery-archive .cx-gallery-count {
        text-align: center;
    }

    .cx-page--gallery .cx-gallery-archive .cx-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .cx-page--gallery .cx-gallery-archive .cx-gallery-card,
    .cx-page--gallery .cx-gallery-archive .cx-gallery-card:nth-child(6n + 1),
    .cx-page--gallery .cx-gallery-archive .cx-gallery-card:nth-child(6n + 5) {
        border-radius: 9px;
    }

    .cx-page--gallery .cx-gallery-archive .cx-gallery-card-overlay {
        padding: 9px;
    }

    .cx-page--gallery .cx-gallery-archive .cx-gallery-card-chip,
    .cx-page--gallery .cx-gallery-archive .cx-gallery-card-code {
        display: none;
    }

    .cx-page--gallery .cx-gallery-archive .cx-gallery-card-title {
        font-size: 0.7rem;
    }

    .cx-page--gallery .cx-gallery-archive-pages {
        gap: 12px;
    }

    .cx-page--gallery .cx-contact-fab {
        z-index: 120;
    }
}
