/* =====================================================================
   POL-PLAN Agronamioty – arkusz stylów. Kolory zmienisz w sekcji :root.
   Granat z logo POL-PLAN + żółć poszycia hal ze zdjęć.
   ===================================================================== */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

:root {
  --navy: #00336B;        /* granat z logo POL-PLAN */
  --navy-dark: #0A2240;
  --navy-soft: #E6EDF5;
  --yellow: #F2B705;      /* żółte poszycie dachu */
  --yellow-dark: #C99600;
  --ink: #0F1B2A;
  --muted: #536173;
  --paper: #F5F6F8;
  --line: #D9E0E8;
  --white: #fff;
  --wrap: 1200px;
  --font: "Archivo", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--white); }
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: .2em; }
a:hover { color: var(--navy-dark); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

h1, h2, h3 { font-weight: 800; font-stretch: 85%; line-height: 1.05; letter-spacing: -.01em; margin: 0 0 .55em; }
h2 { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.3rem); color: var(--navy-dark); }
h3 { font-size: 1.3rem; font-stretch: 95%; }
p { margin: 0 0 1em; }
.lead { font-size: 1.22rem; line-height: 1.55; }
.section-lead { max-width: 62ch; color: var(--muted); }
.nowrap { white-space: nowrap; }
.kicker { font-weight: 700; color: var(--yellow-dark); margin: 0 0 .4rem; font-size: 1rem; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--yellow); color: var(--ink); padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border: 2px solid transparent; border-radius: 4px;
  font: 700 1.02rem/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; margin: 0 .45rem .5rem 0;
}
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #FFC81F; color: var(--ink); }
.btn-light { border-color: rgba(255,255,255,.75); color: var(--white); background: rgba(10,34,64,.25); }
.btn-light:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn-outline { border-color: rgba(255,255,255,.5); color: var(--white); }

/* ---------- nagłówek ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; padding-block: .7rem; }
.brand { display: flex; flex-direction: column; text-decoration: none; }
.brand img { width: 170px; height: auto; display: block; }
.brand-sub { font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; margin-top: .15rem; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: .15rem; margin: 0; padding: 0; align-items: center; }
.site-nav a { display: block; padding: .5rem .7rem; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; }
.site-nav a:hover, .site-nav a.is-active { border-bottom-color: var(--yellow); color: var(--ink); }
.site-nav a.nav-cta { background: var(--navy); color: var(--white); border-radius: 4px; border-bottom: 0; padding: .55rem .95rem; margin-left: .35rem; }
.site-nav a.nav-cta:hover, .site-nav a.nav-cta.is-active { background: var(--navy-dark); color: var(--white); }
.nav-toggle {
  display: none; margin-left: auto; align-items: center; gap: .5rem; padding: .5rem .85rem;
  border: 2px solid var(--line); border-radius: 4px; background: var(--white); font: 700 1rem var(--font); color: var(--ink); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: ""; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

/* ---------- hero: zdjęcia na całą szerokość ---------- */
.hero { position: relative; min-height: min(78vh, 760px); display: grid; align-items: end; color: var(--white); overflow: hidden; background: var(--navy-dark); }
.hero-slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.4s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide.is-active img { animation: kenburns 9s ease-out both; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,34,64,0) 35%, rgba(10,34,64,.45) 62%, rgba(10,34,64,.85) 100%), linear-gradient(90deg, rgba(10,34,64,.35), rgba(10,34,64,0) 60%); pointer-events: none; }
.hero-content { position: relative; z-index: 2; padding-block: 3rem 3.5rem; }
.hero h1 { font-size: clamp(2.5rem, 1.5rem + 4.2vw, 4.8rem); font-stretch: 78%; max-width: 15ch; margin-bottom: 1rem; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.hero-lead { font-size: 1.22rem; max-width: 50ch; color: #E8EEF5; }
.hero-actions { margin-top: 1.4rem; }
.slider-dots { position: absolute; right: max(1.25rem, calc((100vw - var(--wrap)) / 2)); bottom: 1.4rem; z-index: 3; display: flex; gap: .45rem; }
.slider-dots button { width: .75rem; height: .75rem; border-radius: 50%; border: 2px solid var(--white); background: transparent; padding: 0; cursor: pointer; }
.slider-dots button[aria-current="true"] { background: var(--yellow); border-color: var(--yellow); }

/* pasek z parametrami – żółty jak poszycie */
.facts-band { background: var(--yellow); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block: 0; }
.facts div { padding: 1.2rem 1.4rem 1.3rem; }
.facts div + div { border-left: 1px solid rgba(15,27,42,.18); }
.facts dt { font-size: .92rem; font-weight: 600; color: rgba(15,27,42,.75); }
.facts dd { margin: 0; font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); font-weight: 800; font-stretch: 80%; line-height: 1.05; color: var(--ink); }
.facts dd.note { font-size: .9rem; font-weight: 500; font-stretch: 100%; color: rgba(15,27,42,.75); margin-top: .2rem; }

/* ---------- sekcje ---------- */
.band { padding-block: clamp(3.25rem, 7vw, 6rem); }
.band--tint { background: var(--paper); }
.band--dark { background: var(--navy-dark); color: #D3DDE8; }
.band--dark h2 { color: var(--white); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 2rem 4.5rem; align-items: start; }
.split p { max-width: 64ch; }
.photo { display: block; }
.photo img { display: block; width: 100%; border-radius: 6px; }

/* sekcje produktowe: zdjęcia + tekst */
.feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; background: var(--paper); }
.feature--reverse { background: var(--white); }
.feature--reverse .feature-media { order: 2; }
.feature-media { position: relative; min-height: 560px; }
.feature-media > .photo:first-child { position: absolute; inset: 0; }
.feature-media > .photo:first-child img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.feature-media > .photo:nth-child(2) { position: absolute; width: 38%; right: 1.5rem; bottom: -2rem; z-index: 2; border: 6px solid var(--white); box-shadow: 0 16px 32px rgba(0,0,0,.25); border-radius: 6px; }
.feature--reverse .feature-media > .photo:nth-child(2) { right: auto; left: 1.5rem; }
.feature-media > .photo:nth-child(2) img { border-radius: 2px; aspect-ratio: 4 / 3; object-fit: cover; }
.feature-text { padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4.5rem); align-self: center; max-width: 640px; }
.feature-text p { color: #2E3B4C; }

/* konstrukcja – rysunek techniczny z PSD katalogu */
.tech-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2.5rem 4rem; align-items: center; }
.technical .kicker { color: var(--yellow); }
.spec { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.spec li { padding: .7rem 0 .7rem 1.6rem; border-bottom: 1px solid rgba(255,255,255,.12); position: relative; }
.spec li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: .7rem; height: .7rem; background: var(--yellow); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.spec strong { color: var(--white); }
.norms { font-size: .95rem; color: #AFC0D2; }
.norms span { display: inline-block; margin: .35rem .3rem 0 0; padding: .2rem .55rem; border: 1px solid rgba(255,255,255,.25); border-radius: 3px; color: var(--white); font-weight: 600; }
.drawing { margin: 0; background:
  linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 24px 24px,
  linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 24px 24px, #0E2B50;
  border: 1px solid rgba(255,255,255,.15); border-radius: 6px; padding: 1rem; }
.drawing img { display: block; width: 100%; }
.drawing figcaption { font-size: .85rem; color: #93A8BF; margin-top: .5rem; }

.atuty { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.atuty li { border-left: 4px solid var(--yellow); padding: .3rem 0 .3rem 1.25rem; }
.atuty h3 { margin-bottom: .25rem; color: var(--navy-dark); }
.atuty p { margin: 0; color: var(--muted); }
#hale_magazynowe .photo { margin-top: 1.5rem; }

/* ---------- galeria z filtrami ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 1.25rem; }
.filter { font: 700 1rem var(--font); padding: .55rem 1rem; border: 2px solid var(--line); background: var(--white); color: var(--ink); border-radius: 999px; cursor: pointer; }
.filter span { font-weight: 500; color: var(--muted); margin-left: .2rem; }
.filter:hover { border-color: var(--navy); }
.filter.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.filter.is-active span { color: #BFD0E2; }
.gallery { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gallery--kat li:nth-child(7n+1) { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; border-radius: 4px; transition: transform .35s ease, filter .35s ease; }
.gallery a { display: block; height: 100%; overflow: hidden; border-radius: 4px; }
.gallery a:hover img { transform: scale(1.05); filter: brightness(1.05); }

/* ---------- zapytanie ofertowe ---------- */
.rfq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 2rem 4rem; align-items: start; }
.rfq-intro { position: sticky; top: 6rem; }
.contact-card { margin-top: 1.5rem; padding: 1.25rem 1.4rem; background: var(--paper); border-radius: 6px; }
.contact-person { margin-bottom: .5rem; }
.contact-list { list-style: none; padding: 0; margin: 0 0 .8rem; }
.contact-list li { display: flex; flex-wrap: wrap; gap: .2rem 1rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.contact-list span { width: 5.5rem; color: var(--muted); }
.contact-list a { font-weight: 700; text-decoration: none; }
.contact-company { font-size: .92rem; color: var(--muted); margin: 0; }

.rfq { background: var(--white); border: 1px solid var(--line); border-top: 6px solid var(--navy); border-radius: 6px; padding: clamp(1.25rem, 3vw, 2.25rem); display: grid; gap: 1.25rem; }
.rfq fieldset { border: 0; margin: 0; padding: 0 0 1.25rem; border-bottom: 1px solid var(--line); }
.rfq legend { font-weight: 800; font-stretch: 90%; font-size: 1.25rem; color: var(--navy-dark); margin-bottom: .75rem; padding: 0; }
.rfq legend span, .field label span { font-weight: 400; color: var(--muted); font-size: .9rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.span-2 { grid-column: 1 / -1; }
.field label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: .25rem; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); padding: .65rem .8rem; border: 1.5px solid #BCC7D3; border-radius: 4px; background: var(--white);
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0,51,107,.15); }
[aria-invalid="true"] { border-color: #C0392B !important; }
.sub { font-weight: 700; font-size: .95rem; margin: 1rem 0 .4rem; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-block; padding: .5rem .9rem; border: 1.5px solid #BCC7D3; border-radius: 999px; font-weight: 600; font-size: .95rem; transition: background-color .15s; }
.choice input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.choice input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; color: var(--muted); cursor: pointer; line-height: 1.45; }
.consent input { margin-top: .2rem; width: 1.05rem; height: 1.05rem; accent-color: var(--navy); flex: none; }
.form-note { margin: -.5rem 0 0; font-size: .9rem; color: var(--muted); }
.rfq .btn { justify-self: start; margin: 0; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { padding: .85rem 1rem; font-weight: 600; margin: 0; border-radius: 4px; }
.form-msg.is-ok { background: #E3F2E8; color: #1D5E33; }
.form-msg.is-error { background: #FBE5E3; color: #8A1F14; }

/* ---------- stopka (kontakt) ---------- */
.site-footer { background: var(--navy); color: #C9D7E6; padding: 3rem 0 1rem; border-top: 6px solid var(--yellow); }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem 3rem; }
.footer-logo { width: 190px; display: block; margin-bottom: 1rem; }
.footer-h { font-size: 1.3rem; color: var(--white); margin-bottom: .6rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .35rem; }
.copyright { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1rem; font-size: .85rem; color: #93A9C2; }
.call-bar { display: none; }

/* ---------- podgląd zdjęć ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(6, 16, 30, .94); }
.lightbox figure { margin: 0; height: 100%; display: grid; place-items: center; align-content: center; gap: .6rem; padding: 3.5rem 4rem 1.5rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 7rem); object-fit: contain; border-radius: 4px; }
.lightbox figcaption { color: #E3EAF2; text-align: center; font-size: .95rem; }
.lightbox button { position: absolute; border: 0; width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer; background: rgba(255,255,255,.15); color: #fff; font-size: 2rem; line-height: 1; display: grid; place-items: center; }
.lightbox button:hover { background: var(--yellow); color: var(--ink); }
.lb-close { top: .8rem; right: .8rem; }
.lb-prev { left: .8rem; top: 50%; translate: 0 -50%; }
.lb-next { right: .8rem; top: 50%; translate: 0 -50%; }

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .site-nav a { padding: .5rem .5rem; font-size: .95rem; }
}
@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: .5rem .75rem 1rem; }
  .site-nav a { padding: .8rem .5rem; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .site-nav a.nav-cta { margin: .6rem 0 0; text-align: center; }
  .split, .tech-grid, .rfq-wrap { grid-template-columns: minmax(0, 1fr); }
  .rfq-intro { position: static; }
  .feature, .feature--reverse { grid-template-columns: minmax(0, 1fr); }
  .feature--reverse .feature-media { order: 0; }
  .feature-media { min-height: 380px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(3) { border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid rgba(15,27,42,.18); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- telefon ---------- */
@media (max-width: 760px) {
  body { font-size: 1rem; padding-bottom: 4.4rem; }
  .wrap { width: min(100% - 1.5rem, var(--wrap)); }
  .brand img { width: 140px; }
  .hero { min-height: 72vh; }
  .hero-actions .btn { width: 100%; margin-right: 0; }
  .slider-dots { top: 1rem; bottom: auto; }
  .facts div { padding: 1rem; }
  .feature-media { min-height: 300px; }
  .feature-media > .photo:nth-child(2) { width: 44%; right: .75rem; bottom: -1.5rem; border-width: 4px; }
  .feature--reverse .feature-media > .photo:nth-child(2) { left: .75rem; }
  .feature-text { padding-top: 3rem; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
  .gallery--kat li:nth-child(7n+1) { grid-column: span 2; grid-row: span 1; }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .rfq .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .call-bar {
    display: flex; gap: .5rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom)); background: var(--navy-dark);
  }
  .call-bar .btn { margin: 0; flex: 1; }
  .lightbox figure { padding: 3.5rem .5rem 1rem; }
  .lb-prev, .lb-next { top: auto; bottom: .8rem; translate: none; }
}

@media print {
  .site-header { position: static; }
  .site-nav, .nav-toggle, .call-bar, .rfq, .hero-slides, .filters { display: none !important; }
  .hero, .band--dark, .site-footer, .facts-band { background: none; color: var(--ink); }
}
