/* howpaw — strona www. Paleta „Atrament i kość” z aplikacji (app/src/theme/palette.ts),
   kroje: Newsreader 600 (tytuły) i Schibsted Grotesk (tekst), pliki lokalnie — bez zewnętrznych zasobów. */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/Newsreader_600SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/SchibstedGrotesk_400Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/SchibstedGrotesk_600SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f2eee6;
  --card: #fbf8f2;
  --inset: #e7e1d5;
  --line: #e2dbcd;
  --text: #121212;
  --muted: #67625a;
  --ink: #161616;
  --on-ink: #efe9dc;
  --accent: #c8553d;
  --mark-bg: #f3d9cf;
  --mark-fg: #8f3522;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 18px;
  --gutter: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --card: #1c1a17;
    --inset: #2a2723;
    --line: #2f2c27;
    --text: #efe9dc;
    --muted: #aaa397;
    --ink: #efe9dc;
    --on-ink: #161616;
    --accent: #e0795f;
    --mark-bg: #3a211a;
    --mark-fg: #f0a58f;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent);
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 12px;
  background: var(--ink);
  color: var(--on-ink);
  padding: 8px 14px;
  border-radius: 999px;
  z-index: 10;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap--text {
  max-width: 760px;
}

/* Nagłówek */
.site-header {
  padding: 20px 0 8px;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  position: relative;
  display: block;
  width: 132px;
  aspect-ratio: 660 / 186;
}
.logo picture,
.logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.site-nav {
  display: flex;
  gap: 16px;
  font-size: 15px;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* Strona główna */
.hero {
  padding: 32px 0 28px;
}
.eyebrow {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}
.hero h1 {
  font-size: clamp(2.1rem, 8vw, 3.6rem);
  max-width: 15ch;
}
.lead {
  margin: 16px 0 0;
  font-size: 19px;
  color: var(--muted);
  max-width: 44ch;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 24px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 18px 8px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--on-ink);
  line-height: 1.15;
  cursor: default;
  user-select: none;
}
.store-badge svg {
  flex: none;
}
.store-badge small {
  display: block;
  font-size: 11px;
  opacity: 0.8;
}
.store-badge strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
}
.cta-note {
  font-size: 15px;
  color: var(--muted);
}

.features {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
  display: grid;
  gap: 12px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
}
.feature svg {
  display: block;
  color: var(--accent);
  margin-bottom: 12px;
}
.feature h2 {
  font-size: 22px;
}
.feature p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 16px;
}
.disclaimer {
  margin: 20px 0 0;
  font-size: 15px;
  color: var(--muted);
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
  .hero {
    padding: 40px 0 32px;
  }
}
@media (min-width: 960px) {
  .hero h1 {
    max-width: 20ch;
  }
  .features {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Dokumenty prawne */
.doc {
  padding-top: 24px;
  padding-bottom: 8px;
}
.doc h1 {
  font-size: clamp(2rem, 7vw, 2.8rem);
}
.doc .meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.doc h2 {
  font-size: 26px;
  margin: 40px 0 12px;
  scroll-margin-top: 16px;
}
.doc h3 {
  font-size: 20px;
  margin: 24px 0 8px;
}
.doc p,
.doc li {
  max-width: 68ch;
}
.doc ul,
.doc ol {
  padding-left: 1.3em;
}
.doc li + li {
  margin-top: 6px;
}

.draft {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--mark-bg);
  color: var(--mark-fg);
  font-size: 15px;
}
.draft strong {
  font-weight: 600;
}

.summary {
  margin: 24px 0 0;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.summary h2 {
  margin: 0 0 8px;
  font-size: 22px;
}
.summary ul {
  margin: 0;
}

.toc {
  margin: 24px 0 0;
  padding: 16px 20px;
  background: var(--inset);
  border-radius: 14px;
  font-size: 16px;
}
.toc p {
  margin: 0 0 6px;
  font-weight: 600;
}
.toc ol {
  margin: 0;
  columns: 1;
}
@media (min-width: 640px) {
  .toc ol {
    columns: 2;
    column-gap: 32px;
  }
}

.table {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
}
.table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}
.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}
.table thead th {
  border-top: 0;
  background: var(--inset);
  font-weight: 600;
}
/* Na wąskim ekranie wiersze tabeli jako karty — bez przewijania w bok. */
@media (max-width: 639px) {
  .table thead {
    position: absolute;
    left: -9999px;
  }
  .table tr {
    display: block;
    border-top: 1px solid var(--line);
    padding: 6px 0;
  }
  .table tbody tr:first-child {
    border-top: 0;
  }
  .table td {
    display: block;
    border-top: 0;
    padding: 4px 14px;
  }
  .table td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 16px 14px 56px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.steps li + li {
  margin-top: 8px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  font-size: 15px;
  line-height: 28px;
  text-align: center;
}

/* Oznaczenia dla właściciela: [DO SPRAWDZENIA: …] i [DO UZUPEŁNIENIA: …] */
mark.todo {
  background: var(--mark-bg);
  color: var(--mark-fg);
  padding: 0;
  /* Odstęp po bokach cieniem, nie paddingiem — padding w złamanym wierszu wypychał stronę w bok. */
  box-shadow: -0.2em 0 0 var(--mark-bg), 0.2em 0 0 var(--mark-bg);
  border-radius: 2px;
  font-size: 0.92em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Stopka */
.site-footer {
  margin-top: 48px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}
.site-footer p {
  margin: 6px 0 0;
}
