/* Ofertado – wspólne style: kolory (jasny i ciemny motyw), czcionki, przyciski, formularze, baner cookies.
   Paleta pochodzi z logo „Kartka”: granat (#2f3fb0) i bursztyn (#f2b233). */

:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #eceffb;
  --ink: #141a33;
  --muted: #566083;
  --line: #d9def0;
  --accent: #2f3fb0;
  --accent-ink: #ffffff;
  --accent-text: #2f3fb0;
  --accent-soft: #e4e8fb;
  --amber: #f2b233;
  --amber-ink: #141a33;
  --danger: #b3261e;
  --ok: #1d7a46;
  --logo-tile: #2f3fb0;
  --logo-soft: 0.35;
  --shadow: 0 1px 2px rgba(20, 26, 51, 0.06), 0 12px 32px rgba(20, 26, 51, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Sora", "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d1020;
  --surface: #151a31;
  --surface-2: #1c2240;
  --ink: #eef0fb;
  --muted: #a4acce;
  --line: #2a3158;
  --accent: #8c99f7;
  --accent-ink: #0d1020;
  --accent-text: #8c99f7;
  --accent-soft: #232b55;
  --amber: #f2b233;
  --amber-ink: #141a33;
  --danger: #ff8a80;
  --ok: #5fd08e;
  --logo-tile: #5b6cf0;
  --logo-soft: 0.45;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}
/* Bez JavaScript: ciemny motyw według ustawień systemu. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0d1020; --surface: #151a31; --surface-2: #1c2240; --ink: #eef0fb; --muted: #a4acce;
    --line: #2a3158; --accent: #8c99f7; --accent-ink: #0d1020; --accent-text: #8c99f7; --accent-soft: #232b55;
    --danger: #ff8a80; --ok: #5fd08e; --logo-tile: #5b6cf0; --logo-soft: 0.45; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--amber); color: var(--amber-ink); }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 560px) { .container { padding-inline: 16px; } }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; line-height: 1; }
.logo:hover { text-decoration: none; }
.logo svg { width: 36px; height: 36px; flex: none; }
.logo .l-tile { fill: var(--logo-tile); }
.logo .l-paper { fill: #ffffff; }
.logo .l-soft { fill: var(--logo-tile); fill-opacity: var(--logo-soft); }
.logo .l-amber { fill: var(--amber); }

/* Przyciski */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 12px; border: 1.5px solid transparent;
  font: inherit; font-weight: 600; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); transition: transform .12s, filter .12s, background-color .12s, border-color .12s;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; filter: none; transform: none; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--accent-text); filter: none; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); filter: none; }
.btn-amber { background: var(--amber); color: var(--amber-ink); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--bg); filter: none; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Przełącznik motywu */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent-text); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* Formularze */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field .hint, .hint { font-size: 13px; color: var(--muted); }
.input, .select, .textarea {
  font: inherit; font-size: 15px; width: 100%; min-width: 0; min-height: 44px; padding: 10px 14px;
  color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px;
}
.textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 1px; border-color: transparent; }
.input.num { font-variant-numeric: tabular-nums; text-align: right; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.msg { font-size: 14px; font-weight: 500; min-height: 1.4em; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--danger); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); white-space: nowrap; }
.badge.amber { background: var(--amber); color: var(--amber-ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* Baner cookies (wstawiany przez consent.js) */
.cc {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 560px; margin-left: auto;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
.cc h2 { font-size: 17px; margin-bottom: 8px; }
.cc p { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cc-actions .btn { flex: 1 1 140px; }
