/* Policz mi to – arkusz stylów
   Mobile-first: style bazowe dla telefonu, potem breakpointy 640 px i 960 px.
   Dwa motywy: jasny (domyślny) i ciemny – automatycznie wg ustawień systemu
   albo ręcznie przyciskiem w nagłówku (atrybut data-theme na <html>). */

/* ---------- Motyw jasny ---------- */
:root {
  --bg: #f7f9f9;
  --surface: #ffffff;
  --ink: #16302d;
  --ink-soft: #4a5f5c;
  --line: #dbe5e3;
  --accent: #0f766e;          /* przyciski, akcenty */
  --accent-hover: #0b5f58;
  --accent-ink: #ffffff;      /* tekst na przycisku */
  --accent-text: #0f766e;     /* linki i nadtytuły */
  --accent-soft: #e3f2ef;
  --warn-soft: #fdf3e2;
  --warn-ink: #9a5b00;
  --footer-bg: #16302d;
  --footer-ink: #d6e2e0;
  --header-bg: #ffffff;
  --logo-ink: #16302d;
  --logo-accent: #0f766e;
  --logo-on: #ffffff;
  --radius: 14px;
  --gutter: 16px;
  --max: 1080px;
  color-scheme: light;
}

/* ---------- Motyw ciemny: wg systemu (o ile ktoś nie wybrał jasnego) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1a19;
    --surface: #162625;
    --ink: #e6efed;
    --ink-soft: #a9bcb8;
    --line: #27403d;
    --accent: #5fd3c4;
    --accent-hover: #86e0d4;
    --accent-ink: #0b1f1d;
    --accent-text: #6fdccd;
    --accent-soft: #15322f;
    --warn-soft: #3a2c12;
    --warn-ink: #f0b45b;
    --footer-bg: #0a1312;
    --footer-ink: #a9bcb8;
    --header-bg: #13211f;
    --logo-ink: #ffffff;
    --logo-accent: #5fd3c4;
    --logo-on: #16302d;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .ico-sun { display: block; }
  :root:not([data-theme="light"]) .ico-moon { display: none; }
}

/* ---------- Motyw ciemny: wybrany ręcznie ---------- */
:root[data-theme="dark"] {
  --bg: #0f1a19;
  --surface: #162625;
  --ink: #e6efed;
  --ink-soft: #a9bcb8;
  --line: #27403d;
  --accent: #5fd3c4;
  --accent-hover: #86e0d4;
  --accent-ink: #0b1f1d;
  --accent-text: #6fdccd;
  --accent-soft: #15322f;
  --warn-soft: #3a2c12;
  --warn-ink: #f0b45b;
  --footer-bg: #0a1312;
  --footer-ink: #a9bcb8;
  --header-bg: #13211f;
  --logo-ink: #ffffff;
  --logo-accent: #5fd3c4;
  --logo-on: #16302d;
  color-scheme: dark;
}
:root[data-theme="dark"] .ico-sun { display: block; }
:root[data-theme="dark"] .ico-moon { display: none; }

/* ---------- Podstawy ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

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

a { color: var(--accent-text); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink); padding: 8px 12px;
}
.skip-link:focus { left: 8px; top: 8px; z-index: 10; }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Nagłówek ---------- */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 64px;
}
.logo { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo-svg { display: block; height: 30px; width: auto; }
.lg-ink { fill: var(--logo-ink); }
.lg-accent { fill: var(--logo-accent); }
.lg-on { stroke: var(--logo-on); }

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

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { background: var(--accent-soft); }
.theme-toggle svg { width: 20px; height: 20px; }
.ico-sun { display: none; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 20px;
  border-radius: 999px; border: 2px solid var(--accent);
  font-weight: 600; font-size: 1rem; text-decoration: none; text-align: center;
  width: 100%;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--accent-text); }
.btn-ghost:hover { background: var(--accent-soft); }

.site-header .header-cta {
  width: auto; min-height: 40px; padding: 8px 14px; font-size: 0.9rem;
}
.cta-long { display: none; }

/* ---------- Sekcje ---------- */
section { padding-block: 48px; }
section + section { border-top: 1px solid var(--line); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 12px; }
h1 { font-size: clamp(1.75rem, 6vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 4.5vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 12px; }
.lead { font-size: 1.1rem; color: var(--ink-soft); }
.eyebrow {
  display: inline-block; margin-bottom: 12px;
  font-size: 0.85rem; font-weight: 600; color: var(--accent-text);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.section-intro { max-width: 680px; margin-bottom: 24px; color: var(--ink-soft); }

/* ---------- Hero ---------- */
.hero { padding-block: 40px 48px; }
.hero-grid { display: grid; gap: 24px; }
.hero-actions { display: grid; gap: 12px; margin-top: 20px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin-bottom: 8px; }

.check-list, .x-list { list-style: none; padding: 0; margin: 0; }
.check-list li, .x-list li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.check-list li::before, .x-list li::before {
  position: absolute; left: 0; top: 0.1em;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.75rem; font-weight: 700;
}
.check-list li::before { content: "✓"; background: var(--accent-soft); color: var(--accent-text); }
.x-list li::before { content: "✕"; background: var(--warn-soft); color: var(--warn-ink); }

/* ---------- Kroki ---------- */
.steps { display: grid; gap: 16px; padding: 0; margin: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps .card { height: 100%; }
.steps .card::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-bottom: 12px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700;
}

/* ---------- Dwie kolumny ---------- */
.two-col { display: grid; gap: 16px; }

/* ---------- Pilotaż i formularz ---------- */
.pilot { background: var(--accent-soft); }
.pilot-grid { display: grid; gap: 24px; }

/* Karta formularza zostaje jasna w obu motywach:
   formularz Tally w darmowym planie ma ciemny tekst i nie da się go przestylować. */
.form-card {
  padding: 8px 4px;
  background: #ffffff; color: #16302d; border-color: #dbe5e3;
}
.form-card iframe { display: block; width: 100%; min-height: 420px; border: 0; }
.form-card .form-fallback { font-size: 0.95rem; color: #4a5f5c; padding: 12px 16px 16px; }
.form-card a { color: #0f766e; }
.small { font-size: 0.875rem; color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 16px 48px 16px 20px; min-height: 48px; position: relative;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--accent-text); line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 20px 16px; color: var(--ink-soft); }

/* ---------- Stopka ---------- */
.site-footer {
  background: var(--footer-bg); color: var(--footer-ink);
  padding-block: 28px; font-size: 0.95rem;
  border-top: 1px solid var(--line);
}
.site-footer a { color: #ffffff; }
.footer-inner { display: grid; gap: 8px; }
.footer-inner p { margin: 0; }

/* ---------- Strony tekstowe (polityka, podziękowanie) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.25rem; margin-top: 32px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.center-page { min-height: 60vh; display: grid; align-content: center; }

/* ---------- Breakpoint: 640 px (duże telefony poziomo, małe tablety) ---------- */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .btn { width: auto; }
  .hero-actions { display: flex; flex-wrap: wrap; }
  .cta-long { display: inline; }
  .cta-short { display: none; }
  .logo-svg { height: 34px; }
  .two-col { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
  section { padding-block: 64px; }
}

/* ---------- Breakpoint: 960 px (tablety poziomo, laptopy) ---------- */
@media (min-width: 960px) {
  .hero { padding-block: 72px; }
  .hero-grid { grid-template-columns: 1.4fr 1fr; align-items: center; gap: 48px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .pilot-grid { grid-template-columns: 1fr 1.2fr; align-items: start; gap: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
