/* public/assets/css/style.css */

/* Ukrycie/stylizacja paska przewijania */
body::-webkit-scrollbar {
    width: 8px;
}
body::-webkit-scrollbar-track {
    background: #0f0f0f;
}
body::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

/* Typografia - zapobieganie wdowom i sierotom */
p, h1, h2, h3, h4, h5, h6 {
    orphans: 2;
    widows: 2;
}

/* Bazowa typografia */
html {
    font-family: 'Manrope', sans-serif;
    text-size-adjust: 100%;
}

body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-kerning: normal;
}

/* Lepsza czytelność dłuższych bloków tekstu */
p {
    text-wrap: pretty;
    overflow-wrap: anywhere;
    hyphens: auto;
}

/* Spójna hierarchia nagłówków */
h1, h2, h3 {
    line-height: 1.15;
    text-wrap: balance;
}

h4, h5, h6 {
    line-height: 1.25;
    text-wrap: balance;
}

/* Hero title: zawsze 3 linie (kontrolowane w home.php) */
.hero-title-line {
    display: block;
    text-align: center;
    white-space: nowrap;
}

.hero-title-gradient {
    display: block;
    text-align: center;
    white-space: nowrap;
}

/* Kontrola łamania linii przez CSS - proste podejście */
.hero-subtitle {
    display: block;
    line-height: 1.3;
    margin: 0 auto;
    overflow-wrap: anywhere;
    word-break: normal;
    word-spacing: 0.12em;
}

.hero-title-2 {
    display: inline-block;
    line-height: 1.1;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
    text-align: center;
    text-wrap: balance;
}

.hero-title-3 {
    display: inline-block;
    line-height: 1.1;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
    text-align: center;
    text-wrap: balance;
}

/* Strzałka przewijania */
.scroll-arrow-container {
    transition: opacity 0.3s ease;
}

.scroll-arrow-container:hover {
    animation-play-state: paused;
}

/* Animacja bounce dla strzałki */
@keyframes gentle-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.scroll-arrow-container {
    animation: gentle-bounce 2s infinite;
}

/* Lepsze style dla pomaranczowego hasła */
.hero-subtitle {
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
}

/* Responsive typography adjustments */
@media (max-width: 768px) {
    .hero-subtitle {
        font-size: 0.875rem;
        letter-spacing: 0.09em;
        line-height: 1.4;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8.8vw, 2.5rem);
        line-height: 1.1;
    }

    .scroll-arrow-shape {
        width: 72px;
        height: 72px;
        padding-top: 8px;
    }
}

@media (min-width: 769px) {
    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 0.12em;
    }
    
    .hero-title {
        font-size: 5rem;
        line-height: 1.1;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 8rem;
    }
}

/* Tekst gradientowy */
.gradient-text {
    background: linear-gradient(to right, #C97A1F, #8F2A14);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Helper classes for animations (prevents flicker on load) */
.anim-hero, 
.gsap-fade-right, 
.card-hover, 
.gsap-fade-up {
    opacity: 0;
}

/* Toast tweaks: container is pointer-events-none, toasts themselves are clickable */
#toast-container > div {
    transition: transform .25s ease, opacity .25s ease;
}

/* Inline field error styles */
.field-error { color: #ff7b7b; }

/* Ostatnia linia pliku CSS z dodatkowymi poprawkami */
.field-invalid { box-shadow: 0 0 0 2px rgba(255, 120, 120, 0.12); border-color: rgba(255, 120, 120, 0.5) !important; }

/* Honeypot should be invisible */
.honeypot { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Dodatkowe poprawki typografii */
/* Lepsze odstępy i kerning dla nagłówków */
h1, h2, h3, h4, h5, h6 {
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
}

/* Lepsze wykrywalność sekcji */
section {
    scroll-margin-top: 80px;
}

/* Zwiększenie kontrastu dla lepszej czytelnośći */
.text-gray-400 {
    color: #9ca3af !important;
}

.text-gray-500 {
    color: #8b929a !important;
}

/* Google Fonts już używa display=swap w URL; font-display działa tylko w @font-face */

/* Uspokojenie animacji dla użytkowników z preferencją reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-arrow-container {
        animation: none;
    }
    
    .anim-hero,
    .gsap-fade-right,
    .card-hover,
    .gsap-fade-up {
        opacity: 1;
    }
}