/* =============================================================================
   PYK ŁYK — WSPÓLNA BAZA CSS
   -----------------------------------------------------------------------------
   • lekki reset
   • kontrakt zmiennych (każda wersja ustawia swoją paletę/typografię w :root)
   • spójne, dostępne style formularza sterowane zmiennymi (--pl-*)
   Wersje dołączają ten plik PRZED swoim styles.css i tylko nadpisują zmienne.

   KONTRAKT ZMIENNYCH (ustaw w :root każdej wersji):
     --pl-accent           kolor akcentu (CTA, podkreślenia)
     --pl-accent-contrast  kolor tekstu na akcencie (zwykle biały)
     --pl-text             główny kolor tekstu
     --pl-muted            przygaszony tekst
     --pl-bg               tło strony
     --pl-surface          tło kart / paneli
     --pl-border           kolor obramowań
     --pl-radius           promień zaokrągleń (np. 16px)
     --pl-input-bg / --pl-input-border / --pl-input-text  pola formularza
     --pl-font-head / --pl-font-body   rodziny fontów
   ============================================================================= */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--pl-font-body, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  color: var(--pl-text, #1a1a1a);
  background: var(--pl-bg, #fff);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--pl-font-head, inherit); line-height: 1.1; margin: 0 0 .4em; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img, picture, svg { max-width: 100%; display: block; }
picture { display: block; }
picture > img { width: 100%; height: 100%; object-fit: cover; }
/* Galeria (masonry): wysokość kafelka wynika z proporcji obrazka (atrybuty width/height
   w HTML), więc miejsce jest zarezerwowane ZANIM zdjęcie się doładuje — układ nie „rośnie",
   a kotwice (np. „Zapytaj o termin" → #kontakt) trafiają w cel. Nadpisuje height:100% wyżej. */
.pl-gal__pic img { width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

.pl-container { width: min(100% - 2.4rem, 1200px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Domyślna animacja scroll-reveal (wersje mogą nadpisać) --------------------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal][data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal][data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal][data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal][data-reveal-delay="4"] { transition-delay: .32s; }

/* =============================================================================
   MOBILNE MENU — wspólna naprawa panelu nawigacji (dotyczy wszystkich wersji)
   -----------------------------------------------------------------------------
   Problem: po przewinięciu nagłówek (.hdr.is-scrolled) dostaje backdrop-filter,
   który tworzy „containing block" i łapie pozycjonowany panel .nav
   (position:fixed). Skutek: po otwarciu menu i zjechaniu w dół panel zwijał się
   do wysokości nagłówka, a odnośniki „wylewały się" półprzezroczyście na hero.
   Naprawa:
     • na czas otwarcia menu wyłączamy filtr nagłówka → panel znów pozycjonuje
       się względem całego okna (pełna wysokość, nieprzezroczyste tło wersji),
     • blokujemy przewijanie tła,
     • przyciemniamy treść pod panelem (backdrop).
   ============================================================================= */
body.nav-open { overflow: hidden; }
body.nav-open .hdr { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
body.nav-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 95;                       /* pod nagłówkiem (z-index:100), nad treścią */
  background: rgba(18, 14, 10, .55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: pl-nav-backdrop .3s ease both;
}
@keyframes pl-nav-backdrop { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.nav-open::before { animation: none; } }

/* =============================================================================
   FORMULARZ — wspólne, dostępne style (theme przez zmienne --pl-*)
   ============================================================================= */
.pl-form { --f-radius: var(--pl-radius-sm, 12px); }
.pl-form__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.1rem; }
.pl-field { display: flex; flex-direction: column; gap: .4rem; }
.pl-field--full { grid-column: 1 / -1; }
.pl-field__label { font-size: .82rem; font-weight: 600; letter-spacing: .01em; color: var(--pl-muted, #666); }

.pl-input {
  width: 100%;
  font: inherit;
  font-size: .98rem;
  color: var(--pl-input-text, var(--pl-text, #1a1a1a));
  background: var(--pl-input-bg, #fff);
  border: 1px solid var(--pl-input-border, rgba(0,0,0,.18));
  border-radius: var(--f-radius);
  padding: .78rem .9rem;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  appearance: none;
}
textarea.pl-input { resize: vertical; min-height: 108px; }
select.pl-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.4rem;
}
.pl-input::placeholder { color: var(--pl-muted, #999); opacity: .7; }
.pl-input:focus { outline: none; border-color: var(--pl-accent, #e81a41); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pl-accent, #e81a41) 22%, transparent); }
.pl-input:user-invalid { border-color: #d33; }

/* natywna ikona kalendarza czytelna na ciemnym tle */
.pl-input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .6; }

.pl-check { display: flex; gap: .7rem; align-items: flex-start; margin: 1.1rem 0 1.2rem; font-size: .86rem; color: var(--pl-muted, #666); line-height: 1.5; }
.pl-check input { margin-top: .2rem; width: 1.1rem; height: 1.1rem; accent-color: var(--pl-accent, #e81a41); flex: 0 0 auto; }
.pl-check a { color: var(--pl-accent, #e81a41); text-decoration: underline; text-underline-offset: 2px; }

.pl-form__submit {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%;
  font-weight: 700; font-size: 1.02rem;
  color: var(--pl-accent-contrast, #fff);
  background: var(--pl-accent, #e81a41);
  border: none; border-radius: var(--pl-radius, 14px);
  padding: 1rem 1.4rem;
  transition: transform .15s ease, box-shadow .25s ease, filter .2s ease;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--pl-accent, #e81a41) 32%, transparent);
}
.pl-form__submit:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 16px 34px color-mix(in srgb, var(--pl-accent, #e81a41) 40%, transparent); }
.pl-form__submit:active { transform: translateY(0); }
.pl-form__submit svg { stroke-width: 2.2; }

.pl-form__status { margin: .9rem 0 0; font-size: .9rem; min-height: 1.2em; }
.pl-form__status.is-success { color: #1a9d5a; font-weight: 600; }
.pl-form__status.is-error   { color: #d33; font-weight: 600; }
.pl-form__status.is-info    { color: var(--pl-muted, #777); }

@media (max-width: 560px) {
  .pl-form__grid { grid-template-columns: 1fr; }
}
