/* Polskie Komisy — szablon statyczny. Design tokens 1:1 z apps/web/tailwind.config.ts,
   żeby wygląd strony klienta i wspólnej aplikacji /oferta (reverse-proxy) się zgadzał. */

:root {
  --ink-950: #0a0d12;
  --ink-900: #11151c;
  --ink-800: #1a2029;
  --ink-700: #252d3a;
  --ink-600: #3a4556;

  --gold-50: #fbf6e9;
  --gold-100: #f5e9c4;
  --gold-300: #e9cd7a;
  --gold-400: #dfb84f;
  --gold-500: #c99a2e;
  --gold-600: #a67c22;
  --gold-700: #8a6520;

  --background: #ffffff;
  --foreground: var(--ink-900);

  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Manrope", var(--font-sans);

  --max-content: 1280px;
  --max-header: 1600px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--foreground);
  background: var(--background);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout ---------- */
.container-page {
  margin-inline: auto;
  width: 100%;
  max-width: var(--max-content);
  padding-inline: 1rem;
}
@media (min-width: 640px) { .container-page { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container-page { padding-inline: 2rem; } }

.section { padding-block: 3.5rem; }
@media (min-width: 640px) { .section { padding-block: 5rem; } }

.section-alt { background: rgba(10, 13, 18, 0.02); }

.prose-body p { margin-bottom: 1rem; line-height: 1.7; color: var(--ink-700); }
.prose-body p:last-child { margin-bottom: 0; }

.page-fade-in { animation: page-fade-in 0.6s ease-out; }
@keyframes page-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Two-column hero layout used on every service page */
.hero-split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 1024px) { .hero-split { grid-template-columns: 1.1fr 0.9fr; } }
.hero-split-image {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  border-radius: 1rem;
}
.hero-split-image img { width: 100%; height: 100%; object-fit: cover; }

.heading-1 { font-size: 2.25rem; font-weight: 800; color: var(--ink-950); line-height: 1.15; }
@media (min-width: 640px) { .heading-1 { font-size: 2.5rem; } }
.heading-2 { font-size: 1.875rem; font-weight: 700; color: var(--ink-900); }
@media (min-width: 640px) { .heading-2 { font-size: 2.25rem; } }
.heading-2-center { text-align: center; }
.heading-3 { font-size: 1.5rem; font-weight: 700; color: var(--ink-900); }
.text-lead { font-size: 1.125rem; }
.blockquote {
  margin: 2rem 0 0;
  padding-left: 1.5rem;
  border-left: 4px solid var(--gold-400);
  font-size: 1.25rem;
  font-weight: 600;
  font-style: italic;
  color: var(--ink-900);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--gold-400); color: var(--ink-950); }
.btn-primary:hover { background: var(--gold-300); }
.btn-secondary { border-color: var(--ink-600); color: #fff; background: transparent; }
.btn-secondary:hover { border-color: var(--gold-400); color: var(--gold-300); }
.btn-secondary-light { border: 1px solid rgba(26, 32, 41, 0.15); color: var(--ink-800); background: transparent; }
.btn-secondary-light:hover { border-color: var(--gold-400); color: var(--gold-700); }
.btn-compact { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-block { width: 100%; }

/* ---------- Card ---------- */
.card {
  border-radius: 1rem;
  border: 1px solid rgba(26, 32, 41, 0.1);
  background: #fff;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(26, 32, 41, 0.1);
}
.site-header-inner {
  margin-inline: auto;
  max-width: var(--max-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-inline: 1rem;
  height: 5rem;
  transition: height 0.3s;
}
@media (min-width: 640px) { .site-header-inner { padding-inline: 1.5rem; } }
.site-header.is-scrolled .site-header-inner { height: 3.5rem; }

.site-logo { font-weight: 800; font-size: 1.875rem; color: var(--ink-950); white-space: nowrap; transition: font-size 0.3s; }
.site-header.is-scrolled .site-logo { font-size: 1.25rem; }
.site-logo .accent { color: var(--gold-500); }

.site-nav { display: none; align-items: center; }
@media (min-width: 1280px) { .site-nav { display: flex; } }
.site-nav a {
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-700);
  transition: background-color 0.2s, color 0.2s;
}
.site-nav a:hover { background: var(--gold-400); color: var(--ink-950); }
.site-nav a.is-active { color: var(--ink-950); text-decoration: underline; text-underline-offset: 4px; }

.site-header-actions { display: none; align-items: center; gap: 0.75rem; flex-shrink: 0; }
@media (min-width: 1280px) { .site-header-actions { display: flex; } }
.site-header-actions .btn-pill {
  white-space: nowrap;
  border-radius: 999px;
  background: var(--gold-400);
  color: var(--ink-950);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}
.site-header-actions .btn-pill:hover { background: var(--gold-300); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
}
@media (min-width: 1280px) { .nav-toggle { display: none; } }
.nav-toggle span { display: block; width: 1.5rem; height: 2px; background: var(--ink-950); transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  top: 5rem;
  z-index: 40;
  overflow-y: auto;
  background: #fff;
}
.mobile-nav.is-open { display: block; }
.mobile-nav-inner { display: flex; flex-direction: column; gap: 0.25rem; padding: 1.5rem 1rem; }
.mobile-nav-inner a {
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-700);
}
.mobile-nav-inner a.is-highlight { background: var(--gold-400); color: var(--ink-950); text-align: center; margin-top: 1rem; }
.mobile-nav-inner .btn { margin-top: 0.5rem; width: 100%; }
@media (min-width: 1280px) { .mobile-nav { display: none !important; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-950); color: rgba(255, 255, 255, 0.8); }
.site-footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-block: 3.5rem;
}
@media (min-width: 640px) { .site-footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .site-footer-grid { grid-template-columns: repeat(3, 1fr); } }
.site-footer h3 { font-size: 1.25rem; font-weight: 800; color: #fff; }
.site-footer h3 .accent { color: var(--gold-400); }
.site-footer p { margin-top: 1rem; max-width: 20rem; font-size: 0.875rem; line-height: 1.6; }
.site-footer-heading { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.5); }
.site-footer ul { margin-top: 1rem; }
.site-footer li { margin-top: 0.5rem; font-size: 0.875rem; }
.site-footer li:first-child { margin-top: 0; }
.site-footer a:hover { color: var(--gold-300); }
.site-footer-social { display: flex; gap: 1rem; margin-top: 1.25rem; font-size: 0.875rem; }
.site-footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.site-footer-bottom-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-block: 1.5rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}
@media (min-width: 640px) { .site-footer-bottom-inner { flex-direction: row; align-items: center; justify-content: space-between; } }
.site-footer-bottom-links { display: flex; gap: 1rem; }

/* ---------- Hero (homepage) ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 85dvh;
  overflow: hidden;
  background: var(--ink-950);
  color: #fff;
  text-align: center;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}
.hero-slides img.is-active { opacity: 0.6; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--ink-950), rgba(10, 13, 18, 0.6), rgba(10, 13, 18, 0.1));
}
.hero-content { position: relative; display: flex; flex-direction: column; align-items: center; padding-block: 6rem; }
.hero-content h1 { display: flex; flex-direction: column; gap: 0.75rem; max-width: 48rem; font-size: 1.875rem; font-weight: 800; line-height: 1.2; }
@media (min-width: 640px) { .hero-content h1 { font-size: 2.5rem; } }
@media (min-width: 1024px) { .hero-content h1 { font-size: 3rem; } }
.hero-content p { margin-top: 1.5rem; max-width: 48rem; font-size: 1.125rem; color: rgba(255, 255, 255, 0.8); }
.hero-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

/* ---------- Services carousel (marquee) ---------- */
.marquee-wrap {
  margin-top: 2.5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 1.5rem;
  animation: marquee 40s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-card {
  display: block;
  width: 16rem;
  flex: none;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
@media (min-width: 640px) { .marquee-card { width: 18rem; } }
.marquee-card:hover { box-shadow: 0 10px 25px rgba(17, 21, 28, 0.08); }
.marquee-card-image { position: relative; aspect-ratio: 1 / 1; width: 100%; }
.marquee-card-image img { width: 100%; height: 100%; object-fit: cover; }
.marquee-card-body { padding: 1.25rem; }
.marquee-card-body h3 { font-size: 1.125rem; font-weight: 700; color: var(--ink-900); }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.feature-grid.cols-2 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .feature-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
.feature-card { padding: 1.5rem; transition: box-shadow 0.2s; }
.feature-card:hover { box-shadow: 0 10px 25px rgba(17, 21, 28, 0.08); }
a.feature-card:hover { border-color: var(--gold-400); }
.feature-card .icon { font-size: 1.875rem; }
.feature-card h3 { margin-top: 1rem; font-size: 1.125rem; font-weight: 700; color: var(--ink-900); }
.feature-card p { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.6; color: var(--ink-700); }

/* ---------- Two-column list ---------- */
.two-col-list { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .two-col-list { grid-template-columns: repeat(2, 1fr); } }
.two-col-list .card { padding: 2rem; }
.two-col-list h3 { font-size: 1.25rem; font-weight: 700; color: var(--ink-900); }
.two-col-list .intro { margin-top: 0.5rem; color: var(--ink-700); }
.two-col-list ul { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.two-col-list li { display: flex; gap: 0.75rem; color: var(--ink-700); }
.two-col-list li .check { margin-top: 0.15rem; color: var(--gold-700); }

/* ---------- Process steps ---------- */
.process-steps { position: relative; border-left: 1px solid rgba(26, 32, 41, 0.15); padding-left: 2rem; margin: 0; }
@media (min-width: 640px) { .process-steps { padding-left: 2.5rem; } }
.process-steps li { position: relative; padding-bottom: 2.5rem; }
.process-steps li:last-child { padding-bottom: 0; }
.process-steps .step-number {
  position: absolute;
  left: -2.5625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--ink-950);
  color: var(--gold-400);
  font-size: 0.875rem;
  font-weight: 700;
}
@media (min-width: 640px) { .process-steps .step-number { left: -3.0625rem; } }
.process-steps h3 { font-size: 1.125rem; font-weight: 700; color: var(--ink-900); }
.process-steps p { margin-top: 0.5rem; line-height: 1.6; color: var(--ink-700); }

/* ---------- FAQ accordion ---------- */
.faq-accordion { padding: 0; }
.faq-item { border-top: 1px solid rgba(26, 32, 41, 0.1); padding: 1.25rem 1.5rem; }
.faq-item:first-child { border-top: none; }
.faq-item[open] { background: rgba(10, 13, 18, 0.02); }
.faq-item summary {
  display: flex;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  color: var(--ink-900);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { flex-shrink: 0; font-size: 1.25rem; color: var(--gold-600); transition: transform 0.2s; }
.faq-item[open] summary .plus { transform: rotate(45deg); }
.faq-item p { margin-top: 0.75rem; color: var(--ink-700); white-space: pre-line; }

/* ---------- Testimonials ---------- */
.testimonials-grid { margin-top: 2.5rem; display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .testimonials-grid { grid-template-columns: repeat(3, 1fr); } }
.testimonial-card { padding: 1.5rem; }
.testimonial-card blockquote { margin: 0; color: var(--ink-700); }
.testimonial-card figcaption { margin-top: 1rem; font-size: 0.875rem; font-weight: 600; color: var(--ink-900); }

/* ---------- CTA banner ---------- */
.cta-banner { background: var(--ink-950); color: #fff; padding-block: 4rem; }
.cta-banner-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; }
@media (min-width: 640px) { .cta-banner-inner { flex-direction: row; align-items: center; justify-content: space-between; } }
.cta-banner h3 { font-size: 1.5rem; font-weight: 700; }
@media (min-width: 640px) { .cta-banner h3 { font-size: 1.875rem; } }
.cta-banner p { margin-top: 0.75rem; color: rgba(255, 255, 255, 0.7); max-width: 42rem; }
.cta-banner-actions { display: flex; flex-wrap: wrap; gap: 1rem; flex-shrink: 0; }

.highlight-box { border-color: rgba(223, 184, 79, 0.3); background: #fff; padding: 2rem; }

/* Full-width Google map directly under the header (/kontakt) */
.contact-map { width: 100%; height: 320px; background: rgba(10, 13, 18, 0.04); border-bottom: 1px solid rgba(26, 32, 41, 0.1); }
.contact-map[hidden] { display: none; }
@media (min-width: 1024px) { .contact-map { height: 420px; } }
.contact-map iframe { display: block; width: 100%; height: 100%; border: 0; }

.info-list { display: flex; flex-direction: column; gap: 1rem; color: var(--ink-800); }
.info-list dd { font-size: 1.125rem; font-weight: 600; }
.card-padded { padding: 1.5rem; }
@media (min-width: 640px) { .card-padded { padding: 2rem; } }
.max-w-form { max-width: 42rem; }
.form-stack { margin-top: 1rem; display: flex; flex-direction: column; gap: 1.5rem; }
.section-clip { overflow: hidden; }
.text-center-narrow { text-align: center; margin-inline: auto; max-width: 42rem; }

/* ---------- Checklist grid (weryfikacja-techniczna) ---------- */
.checklist-grid { margin-top: 2.5rem; display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .checklist-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .checklist-grid { grid-template-columns: repeat(3, 1fr); } }
.checklist-grid li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(26, 32, 41, 0.1);
  background: #fff;
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--ink-800);
}
.checklist-grid li .check { margin-top: 0.125rem; color: var(--gold-700); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field label { font-size: 0.875rem; font-weight: 500; color: var(--ink-800); }
.field .required { color: var(--gold-700); }
.field-row { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .field-row.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px) { .field-row.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.input, .textarea, .select {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid rgba(26, 32, 41, 0.15);
  background: #fff;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--ink-900);
  font-family: inherit;
}
.input:focus-visible, .textarea:focus-visible, .select:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
  border-color: var(--gold-500);
}
.textarea { min-height: 7rem; resize: vertical; }

fieldset { border: none; padding: 0; margin: 0; }
legend { padding: 0; font-size: 0.875rem; font-weight: 500; color: var(--ink-800); }
.option-group { margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.option-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--ink-700); }
.option-label input { accent-color: var(--gold-500); }

.rodo-consent { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.875rem; color: var(--ink-700); }
.rodo-consent input { margin-top: 0.2rem; flex-shrink: 0; accent-color: var(--gold-500); }

.success-notice {
  border-radius: 0.75rem;
  border: 1px solid rgba(223, 184, 79, 0.4);
  background: var(--gold-50);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-900);
}
.form-error { margin-top: 0.75rem; font-size: 0.875rem; font-weight: 500; color: #dc2626; }
/* Honeypot (macro inquiry_guard) — poza ekranem, nie display:none, bo część botów to sprawdza. */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note-box { border-radius: 0.75rem; border: 1px solid rgba(26, 32, 41, 0.1); padding: 1.25rem; }
.form-note-box .label { font-size: 0.875rem; font-weight: 500; color: var(--ink-800); }
.form-note-box .or { color: rgba(37, 45, 58, 0.6); }
.form-note-box .fields { margin-top: 1rem; display: flex; flex-direction: column; gap: 1rem; }

/* ---------- Installment calculator ---------- */
.calculator { padding: 1.5rem; }
@media (min-width: 640px) { .calculator { padding: 2rem; } }
.calculator h3 { font-size: 1.125rem; font-weight: 700; color: var(--ink-900); }
.calculator > p { margin-top: 0.25rem; font-size: 0.875rem; color: var(--ink-700); }
.calculator-grid { margin-top: 1.5rem; display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .calculator-grid { grid-template-columns: repeat(2, 1fr); } }
.calculator-grid label { display: flex; flex-direction: column; gap: 0.375rem; font-size: 0.875rem; font-weight: 500; color: var(--ink-800); }
.calculator-grid input[type="range"] { accent-color: var(--gold-500); }
.calculator-result { margin-top: 1.5rem; border-radius: 0.75rem; background: var(--ink-950); padding: 1.25rem; text-align: center; color: #fff; }
.calculator-result p:first-child { font-size: 0.875rem; color: rgba(255, 255, 255, 0.6); }
.calculator-result .amount { margin-top: 0.25rem; font-size: 1.875rem; font-weight: 800; color: var(--gold-400); }

/* ---------- Generic grids/spacing helpers used across pages ---------- */
.stack { display: flex; flex-direction: column; gap: 2.5rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.max-w-content { max-width: 48rem; }
.max-w-3col { max-width: 48rem; margin-inline: auto; }
