/* ==========================================================================
   Wiatraczki.com.pl — POLCO PRODUCTS
   Mobile-first, fluid type (clamp), intrinsic grids, container queries
   ========================================================================== */

:root {
  /* Paleta z logo POLCO PRODUCTS: czerwień, błękit, zieleń, żółć, fiolet + granat */
  --ink: #232a7c;
  --ink-soft: #4a518f;
  --bg: #ffffff;
  --bg-soft: #f5f6fc;
  --c-red: #e4322b;
  --c-blue: #0f6bb2;
  --c-green: #159a48;
  --c-yellow: #ffd400;
  --c-violet: #8e4a9e;
  --c-navy: #232a7c;
  --rainbow: linear-gradient(100deg, var(--c-red), var(--c-yellow), var(--c-green), var(--c-blue), var(--c-violet));
  --holo: linear-gradient(115deg, #cfe8ff, #e3d4f0 30%, #ffd9d7 55%, #fff3b0 80%, #cdeedd);

  /* Typografia płynna */
  --step--1: clamp(0.83rem, 0.78rem + 0.29vw, 1rem);
  --step-0:  clamp(1rem, 0.91rem + 0.43vw, 1.19rem);
  --step-1:  clamp(1.2rem, 1.07rem + 0.63vw, 1.56rem);
  --step-2:  clamp(1.44rem, 1.26rem + 0.89vw, 1.95rem);
  --step-3:  clamp(1.73rem, 1.48rem + 1.24vw, 2.44rem);
  --step-4:  clamp(2.07rem, 1.6rem + 2.4vw, 3.4rem);
  --step-5:  clamp(2.5rem, 1.8rem + 3.6vw, 4.4rem);

  --space-s: clamp(0.75rem, 0.69rem + 0.29vw, 0.875rem);
  --space-m: clamp(1rem, 0.93rem + 0.38vw, 1.25rem);
  --space-l: clamp(1.5rem, 1.38rem + 0.57vw, 1.75rem);
  --space-xl: clamp(2rem, 1.86rem + 0.71vw, 2.5rem);
  --space-section: clamp(3.5rem, 8vw, 7rem);

  --radius: 1.25rem;
  --shadow: 0 10px 30px -12px rgb(29 34 51 / .18);
  --wrap: min(72rem, 100% - 2.5rem);

  --z-nav: 30;
  --z-lightbox: 40;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Nunito", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: "Baloo 2", "Nunito", system-ui, sans-serif; line-height: 1.15; }
h1 { font-size: var(--step-5); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.wrap { width: var(--wrap); margin-inline: auto; }

.rainbow-text {
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Pasek tęczowy u góry --- */
.top-ribbon { height: 5px; background: var(--rainbow); }

/* --- Nawigacja --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgb(255 255 255 / .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgb(29 34 51 / .07);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding-block: 0.7rem;
}
.brand { display: flex; align-items: center; }
.brand img {
  height: clamp(2.1rem, 4.5vw, 2.8rem);
  width: auto;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.brand:hover img { transform: scale(1.05) rotate(-2deg); }
@keyframes spin { to { transform: rotate(360deg); } }

.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: var(--step--1);
  white-space: nowrap;
  transition: transform .15s;
}
.nav-phone:hover { transform: translateY(-1px); }
.nav-phone svg { width: 1.1rem; height: 1.1rem; color: var(--c-green); }
@media (min-width: 48em) {
  .nav-phone { order: 3; margin-left: 0; }
}

.nav-toggle {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--bg-soft);
  cursor: pointer;
}
.nav-toggle svg { width: 1.4rem; height: 1.4rem; }

.nav-menu {
  display: none;
  list-style: none;
  padding: 0;
  gap: clamp(0.9rem, 2vw, 1.8rem);
  font-weight: 700;
  font-size: var(--step--1);
}
.nav-menu a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.35rem 0.15rem;
  border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-menu a:hover, .nav-menu a[aria-current="page"] {
  color: var(--ink);
  border-image: var(--rainbow) 1;
  border-bottom: 3px solid;
}

/* Mobile: menu rozwijane */
.nav-menu.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--bg);
  padding: var(--space-l);
  box-shadow: var(--shadow);
  border-bottom: 1px solid rgb(29 34 51 / .07);
}

@media (min-width: 48em) {
  .nav-toggle { display: none; }
  .nav-menu { display: flex; }
}

/* --- Hero --- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--bg);
  padding-block: var(--space-section);
  text-align: center;
}
/* Film w tle hero + nakładka dla czytelności tekstu */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgb(255 255 255 / .82) 0%, rgb(255 255 255 / .6) 45%, rgb(255 255 255 / .38) 100%);
  backdrop-filter: blur(2px);
}
.hero .kicker { color: var(--c-navy); }
.hero p.lead { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .hero-bg { display: none; }
}

/* Pływające plamy w kolorach logo (wyłączone, gdy w tle gra film) */
.hero::before, .hero::after {
  content: none;
  position: absolute;
  z-index: -1;
  width: 42rem; height: 42rem;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .16;
  animation: drift 22s ease-in-out infinite alternate;
}
.hero::before {
  background: radial-gradient(circle at 30% 30%, var(--c-blue), var(--c-violet) 70%);
  top: -18rem; right: -12rem;
}
.hero::after {
  background: radial-gradient(circle at 70% 70%, var(--c-red), var(--c-yellow) 75%);
  bottom: -20rem; left: -14rem;
  animation-delay: -11s;
}
@keyframes drift {
  from { translate: 0 0; rotate: 0deg; }
  to { translate: 4rem 2.5rem; rotate: 30deg; }
}
.hero-tagline {
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  font-size: clamp(1.9rem, 1.1rem + 4.4vw, 4.4rem);
}
.hero-h1 {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: var(--step-1);
  color: var(--ink-soft);
  margin-top: var(--space-s);
  max-width: 40ch;
  margin-inline: auto;
}

/* Wejście hero */
.hero .kicker, .hero h1, .hero p.lead, .hero-cta, .hero-pinwheels {
  animation: rise .7s cubic-bezier(.22,1,.36,1) both;
}
.hero h1 { animation-delay: .08s; }
.hero p.lead { animation-delay: .18s; }
.hero-cta { animation-delay: .28s; }
.hero-pinwheels { animation-delay: .38s; }
@keyframes rise {
  from { opacity: 0; translate: 0 26px; }
  to { opacity: 1; translate: 0 0; }
}
.hero .kicker {
  display: inline-block;
  font-weight: 800;
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-violet);
  margin-bottom: var(--space-s);
}
.hero p.lead {
  max-width: 44ch;
  margin: var(--space-m) auto 0;
  font-size: var(--step-1);
  color: var(--ink-soft);
}
.hero-cta {
  margin-top: var(--space-xl);
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: var(--space-s);
}
.hero-cta .btn { white-space: nowrap; }
@media (max-width: 26em) {
  .hero-cta .btn { font-size: var(--step--1); padding: 0.75em 1.2em; }
}
.hero-pinwheels {
  margin-top: var(--space-xl);
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 4vw, 3rem);
}
.hero-pinwheels svg { width: clamp(3.2rem, 9vw, 6rem); height: auto; }
.hero-pinwheels .pin { transform-box: fill-box; transform-origin: 50% 50%; animation: spin linear infinite; }
.hero-pinwheels svg:nth-child(1) .pin { animation-duration: 7s; }
.hero-pinwheels svg:nth-child(2) .pin { animation-duration: 4.5s; animation-direction: reverse; }
.hero-pinwheels svg:nth-child(3) .pin { animation-duration: 10s; }
.hero-pinwheels svg:nth-child(4) .pin { animation-duration: 6s; animation-direction: reverse; }
.hero-pinwheels svg:nth-child(5) .pin { animation-duration: 8.5s; }

.hero-pinwheels svg { transition: transform .3s; }
.hero-pinwheels svg:hover { transform: scale(1.15); }

@media (prefers-reduced-motion: reduce) {
  .pin, .hero::before, .hero::after,
  .hero .kicker, .hero h1, .hero p.lead, .hero-cta, .hero-pinwheels { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* --- Przyciski --- */
.btn {
  display: inline-block;
  font-weight: 800;
  font-size: var(--step-0);
  text-decoration: none;
  padding: 0.8em 1.7em;
  border-radius: 999px;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--bg-soft); color: var(--ink); }

/* --- Sekcje --- */
.section { padding-block: var(--space-section); }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 52ch; margin-bottom: var(--space-xl); }
.section-head p { color: var(--ink-soft); margin-top: var(--space-s); }

/* --- Kafle kategorii --- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: var(--space-l);
}
.cat-card {
  container-type: inline-size;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--radius);
  overflow: clip;
  background: var(--bg);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px -16px rgb(35 42 124 / .3); }
.cat-card::after {
  content: "";
  position: absolute;
  inset-inline: 0; bottom: 0;
  height: 5px;
  background: var(--rainbow);
  scale: 0 1;
  transform-origin: left;
  transition: scale .35s cubic-bezier(.22,1,.36,1);
}
.cat-card:hover::after { scale: 1 1; }
.cat-card .thumb {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.cat-card:hover .thumb { transform: scale(1.06); }
.cat-card .body { padding: var(--space-l); }
.cat-card .body p { color: var(--ink-soft); font-size: var(--step--1); margin-top: 0.4rem; }
.cat-card .tag {
  position: absolute;
  top: 1rem; left: 1rem;
  font-size: var(--step--1);
  font-weight: 800;
  padding: 0.3em 0.9em;
  border-radius: 999px;
  color: var(--ink);
  background: rgb(255 255 255 / .88);
  backdrop-filter: blur(4px);
}
.cat-card.holo .tag { background: var(--holo); }

/* --- Liczby / atuty --- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
  gap: var(--space-l);
  text-align: center;
}
.stat b {
  display: block;
  font-family: "Baloo 2", sans-serif;
  font-size: var(--step-4);
  line-height: 1;
}
.stat span { color: var(--ink-soft); font-size: var(--step--1); }

/* --- Galeria produktów --- */
.series { margin-bottom: var(--space-xl); }
.series h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--space-m);
}
.series h3::before {
  content: "";
  width: 0.85em; height: 0.85em;
  border-radius: 50%;
  background: var(--rainbow);
  flex: none;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(10.5rem, 100%), 1fr));
  gap: var(--space-s);
}
.gallery a {
  border-radius: 0.9rem;
  overflow: clip;
  background: var(--bg-soft);
  transition: transform .15s;
}
.gallery a:hover { transform: scale(1.03); }
.gallery img { aspect-ratio: 1; object-fit: cover; width: 100%; }

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: none;
  place-items: center;
  background: rgb(20 22 34 / .92);
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
.lightbox.open { display: grid; }
.lightbox img {
  max-height: 88svh;
  max-width: 100%;
  border-radius: 0.75rem;
}
.lightbox button {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 2.75rem; height: 2.75rem;
  border: 0; border-radius: 50%;
  background: rgb(255 255 255 / .15);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

/* --- Dla kogo --- */
.audience-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  border-top: 5px solid;
  border-image: var(--rainbow) 1;
}
.audience-card p { color: var(--ink-soft); font-size: var(--step--1); margin-top: 0.5rem; }

/* --- Galeria zdjec na stronie glownej --- */
.foto-strip { grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); }
.foto-strip img { aspect-ratio: 3 / 4; }

/* --- Sekcja "z pracowni" --- */
.showcase {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xl);
}
.showcase-photo { flex: 1 1 20rem; min-width: 0; margin: 0; }
.showcase-text { flex: 1 1 18rem; min-width: 0; }
.showcase-text p { color: var(--ink-soft); margin-top: var(--space-m); max-width: 48ch; }
.showcase-photo img {
  width: 100%;
  border-radius: var(--radius);
  rotate: -2deg;
  box-shadow: 0 24px 48px -18px rgb(35 42 124 / .35);
  transition: rotate .4s cubic-bezier(.34,1.56,.64,1), transform .4s;
}
.showcase-photo:hover img { rotate: 0deg; transform: scale(1.02); }

/* --- Kontakt --- */
.contact-card {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
}
.contact-card > div { flex: 1 1 18rem; min-width: 0; }
.contact-list { list-style: none; padding: 0; display: grid; gap: var(--space-m); }
.contact-list li { display: flex; gap: 0.8rem; align-items: start; }
.contact-list svg { width: 1.5rem; height: 1.5rem; flex: none; margin-top: 0.2rem; color: var(--c-violet); }
.contact-list a { font-weight: 700; }

/* --- Dlaczego my --- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: var(--space-l);
}
.why-card { text-align: center; }
.why-card .ico {
  width: 3.5rem; height: 3.5rem;
  margin: 0 auto var(--space-s);
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg-soft);
}
.why-card .ico svg { width: 1.8rem; height: 1.8rem; color: var(--c-violet); }
.why-card h3 { font-size: var(--step-0); }
.why-card p { color: var(--ink-soft); font-size: var(--step--1); margin-top: 0.35rem; }

/* --- O nas rozbudowane --- */
.about-split { display: flex; flex-wrap: wrap; gap: var(--space-xl); align-items: center; }
.about-split > div { flex: 1 1 20rem; min-width: 0; }
.about-split img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-split .sig {
  margin-top: var(--space-m);
  font-family: "Baloo 2", cursive;
  font-size: var(--step-1);
  color: var(--c-violet);
}

/* --- Formularz kontaktowy --- */
.contact-form { display: grid; gap: var(--space-m); }
.contact-form label { display: grid; gap: 0.35rem; font-weight: 700; font-size: var(--step--1); }
.contact-form input, .contact-form textarea {
  font: inherit;
  font-size: max(16px, 1rem);
  padding: 0.7rem 0.9rem;
  border: 2px solid rgb(35 42 124 / .15);
  border-radius: 0.75rem;
  background: var(--bg);
  color: var(--ink);
  width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--c-blue);
}
.contact-form textarea { resize: vertical; min-height: 7rem; }
.form-note { font-size: var(--step--1); color: var(--ink-soft); }
.form-status { font-weight: 700; }
.form-status.ok { color: var(--c-green); }
.form-status.err { color: var(--c-red); }

/* --- Stopka --- */
.site-footer {
  background: var(--ink);
  color: rgb(255 255 255 / .72);
  padding-block: var(--space-xl);
  font-size: var(--step--1);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  gap: var(--space-l);
  margin-bottom: var(--space-l);
}
.footer-grid h4 { color: #fff; font-size: var(--step-0); margin-bottom: 0.6rem; }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
.footer-grid a { color: rgb(255 255 255 / .78); text-decoration: none; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.footer-brand img { height: 2.6rem; margin-bottom: var(--space-s); filter: brightness(0) invert(1); }
.footer-social { display: flex; gap: 0.6rem; margin-top: var(--space-s); }
.footer-social a {
  width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / .1);
}
.footer-social svg { width: 1.2rem; height: 1.2rem; }
.footer-bottom {
  border-top: 1px solid rgb(255 255 255 / .15);
  padding-top: var(--space-m);
  display: flex; flex-wrap: wrap; gap: var(--space-s);
  justify-content: space-between;
  font-size: 0.8rem;
}
.footer-bottom a { color: rgb(255 255 255 / .78); }

/* --- Cookie banner --- */
.cookie-bar {
  position: fixed;
  inset-inline: 1rem;
  bottom: 1rem;
  z-index: 50;
  max-width: 42rem;
  margin-inline: auto;
  background: var(--ink);
  color: #fff;
  padding: var(--space-m) var(--space-l);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px -12px rgb(0 0 0 / .5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  align-items: center;
  justify-content: space-between;
  font-size: var(--step--1);
}
.cookie-bar.hidden { display: none; }
.cookie-bar p { flex: 1 1 16rem; }
.cookie-bar a { color: var(--c-yellow); }
.cookie-bar button {
  font: inherit; font-weight: 800;
  padding: 0.6em 1.4em;
  border: 0; border-radius: 999px;
  background: var(--c-green); color: #fff;
  cursor: pointer;
}

/* --- Scroll reveal --- */
.reveal { opacity: 0; translate: 0 22px; transition: opacity .6s, translate .6s; }
.reveal.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; translate: none; transition: none; }
}

/* --- Podstrona: nagłówek --- */
.page-head {
  background: var(--bg-soft);
  padding-block: var(--space-xl);
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: var(--step--1);
  color: var(--ink-soft);
  margin-bottom: var(--space-m);
}
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; font-weight: 700; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 700; }
.page-head p { color: var(--ink-soft); max-width: 60ch; margin-top: var(--space-s); }

/* --- Treść SEO na podstronach --- */
.prose-wide { max-width: 60rem; }
.prose-wide .lead-text { font-size: var(--step-1); color: var(--ink); }
.prose-wide h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-s);
  display: flex; align-items: center; gap: 0.6rem;
}
.prose-wide h2::before {
  content: ""; flex: none;
  width: 0.7em; height: 0.7em;
  border-radius: 50%;
  background: var(--rainbow);
}
.prose-wide p { margin-block: var(--space-m); color: var(--ink-soft); }
.prose-wide .lead-text { color: var(--ink); }
.prose-wide ul { margin: var(--space-m) 0; padding-left: 1.2rem; display: grid; gap: 0.6rem; color: var(--ink-soft); }
.prose-wide li { line-height: 1.55; }
.prose-wide strong { color: var(--ink); }

/* --- Prose (polityka prywatności itp.) --- */
.prose { max-width: 68ch; }
.prose p { margin-block: var(--space-m); text-align: justify; }
