/* =====================================================
 * style.css — wstatucie.pl
 * Po-Tailwind dodatki: prose dla podstron, breadcrumbs, fade-in, cookie banner
 * Paleta: stone / moss / clay (zob. tailwind.config.js)
 * ===================================================== */

body {
    font-family: 'Public Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Animacje Fade-In */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Sticky Header Transition */
nav.is-sticky {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.875rem;
    color: #635c52; /* stone-700 */
}
.breadcrumbs a { color: #48674d; font-weight: 600; } /* moss-700 */
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { color: #b4ada1; padding: 0 0.5rem; } /* stone-400 */
.breadcrumbs .current { color: #1c1b19; } /* stone-950 */

/* Prose - artykuły i podstrony.
   Wszystkie reguły używają :where() — specyficzność 0,
   żeby Tailwindowe klasy na elementach (np. text-stone-900, font-bold)
   normalnie wygrywały. */
:where(.prose) h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1c1b19;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}
:where(.prose) h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1c1b19;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}
:where(.prose) p {
    color: #4b463f; /* stone-800 */
    line-height: 1.75;
    margin-bottom: 1.25rem;
    font-size: 1.0625rem;
}
:where(.prose) ul, :where(.prose) ol {
    color: #4b463f;
    line-height: 1.75;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    font-size: 1.0625rem;
}
:where(.prose) ul { list-style: disc; }
:where(.prose) ol { list-style: decimal; }
:where(.prose) ul li, :where(.prose) ol li { margin-bottom: 0.5rem; }
:where(.prose) strong { color: #1c1b19; font-weight: 700; }
/* :where() zeruje specyficzność selektora — dzięki temu Tailwindowe klasy
   (np. text-stone-900, text-white) na linkach w prose wygrywają normalnie. */
:where(.prose) a { color: #48674d; font-weight: 600; text-decoration: underline; }
:where(.prose) a:hover { color: #3b523e; }
:where(.prose) blockquote {
    border-left: 4px solid #48674d;
    padding: 0.5rem 0 0.5rem 1.5rem;
    color: #635c52;
    font-style: italic;
    margin: 1.5rem 0;
}

/* Reset stylów .prose dla bloków oznaczonych .not-prose
   Tylko text-decoration i font-weight — kolor zostawiamy klasom Tailwind. */
.not-prose a {
    text-decoration: none;
    font-weight: inherit;
}
.not-prose a:hover {
    text-decoration: none;
}

/* ====== Cookie banner ====== */
#cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    background: #1c1b19; /* stone-950 */
    color: #f8f7f5; /* stone-50 */
    border-top: 3px solid #48674d; /* moss-700 */
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
    transform: translateY(100%);
    transition: transform 0.35s ease-out;
}
#cookie-banner.cookie-banner--visible { transform: translateY(0); }
.cookie-banner__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
@media (min-width: 1024px) {
    .cookie-banner__inner {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }
    .cookie-banner__content { flex: 1; }
}
.cookie-banner__content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #ffffff;
}
.cookie-banner__content p {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #d1ccc3; /* stone-300 */
    margin: 0;
}
.cookie-banner__content a {
    color: #7da082; /* moss-400 */
    text-decoration: underline;
    font-weight: 600;
}
.cookie-banner__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}
@media (min-width: 640px) {
    .cookie-banner__actions { flex-direction: row; }
}

.cookie-btn {
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.875rem 1.5rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: filter 0.15s, background-color 0.15s, color 0.15s;
    line-height: 1;
    white-space: nowrap;
    border-radius: 0.5rem;
}
.cookie-btn--primary {
    background: #48674d; /* moss-700 */
    color: #ffffff;
    border-color: #48674d;
}
.cookie-btn--primary:hover { filter: brightness(1.1); }
.cookie-btn--ghost {
    background: transparent;
    color: #f8f7f5;
    border-color: rgba(255, 255, 255, 0.3);
}
.cookie-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ====== Cookie modal ====== */
#cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
#cookie-modal.cookie-modal--open { display: flex; }
.cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 27, 25, 0.7);
    backdrop-filter: blur(2px);
}
.cookie-modal__panel {
    position: relative;
    background: #ffffff;
    color: #1c1b19;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    border-top: 4px solid #48674d;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    outline: none;
    border-radius: 0.75rem;
}
.cookie-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0.5rem;
    border-bottom: 1px solid #e2dfd9;
}
.cookie-modal__header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #1c1b19;
}
.cookie-modal__close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.75rem;
    line-height: 1;
    color: #635c52;
    padding: 0.25rem 0.5rem;
}
.cookie-modal__close:hover { color: #1c1b19; }
.cookie-modal__body {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.cookie-cat {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid #e2dfd9;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: border-color 0.15s;
}
.cookie-cat:hover { border-color: #48674d; }
.cookie-cat input[type="checkbox"] {
    margin-top: 0.25rem;
    accent-color: #48674d;
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}
.cookie-cat input[type="checkbox"]:disabled { opacity: 0.6; cursor: not-allowed; }
.cookie-cat strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1c1b19;
    margin-bottom: 0.25rem;
}
.cookie-cat p {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #635c52;
    margin: 0;
}
.cookie-modal__footer {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid #e2dfd9;
}
@media (min-width: 480px) {
    .cookie-modal__footer { flex-direction: row; justify-content: flex-end; }
}
.cookie-modal__footer .cookie-btn--ghost {
    color: #635c52;
    border-color: #d1ccc3;
}
.cookie-modal__footer .cookie-btn--ghost:hover {
    background: #f1efeb;
    color: #1c1b19;
    border-color: #968e7f;
}

/* Stopka — przycisk "Ustawienia cookies" */
.cookie-settings-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-decoration: underline;
}
.cookie-settings-btn:hover { color: #7da082; }
