/* ==========================================================================
   KAIM Solutions — styles
   Paleta: granat (główny), niebieski (akcent), zieleń (pozytywne komunikaty)
   ========================================================================== */

:root {
  --color-navy: #0f2440;
  --color-navy-dark: #0a1a30;
  --color-blue: #2f6fed;
  --color-blue-light: #eaf1ff;
  --color-green: #17a673;
  --color-green-light: #e7f8f1;
  --color-gray-50: #f6f8fb;
  --color-gray-100: #eef1f6;
  --color-gray-200: #e2e6ee;
  --color-gray-400: #94a1b8;
  --color-gray-600: #5b6679;
  --color-white: #ffffff;
  --color-text: #1b2536;
  --color-text-muted: #5b6679;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 36, 64, 0.06), 0 1px 3px rgba(15, 36, 64, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 36, 64, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 36, 64, 0.12);

  --container: 1160px;
  --font-sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px; /* kompensuje stały (fixed) nagłówek przy skoku do #kotwicy */
}

html, body { overflow-x: hidden; width: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 76px; /* wysokość stałego nagłówka, żeby treść pod nim nie chowała się */
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Grid items default to min-width:auto, which lets long unbreakable
   content force the track (and the whole page) wider than the viewport.
   These are the two/three-column grids that collapse to 1 column on
   mobile — min-width:0 lets their content wrap/shrink instead. */
.hero-copy, .hero-art,
.contact-info, .contact-form,
.footer-brand, .footer-col {
  min-width: 0;
}

section { padding: 96px 0; }

@media (max-width: 720px) {
  section { padding: 64px 0; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-blue);
  background: var(--color-blue-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}

h1, h2, h3, h4 {
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; }

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-top: 16px;
}

.text-lead {
  font-size: 1.15rem;
  color: var(--color-text-muted);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-navy) 0%, #16345c 100%);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-blue) 0%, #1d56c9 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-navy);
  border: 1.5px solid var(--color-gray-200);
}
.btn-secondary:hover { border-color: var(--color-blue); color: var(--color-blue); transform: translateY(-2px); }

.btn-block { width: 100%; }

/* ---------- Icon sprite ---------- */

.icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-gray-100);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-navy);
}

.brand img { height: 38px; width: auto; }

/* logo-header.png is dark navy on transparent — invert it to white for use on dark backgrounds (footer) */
.brand-mark-invert { filter: brightness(0) invert(1); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--color-blue); }

.header-actions { display: flex; align-items: center; gap: 18px; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--color-navy);
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 24px;
    border-bottom: 1px solid var(--color-gray-100);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
  }
  .nav-links.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-links a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--color-gray-100); }
  .header-actions .btn-primary { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 88px 0 64px;
  overflow: hidden;
  background:
    radial-gradient(1100px 560px at 88% -12%, var(--color-blue-light) 0%, transparent 60%),
    linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 { margin-bottom: 24px; }
.hero h1 span { color: var(--color-blue); }

.hero .text-lead { margin-bottom: 36px; max-width: 480px; }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-trust {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.hero-trust-item { display: flex; align-items: center; gap: 8px; }
.hero-trust-item .icon { width: 18px; height: 18px; color: var(--color-green); }

.hero-art { position: relative; overflow: hidden; }

.hero-blob {
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle at 30% 30%, var(--color-blue-light), transparent 60%),
              radial-gradient(circle at 70% 75%, var(--color-green-light), transparent 55%);
  border-radius: 50%;
  z-index: 0;
}

.icon-wrap.blue { background: var(--color-blue-light); color: var(--color-blue); }
.icon-wrap.green { background: var(--color-green-light); color: var(--color-green); }

.need-check {
  position: relative;
  z-index: 1;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-gray-100);
  max-width: 100%;
  box-sizing: border-box;
}

.need-check-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-blue-light);
  color: var(--color-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.need-check h3 { color: var(--color-navy); font-size: 1.2rem; margin-bottom: 8px; }
.need-check > p { color: var(--color-text-muted); font-size: 0.92rem; margin-bottom: 22px; }

.need-check-form { display: flex; gap: 10px; flex-wrap: wrap; }

.need-check-form input {
  flex: 1;
  min-width: 180px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-gray-200);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color 0.15s ease;
}

.need-check-form input:focus { outline: none; border-color: var(--color-blue); }

.need-check-result {
  display: none;
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
}

.need-check-result.is-visible { display: block; }

.need-check-result.is-positive {
  background: var(--color-green-light);
  border: 1px solid rgba(23, 166, 115, 0.25);
}

.need-check-result.is-negative {
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-100);
}

.need-check-result strong { display: block; color: var(--color-navy); margin-bottom: 4px; }
.need-check-result p { color: var(--color-text-muted); }
.need-check-result .btn { margin-top: 14px; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; padding: 0 8px; }
  .hero .text-lead { max-width: none; }
}

/* ---------- Problems section ---------- */

.problems { background: var(--color-gray-50); }

.problems-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.problem-item {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--color-gray-100);
}

.problem-item .icon-wrap {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.problem-item p { font-weight: 600; color: var(--color-navy); font-size: 1rem; }

.problems-resolve {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, var(--color-navy) 0%, #16345c 100%);
  border-radius: var(--radius-lg);
  color: var(--color-white);
}

.problems-resolve h3 { color: var(--color-white); font-size: 1.6rem; margin-bottom: 8px; }
.problems-resolve p { color: rgba(255,255,255,0.72); }

@media (max-width: 720px) {
  .problems-grid { grid-template-columns: 1fr; }
}

/* ---------- Benefits ---------- */

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.benefit-card {
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-100);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.benefit-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.benefit-card .icon-wrap {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}

.benefit-card h3 { margin-bottom: 10px; }
.benefit-card p { color: var(--color-text-muted); font-size: 0.95rem; }

@media (max-width: 900px) {
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .benefits-grid { grid-template-columns: 1fr; }
}

/* ---------- Services ---------- */

.services { background: var(--color-gray-50); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: start;
}

.service-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-100);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.service-card.is-open { box-shadow: var(--shadow-md); }

.service-card-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px;
  text-align: left;
}

.service-card .icon-wrap {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--color-blue-light); color: var(--color-blue);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.service-card-head-text { flex: 1; }
.service-card-head-text h3 { margin-bottom: 4px; }
.service-card-head-text p { color: var(--color-text-muted); font-size: 0.92rem; }

.service-card-head .chevron { color: var(--color-gray-400); transition: transform 0.2s ease; }
.service-card.is-open .chevron { transform: rotate(180deg); color: var(--color-blue); }

.service-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.service-card-body-inner {
  padding: 0 26px 26px 96px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}

.service-card-body-inner li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.service-card-body-inner li .icon { width: 15px; height: 15px; color: var(--color-green); }

@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .service-card-body-inner { grid-template-columns: 1fr; padding-left: 26px; }
}

/* ---------- Process ---------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.process-step { position: relative; padding-top: 8px; }

.process-step .num {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--color-navy);
  color: var(--color-white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
  margin-bottom: 20px;
}

.process-step h3 { margin-bottom: 8px; font-size: 1.1rem; }
.process-step p { color: var(--color-text-muted); font-size: 0.92rem; }

@media (max-width: 900px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .process-grid { grid-template-columns: 1fr; }
}

/* ---------- Testimonials ---------- */

.testimonials { background: var(--color-gray-50); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testimonial-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px dashed var(--color-gray-200);
}

.testimonial-stars { display: flex; gap: 4px; color: #f5b400; margin-bottom: 16px; }
.testimonial-stars .icon { width: 16px; height: 16px; }

.testimonial-card p.quote {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-author { display: flex; align-items: center; gap: 12px; }

.testimonial-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--color-blue-light); color: var(--color-blue);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}

.testimonial-author strong { display: block; font-size: 0.92rem; color: var(--color-navy); }
.testimonial-author span { font-size: 0.82rem; color: var(--color-text-muted); }

@media (max-width: 900px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* ---------- About ---------- */

.about-content { max-width: 760px; margin: 0 auto; }

.about-content p { color: var(--color-text-muted); margin-bottom: 18px; }
.about-content p:last-child { margin-bottom: 0; }

.about-stats {
  display: flex;
  gap: 16px;
  margin: 28px 0 32px;
  flex-wrap: wrap;
}

.about-stat {
  flex: 1;
  min-width: 180px;
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-100);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.about-stat strong { display: block; font-size: 1.1rem; color: var(--color-navy); }
.about-stat span { font-size: 0.85rem; color: var(--color-text-muted); }

.about-cta { text-align: center; margin-top: 8px; }

/* ---------- FAQ ---------- */

.faq-section { background: var(--color-gray-50); }

.faq { max-width: 780px; margin: 0 auto; }

.faq-item { border-bottom: 1px solid var(--color-gray-100); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  text-align: left;
  font-weight: 700;
  color: var(--color-navy);
  font-size: 1.02rem;
}

.faq-question .chevron { color: var(--color-gray-400); transition: transform 0.2s ease; flex-shrink: 0; }
.faq-item.is-open .chevron { transform: rotate(180deg); color: var(--color-blue); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-answer p { padding: 0 4px 22px; color: var(--color-text-muted); max-width: 640px; }

/* ---------- Contact ---------- */

.contact {
  background: linear-gradient(160deg, var(--color-navy) 0%, #14304f 60%, #16345c 100%);
  color: var(--color-white);
}

.contact .section-head h2 { color: var(--color-white); }
.contact .section-head p { color: rgba(255,255,255,0.65); }

.eyebrow-on-dark { background: #1d3a5f; color: #ffffff; }

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.contact-info-item .icon-wrap {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08); color: var(--color-white);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.contact-info-item strong { display: block; }
.contact-info-item span { font-size: 0.9rem; color: rgba(255,255,255,0.6); }

.contact-info-item a { color: inherit; text-decoration: none; }
.contact-info-item a:hover, .contact-info-item a:focus-visible { text-decoration: underline; }

.contact-info-item--multi { align-items: flex-start; }
.contact-info-item--multi .icon-wrap { margin-top: 2px; }

.contact-info-multi { display: flex; flex-direction: column; gap: 10px; width: 100%; }

.contact-form {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 36px;
  color: var(--color-text);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-field { margin-bottom: 18px; }

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-gray-200);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: border-color 0.15s ease;
  background: var(--color-white);
}

.form-field input:focus,
.form-field textarea:focus { outline: none; border-color: var(--color-blue); }

.form-field textarea { resize: vertical; min-height: 110px; }

.form-note { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 14px; text-align: center; }

.form-status {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
}
.form-status.is-success { display: block; background: var(--color-green-light); color: var(--color-green); }
.form-status.is-error { display: block; background: #fdecea; color: #c0392b; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255,255,255,0.6);
  padding: 56px 0 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 28px;
}

.footer-brand .brand { color: var(--color-white); margin-bottom: 14px; }
.footer-brand p { font-size: 0.9rem; max-width: 320px; }

.footer-col h4 { color: var(--color-white); font-size: 0.95rem; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 0.9rem; transition: color 0.15s ease; }
.footer-col ul li a:hover { color: var(--color-white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
