:root {
    color-scheme: dark;

    --bg: #07070b;
    --accent: #597C2C;
    --accent-2: #888C4A;
    --accent-rgb: 89, 124, 44;
    --accent-glow: rgba(89, 124, 44, 0.18);

    --green: #597C2C;
    --olive-dark: #4E4C37;
    --olive-mid: #585836;
    --olive: #566732;
    --olive-light: #878A45;
    --brown: #59483B;

    --text: #e5e5eb;
    --text-dim: #8b8f96;
    --text-mute: #53565d;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: rgba(var(--accent-rgb), 0.35);
    color: #fff;
}

button,
[role="button"],
a[href],
label {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

html {
    background: var(--bg);
    scroll-behavior: smooth;
    overflow: hidden;
    touch-action: none;
    -ms-content-zooming: none;
    -ms-touch-action: none;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: transparent;
    color: var(--text);
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    touch-action: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
    padding: 12px 18px;
    background: #000;
    color: #fff;
    border: 2px solid var(--accent);
    border-radius: 8px;
    z-index: 9999;
    font-size: 14px;
    font-weight: 600;
}

#gradient-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    z-index: 0;
    opacity: 0;
    transition: opacity 2s ease;
    overflow: hidden;
}

#gradient-canvas.loaded { opacity: 1; }

html.no-gradient #gradient-canvas { display: none; }

html.no-gradient body {
    background:
        radial-gradient(ellipse at 25% 15%, #2a2a1c, transparent 55%),
        radial-gradient(ellipse at 80% 80%, #1a2210, transparent 55%),
        #07070b;
}

.gradient-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at center,
                                transparent 0%,
                                rgba(10, 10, 12, 0.35) 65%,
                                rgba(10, 10, 12, 0.8) 100%);
}

.noise {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 0 0' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.particles {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(58, 69, 85, 0.5);
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    0%   { transform: translateY(100vh) translateX(0)   scale(0);   opacity: 0;   }
    10%  {                                                          opacity: 1;
           transform: translateY(90vh)  translateX(10px) scale(1);                }
    90%  {                                                          opacity: 0.5; }
    100% { transform: translateY(-10vh) translateX(-10px) scale(0.5); opacity: 0; }
}

.stage {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: #fff;
    white-space: nowrap;
}

.hero-title-line { display: inline; }

.hero-title-accent {
    background: linear-gradient(135deg, #597C2C, #888C4A 60%, #878A45);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 200%;
    animation: heroGradShift 6s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 40px rgba(89, 124, 44, 0.35));
}

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

.hero-sub {
    font-size: clamp(15px, 1.4vw, 17px);
    color: var(--text-dim);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.65;
    font-weight: 400;
    white-space: nowrap;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    overflow: hidden;
    transition: box-shadow   0.6s var(--ease-soft),
                background   0.5s var(--ease-soft),
                border-color 0.5s var(--ease-soft),
                filter       0.5s var(--ease-soft);
    font-family: inherit;
}

.btn-hero:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.btn-hero-primary {
    background: linear-gradient(135deg, #597C2C, #888C4A);
    color: #fff;
    box-shadow:
        0 4px  12px rgba(89, 124, 44, 0.25),
        0 14px 40px rgba(89, 124, 44, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-hero-primary:hover {
    filter: brightness(1.08);
    box-shadow:
        0 6px  18px rgba(89, 124, 44, 0.35),
        0 22px 60px rgba(89, 124, 44, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-hero i { font-size: 15px; }

.btn-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg,
                                transparent 40%,
                                rgba(255, 255, 255, 0.35) 50%,
                                transparent 60%);
    transform: translateX(-100%);
    animation: btnShine 3.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes btnShine {
    0%, 60% { transform: translateX(-100%); }
    100%    { transform: translateX(100%); }
}

.hero-link-preview {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.hero-link-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-mute);
    font-weight: 600;
    display: inline-block;
}

.hero-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.02em;
}

.hero-link-chip i { font-size: 11px; color: var(--text-dim); }
.hero-link-host    { color: var(--text); }
.hero-link-slug    { color: #888C4A; font-weight: 700; }

.stage > * {
    opacity: 0;
    animation: heroFadeUp 1.0s cubic-bezier(0.19, 1, 0.22, 1) both;
    will-change: transform, opacity;
}

.stage > *:nth-child(1) { animation-delay: 0.10s; }
.stage > *:nth-child(2) { animation-delay: 0.35s; }
.stage > *:nth-child(3) { animation-delay: 0.60s; }
.stage > *:nth-child(4) { animation-delay: 0.85s; }
.stage > *:nth-child(5) { animation-delay: 1.10s; }

@keyframes heroFadeUp {
    from { opacity: 0; transform: translate3d(0, 40px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0,    0); }
}

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

.logo {
    display: block;
    height: auto;
    transition: filter 0.7s var(--ease-soft);
}

.logo:hover img {
    filter: drop-shadow(0 0  40px rgba(var(--accent-rgb), 0.55))
            drop-shadow(0 0  90px rgba(var(--accent-rgb), 0.4))
            drop-shadow(0 0 180px rgba(var(--accent-rgb), 0.22));
}

.logo img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0  30px rgba(var(--accent-rgb), 0.4))
            drop-shadow(0 0  80px rgba(var(--accent-rgb), 0.3))
            drop-shadow(0 0 160px rgba(var(--accent-rgb), 0.16));
    animation: levitate 4s ease-in-out infinite;
    transition: filter 0.7s var(--ease-soft);
    will-change: transform;
}

[data-physics] {
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

[data-physics]:hover {
    filter: brightness(1.04) drop-shadow(0 0 22px rgba(var(--accent-rgb), 0.28));
    transition: filter 0.4s var(--ease);
}

.phys-active {
    animation: none !important;
    opacity: 1 !important;
    will-change: transform;
    z-index: 100;
    position: relative;
}

.phys-grabbing {
    cursor: grabbing !important;
    filter: brightness(1.10) drop-shadow(0 10px 28px rgba(var(--accent-rgb), 0.45));
    transition: filter 0.2s var(--ease);
}

.phys-resting { will-change: auto; }

.dust {
    position: fixed;
    width: 4px;
    height: 4px;
    border-radius: 1px;
    background: rgba(var(--accent-rgb), 0.7);
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.5);
}

.partnerzy {
    position: relative;
    z-index: 3;
    flex-shrink: 0;
    width: 100%;
    max-width: 600px;
    margin: 32px auto 0;
    padding: 8px 16px 16px;
    text-align: center;
    opacity: 0;
    animation: heroFadeUp 1.0s cubic-bezier(0.19, 1, 0.22, 1) 1.10s both;
    will-change: transform, opacity;
}

.part-head {
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.part-title {
    font-size: clamp(15px, 1.6vw, 20px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-dim);
    text-transform: uppercase;
}

.part-slider {
    position: relative;
    width: 100%;
    margin: -46px -16px;
    padding: 50px 0;
    overflow: hidden;
    cursor: grab;
    -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
    mask-image:        linear-gradient(to right, transparent, black 6%, black 94%, transparent);
    user-select: none;
    -webkit-user-select: none;
}

.part-slider.dragging { cursor: grabbing; }

.part-track .part-item.is-extracted,
.part-track .part-item.is-duplicate-hidden {
    visibility: hidden !important;
    pointer-events: none;
}

.part-track {
    display: flex;
    gap: 24px;
    width: max-content;
    will-change: transform;
    padding: 0 8px;
}

.part-item {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 3px;
    align-items: center;
    padding: 8px 16px 8px 8px;
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: border-color 0.4s var(--ease),
                background   0.4s var(--ease),
                box-shadow   0.4s var(--ease);
    text-decoration: none;
    color: inherit;
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
}

.part-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.part-item-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4),
                inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: box-shadow 0.4s var(--ease);
    background: rgba(var(--accent-rgb), 0.1);
    grid-row: 1 / 3;
    grid-column: 1;
}

.part-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.part-item-avatar img.broken { opacity: 0; }

.part-item > span:first-of-type {
    grid-column: 2;
    grid-row: 1;
    font-size: 13px;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    line-height: 1.2;
    align-self: end;
}

.part-source {
    grid-column: 2;
    grid-row: 2;
    font-size: 9px !important;
    color: var(--text-dim) !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
    opacity: 0.7;
    line-height: 1;
    align-self: start;
    white-space: nowrap;
}

.part-item:hover {
    border-color: rgba(var(--accent-rgb), 0.4);
    background: rgba(var(--accent-rgb), 0.06);
    box-shadow: 0 14px 32px rgba(var(--accent-rgb), 0.22);
}

.part-item:hover .part-item-avatar {
    box-shadow: 0 8px 28px rgba(var(--accent-rgb), 0.4),
                inset 0 0 0 1px rgba(var(--accent-rgb), 0.3);
    transform: scale(1.04);
}

.nojs-fallback {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: var(--bg);
    color: var(--text);
    padding: 32px;
    text-align: center;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

html.no-js .nojs-fallback { display: flex; }

html.no-js .stage,
html.no-js .partnerzy,
html.no-js #gradient-canvas,
html.no-js .gradient-overlay,
html.no-js .noise,
html.no-js .particles { display: none !important; }

@media (max-width: 600px) {
    .stage { gap: 20px; padding: 80px 20px 60px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-badge-dot,
    .btn-shine,
    .hero-title-accent,
    .stage > *,
    .logo img,
    .partnerzy {
        animation: none !important;
    }
    .stage > *  { opacity: 1 !important; transform: none !important; }
    .partnerzy  { opacity: 1 !important; }
}
