:root {
  --navy: #0F2240;
  --navy-2: #1C3A63;
  --copper: #C17A4B;
  --copper-dark: #A4623A;
  --steel: #6B7A8A;
  --paper: #F7F5F2;
  --card: #FFFFFF;
  --line: #E6E1DA;
  --text: #14202F;
  --muted: #4F5B68;
  --radius: 20px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
/* Logo mają jasne tło – „multiply” wtapia je w kartę bez prostokąta. */
.brand img, .logo-card img, .app-logo { mix-blend-mode: multiply; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; border-radius: 6px; }

/* Górny pasek */
header.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(247, 245, 242, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand span { font: 700 19px/1 var(--serif); color: var(--navy); white-space: nowrap; }
nav.links { display: flex; gap: 22px; margin-left: auto; }
nav.links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; }
nav.links a:hover { color: var(--navy); }
.lang {
  display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--card);
}
.lang button {
  border: 0; background: none; font: 600 13px/1 var(--sans); color: var(--muted);
  padding: 7px 11px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--navy); color: #fff; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--copper-dark);
}
h1, h2, h3 { font-family: var(--serif); color: var(--navy); margin: 0; line-height: 1.15; }
h1 { font-size: clamp(36px, 5.2vw, 58px); margin: 14px 0 18px; letter-spacing: -.01em; }
h2 { font-size: clamp(28px, 3.6vw, 38px); }
h3 { font-size: 21px; }
.lead { font-size: 18px; color: var(--muted); max-width: 34em; margin: 0 0 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-weight: 600; font-size: 15px; padding: 13px 20px; border-radius: 12px;
  border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--navy); }
.btn.ghost:hover { border-color: var(--steel); }
.btn svg { width: 18px; height: 18px; }
.logo-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(28px, 5vw, 56px); box-shadow: 0 24px 60px -32px rgba(15, 34, 64, .35);
}

section { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p { color: var(--muted); margin: 12px 0 0; font-size: 17px; }

/* O nas */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pillar {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.pillar .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(193, 122, 75, .12); color: var(--copper-dark); margin-bottom: 16px;
}
.pillar .ico svg { width: 22px; height: 22px; }
.pillar h3 { font-size: 18px; margin-bottom: 6px; }
.pillar p { margin: 0; color: var(--muted); font-size: 15px; }

/* Katalog aplikacji */
.app {
  background: var(--card); border: 1px solid var(--line); border-radius: 28px; overflow: hidden;
}
.app-readme { padding: clamp(28px, 5vw, 56px); text-align: center; }
.app-readme img.app-logo { width: 200px; margin: 0 auto; }
.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;
}
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 26px auto; max-width: 820px; }
.badges img { height: 20px; }
.app-desc { max-width: 760px; margin: 0 auto 28px; font-size: 17px; color: var(--text); }
.app-desc strong { color: var(--navy); }
.app .actions { justify-content: center; }
.app-facts {
  display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: #FBFAF8;
}
.fact { padding: 22px 28px; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact b { display: block; color: var(--navy); font-size: 15px; margin-bottom: 4px; }
.fact span { color: var(--muted); font-size: 14px; }
.more { color: var(--muted); text-align: center; margin: 22px 0 0; font-size: 15px; }

/* Kontakt */
.contact {
  background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #E8EDF4;
  border-radius: 28px; padding: clamp(32px, 5vw, 56px);
  display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
}
.contact h2 { color: #fff; }
.contact p { margin: 10px 0 0; color: #C4CFDD; font-size: 17px; }
.contact .btn.primary { background: var(--copper); }
.contact .btn.primary:hover { background: var(--copper-dark); }
.contact .mail { font-weight: 600; color: #fff; }

footer { padding: 36px 0 44px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer a { text-decoration: none; }
footer a:hover { color: var(--navy); }

/* Dostępność */
main, footer { zoom: var(--scale, 1); }
.a11y { position: relative; }
.a11y-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--navy);
  font: 600 14px/1 var(--sans); padding: 8px 12px; border-radius: 999px;
}
.a11y-btn svg { width: 20px; height: 20px; }
.a11y-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 300px;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; box-shadow: 0 24px 60px -24px rgba(15, 34, 64, .4);
}
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 { font-size: 19px; margin-bottom: 14px; }
.a11y-row { margin-bottom: 14px; }
.a11y-row > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg button {
  border: 1px solid var(--line); background: var(--paper); color: var(--navy); border-radius: 10px;
  padding: 9px 0; font: 700 15px/1 var(--serif); cursor: pointer;
}
.seg button:nth-child(2) { font-size: 18px; }
.seg button:nth-child(3) { font-size: 21px; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 15px; cursor: pointer;
  border-top: 1px solid var(--line);
}
.opt input { width: 20px; height: 20px; accent-color: var(--copper); margin: 0; flex: none; }
.a11y-reset {
  margin-top: 8px; width: 100%; border: 0; background: none; color: var(--muted);
  font: 500 14px/1 var(--sans); padding: 10px; border-radius: 10px; cursor: pointer; text-decoration: underline;
}

html.ul main a:not(.btn), html.ul footer a, html.ul nav.links a {
  text-decoration: underline; text-underline-offset: 3px;
}
html.rm { scroll-behavior: auto; }
html.rm *, html.rm *::before, html.rm *::after { transition: none !important; animation: none !important; }
html.rm .btn:hover { transform: none; }

html.hc {
  --paper: #000; --card: #000; --text: #fff; --muted: #fff; --steel: #fff;
  --navy: #FFE500; --navy-2: #FFE500; --line: #FFE500; --copper: #FFE500; --copper-dark: #FFE500;
}
html.hc header.top { background: #000; border-bottom-width: 2px; }
html.hc .pillar, html.hc .app, html.hc .logo-card, html.hc .a11y-panel, html.hc .a11y-btn { border-width: 2px; }
html.hc .logo-card, html.hc .a11y-panel { box-shadow: none; }
html.hc .btn.primary, html.hc .contact .btn.primary,
html.hc .lang button[aria-pressed="true"], html.hc .seg button[aria-pressed="true"] { background: #FFE500; color: #000; }
html.hc .btn.ghost { background: #000; color: #FFE500; border: 2px solid #FFE500; }
html.hc .contact { background: #000; border: 2px solid #FFE500; }
html.hc .contact h2, html.hc .contact .mail { color: #FFE500; }
html.hc .contact p { color: #fff; }
html.hc .app-facts { background: #000; }
html.hc .pillar .ico { background: transparent; border: 2px solid #FFE500; }
html.hc .brand img, html.hc .logo-card img, html.hc .app-logo { mix-blend-mode: normal; background: #fff; }
html.hc .brand img { border-radius: 8px; }
html.hc .logo-card img, html.hc .app-logo { border-radius: 16px; padding: 12px; }
html.hc :focus-visible { outline-color: #fff; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .logo-card { max-width: 480px; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .app-facts { grid-template-columns: 1fr; }
  .fact + .fact { border-left: 0; border-top: 1px solid var(--line); }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  nav.links { display: none; }
  .a11y { margin-left: auto; }
  .a11y-btn .label { display: none; }
  .a11y-btn { padding: 8px; }
  .a11y-panel { position: fixed; left: 16px; right: 16px; top: 76px; width: auto; }
  .top .wrap { gap: 12px; }
  .hero { padding-top: 40px; }
  .pillars { grid-template-columns: 1fr; }
  section { padding: 44px 0; }
  .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* Stopka: linki prawne */
footer .legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* Polityka prywatności */
.doc { padding: 48px 0 24px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(32px, 4.4vw, 46px); margin: 12px 0 8px; }
.doc .updated { color: var(--muted); margin: 0 0 28px; }
.doc .toc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin: 0 0 36px;
}
.doc .toc b { display: block; color: var(--navy); margin-bottom: 8px; }
.doc .toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.doc .toc a { color: var(--muted); text-decoration: none; }
.doc .toc a:hover { color: var(--navy); text-decoration: underline; }
.doc h2 { font-size: 26px; margin: 40px 0 12px; scroll-margin-top: 90px; }
.doc h3 { font-size: 19px; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc a { color: var(--copper-dark); }
.doc .app-section {
  background: var(--card); border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(22px, 4vw, 40px); margin-top: 40px;
}
.doc .app-section > h2:first-child { margin-top: 0; }
.doc .callout {
  background: rgba(193, 122, 75, .1); border-left: 4px solid var(--copper);
  border-radius: 0 14px 14px 0; padding: 14px 18px; margin: 16px 0;
}
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--navy); font-weight: 600; }
.table-scroll { overflow-x: auto; }
html.hc .doc .callout { background: transparent; border-left-color: #FFE500; }
html.hc .doc .app-section, html.hc .doc .toc { border-width: 2px; }
@media (max-width: 640px) {
  .doc .toc ol { columns: 1; }
}
