/* PREFABSTUDIO — poprawki po audycie UX/CRO/SEO, 2026-07-14 */

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10000;
    padding: 0.75rem 1rem;
    background: #fff;
    color: #1e211d;
    border: 2px solid currentColor;
    border-radius: 0.35rem;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
    outline: 3px solid #1e211d !important;
    outline-offset: 3px !important;
}

/* Treść pozostaje dostępna także bez IntersectionObserver/JS. */
.reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
}

/* Dwie kluczowe sekcje były omyłkowo ukrywane na telefonach. */
@media (max-width: 768px) {
    #o-nas + section,
    #benefits {
        display: block !important;
    }
}

/* Długi nagłówek nie może być obcinany przez overflow hero na telefonach. */
@media (max-width: 480px) {
    #hero h1 {
        font-size: clamp(1.4rem, 6vw, 1.55rem);
        line-height: 1.08;
        letter-spacing: 0.02em;
    }
}

.form-status {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(30, 33, 29, 0.24);
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.9);
    color: #1e211d;
    line-height: 1.5;
}

.form-status[data-state="error"] {
    border-color: #9f2f2f;
    color: #782020;
}

.form-status[data-state="success"] {
    border-color: #3f6f4a;
    color: #284d31;
}

.form-status a {
    color: inherit;
    font-weight: 700;
}

.form-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

button[aria-busy="true"] {
    cursor: wait;
    opacity: 0.7;
}

/* CTA nie zasłania przycisków decyzji w banerze cookies. */
body:has(.cookie-banner:not(.cookie-banner--hidden)) .floating-cta {
    display: none;
}

.contact-modal-content[role="dialog"] {
    max-height: min(92vh, 900px);
    overflow-y: auto;
}

/* Jednolity menedżer zgód również na podstronach, które wcześniej nie miały bannera. */
.prefab-consent-generated.cookie-banner,
#cookie-banner {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(25, 28, 24, 0.7);
    color: #fff;
    backdrop-filter: blur(5px);
}

.prefab-consent-generated.cookie-banner.cookie-banner--hidden,
#cookie-banner.cookie-banner--hidden {
    display: none;
}

.prefab-consent-generated .cookie-banner__wrapper,
#cookie-banner .cookie-banner__wrapper {
    width: min(680px, 100%);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    display: grid;
    gap: 1.5rem;
    padding: clamp(1.5rem, 4vw, 2.35rem);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.5rem;
    background: rgba(25, 28, 24, 0.99);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.prefab-consent-generated .cookie-banner__content {
    max-width: 700px;
    line-height: 1.45;
}

.prefab-consent-generated .cookie-banner__content p {
    margin: 0.35rem 0 0;
}

.prefab-consent-generated .cookie-banner__content a {
    color: inherit;
    text-decoration: underline;
}

.prefab-consent-generated .cookie-banner__actions,
#cookie-banner .cookie-banner__actions,
.prefab-consent-generated .cookie-modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.prefab-consent-generated button,
#cookie-essential {
    min-height: 44px;
    padding: 0.7rem 1rem;
    border: 1px solid currentColor;
    border-radius: 0.25rem;
    background: #fff;
    color: #1e211d;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.prefab-consent-generated .btn-secondary,
#cookie-essential {
    background: transparent;
    color: inherit;
}

.prefab-consent-generated.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.prefab-consent-generated .cookie-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.prefab-consent-generated .cookie-modal-content {
    position: relative;
    width: min(620px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 1.35rem;
    border-radius: 0.5rem;
    background: #fff;
    color: #1e211d;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

.prefab-consent-generated .cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.prefab-consent-generated .cookie-modal-close {
    min-width: 44px;
    padding: 0.25rem;
    font-size: 1.7rem;
}

.prefab-consent-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(30, 33, 29, 0.16);
}

.prefab-consent-row span,
.prefab-consent-row small {
    display: block;
}

.prefab-consent-row small {
    margin-top: 0.25rem;
    line-height: 1.4;
}

.prefab-consent-row input {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
}

.footer-cookie-btn {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

#cookie-banner .cookie-banner__actions {
    flex-wrap: wrap;
}

#cookie-banner .cookie-banner__content p {
    margin: 0.3rem 0 0;
    line-height: 1.4;
}

#cookie-banner .cookie-banner__content strong,
#cookie-banner .cookie-banner__content a,
#cookie-banner .btn-secondary {
    color: #fff;
}

#cookie-banner .btn-secondary {
    border-color: rgba(255, 255, 255, 0.72);
    background: transparent;
}

#cookie-banner #cookie-accept {
    border-color: #c1683f;
    background: #c1683f;
    color: #fff;
}

@media (max-width: 760px) {
    .prefab-consent-generated .cookie-banner__wrapper,
    #cookie-banner .cookie-banner__wrapper {
        gap: 1.2rem;
        padding: 1.5rem 1.1rem;
    }

    .prefab-consent-generated .cookie-banner__actions,
    #cookie-banner .cookie-banner__actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    #cookie-banner .cookie-banner__button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-background-video {
        display: none;
    }

    #hero {
        background: url("../media/hero-prefabstudio-poster.webp") center / cover no-repeat;
    }
}
