/* --- RESET I ZMIENNE --- */
:root {
    --color-dark: #09090b;      /* Bardzo głęboki ciemny, prawie czarny (startupowy) */
    --color-light: #ffffff;
    --color-gray: #f8fafc;
    --color-accent: #3b82f6;    /* Startupowy niebieski/chabrowy */
    --color-accent-2: #8b5cf6;  /* Startupowy fioletowy */
    --color-text-dark: #1e293b;
    --color-text-light: #f1f5f9;
    
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --anim-duration: 1.2s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    overflow: hidden; /* Do showcase */
    background: var(--color-dark);
    -webkit-font-smoothing: antialiased;
    color: var(--color-text-dark);
}

/* --- UKŁAD SHOWCASE --- */
.showcase-wrapper {
    position: absolute; top: 0; left: 0; width: 100%; height: 100vh;
    transition: transform 1s var(--ease-out-expo); will-change: transform;
}
.screen-section {
    width: 100%; height: 100vh; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}

/* Kolory Bazowe */
.section-light { background-color: var(--color-light); }
.section-gray { background-color: var(--color-gray); }
.text-white { color: #fff !important; }
.text-gray-light { color: #cbd5e1 !important; }

/* --- STARTUP MESH GRADIENTS (Styl Repto.pl) --- */
.section-mesh-gradient {
    background-color: var(--color-dark);
    color: #fff;
    position: relative;
}
.mesh-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
    /* Rozmyte gradienty promieniowe imitujące kolorowe "bloby" */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 40%);
    filter: blur(60px);
    animation: pulseGlow 10s ease-in-out infinite alternate;
}
.mesh-alt {
    background-image: 
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.15), transparent 50%),
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.1), transparent 40%); /* Szmaragdowy akcent */
}
.mesh-final {
    background-image: 
        radial-gradient(circle at 50% 100%, rgba(139, 92, 246, 0.2), transparent 60%);
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; }
}

.relative-z { position: relative; z-index: 2; }

/* Szkło (Glassmorphism) - idealne na tła Mesh */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.glass-panel-dark {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

/* --- HEADER I NAWIGACJA --- */
.main-header { position: fixed; top: 0; left: 0; width: 100%; padding: 30px 50px; display: flex; justify-content: space-between; align-items: center; z-index: 100; pointer-events: none; }
.logo-container, .header-link { pointer-events: auto; }
.logo { height: 35px; width: auto; }
.header-link { font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; text-decoration: none; mix-blend-mode: difference; color: #fff; margin-left: 20px; }

.side-nav { position: fixed; right: 40px; top: 50%; transform: translateY(-50%); z-index: 100; }
.side-nav ul { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.nav-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #888; background: transparent; cursor: pointer; transition: all 0.3s ease; padding: 0; }
.nav-dot.active { background: #888; transform: scale(1.3); }
.nav-dot:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }

/* --- TYPOGRAFIA I UKŁAD --- */
.container { max-width: 1300px; width: 100%; padding: 0 40px; margin: 0 auto; }
.split-layout { display: flex; align-items: center; justify-content: space-between; gap: 80px; }
.split-layout.reverse { flex-direction: row-reverse; }
.split-layout.align-center { justify-content: center; }
.content-left, .content-right { flex: 1; }
.content-full { width: 100%; max-width: 800px; margin: 0 auto; }
.text-content { max-width: 550px; }
.text-center { text-align: center; }

.small-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; font-weight: 600; color: #888; }
h1, h2 { font-size: clamp(40px, 4vw, 65px); font-weight: 700; line-height: 1.1; margin-bottom: 30px; letter-spacing: -1px; }
.massive-text { font-size: clamp(50px, 6vw, 80px); }
p { font-size: 18px; line-height: 1.6; margin-bottom: 30px; opacity: 0.9; }
.center-p { margin: 0 auto 40px auto; max-width: 600px; }

.check-list { list-style: none; margin-bottom: 40px; }
.check-list li { font-size: 16px; font-weight: 500; margin-bottom: 15px; position: relative; padding-left: 25px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--color-accent); font-weight: bold; }

/* --- PRZYCISKI --- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 16px 36px; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; text-decoration: none; border-radius: 6px; transition: all 0.3s ease; border: none; cursor: pointer;}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: #2563eb; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3); }
.btn-white { background: #fff; color: var(--color-dark); }
.btn-white:hover { background: #f0f0f0; transform: translateY(-3px); }
.btn-text { background: transparent; padding: 0; border-bottom: 2px solid currentColor; border-radius: 0; color: inherit; }
.btn-text:hover { color: var(--color-accent); border-color: var(--color-accent); }
.mt-40 { margin-top: 40px; }
.glow-effect { box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 4px; }

/* --- PLACEHOLDERY --- */
.placeholder { display: flex; align-items: center; justify-content: center; color: #888; text-align: center; padding: 20px; width: 100%; border: 1px dashed rgba(150,150,150,0.3);}
.placeholder-tall { height: 600px; }
.placeholder-square { aspect-ratio: 1/1; max-width: 500px; margin: 0 auto; background: rgba(0,0,0,0.03); border-radius: 16px;}
.placeholder-float { height: 500px; border-radius: 20px; box-shadow: 0 30px 60px rgba(0,0,0,0.1); background: #fff;}
.placeholder-cert { height: 350px; max-width: 500px; margin: 0 auto; }

/* --- E-E-A-T GRID --- */
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; max-width: 1100px; margin: 40px auto 0 auto; }
.trust-card { padding: 40px 30px; text-align: left; transition: transform 0.4s var(--ease-out-expo); }
.trust-card:hover { transform: translateY(-10px); }
.trust-icon { font-size: 40px; margin-bottom: 24px; display: inline-block; }
.trust-card h3 { font-size: 22px; margin-bottom: 16px; }

/* --- FAQ AKORDEON --- */
.faq-accordion { width: 100%; max-width: 600px; margin: 0 auto; border-top: 1px solid rgba(0,0,0,0.1); }
.faq-item { border-bottom: 1px solid rgba(0,0,0,0.1); }
.faq-question { width: 100%; background: transparent; border: none; padding: 24px 0; font-size: 18px; font-weight: 600; color: var(--color-text-dark); display: flex; justify-content: space-between; align-items: center; cursor: pointer; text-align: left; transition: color 0.3s ease; }
.faq-question:hover, .faq-question[aria-expanded="true"] { color: var(--color-accent); }
.faq-icon { font-size: 24px; transition: transform 0.4s ease; }
.faq-answer-wrapper { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s ease; }
.faq-answer { overflow: hidden; }
.faq-answer p { font-size: 16px; color: #555; padding-bottom: 24px; margin-bottom: 0; opacity: 0; transform: translateY(-10px); transition: opacity 0.4s ease, transform 0.4s ease; }
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-question[aria-expanded="true"] + .faq-answer-wrapper { grid-template-rows: 1fr; }
.faq-question[aria-expanded="true"] + .faq-answer-wrapper .faq-answer p { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }

/* --- BLOG GRID --- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; max-width: 1100px; margin: 40px auto 0 auto; text-align: left;}
.blog-card { padding: 30px; display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.3s ease; height: 100%; text-decoration: none; color: inherit; }
.blog-card:hover { transform: translateY(-8px); }
.blog-date { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; display: block; }
.blog-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 20px; line-height: 1.4; }

/* --- ANIMACJE --- */
.anim-slide-up { opacity: 0; transform: translateY(60px); transition: all var(--anim-duration) var(--ease-out-expo); }
.anim-slide-left { opacity: 0; transform: translateX(60px); transition: all var(--anim-duration) var(--ease-out-expo); }
.anim-slide-right { opacity: 0; transform: translateX(-60px); transition: all var(--anim-duration) var(--ease-out-expo); }
.anim-zoom-in { opacity: 0; transform: scale(0.9); transition: all var(--anim-duration) var(--ease-out-expo); }
.screen-section.active .anim-slide-up { opacity: 1; transform: translateY(0); }
.screen-section.active .anim-slide-left, .screen-section.active .anim-slide-right { opacity: 1; transform: translateX(0); }
.screen-section.active .anim-zoom-in { opacity: 1; transform: scale(1); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* --- RWD --- */
@media (max-width: 992px) {
    .split-layout, .split-layout.reverse { flex-direction: column; gap: 40px; text-align: center; }
    .content-left, .content-right { width: 100%; }
    .text-content { max-width: 100%; }
    .side-nav { display: none; } 
    body { overflow-y: auto; } 
    .showcase-wrapper { position: static; height: auto; transform: none !important; }
    .screen-section { height: auto; padding: 100px 0; }
    .placeholder-tall { height: 350px; }
    .anim-slide-up, .anim-slide-left, .anim-slide-right, .anim-zoom-in { opacity: 1; transform: none; transition: none; }
}
/* ==========================================================
   DODATKOWE USPRAWNIENIA (WKLEJ NA SAMYM KOŃCU PLIKU)
   ========================================================== */

/* 1. MAGICZNE INWERTOWANIE LOGO (TriK DLA JPG Z BIAŁYM TŁEM) */
.logo-container {
    /* W trybie 'difference' czerń z obrazka reaguje z tłem strony */
    mix-blend-mode: difference;
    display: inline-block;
    z-index: 101;
}

.logo {
    /* Odwracamy oryginalny plik JPG: robi się z niego czarne tło i biały tekst.
       W połączeniu z 'mix-blend-mode: difference' kontenera:
       - Na czarnej sekcji: czarne tło zniknie, biały tekst pozostanie biały.
       - Na jasnej sekcji: czarne tło zniknie, biały tekst stanie się CZARNY! */
    filter: invert(1);
    /* Opcjonalnie delikatnie podbijamy jasność, by biel była czystsza */
    -webkit-filter: invert(1) brightness(1.2);
}


/* 2. NOWOCZESNE GRADIENTY STARTUPOWE DLA JASNYCH SEKCJI (SaaS Style) */

/* Sekcje białe (np. FAQ, Prawo) - subtelny fiolet i błękit */
.section-light {
    background-color: #ffffff;
    background-image: 
        radial-gradient(circle at 5% 5%, rgba(130,189,231, 0.44) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(222,157,32, 0.34) 0%, transparent 40%);
    position: relative;
}


/* Dodatkowy "blob" na środku jasnej sekcji dla głębi */
.section-light::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.02) 0%, transparent 50%);
    pointer-events: none; /* Żeby nie blokowało kliknięć w FAQ */
    z-index: 0;
}

/* Sekcje szare (np. Baza Wiedzy, Proces) - chłodny szmaragd i błękit */
.section-gray {
    background-color: #f8fafc;
    background-image: 
        radial-gradient(circle at 85% 15%, rgba(16, 185, 129, 0.04) 0%, transparent 45%),
        radial-gradient(circle at 15% 85%, rgba(59, 130, 246, 0.03) 0%, transparent 45%);
    position: relative;
}

/* Upewnienie się, że właściwy kontent w jasnych sekcjach jest NAD gradientami */
.section-light .container, 
.section-gray .container {
    position: relative;
    z-index: 2;
}

/* Subtelny glow dla kart na jasnych tłach, by lepiej odstawały od gradientu */
.glass-panel-dark {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.04);
}
/* ==========================================================
   NIEZAWODNE MENU I LOGO (ZALEŻNE OD JASNOŚCI SEKCJI)
   ========================================================== */

/* 1. Reset poprzednich ustawień dla bezpieczeństwa */
.logo-container, .header-link {
    mix-blend-mode: normal !important;
    transition: color 0.4s ease, filter 0.4s ease;
}

/* 2. DOMYŚLNIE (CIEMNE SEKCJE): Logo na biało, bez tła */
.logo {
    /* Odwracamy kolory (białe tło staje się czarne, czarne logo staje się białe) */
    filter: invert(1) brightness(1.2) !important;
    /* Tryb SCREEN sprawia, że CZARNE tło staje się w pełni przezroczyste! */
    mix-blend-mode: screen !important; 
    transition: filter 0.4s ease;
}

.header-link {
    color: #ffffff !important;
}

.nav-dot {
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.nav-dot.active {
    background: #ffffff !important;
    border-color: #ffffff !important;
}

/* 3. MOTYW JASNY (JASNE SEKCJE): Logo na czarno, bez tła */
/* Klasa .light-section-active będzie dodawana przez JS */
body.light-section-active .logo {
    /* Zdejmujemy inwersję (wraca oryginalne czarne logo na białym tle) */
    filter: none !important;
    /* Tryb MULTIPLY sprawia, że BIAŁE tło staje się w pełni przezroczyste! */
    mix-blend-mode: multiply !important;
}

body.light-section-active .header-link {
    color: #1e293b !important; /* Ciemny, startupowy grafit */
}

body.light-section-active .nav-dot {
    border-color: rgba(0, 0, 0, 0.2) !important;
}

body.light-section-active .nav-dot.active {
    background: #1e293b !important;
    border-color: #1e293b !important;
}

/* ==========================================================
   EFEKT GLOWING GRADIENT BORDER DLA KART E-E-A-T
   ========================================================== */

/* 1. Resetujemy domyślne tło i border kart */
.trust-card {
    background: transparent !important; /* Usuwamy stare tło glassmorphism */
    border: none !important;            /* Usuwamy stary, zwykły border */
    padding: 3px !important;            /* Padding to grubość naszej nowej ramki */
    border-radius: 20px !important;     /* Zaokrąglenie ramki zewnętrznej */
    position: relative;
    z-index: 1;
    /* Dodajemy subtelny cień (glow) pod całą kartą */
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.5);
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}

/* 2. Tworzymy gradientowe tło (spodnia warstwa - nasza ramka) */
.trust-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2; /* Musi być pod spodem */
    border-radius: 20px; /* Takie samo zaokrąglenie */
    
    /* GRADIENT (dopasowany do tła sekcji): Niebieski -> Fioletowy -> Szmaragdowy */
    background: linear-gradient(135deg, #3b82f6, #091614, #10b981);
    background-size: 200% 200%;
    
    /* Opcjonalnie: subtelna animacja przesuwania gradientu */
    animation: gradientMove 4s ease infinite alternate !important;
}

/* 3. Tworzymy wnętrze karty (wierzchnia warstwa) */
.trust-card::after {
    content: "";
    position: absolute;
    /* Odsunięcie od krawędzi = grubość ramki (zdefiniowana w paddingu rodzica) */
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    z-index: -1; /* Pomiędzy gradientem a treścią */
    
    /* Kolor tła wnętrza karty (ciemny granat, lekko przezroczysty) */
    background: rgba(9, 9, 11, 0.95);
    border-radius: 17px; /* (border-radius rodzica) - (grubość ramki) */
    backdrop-filter: blur(10px); /* Zachowujemy efekt glassmorphism wewnątrz */
}

/* 4. Style dla treści wewnątrz karty (żeby nie były przyklejone do ramki) */
.trust-card h3,
.trust-card p,
.trust-card .trust-icon {
    padding: 30px; /* Wewnętrzny odstęp treści */
    margin: 0;     /* Reset marginesów */
}

/* 5. Efekt HOVER (najechania myszką) */
.trust-card:hover {
    /* Uniesienie karty */
    transform: translateY(-10px);
    /* Wzmocnienie cienia (glow) */
    box-shadow: 0 20px 50px -15px rgba(139, 92, 246, 0.7);
}

/* Animacja przesuwania gradientu */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* --- POPRAWKA DLA MOBILE --- */
/* Na małych ekranach zmniejszamy trochę padding, żeby karty nie były za duże */
@media (max-width: 768px) {
    .trust-card h3,
    .trust-card p,
    .trust-card .trust-icon {
        padding: 20px;
    }
}

/* ==========================================================
   MENU MOBILNE (HAMBURGER) I ODKLEJANIE PRZY SCROLLU
   ========================================================== */

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 102;
    pointer-events: auto;
}

.hamburger-line {
    display: block;
    width: 26px;
    height: 2px;
    margin: 6px 0;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

/* Ikona hamburgera dopasowuje się do jasnych sekcji (tak jak logo) */
body.light-section-active .hamburger-line {
    background-color: #1e293b !important;
}

/* Telefony i Tablety */
@media (max-width: 992px) {
    .main-header {
        /* Kluczowa zmiana: absolute sprawia, że menu zostaje na górze i przewija się ze stroną */
        position: absolute; 
        padding: 20px;
        background: transparent;
    }

    .hamburger {
        display: block; /* Pokazujemy ikonę na mobile */
    }

    .header-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(9, 9, 11, 0.98); /* Startupowe ciemne, matowe tło */
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 0;
        max-height: 0; /* Menu domyślnie zwinięte */
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        pointer-events: auto;
    }

    /* Klasa dodawana przez JS po kliknięciu w hamburgera */
    .header-links.active {
        max-height: 250px;
        padding: 20px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    .header-link {
        margin: 15px 20px;
        display: block;
        color: #ffffff !important; /* Wewnątrz rozwiniętego czarnego menu tekst musi być biały */
        text-align: center;
        mix-blend-mode: normal !important; /* Wyłączamy efekty blendowania wewnątrz dropdowna */
    }

    /* Animacja zmiany hamburgera w krzyżyk (X) */
    .hamburger.active .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    body { overflow-y: auto; }
    .showcase-wrapper { position: static; height: auto; transform: none !important; }
    .screen-section { height: auto; padding: 100px 0; }
    .anim-slide-up, .anim-slide-left, .anim-slide-right, .anim-zoom-in { transition: none; opacity: 1; transform: none; }
    .mesh-bg { animation: none; } /* Wyłącza pulsowanie tła na życzenie użytkownika */
}