/* --- Base Reset --- */
body, html { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; font-family: 'Lato', sans-serif; background-color: #000; }
h1, h2, h3, h4, h5 { font-family: 'Rufina', serif; }

#fullpage-wrapper { position: relative; width: 100vw; height: 100dvh; overflow: hidden; }
.fp-section { position: absolute; top: 0; left: 0; width: 100vw; height: 100dvh; }
.fp-section.ready-to-animate { transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1); }

/* Strefa bezpieczeństwa dla zawartości Fullpage */
#fullpage-wrapper .fp-section .container {
    padding-top: 100px; /* Chroni przed logo i menu od góry */
    position: relative;
    z-index: 1; /* Upewnia się, że kontener jest pod pływającym UI (z-index logo/menu to zwykle 10+) */
}

/* Na większych ekranach dodajemy marginesy po bokach */
@media (min-width: 992px) {
    #fullpage-wrapper .fp-section .container {
        padding-left: 80px;  /* Odstęp od lewej krawędzi (logo) */
        padding-right: 80px; /* Odstęp od prawej krawędzi (hamburger) */
    }
}


/* Skalowanie typografii na urządzeniach mobilnych */
@media (max-width: 768px) {
    #fullpage-wrapper .display-1 {
        font-size: 2.8rem; /* Zmniejszamy bazowy rozmiar (domyślnie to ok. 5-6rem) */
        line-height: 1.1;
        word-wrap: break-word; /* Wymusza łamanie długich słów zamiast wychodzenia poza ekran */
    }
    #fullpage-wrapper h2 {
        font-size: 1.9rem; /* Zmniejszamy bazowy rozmiar (domyślnie to ok. 5-6rem) */
        line-height: 1.1;
        word-wrap: break-word; /* Wymusza łamanie długich słów zamiast wychodzenia poza ekran */
    }
    
    #fullpage-wrapper .fp-section .container {
        padding-top: 120px; /* Na małych ekranach UI zajmuje relatywnie więcej miejsca, dajemy większy bufor z góry */
    }
}

/* --- Proportional Logo --- */
.floating-logo { position: fixed; top: 20px; left: 20px; z-index: 1100; width: 140px; height: auto; transition: all 0.5s ease; }
.floating-logo svg { width: 100%; height: auto; display: block; }
.logo-colour { fill: #000; transition: fill 0.5s ease-in-out; }

/* --- Hamburger Animation & Color Fix --- */
.main-nav { position: fixed; top: 20px; right: 20px; z-index: 1100; }
.hamburger { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.hamburger-line { 
    display: block; width: 28px; height: 2px; background-color: #000; 
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.5s ease; 
}

/* Force Cross to White when active (visibility fix against dark overlay) */
.hamburger.active .hamburger-line { background-color: #ffffff !important; }

/* X Transformation */
.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); }

/* Adaptive Helpers */
.bg-white { background-color: #ffffff; }

/* --- Menu Overlay --- */
.menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.98); z-index: 1050;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: all 0.5s ease-in-out;
}
.menu-overlay.active { opacity: 1; visibility: visible; }
.overlay-content a {
    display: block; color: #fff; font-size: 3rem; text-decoration: none;
    font-family: 'Rufina', serif; margin: 20px 0; text-transform: uppercase;
    transition: transform 0.3s ease, opacity 0.3s ease; opacity: 0; transform: translateY(20px);
}
.menu-overlay.active a { opacity: 1; transform: translateY(0); }
.menu-overlay.active a:nth-child(1) { transition-delay: 0.2s; }
.menu-overlay.active a:nth-child(2) { transition-delay: 0.4s; }

/* --- Section Animations --- */
.fp-section h1, .fp-section h2, .fp-section p, .fp-section .fp-btn, .fp-section .fp-image { opacity: 0; transform: translateY(20px); }
.fp-section.is-active h1 { opacity: 1; transform: translateY(0); transition: 0.8s ease 0.4s; }
.fp-section.is-active h2 { opacity: 1; transform: translateY(0); transition: 0.8s ease 0.6s; }
.fp-section.is-active p, .fp-section.is-active .fp-btn, .fp-section.is-active .fp-image { opacity: 1; transform: translateY(0); transition: 0.8s ease 0.8s; }

@media (min-width: 768px) {
    .floating-logo { width: 200px; left: 40px; top: 30px; }
    .main-nav { right: 40px; top: 30px; }
}

#fp-nav { display: none; position: fixed; top: 50%; right: 30px; transform: translateY(-50%); z-index: 999; flex-direction: column; gap: 15px; }
@media (min-width: 768px) { #fp-nav { display: flex; } }
.fp-dot { width: 10px; height: 10px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.4); cursor: pointer; transition: 0.3s; }
.fp-dot.active { background-color: #fff; transform: scale(1.4); }

:root {
    /* Soft Mint */
    --lead-color-01: rgba(193, 225, 193, 1); 
    /* Deep Terracotta (Dark Peach) */
    --lead-color-02: rgba(186, 104, 91, 1); 
    /* Slate Gray */
    --lead-color-03: rgba(87, 96, 105, 1); 
    /* Powder Blue */
    --lead-color-05: rgba(174, 217, 241, 1); 
}
.background-lead-01{ background: var(--lead-color-01); }
.background-lead-02{ background: var(--lead-color-02); }
.background-lead-03{ background: var(--lead-color-03); }
.background-lead-05{ background: var(--lead-color-05); }

.scroll-indicator { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; z-index: 10; animation: float 2s infinite; }
.mouse { width: 24px; height: 38px; border: 2px solid rgba(255,255,255,0.7); border-radius: 12px; position: relative; }
.wheel { width: 4px; height: 6px; background: #fff; border-radius: 2px; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); animation: scroll-dot 1.5s infinite; }
@keyframes scroll-dot { 0% { opacity: 0; transform: translate(-50%, 0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50% , 12px); } }
@keyframes float { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -10px); } }

/* --- Contact Modal --- */
.custom-modal {
    display: flex; 
    visibility: hidden; 
    position: fixed; 
    z-index: 9999; 
    left: 0; 
    top: 0;
    width: 100vw; 
    height: 100dvh; 
    background-color: rgba(0, 0, 0, 0.85); 
    align-items: center; 
    justify-content: center; 
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.custom-modal.show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.custom-modal-content {
    background-color: #111; 
    padding: 40px;
    width: 90%; 
    max-width: 500px; 
    position: relative;
    transform: translateY(20px); 
    transition: transform 0.3s ease;
    border: 1px solid #333;
}

.custom-modal.show .custom-modal-content { transform: translateY(0); }
.close-modal { position: absolute; top: 15px; right: 20px; color: #888; font-size: 28px; line-height: 1; cursor: pointer; transition: color 0.2s ease; }
.close-modal:hover { color: #fff; }
.custom-modal-content .form-control::placeholder { color: #777; }

/* --- Dynamiczne kolory Myszki (Scroll Indicator) --- */
.scroll-indicator.indicator-dark .mouse { border-color: rgba(0,0,0,0.7); }
.scroll-indicator.indicator-dark .wheel { background: #000; }
.scroll-indicator.indicator-dark .scroll-text { color: #000; font-weight: 500; }

.scroll-indicator.indicator-light .mouse { border-color: rgba(255,255,255,0.7); }
.scroll-indicator.indicator-light .wheel { background: #fff; }
.scroll-indicator.indicator-light .scroll-text { color: #fff; }

/* 🌟 DYNAMICZNE KOLORY KROPKA NAWIGACYJNEGO NA JASNYM TLE 🌟 */
#fp-nav.nav-on-light .fp-dot { background-color: rgba(0, 0, 0, 0.3); }
#fp-nav.nav-on-light .fp-dot.active { background-color: #000000; }