/* ==========================================================================
   Pałac Antyków — baza: reset, typografia, siatka, dostępność
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--fg);
  background-color: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
}

img, svg, video { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; } /* atrybut hidden wygrywa z każdym display w klasach */
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-6) 0; }
p { margin: 0; }
main { display: block; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--c-gold-500); color: var(--c-brown-950); }

/* --- Nagłówki: Playfair 400. Ciężar buduje rozmiar, nie pogrubienie. --- */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-snug);
  text-wrap: balance;
  color: inherit;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: -.012em; }
h2 { font-size: var(--fs-h2); letter-spacing: -.008em; }
h3 { font-size: var(--fs-h3); }
.display { font-size: var(--fs-display); line-height: .98; letter-spacing: -.018em; font-weight: 400; }

/* Etykieta sekcji: Playfair kursywą, złoto. Zamiast tracked-caps — cichsza, bardziej „pałacowa”. */
.eyebrow {
  display: block;
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--accent);
}

.lead { font-size: var(--fs-lead); line-height: 1.5; font-weight: 300; max-width: var(--measure); }
@media (max-width: 720px) { .lead { font-weight: 400; } .section-head { margin-bottom: var(--space-6); } }
.muted { color: var(--fg-muted); }
.small { font-size: var(--fs-small); }
.num { font-family: var(--font-display); font-variant-numeric: lining-nums tabular-nums; }

.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1.1em; }
.prose a { border-bottom: 1px solid var(--accent); transition: color var(--dur-fast) var(--ease); }
.prose a:hover { color: var(--accent); }

/* --- Siatka i rytm --- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 860px; }
.container--wide { max-width: 1600px; }
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * .6); }
/* Styk dwóch sekcji na tej samej powierzchni: pojedynczy odstęp zamiast podwójnego. */
.section--joined { padding-top: calc(var(--section) * .55); }
.section--joined-bottom { padding-bottom: calc(var(--section) * .55); }
.grid { display: grid; gap: var(--gutter); grid-template-columns: repeat(var(--cols, 12), minmax(0, 1fr)); }
.flow > * + * { margin-top: var(--flow, 1.25rem); }
.hairline { border-top: 1px solid var(--line); }

.section-head { display: grid; gap: var(--space-4); max-width: var(--measure); margin-bottom: var(--space-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head__note { color: var(--fg-muted); font-size: var(--fs-lead); font-weight: 300; }

/* --- Dostępność --- */
.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; }
.skip-link { position: absolute; left: 1rem; top: -100%; z-index: 100; padding: .75rem 1rem; background: var(--c-brown-900); color: var(--c-cream-100); font-weight: 700; }
.skip-link:focus { top: 1rem; }

/* Płynne przejście między podstronami (View Transitions, progresywnie) */
@view-transition { navigation: auto; }
