/* =========================================================
   Marcin Szczyligar — identyfikacja wizualna
   Paleta: ciepła biel + grafit + kobaltowy akcent
   Zero zewnętrznych zależności (font systemowy)
   ========================================================= */

:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --surface-2: #f4f3ef;
  --ink: #14181f;
  --muted: #5b6472;
  --line: #e7e5e0;
  --accent: #2e50e6;
  --accent-ink: #ffffff;
  --accent-soft: #eaeefe;

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1080px;
  --gap: clamp(1.5rem, 4vw, 3rem);

  --shadow: 0 1px 2px rgba(20, 24, 31, 0.04), 0 8px 30px rgba(20, 24, 31, 0.06);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0f14;
    --surface: #12161d;
    --surface-2: #161b23;
    --ink: #eaecef;
    --muted: #9aa3b2;
    --line: #242b35;
    --accent: #6e86ff;
    --accent-ink: #0c0f14;
    --accent-soft: #1a2130;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 34px rgba(0, 0, 0, 0.4);
  }
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-left: max(clamp(1.25rem, 5vw, 2rem), env(safe-area-inset-left));
  padding-right: max(clamp(1.25rem, 5vw, 2rem), env(safe-area-inset-right));
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 66px;
}

.header-inner > * { min-width: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  font-weight: 650;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-name { overflow: hidden; font-size: 0.98rem; text-overflow: ellipsis; white-space: nowrap; }

.nav { display: flex; gap: 1.6rem; }
.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.lang-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.lang-toggle:hover { border-color: var(--accent); }

.menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem max(1rem, env(safe-area-inset-right)) 1rem max(1rem, env(safe-area-inset-left));
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav[data-open] { display: flex; }
  .nav a { display: flex; align-items: center; min-height: 44px; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(3.5rem, 9vw, 6.5rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }

.eyebrow {
  display: inline-block;
  margin: 0 0 1.1rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  font-weight: 700;
  max-width: min(20ch, 100%);
  text-wrap: balance;
}

.hero-lead {
  margin: 1.4rem 0 0;
  max-width: 60ch;
  font-size: clamp(1.05rem, 2.4vw, 1.22rem);
  color: var(--muted);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }

.btn-ghost { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); }

.stats {
  list-style: none;
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.stats li { display: flex; flex-direction: column; gap: 0.25rem; }
.stat-num { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; letter-spacing: -0.02em; }
.stat-label { color: var(--muted); font-size: 0.9rem; }

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(3rem, 7vw, 5rem);
  scroll-margin-top: 5rem;
}

.section-head { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-kicker {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-title { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 700; }

.prose { max-width: 68ch; }
.prose p { margin: 0 0 1.1rem; color: var(--muted); font-size: 1.08rem; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }

.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

.card-num {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.card p { margin: 0; color: var(--muted); font-size: 1rem; }

/* ---------- Highlights ---------- */
.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; max-width: 72ch; }
.highlights li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--ink);
  font-size: 1.06rem;
}
.highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}

/* ---------- Contact ---------- */
.contact-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.75rem, 5vw, 3.5rem);
}
.contact-lead { color: var(--muted); max-width: 52ch; margin: 0.75rem 0 0; font-size: 1.08rem; }

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
@media (max-width: 720px) { .contact-links { grid-template-columns: 1fr; } }

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.contact-link:hover { transform: translateY(-3px); border-color: var(--accent); }
.contact-link-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.contact-link-value { font-weight: 600; font-size: 1.02rem; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(2rem, 6vw, 4rem); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-brand { font-weight: 650; color: var(--ink); }
@media (max-width: 480px) { .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; } }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .wrap {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  .header-inner { height: 60px; }
  .hero { padding-top: 2.75rem; }
  .hero-title { font-size: clamp(2rem, 10vw, 2.5rem); }
  .hero-cta { display: grid; grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .contact-box { padding: 1.25rem; }
}

@media (pointer: coarse) {
  .lang-toggle { min-width: 44px; min-height: 44px; }
}
