/* Optimus — Apex: nowoczesna wizytówka, szkło, gradienty, animowane menu i galeria */

:root {
    --ax-bg0: #05050c;
    --ax-bg1: #0a0a18;
    --ax-surface: rgba(255, 255, 255, 0.04);
    --ax-surface2: rgba(255, 255, 255, 0.08);
    --ax-ink: #f4f4f5;
    --ax-muted: #a1a1aa;
    --ax-cyan: #22d3ee;
    --ax-violet: #a78bfa;
    --ax-gold: #eab308;
    --ax-gold-light: #fde047;
    --ax-amber: #f59e0b;
    --ax-coral: #fb7185;
    --ax-line: rgba(255, 255, 255, 0.1);
    --ax-glow: 0 0 40px rgba(34, 211, 238, 0.12), 0 0 60px rgba(234, 179, 8, 0.08);
    --font-display: "Syne", system-ui, sans-serif;
    --font-body: "DM Sans", system-ui, sans-serif;
}

@keyframes axMesh {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
    33% { transform: translate(2%, -1%) scale(1.05); opacity: 0.9; }
    66% { transform: translate(-1%, 2%) scale(0.98); opacity: 0.95; }
}

@keyframes axFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes axShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes axMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes axLine {
    0% { transform: scaleY(0); opacity: 0; }
    100% { transform: scaleY(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.92); opacity: 0.5; }
    to { transform: scale(1); opacity: 1; }
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.site-apex {
    font-family: var(--font-body);
    background-color: var(--ax-bg0);
    color: var(--ax-ink);
    scroll-behavior: smooth;
    overflow-x: hidden;
    min-height: 100dvh;
    line-height: 1.65;
}

body.site-apex::before {
    content: "";
    position: fixed;
    inset: -20%;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 45% at 15% 75%, rgba(234, 179, 8, 0.11), transparent 52%),
        radial-gradient(ellipse 70% 50% at 92% 65%, rgba(251, 113, 133, 0.07), transparent 48%),
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(34, 211, 238, 0.1), transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 30%, rgba(167, 139, 250, 0.12), transparent 45%),
        radial-gradient(ellipse 50% 60% at 50% 90%, rgba(245, 158, 11, 0.06), transparent 40%),
        linear-gradient(180deg, var(--ax-bg0) 0%, var(--ax-bg1) 100%);
    animation: axMesh 18s ease-in-out infinite;
}

body.site-apex::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 55;
    pointer-events: none;
    opacity: 0;
    background: rgba(2, 3, 12, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: opacity 0.45s ease;
}

body.site-apex.darken-page::after {
    opacity: 1;
    pointer-events: auto;
}

body.site-apex .text-gray-200 { color: #e4e4e7 !important; }
body.site-apex .text-gray-300 { color: #d4d4d8 !important; }
body.site-apex .text-gray-400 { color: var(--ax-muted) !important; }
body.site-apex .text-gray-500 { color: #71717a !important; }
body.site-apex .text-gray-600 { color: #71717a !important; }

body.site-apex h1,
body.site-apex h2,
body.site-apex h3,
body.site-apex h4 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* Znak „OPTIMUS” — złoto z ruchem refleksu (gradient + shimmer + blask) */
.brand-optimus {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.15;
    background: linear-gradient(
        108deg,
        #713f12 0%,
        #b45309 10%,
        #ca8a04 22%,
        #eab308 34%,
        #fef08a 42%,
        #ffffff 46%,
        #fde047 50%,
        #facc15 58%,
        #f59e0b 72%,
        #fcd34d 86%,
        #854d0e 100%
    );
    background-size: 240% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: axShimmer 5.5s linear infinite;
    filter: drop-shadow(0 0 12px rgba(250, 204, 21, 0.42)) drop-shadow(0 0 32px rgba(234, 179, 8, 0.2));
}

.site-header .brand-optimus {
    letter-spacing: 0.08em;
    animation: axShimmer 7s linear infinite;
    filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.32)) drop-shadow(0 0 14px rgba(245, 158, 11, 0.12));
}

/* ——— Nagłówek (pełna szerokość, szkło) ——— */
#header-container {
    position: relative;
    z-index: 50;
}

.site-header {
    border-bottom: 1px solid rgba(234, 179, 8, 0.12) !important;
    background: rgba(5, 5, 12, 0.75) !important;
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.35),
        0 1px 0 rgba(34, 211, 238, 0.08),
        inset 0 -1px 0 rgba(234, 179, 8, 0.06) !important;
}

#header-container .site-header nav {
    max-width: 80rem;
}

.apex-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.site-header--compact {
    box-shadow:
        0 2px 16px rgba(0, 0, 0, 0.28),
        0 1px 0 rgba(34, 211, 238, 0.06),
        inset 0 -1px 0 rgba(234, 179, 8, 0.05) !important;
}

#header-container .site-header--compact nav {
    min-height: 0;
}

.site-header .nav-link {
    color: var(--ax-muted) !important;
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.3rem 0.55rem;
    border-radius: 9999px;
    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        box-shadow 0.25s ease;
}

/* Nie używaj skrótu `background:` na hover — nadpisuje gradient `background-clip: text` przy .elegant-gold-text */
.site-header .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.12), 0 0 24px rgba(234, 179, 8, 0.08);
}

.site-header .nav-link:not(.elegant-gold-text):hover,
.site-header .nav-link:not(.elegant-gold-text):focus-visible {
    color: var(--ax-ink) !important;
}

.site-header .nav-link.elegant-gold-text:hover,
.site-header .nav-link.elegant-gold-text:focus-visible {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

/* Wyższa specyficzność niż .site-header .nav-link — inaczej wygrywa color: var(--ax-muted) i psuje gradient */
.site-header .nav-link.elegant-gold-text {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

.menu-hamburger {
    border: 1px solid var(--ax-line) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
}
.menu-hamburger .menu-icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--ax-gold-light), var(--ax-cyan), var(--ax-violet));
    transition: transform 0.45s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.25s ease;
    transform-origin: center;
}
#menu-button[aria-expanded="true"] .menu-icon-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
#menu-button[aria-expanded="true"] .menu-icon-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-button[aria-expanded="true"] .menu-icon-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ——— Menu mobilne: pełny ekran + panel szkła ——— */
.apex-menu {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition:
        opacity 0.4s ease,
        visibility 0.4s step-end;
}

.apex-menu.menu-active {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transition:
        opacity 0.4s ease,
        visibility 0s step-start;
}

.apex-menu-handle {
    display: none;
}

.apex-menu-panel {
    position: relative;
    width: 100%;
    max-width: 28rem;
    max-height: min(88vh, 640px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 1.5rem;
    border: 1px solid var(--ax-line);
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.92) 0%, rgba(10, 10, 24, 0.88) 100%);
    box-shadow:
        0 0 0 1px rgba(34, 211, 238, 0.08),
        0 0 0 1px rgba(234, 179, 8, 0.06),
        0 24px 80px rgba(0, 0, 0, 0.55),
        var(--ax-glow);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    transform: scale(0.92) translateY(24px);
    opacity: 0;
    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.45s ease;
}

.apex-menu.menu-active .apex-menu-panel {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.apex-menu .menu-scroll-inner {
    position: relative;
    z-index: 2;
    display: flex !important;
    flex-direction: column;
    gap: 0.5rem;
    padding: 3.25rem 1.25rem 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.apex-menu .menu-scroll-inner > a.menu-link-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    min-height: 3.25rem;
    padding: 0.75rem 1rem;
    border-radius: 0.875rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ax-ink) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transform: translateX(28px);
    opacity: 0;
    filter: blur(4px);
    transition:
        opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.45s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.apex-menu:not(.menu-active) .menu-scroll-inner > a.menu-link-item {
    transition-delay: 0s !important;
}

.apex-menu.menu-active .menu-scroll-inner > a.menu-link-item {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

.apex-menu.menu-active .menu-scroll-inner > a.menu-link-item:nth-of-type(1) { transition-delay: 0.05s; }
.apex-menu.menu-active .menu-scroll-inner > a.menu-link-item:nth-of-type(2) { transition-delay: 0.1s; }
.apex-menu.menu-active .menu-scroll-inner > a.menu-link-item:nth-of-type(3) { transition-delay: 0.15s; }
.apex-menu.menu-active .menu-scroll-inner > a.menu-link-item:nth-of-type(4) { transition-delay: 0.2s; }
.apex-menu.menu-active .menu-scroll-inner > a.menu-link-item:nth-of-type(5) { transition-delay: 0.25s; }
.apex-menu.menu-active .menu-scroll-inner > a.menu-link-item:nth-of-type(6) { transition-delay: 0.3s; }
.apex-menu.menu-active .menu-scroll-inner > a.menu-link-item:nth-of-type(7) { transition-delay: 0.35s; }
.apex-menu.menu-active .menu-scroll-inner > a.menu-link-item:nth-of-type(8) { transition-delay: 0.4s; }
.apex-menu.menu-active .menu-scroll-inner > a.menu-link-item:nth-of-type(9) { transition-delay: 0.45s; }

@media (hover: hover) and (pointer: fine) {
    .apex-menu .menu-scroll-inner > a.menu-link-item:hover {
        border-color: rgba(34, 211, 238, 0.4) !important;
        box-shadow: 0 0 24px rgba(34, 211, 238, 0.12), 0 0 28px rgba(234, 179, 8, 0.1);
    }
}

.menu-close-fab {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 5;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    border: 1px solid var(--ax-line) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--ax-ink) !important;
    transition: transform 0.35s ease, background 0.25s ease, box-shadow 0.25s ease;
}
@media (hover: hover) and (pointer: fine) {
    .menu-close-fab:hover {
        transform: rotate(90deg) scale(1.05);
        background: rgba(34, 211, 238, 0.15) !important;
        box-shadow: 0 0 20px rgba(34, 211, 238, 0.25);
    }
}

/* Hero */
#hero-section {
    position: relative;
    background-image:
        linear-gradient(165deg, rgba(5, 5, 12, 0.88) 0%, rgba(10, 10, 24, 0.55) 45%, rgba(5, 5, 12, 0.92) 100%),
        url("grafika/banner.webp"),
        url("grafika/banner.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#hero-section .text-gray-200,
#hero-section .text-gray-300 {
    color: rgba(244, 244, 245, 0.92) !important;
}

.hero-glow-blobs {
    display: block !important;
}
.hero-glow-blobs::before,
.hero-glow-blobs::after {
    display: block !important;
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.45;
    animation: axMesh 12s ease-in-out infinite;
}
.hero-glow-blobs::before {
    width: 45vmin;
    height: 45vmin;
    top: 5%;
    right: 0;
    background:
        radial-gradient(circle at 35% 45%, rgba(250, 204, 21, 0.28), transparent 50%),
        rgba(34, 211, 238, 0.18);
}
.hero-glow-blobs::after {
    width: 40vmin;
    height: 40vmin;
    bottom: 10%;
    left: -5%;
    background:
        radial-gradient(circle at 60% 40%, rgba(251, 113, 133, 0.18), transparent 55%),
        rgba(167, 139, 250, 0.2);
    animation-delay: -4s;
}

.hero-orbit-logo {
    animation: axFloat 6s ease-in-out infinite;
    border-radius: 9999px !important;
    border: 2px solid rgba(234, 179, 8, 0.5) !important;
    box-shadow:
        0 0 0 1px rgba(34, 211, 238, 0.35),
        0 0 32px rgba(250, 204, 21, 0.28),
        0 0 20px rgba(167, 139, 250, 0.15),
        0 20px 50px rgba(0, 0, 0, 0.45) !important;
}

/* Sekcje jasne / szklane */
.structural-bg-section,
.bg-\[\#0e1117\] {
    background: rgba(255, 255, 255, 0.03) !important;
    position: relative;
    border-top: 1px solid var(--ax-line);
    border-bottom: 1px solid var(--ax-line);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.structural-bg-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--ax-cyan), var(--ax-gold-light), var(--ax-violet), var(--ax-amber));
    transform-origin: top;
    animation: axLine 0.9s ease-out forwards;
}

.structural-bg-section > * {
    position: relative;
    z-index: 1;
}

.apex-band {
    background: linear-gradient(165deg, #0c0c18 0%, #12122a 50%, #0a0a14 100%) !important;
    color: #fafafa !important;
    border-color: var(--ax-line) !important;
    position: relative;
    overflow: hidden;
}

.apex-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 40% at 80% 20%, rgba(34, 211, 238, 0.06), transparent),
        radial-gradient(ellipse 50% 50% at 10% 80%, rgba(167, 139, 250, 0.07), transparent),
        radial-gradient(ellipse 45% 35% at 50% 0%, rgba(234, 179, 8, 0.09), transparent),
        radial-gradient(ellipse 55% 40% at 0% 50%, rgba(251, 113, 133, 0.06), transparent);
    pointer-events: none;
}

.apex-band > * {
    position: relative;
    z-index: 1;
}

.apex-band .text-gray-300,
.apex-band .text-gray-400 {
    color: #c4c4cc !important;
}

.apex-band .elegant-gold-text {
    -webkit-text-fill-color: transparent !important;
    background: linear-gradient(100deg, #5eead4 0%, #2dd4bf 30%, #22d3ee 55%, #38bdf8 78%, #7dd3fc 100%, #5eead4) !important;
    background-size: 220% auto !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    animation: axShimmer 8s linear infinite !important;
}

#main-content-container > section.content-section:not(#hero-section) {
    border-left: none;
    padding-left: 0;
}

.section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
}
@media (max-width: 639px) {
    .section-padding {
        padding-top: 2.75rem;
        padding-bottom: 2.75rem;
    }
}

.elegant-gold-text {
    background: linear-gradient(100deg, #0f766e 0%, #14b8a6 28%, #22d3ee 52%, #0ea5e9 76%, #38bdf8 100%, #0f766e) !important;
    background-size: 220% auto !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    animation: axShimmer 10s linear infinite !important;
}

.apex-band .card-elegant .elegant-gold-text {
    animation: axShimmer 8s linear infinite !important;
}

.card-elegant {
    position: relative;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--ax-line) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25) !important;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.3s ease;
}

.card-elegant .text-white,
.card-elegant h3,
.card-elegant h4 {
    color: var(--ax-ink) !important;
}

@media (hover: hover) and (pointer: fine) {
    .card-elegant:hover {
        transform: translateY(-6px);
        box-shadow:
            0 20px 50px rgba(34, 211, 238, 0.1),
            0 0 40px rgba(234, 179, 8, 0.08),
            0 0 0 1px rgba(34, 211, 238, 0.18) !important;
        border-color: rgba(234, 179, 8, 0.22) !important;
    }
}

.apex-band .card-elegant {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.apex-band .card-elegant .text-white,
.apex-band .card-elegant h3,
.apex-band .card-elegant h4 {
    color: #fafafa !important;
}

.apex-band .card-elegant .text-gray-400,
.apex-band .card-elegant .text-gray-300 {
    color: #c4c4cc !important;
}

.btn-spectrum {
    position: relative;
    overflow: hidden;
    color: #05050c !important;
    font-weight: 800;
    font-family: var(--font-body);
    background: linear-gradient(120deg, #22d3ee 0%, #fde047 28%, #a78bfa 55%, #fb923c 78%, #22d3ee 100%) !important;
    background-size: 220% auto !important;
    border: none !important;
    border-radius: 9999px !important;
    box-shadow:
        0 4px 24px rgba(34, 211, 238, 0.28),
        0 0 36px rgba(234, 179, 8, 0.2),
        0 0 28px rgba(167, 139, 250, 0.12) !important;
    animation: axShimmer 4s linear infinite !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.btn-spectrum::after {
    display: none !important;
}

@media (hover: hover) and (pointer: fine) {
    .btn-spectrum:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 8px 32px rgba(34, 211, 238, 0.45), 0 0 60px rgba(167, 139, 250, 0.2) !important;
    }
}

.animate-on-scroll {
    opacity: 0;
    transition:
        opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.85s ease;
    filter: blur(8px);
}

/* ——— Galeria: nieskończony marquee ——— */
.apex-gallery-stage {
    position: relative;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.apex-marquee-viewport {
    overflow: hidden;
    width: 100%;
    padding: 0.5rem 0 1rem;
}

.apex-marquee-viewport.apex-marquee-viewport--live {
    overscroll-behavior: contain;
    perspective: 1200px;
    perspective-origin: 50% 58%;
    -webkit-perspective: 1200px;
}

.apex-marquee-scroll-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y pinch-zoom;
}

.apex-marquee-scroll-shell.apex-marquee-scroll-shell--live {
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    will-change: scroll-position;
}

.apex-marquee-scroll-shell.apex-marquee-scroll-shell--live:active {
    cursor: grabbing;
}

.apex-marquee-scroll-shell.apex-marquee-scroll-shell--live::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.apex-marquee-scroll-shell.apex-marquee-scroll-shell--live.apex-marquee-scroll-shell--touch {
    touch-action: pan-x;
}

.apex-marquee-scroll-shell--live.apex-marquee-scroll-shell--touch .gallery-item-3d > img {
    pointer-events: none;
    -webkit-user-drag: none;
}

.apex-marquee-viewport--touch-gallery .gallery-item {
    cursor: grab;
}

.apex-marquee-viewport--live .gallery-item-3d > img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

.apex-marquee-viewport--live .gallery-item-3d {
    -webkit-touch-callout: none;
}

.gallery-zoom-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.gallery-zoom-btn:focus-visible {
    outline: 2px solid var(--ax-cyan);
    outline-offset: 2px;
}

.apex-marquee-track {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1.25rem;
    width: max-content;
    animation: axMarquee 55s linear infinite;
}

.apex-marquee-track.apex-marquee-track--live {
    animation: none !important;
    transform-style: preserve-3d;
}

.apex-marquee-track:not(.apex-marquee-track--live):hover {
    animation-play-state: paused;
}

.gallery-item-3d {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-origin: center center;
}

.apex-marquee-track .gallery-item {
    flex: 0 0 auto;
    width: min(85vw, 380px);
    aspect-ratio: 16 / 9;
}

@media (min-width: 768px) {
    .apex-marquee-track .gallery-item {
        width: 400px;
    }
}

.gallery-item {
    cursor: pointer;
    border-radius: 1rem !important;
    overflow: hidden;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.gallery-item img {
    transition: transform 6s ease-out;
}

@media (hover: hover) and (pointer: fine) {
    .gallery-item:hover {
        transform: scale(1.03) translateY(-4px);
        box-shadow: 0 16px 48px rgba(34, 211, 238, 0.16), 0 12px 36px rgba(234, 179, 8, 0.12);
    }
    .gallery-item:hover img {
        transform: scale(1.08);
    }
}

#lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(2, 3, 12, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeIn 0.3s ease;
}
#lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}
#lightbox-img {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 1rem;
    border: 1px solid rgba(34, 211, 238, 0.35);
    box-shadow: 0 0 60px rgba(34, 211, 238, 0.2), 0 24px 80px rgba(0, 0, 0, 0.6);
    animation: zoomIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
#lightbox-close {
    position: absolute;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
    z-index: 1001;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    line-height: 1;
    color: var(--ax-ink);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border: 1px solid var(--ax-line);
    transition: transform 0.25s ease, background 0.25s ease;
}
@media (hover: hover) and (pointer: fine) {
    #lightbox-close:hover {
        background: rgba(34, 211, 238, 0.2);
        transform: scale(1.05);
    }
}

#header-container header {
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
    padding-top: max(0.35rem, env(safe-area-inset-top));
}

.touch-target {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.opinia-tygodnia {
    border: 1px solid rgba(34, 211, 238, 0.45) !important;
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.12) !important;
    position: relative;
    padding-top: 2.5rem;
}
.opinia-tygodnia::before {
    content: "Opinia tygodnia";
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ax-cyan);
    font-weight: 800;
    font-family: var(--font-body);
}
@media (max-width: 639px) {
    .opinia-tygodnia {
        padding-top: 1rem;
    }
    .opinia-tygodnia::before {
        position: static;
        display: block;
        margin-bottom: 0.5rem;
    }
}

.apex-band .opinia-tygodnia {
    border-color: rgba(167, 139, 250, 0.5) !important;
}
.apex-band .opinia-tygodnia::before {
    color: #c4b5fd;
}

#kontakt .apex-contact-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.65) !important;
    border: 1px solid rgba(148, 163, 184, 0.15) !important;
    border-left: 4px solid var(--ax-cyan) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

@media (min-width: 640px) {
    #kontakt .apex-contact-row {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
}

#kontakt .apex-contact-row .apex-contact-label {
    color: #cbd5e1 !important;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

#kontakt .apex-contact-row a {
    color: #e2e8f0 !important;
}

#kontakt .apex-contact-row a:hover {
    color: var(--ax-cyan) !important;
}

#kontakt .apex-contact-row--muted {
    border-left-color: rgba(100, 116, 139, 0.6) !important;
    background: rgba(15, 23, 42, 0.45) !important;
}

#kontakt .apex-contact-field {
    width: 100%;
    min-height: 48px;
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.75) !important;
    color: #e4e4e7 !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

#kontakt textarea.apex-contact-field {
    min-height: 8rem;
}

#kontakt .apex-contact-field::placeholder {
    color: #64748b !important;
    opacity: 1;
}

#kontakt .apex-contact-field:hover {
    border-color: rgba(34, 211, 238, 0.25) !important;
    background: rgba(15, 23, 42, 0.88) !important;
}

#kontakt .apex-contact-field:focus {
    outline: none;
    border-color: rgba(34, 211, 238, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
    background: rgba(10, 15, 30, 0.92) !important;
}

#kontakt .apex-contact-field:-webkit-autofill,
#kontakt .apex-contact-field:-webkit-autofill:hover,
#kontakt .apex-contact-field:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 40px rgba(15, 23, 42, 0.95) inset !important;
    box-shadow: 0 0 0 40px rgba(15, 23, 42, 0.95) inset !important;
    -webkit-text-fill-color: #e4e4e7 !important;
    caret-color: var(--ax-cyan);
    border-color: rgba(148, 163, 184, 0.22) !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--ax-cyan);
    outline-offset: 3px;
}

#kontakt .apex-contact-field:focus-visible {
    outline: 2px solid var(--ax-cyan);
    outline-offset: 2px;
}

#footer-container footer {
    background: linear-gradient(180deg, #05050c 0%, #08081a 100%) !important;
    color: #a1a1aa !important;
    border-color: var(--ax-line) !important;
}

#footer-container footer a:hover {
    color: var(--ax-gold-light) !important;
}

/* 404 */
.apex-404-wrap {
    max-width: 26rem;
    padding: 2.5rem 1.75rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ax-line);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), var(--ax-glow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    text-align: center;
}

.apex-404-num {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 14vw, 5rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(100deg, #0f766e, #14b8a6, #22d3ee, #0ea5e9, #0f766e);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: axShimmer 5s linear infinite;
}

.apex-404-wrap h1 {
    font-family: var(--font-display);
}

@media (prefers-reduced-motion: reduce) {
    body.site-apex::before,
    .hero-glow-blobs::before,
    .hero-glow-blobs::after,
    .hero-orbit-logo,
    .opinia-tygodnia,
    .btn-spectrum,
    .elegant-gold-text,
    .apex-band .elegant-gold-text,
    .apex-404-num,
    .brand-optimus,
    .site-header .brand-optimus {
        animation: none !important;
    }
    .brand-optimus,
    .site-header .brand-optimus {
        background-position: 55% 50% !important;
        filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.35)) !important;
    }
    .structural-bg-section::before {
        animation: none;
        transform: scaleY(1);
        opacity: 1;
    }
    .apex-menu,
    .apex-menu.menu-active .apex-menu-panel {
        transition-duration: 0.2s !important;
    }
    .apex-menu .menu-scroll-inner > a.menu-link-item {
        filter: none !important;
        transition-duration: 0.15s !important;
    }
    .animate-on-scroll {
        filter: none !important;
        transition-duration: 0.25s !important;
    }
    .apex-marquee-track:not(.apex-marquee-track--live) {
        animation: none !important;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }
    .apex-marquee-track.apex-marquee-track--live {
        animation: none !important;
    }
    .apex-404-num {
        animation: none !important;
    }
}
