/* skanfirmy.pl — shared brand styles */
:root {
  --indigo: #14243a;
  --indigo-dark: #0d1a2b;
  --indigo-darker: #08111d;
  --accent: #0052a5;
  --accent-dark: #003d7a;
  --blue: #2563eb;
  --ink: #0f172a;
  --slate: #475569;
  --muted: #64748b;
  --line: #dde4ee;
  --bg: #f4f7fb;
  --ok: #059669;
  --warn: #d97706;
  --err: #dc2626;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  --shadow-lg: 0 20px 50px rgba(15,23,42,.12);
  --title-swipe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16'%3E%3Cpath d='M3 9.5C18 4 34 12.5 52 8 72 3 92 11 117 6.5 100 13 82 5.5 62 10 42 14.5 22 6 3 9.5Z' fill='%230052a5'/%3E%3C/svg%3E");
  --hero-brush-navy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M37 7C33 24 23 36 5 38c11-4 21-13 25-33 3-1 5 0 7 2z' fill='%2316283f' fill-opacity='.10'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-word { font-weight: 800; letter-spacing: -.2px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--slate); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
/* przyciski w nav muszą wygrać z .nav-links a (specyficzność) — inaczej tekst dziedziczy slate */
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; }
.nav-links a.btn-ghost, .nav-links a.btn-ghost:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: none; cursor: pointer; transition: transform .05s, box-shadow .15s, background .15s;
}
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-dark); text-decoration: none; box-shadow: 0 8px 20px rgba(22,40,63,.32); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: #cbd5e1; text-decoration: none; }
.btn:active { transform: translateY(1px); }

/* Hero */
.hero { padding: 88px 0 72px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    var(--hero-brush-navy),
    radial-gradient(1000px 500px at 50% -10%, rgba(22,40,63,.10), transparent 70%);
  background-repeat: no-repeat, no-repeat;
  background-position: bottom -90px left -70px, center;
  background-size: 460px 460px, auto;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .6px;
  text-transform: uppercase; color: var(--indigo);
  background: #eaf1fb; border: 1px solid var(--accent); padding: 8px 16px 8px 13px; border-radius: 100px; margin-bottom: 22px;
  box-shadow: 0 2px 12px rgba(0,82,165,.14);
}
.eyebrow svg { width: 16px; height: 16px; color: var(--accent-dark); flex-shrink: 0; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; line-height: 1.08; letter-spacing: -1.5px; }
.hero h1 .grad { color: var(--accent); }
.hero p.lead { font-size: clamp(17px, 2.2vw, 21px); color: var(--slate); max-width: 620px; margin: 20px auto 0; }
.hero-cta { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.hero-note { margin-top: 20px; font-size: 14px; color: var(--muted); }

/* Section */
.section { padding: 64px 0; }
#narzedzia, #jak, #wtyczki, #hubForm { scroll-margin-top: 84px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section .section-head h2 { font-size: clamp(26px, 3.5vw, 36px); font-weight: 800; letter-spacing: -.8px; text-transform: none; color: var(--ink); }
.section-head h2::after {
  content: ""; display: block; width: 92px; height: 13px; margin: 12px auto 0;
  background: var(--title-swipe) no-repeat center / contain;
}
.section-head p { color: var(--slate); font-size: 17px; margin-top: 12px; }

/* Tool cards */
.tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.tool-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tool-ico {
  width: 56px; height: 56px; margin-bottom: 18px; flex-shrink: 0;
  filter: drop-shadow(0 6px 14px rgba(22,40,63,.28));
}
.tool-ico img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tool-card h3 { font-size: 21px; font-weight: 700; }
.tool-card p { color: var(--slate); font-size: 15px; margin: 8px 0 18px; flex-grow: 1; }
.tool-card .tool-links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.tool-card .tool-links a { font-weight: 600; font-size: 15px; }
.tool-card .tool-links a:not([href]) { color: var(--muted); cursor: default; }
.tool-card .tool-links a:not([href]):hover { text-decoration: none; }
.chip { font-size: 12px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); padding: 4px 10px; border-radius: 100px; }

/* Źródła danych (zaufanie / powaga) */
.sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 20px; }
.source-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.source-ico {
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
  position: relative;
  background: radial-gradient(circle at 32% 28%, #223e60, var(--indigo) 58%, var(--indigo-darker) 100%);
  box-shadow: 0 6px 14px rgba(22,40,63,.28), inset 0 0 0 1px rgba(255,255,255,.07);
}
.source-ico svg { width: 22px; height: 22px; position: relative; z-index: 1; }
.source-card h3 { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.source-card p { color: var(--slate); font-size: 14px; margin: 6px 0 12px; line-height: 1.5; }
.source-card code { font-family: ui-monospace, "SF Mono", monospace; font-size: 12px; color: var(--indigo-dark); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; display: inline-block; }
.sources-note { text-align: center; color: var(--muted); font-size: 13px; margin: 28px auto 0; max-width: 660px; line-height: 1.55; }

/* Feature row */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature { text-align: center; }
.feature .f-ico {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 32% 28%, #223e60, var(--indigo) 58%, var(--indigo-darker) 100%);
  box-shadow: 0 8px 18px rgba(22,40,63,.32), inset 0 0 0 1px rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: center;
}
.feature .f-ico svg { width: 24px; height: 24px; position: relative; z-index: 1; }
.feature h4 { font-size: 17px; font-weight: 700; }
.feature p { color: var(--slate); font-size: 15px; margin-top: 6px; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: #fff; padding: 40px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer .brand { font-size: 16px; }
.footer-meta { color: var(--muted); font-size: 14px; }
.footer-links { display: flex; gap: 16px 22px; flex-wrap: wrap; }
.footer-links a { color: var(--slate); font-size: 14px; }

@media (max-width: 760px) {
  .nav-links { gap: 16px; }
  .nav-links .nav-hide { display: none; }
  .tools, .features { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 48px; }
}

/* ---------- Pasek dostępności (zawsze widoczny, u góry strony) ---------- */

/* Rezerwuje miejsce na pasek a11y (wstawiany przez JS) zanim się załaduje,
   żeby nie powodować CLS. Wysokości zmierzone empirycznie (2 wiersze paska:
   a11y + language switcher). Usuwane, gdy JS realnie wstawi pasek. */
body { padding-top: 73px; }
@media (max-width: 410px) { body { padding-top: 111px; } }
html.a11y-loaded body { padding-top: 0; }

.a11y-bar { background: var(--bg); border-bottom: 1px solid var(--line); }
.a11y-bar-inner {
  max-width: 1120px; margin: 0 auto; padding: 6px 24px; display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap; font-size: 12.5px;
}
.a11y-bar-label { color: var(--muted); font-weight: 600; }
.a11y-bar-group { display: flex; gap: 4px; }
.a11y-bar button {
  font: inherit; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer; font-weight: 700;
}
.a11y-bar button:hover { background: var(--bg); }
.a11y-bar button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.a11y-bar button.a11y-yellow-btn[aria-pressed="true"] { background: #ffeb00; color: #000; border-color: #ffeb00; }

.a11y-lang-bar { border-top: 1px solid var(--line); }
.a11y-lang-bar .a11y-bar-inner { gap: 16px; padding-top: 5px; padding-bottom: 5px; }
.a11y-lang-bar a { color: var(--accent); text-decoration: none; font-weight: 700; letter-spacing: .2px; }
.a11y-lang-bar a:hover { text-decoration: underline; }
.a11y-lang-current { color: var(--ink); font-weight: 700; letter-spacing: .2px; }

/* Kontrast: czarne tło, biały tekst, wszędzie, niezależnie od kolorów komponentu */
html.a11y-contrast, html.a11y-contrast body { background: #000 !important; color: #fff !important; }
html.a11y-contrast * { background-color: #000 !important; color: #fff !important; border-color: #fff !important; }
html.a11y-contrast a, html.a11y-contrast a:visited { color: #ffeb00 !important; text-decoration: underline !important; }
html.a11y-contrast img, html.a11y-contrast svg { filter: grayscale(1) contrast(1.3); }
html.a11y-contrast .a11y-bar button[aria-pressed="true"] { background: #fff !important; color: #000 !important; }

/* Żółty: żółte tło, czarny tekst, wszędzie */
html.a11y-yellow, html.a11y-yellow body { background: #ffeb00 !important; color: #000 !important; }
html.a11y-yellow * { background-color: #ffeb00 !important; color: #000 !important; border-color: #000 !important; }
html.a11y-yellow a, html.a11y-yellow a:visited { color: #000 !important; text-decoration: underline !important; }
html.a11y-yellow img, html.a11y-yellow svg { filter: grayscale(1) contrast(1.2); }
html.a11y-yellow .a11y-bar button[aria-pressed="true"] { background: #000 !important; color: #ffeb00 !important; }
