/* ==========================================================================
   NEXUS CREATIVE AGENCY - MAIN STYLE SHEET (DESIGN SYSTEM)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Tokens (Cyber obsidian, neon accents) */
    --color-bg-base: #070913;       /* Głębia kosmosu */
    --color-bg-panel: rgba(15, 18, 36, 0.7); /* Szklane panele */
    --color-bg-panel-solid: #0f1224;
    
    --color-primary: #8b5cf6;       /* Cyber Purple */
    --color-primary-glow: rgba(139, 92, 246, 0.25);
    
    --color-secondary: #3b82f6;     /* Electric Blue */
    --color-secondary-glow: rgba(59, 130, 246, 0.25);
    
    --color-accent: #ec4899;        /* Cyber Pink/Magenta */
    --color-accent-glow: rgba(236, 72, 153, 0.25);
    
    --color-text-main: #ffffff;
    --color-text-muted: #94a3b8;
    --color-text-dark: #64748b;
    
    --color-border: rgba(139, 92, 246, 0.15);
    --color-border-hover: rgba(236, 72, 153, 0.35);

    --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --border-radius-lg: 16px;
    --border-radius-md: 8px;
    --box-shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glow-primary: 0 0 20px var(--color-primary-glow);
}

/* ==========================================================================
   RESET & GLOBAL BASE STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
}

body {
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    line-height: 1.6;
    font-size: 1rem;
    overflow-x: hidden;
    padding-top: 90px; /* Space for sticky header */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-base);
}
::-webkit-scrollbar-thumb {
    background: var(--color-primary-glow);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Hide default cursor on desktop when custom cursor is active */
@media (min-width: 1025px) {
    html, body, a, button, select, input, textarea {
        cursor: none !important;
    }
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   BACKGROUND GRADIENT SHAPES (MESH BLOB BACKGROUND)
   ========================================================================== */
.bg-glow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    overflow: hidden;
    pointer-events: none;
}

.bg-glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.22;
    mix-blend-mode: screen;
    pointer-events: none;
}

.blob-purple {
    background-color: var(--color-primary);
    width: 500px;
    height: 500px;
    top: -150px;
    left: -150px;
    animation: floatBlob 16s infinite alternate ease-in-out;
}

.blob-blue {
    background-color: var(--color-secondary);
    width: 600px;
    height: 600px;
    bottom: -200px;
    right: -100px;
    animation: floatBlob 20s infinite alternate-reverse ease-in-out;
}

.blob-pink {
    background-color: var(--color-accent);
    width: 400px;
    height: 400px;
    top: 40%;
    left: 50%;
    animation: floatBlob 14s infinite alternate ease-in-out;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(80px, 50px) scale(1.1) rotate(180deg); }
    100% { transform: translate(-40px, -80px) scale(0.9) rotate(360deg); }
}

/* ==========================================================================
   INTERACTIVE CUSTOM CURSOR
   ========================================================================== */
.custom-cursor {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.custom-cursor-follower {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--color-primary);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    /* transition-duration is set in JS using requestAnimationFrame for drag effect */
    transition: transform 0.08s cubic-bezier(0.25, 1, 0.5, 1), width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
}

/* Cursor interaction classes added via JS */
.custom-cursor.hovered {
    width: 12px;
    height: 12px;
    background-color: var(--color-accent);
}

.custom-cursor-follower.hovered {
    width: 50px;
    height: 50px;
    border-color: var(--color-accent);
    background-color: rgba(236, 72, 153, 0.05);
}

/* ==========================================================================
   NAVIGATION BAR (HEADER)
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    z-index: 900;
    background-color: rgba(7, 9, 19, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition-smooth);
}

header.scrolled {
    height: 75px;
    background-color: rgba(7, 9, 19, 0.85);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-brand {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-brand span {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 50%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    width: 28px;
    height: 28px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: rotateLogo 8s infinite linear;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-accent);
}

@keyframes rotateLogo {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-link {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--color-text-main);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--color-text-main);
}

.nav-link.active::after {
    width: 100%;
}

/* Header CTAs */
.nav-cta {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ==========================================================================
   BUTTONS (GLOW & OUTLINE & MAGNETIC)
   ========================================================================== */
.btn-glow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: var(--color-text-white);
    border: none;
    border-radius: var(--border-radius-md);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 15px var(--color-primary-glow);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.btn-glow:hover::before {
    left: 100%;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 23px;
    background: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text-main);
    border-radius: var(--border-radius-md);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    border-color: var(--color-accent);
    background-color: rgba(236, 72, 153, 0.05);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.15);
    transform: translateY(-1px);
}

/* Hamburger Mobile Menu Trigger */
.menu-trigger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
}

.menu-trigger-bar {
    width: 24px;
    height: 2px;
    background-color: var(--color-text-main);
    transition: var(--transition-smooth);
}

/* ==========================================================================
   GLASSMORPHIC CARDS
   ========================================================================== */
.glass-panel {
    background-color: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: var(--color-border-hover);
    box-shadow: 0 10px 40px rgba(236, 72, 153, 0.08);
}

/* ==========================================================================
   SCROLL REVEAL EFFECTS (INTERSECTION OBSERVER)
   ========================================================================== */
.reveal {
    opacity: 0;
    transition: opacity 1.0s cubic-bezier(0.16, 1, 0.3, 1), transform 1.0s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-up {
    transform: translateY(60px);
}

.reveal-down {
    transform: translateY(-60px);
}

.reveal-left {
    transform: translateX(-60px);
}

.reveal-right {
    transform: translateX(60px);
}

.reveal-scale {
    transform: scale(0.9);
}

.reveal.revealed {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Delay modifiers */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ==========================================================================
   SECTION TITLE STYLE
   ========================================================================== */
.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 60px auto;
}

.section-pretitle {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-accent);
    margin-bottom: 12px;
    display: inline-block;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: 2.5rem;
    color: var(--color-text-main);
    margin-bottom: 18px;
    line-height: 1.15;
}

.section-title span {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 50%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-desc {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   INFINITE MARQUEE CSS
   ========================================================================== */
.marquee-wrapper {
    overflow: hidden;
    width: 100%;
    display: flex;
    padding: 30px 0;
    position: relative;
}

.marquee-wrapper::before, .marquee-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}
.marquee-wrapper::before {
    left: 0;
    background: linear-gradient(90deg, var(--color-bg-base), transparent);
}
.marquee-wrapper::after {
    right: 0;
    background: linear-gradient(270deg, var(--color-bg-base), transparent);
}

.marquee-content {
    display: flex;
    gap: 60px;
    animation: infiniteScroll 25s linear infinite;
    flex-shrink: 0;
    min-width: 100%;
    align-items: center;
    justify-content: space-around;
}

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

.marquee-item {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    opacity: 0.4;
    transition: var(--transition-fast);
}

.marquee-item:hover {
    opacity: 0.95;
    color: var(--color-primary);
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
footer {
    background-color: #04050a;
    border-top: 1px solid var(--color-border);
    padding: 80px 0 40px 0;
    font-size: 0.9rem;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-brand h3 {
    margin-bottom: 20px;
}

.footer-brand p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 25px;
    max-width: 250px;
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.social-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-bg-panel-solid);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.social-circle:hover {
    color: var(--color-text-main);
    border-color: var(--color-accent);
    background-color: rgba(236, 72, 153, 0.05);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.25);
    transform: translateY(-2px);
}

.footer-column h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-main);
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.footer-newsletter h4 {
    margin-bottom: 15px;
}

.footer-newsletter p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-input {
    flex-grow: 1;
    background-color: var(--color-bg-panel-solid);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--color-text-main);
    outline: none;
    transition: var(--transition-fast);
}

.newsletter-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary-glow);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-dark);
    font-size: 0.8rem;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a:hover {
    color: var(--color-text-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 75px;
    }

    header {
        height: 75px;
    }

    .nav-menu {
        display: none; /* Mobile menu handled via trigger drawer */
    }

    .menu-trigger {
        display: flex;
    }

    .section-title {
        font-size: 2.1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
