/* ==========================================================================
   Podstawy: reset, typografia, układ, nagłówek, stopka, przyciski, pola.
   Wszystkie wartości pochodzą z tokens.css.
   ========================================================================== */

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

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

body {
	margin: 0;
	background: var(--c-paper);
	color: var(--c-ink);
	font-family: var(--font-text);
	font-size: var(--step-0);
	line-height: var(--lh-text);
	font-kerning: normal;
	font-variant-ligatures: common-ligatures;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

[hidden] {
	display: none !important;
}

h1,
h2,
h3,
h4 {
	margin: 0;
	font-family: var(--font-display);
	font-weight: var(--fw-regular);
	line-height: var(--lh-tight);
	text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure,
blockquote {
	margin: 0;
}

p {
	text-wrap: pretty;
	-webkit-hyphens: auto;
	hyphens: auto;
	hyphenate-limit-chars: 7 3 3;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	transition: text-decoration-color var(--dur) var(--ease);
}

a:hover {
	text-decoration-color: var(--c-ink-faint);
}

:focus-visible {
	outline: 2px solid var(--c-focus);
	outline-offset: 3px;
}

/* Nazwa łacińska: zawsze kursywa, w HTML oznaczona lang="la" */
.latin {
	font-style: italic;
}

/* Brakujące dane i otwarte decyzje — widoczne celowo, do uzupełnienia */
.brak {
	padding: 0.05em 0.35em;
	border-radius: 2px;
	background: var(--c-missing-bg);
	color: var(--c-missing-ink);
	font-family: var(--font-ui);
	font-size: 0.82em;
	font-style: normal;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	top: -4rem;
	left: var(--gutter);
	z-index: 10;
	padding: 0.5em 1em;
	background: var(--c-ink);
	color: var(--c-paper);
	font-family: var(--font-ui);
}

.skip-link:focus {
	top: 0.5rem;
}

/* ---- Układ --------------------------------------------------------------- */

.wrap {
	width: 100%;
	max-width: calc(var(--page-max) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	padding-block: var(--space-section);
}

.section--rule {
	border-top: var(--border);
}

/* Pasma na przemian (Anita, 20.10) — reguła, nie lista sekcji, więc usunięcie albo dodanie
   sekcji niczego nie psuje. Ciemne = tło strony (--c-paper), jasne = --c-surface.
   Nagłówek z logo jest zawsze jasny (pasmo 1). W <main class="pasma"> każda sekcja
   (bezpośrednie dziecko) liczy się dalej: 1. ciemna, 2. jasna, 3. ciemna… Stopka dostaje
   kolor przeciwny do ostatniej sekcji. Cienkie linie między pasmami daje .section--rule. */
.pasma > section:nth-of-type(even) {
	background: var(--c-surface);
}

/* Stopka: domyślnie jasna (po nieparzystej liczbie sekcji); po parzystej — ciemna.
   Po jasnej sekcji stopka przylega do niej bez odstępu (Anita, 11.11: „kreski oddzielają kolory” — jasne ma sięgać
   do kreski stopki; odstęp nad stopką pokazywał ciemne tło strony jeszcze przed kreską). */
main.pasma:has(> section:last-of-type:nth-of-type(even)) + .site-footer {
	margin-top: 0;
	background: var(--c-paper);
}

.flow > * + * {
	margin-top: var(--flow, 1em);
}

.eyebrow {
	font-family: var(--font-ui);
	font-size: var(--step--2);
	font-weight: var(--fw-medium);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--c-ink-faint);
}

.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-2xs) var(--space-m);
	margin-bottom: var(--space-l);
}

.section-head h2 {
	font-size: var(--step-3);
}

.more {
	font-family: var(--font-ui);
	font-size: var(--step--1);
}

/* ---- Nagłówek ------------------------------------------------------------ */

.site-header {
	border-bottom: var(--border);
	background: var(--c-surface); /* jaśniejszy pasek z logo (Anita, 20.10) — jak sekcja „Czy to prawdziwe?” */
}

.site-header .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	column-gap: var(--space-l);
	padding-block: var(--space-xs) var(--space-3xs);
}

/* Slot logo: dopóki nie ma pliku, wyświetla się wordmark. Instrukcja w index.html. */
.logo {
	display: inline-flex;
	align-items: center;
	min-height: var(--logo-height);
	text-decoration: none;
}

/* Logo: wersja 7 (decyzja Anity, 23.10). Wysokość: --logo-height w tokens.css. */
.logo img {
	width: auto;
	height: var(--logo-height);
}

.wordmark {
	/* ujemny margines kompensuje światło po ostatniej literze */
	margin-right: calc(-1 * var(--tracking-logo));
	font-family: var(--font-ui);
	font-size: var(--step--1);
	font-weight: var(--fw-medium);
	letter-spacing: var(--tracking-logo);
	text-transform: uppercase;
	white-space: nowrap;
}

.nav {
	order: 3;
	flex-basis: 100%;
}

.nav ul {
	display: flex;
	gap: var(--space-m);
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
}

.nav a {
	display: block;
	padding-block: var(--space-2xs);
	font-family: var(--font-ui);
	font-size: var(--step--1);
	text-decoration: none;
	white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current="page"] {
	text-decoration: underline;
	text-underline-offset: 0.45em;
}

/* „Wycena” — zakładka tylko na czas podglądu, wyróżniona obwódką */
.nav__wycena {
	padding-inline: 0.75em;
	border: 1px solid var(--c-ink);
	border-radius: 999px;
}

.cart {
	font-family: var(--font-ui);
	font-size: var(--step--1);
	text-decoration: none;
	white-space: nowrap;
}

.cart__count {
	font-variant-numeric: tabular-nums;
}

@media (min-width: 48rem) {
	.site-header .wrap {
		padding-block: var(--space-s);
	}

	.nav {
		order: 0;
		flex-basis: auto;
		margin-left: auto;
	}
}

/* ---- Stopka -------------------------------------------------------------- */

.site-footer {
	margin-top: var(--space-section);
	padding-block: var(--space-xl) var(--space-l);
	border-top: var(--border);
	background: var(--c-surface); /* stopka jasna; wyjątek po parzystej liczbie sekcji — reguła przy .pasma */
	color: var(--c-ink-soft);
	font-family: var(--font-ui);
	font-size: var(--step--1);
	line-height: var(--lh-ui);
}

.site-footer__grid {
	display: grid;
	gap: var(--space-l);
}

.site-footer h2 {
	margin-bottom: var(--space-2xs);
	color: var(--c-ink-faint);
	font-family: var(--font-ui);
	font-size: var(--step--2);
	font-weight: var(--fw-medium);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.site-footer ul {
	display: grid;
	gap: 0.45em;
	padding: 0;
	list-style: none;
}

.site-footer a {
	text-decoration: none;
}

.site-footer a:hover {
	text-decoration: underline;
}

.site-footer .motto {
	margin-top: 0.4em;
	color: var(--c-ink);
	font-family: var(--font-text);
	font-size: var(--step-0);
	font-style: italic;
}

/* Dane spółki w stopce (art. 206 § 1 KSH): firma, adres, NIP, kapitał; sąd i KRS po uzupełnieniu. */
.site-footer__firma {
	max-width: 70ch;
	margin-top: var(--space-l);
	color: var(--c-ink-faint);
	font-size: var(--step--2);
	line-height: 1.5;
}

.site-footer__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--space-2xs) var(--space-m);
	margin-top: var(--space-xl);
	padding-top: var(--space-s);
	border-top: var(--border);
	color: var(--c-ink-faint);
	font-size: var(--step--2);
}

/* Stopka (Anita, 11.11): nazwa sklepu + trzy równe kolumny po trzy linki —
   Na skróty / Informacje / Zasady i prywatność (wcześniej dwie nierówne: 3 i 6). */
@media (min-width: 48rem) {
	.site-footer__grid {
		grid-template-columns: 1.5fr 1fr 1fr 1fr;
	}
}

/* ---- Przyciski ----------------------------------------------------------- */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	min-height: 3rem;
	padding: 0.7em 1.6em;
	border: 1px solid var(--c-accent);
	border-radius: var(--radius-ui);
	background: var(--c-accent);
	color: var(--c-accent-ink);
	font-family: var(--font-ui);
	font-size: var(--step-0);
	font-weight: var(--fw-medium);
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.button:hover {
	background: transparent;
	color: var(--c-accent);
}

.button--ghost {
	border-color: var(--c-ink);
	background: transparent;
	color: var(--c-ink);
}

.button--ghost:hover {
	background: var(--c-ink);
	color: var(--c-paper);
}

.button--block {
	width: 100%;
}

/* ---- Pola formularzy ----------------------------------------------------- */

.field {
	display: grid;
	gap: 0.4em;
	font-family: var(--font-ui);
	font-size: var(--step--1);
}

input,
textarea,
select {
	width: 100%;
	padding: 0.7em 0.85em;
	border: 1px solid var(--c-rule);
	border-radius: var(--radius-ui);
	background: var(--c-surface);
	color: var(--c-ink);
	font: inherit;
	font-size: max(1rem, var(--step-0)); /* min. 16 px: iPhone nie powiększa strony przy wpisywaniu */
}

textarea {
	min-height: 9rem;
	resize: vertical;
}

.field__hint {
	color: var(--c-ink-faint);
	font-family: var(--font-ui);
	font-size: var(--step--2);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
	}
}
