/* Kulinarna — style motywu. Kolory spełniają kontrast WCAG AA (tekst ≥ 4,5:1, elementy interfejsu ≥ 3:1). */

:root {
  --bg: #fffdf9;
  --surface: #ffffff;
  --tint: #fff4e6;
  --ink: #2b2118;
  --muted: #6b5b4e;
  --line: #e8dccb;
  --field: #8a7866;
  --accent: #c2410c;
  --accent-d: #9a3412;
  --green: #3f6212;
  --green-bg: #ecfccb;
  --focus: #1d4ed8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(43, 33, 24, .06), 0 8px 24px rgba(43, 33, 24, .08);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent-d); text-underline-offset: .18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: .75rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: .75rem; color: #fff; }

.wrap { width: min(100% - 2rem, 1180px); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2rem, 760px); }

/* Paski informacyjne */
.demo-bar {
  background: #fef3c7; color: #78350f; text-align: center;
  font-size: .9rem; padding: .45rem 1rem; border-bottom: 1px solid #fcd34d;
}
.demo-note {
  background: #fef3c7; color: #78350f; border: 1px solid #fcd34d;
  border-radius: 10px; padding: .6rem .9rem; font-size: .95rem; margin: 0 0 1.25rem;
}

/* Przyciski, znaczki */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.15rem; border-radius: 999px;
  border: 2px solid var(--accent); background: var(--accent); color: #fff;
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--accent-d); border-color: var(--accent-d); color: #fff; }
.btn--ghost { background: transparent; color: var(--accent-d); }
.btn--ghost:hover { background: var(--tint); color: var(--accent-d); border-color: var(--accent-d); }
.btn--small { padding: .4rem .85rem; font-size: .95rem; }
.btn--light { background: #fff; border-color: #fff; color: var(--accent-d); }
.btn--light:hover { background: var(--tint); border-color: var(--tint); color: var(--accent-d); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.chip {
  display: inline-block; padding: .3rem .85rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); color: var(--ink);
  text-decoration: none; font-size: .95rem;
}
.chip:hover { border-color: var(--accent); color: var(--accent-d); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip--quiet { background: transparent; color: var(--muted); }

.badge {
  display: inline-block; padding: .15rem .65rem; border-radius: 999px;
  background: #ede5d8; color: var(--ink); font-size: .85rem; font-weight: 600;
}
.badge--accent { background: var(--accent); color: #fff; }
.badge--green { background: var(--green-bg); color: var(--green); }

/* Nagłówek */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 249, .96); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(8px);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__name { font: 700 1.3rem/1 var(--font-head); }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--field); border-radius: 10px;
  background: var(--surface); cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; content: "";
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }

.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.nav-list { display: flex; gap: .25rem 1.1rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { display: block; padding: .4rem .1rem; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; }
.nav-list a:hover, .nav-list .current-menu-item > a { color: var(--accent-d); border-bottom-color: var(--accent); }

.site-search { display: flex; gap: .4rem; }
.site-search input { width: 12rem; }

/* Formularze */
input[type="search"], input[type="text"], input[type="email"], select, textarea {
  font: inherit; color: inherit; background: #fff;
  border: 1px solid var(--field); border-radius: 10px; padding: .55rem .75rem; width: 100%;
}
input[type="search"]::placeholder { color: var(--muted); opacity: 1; }
input[type="checkbox"] { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; margin-top: .3rem; flex: none; }

/* Sekcje strony głównej */
.hero { background: linear-gradient(180deg, var(--tint), var(--bg)); padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 3rem); }
.hero__eyebrow { margin: 0 0 .5rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; color: var(--accent-d); }
.hero__title { margin-bottom: .4em; }
.hero__lead { max-width: 40rem; font-size: 1.2rem; color: var(--muted); }
.hero__search { display: flex; flex-wrap: wrap; gap: .6rem; max-width: 40rem; margin: 1.5rem 0 1rem; }
.hero__search input { flex: 1 1 14rem; padding: .8rem 1rem; }
.hero__cats { margin-top: 1rem; }

.section { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section--tint { background: var(--tint); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.section__head h2 { margin: 0; }
.more { font-weight: 600; }

.cta { background: var(--accent); color: #fff; padding: 2.25rem 0; }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta h2 { color: #fff; margin-bottom: .25em; }
.cta p { margin: 0; max-width: 36rem; }

/* Siatki i karty */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

.card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--tint); text-decoration: none; }
.ks-media__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ks-ph {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: linear-gradient(135deg, hsl(var(--h) 85% 94%), hsl(var(--h) 70% 82%));
}
.ks-ph__icon { font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1; }
.card__badge {
  position: absolute; left: .6rem; top: .6rem; background: rgba(43, 33, 24, .86);
  color: #fff; font-size: .85rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px;
}
.card__badge--accent { background: var(--accent); }
.card__body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.15rem; flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; margin: 0; font-size: .85rem; color: var(--muted); }
.card__tag { color: var(--accent-d); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; }
.card__title { margin: 0; font-size: 1.15rem; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; } /* cała karta klikalna */
.card { position: relative; }
.card__excerpt { margin: 0; color: var(--muted); font-size: .95rem; }
.card__foot { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin: auto 0 0; padding-top: .5rem; font-size: .88rem; color: var(--muted); }

/* Nagłówki podstron, okruszki */
.page-head { padding: 1rem 0 .5rem; }
.page-head h1 { margin-bottom: .3em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 44rem; }
.breadcrumbs { margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .4rem; list-style: none; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: .4rem; }
.breadcrumbs a { color: var(--muted); }

/* Filtry */
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 1.25rem 0 1rem; }
.filters__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem 1rem; }
.field label { display: block; font-size: .88rem; font-weight: 700; margin-bottom: .25rem; }
.field--wide { grid-column: 1 / -1; }
.filters__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.results-info { color: var(--muted); margin: .5rem 0 1.25rem; }
.empty { background: var(--tint); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.25rem; color: var(--muted); }

/* Treść wpisów i stron */
.post__head { padding-top: 1rem; }
.post__meta { color: var(--muted); font-size: .95rem; }
.post__media, .recipe__media, .firm__media {
  margin: 1.25rem 0 1.75rem; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 21 / 9; background: var(--tint);
}
.post__media img, .recipe__media img, .firm__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post__media .ks-ph, .recipe__media .ks-ph, .firm__media .ks-ph { width: 100%; height: 100%; }
.post__media .ks-ph__icon, .recipe__media .ks-ph__icon, .firm__media .ks-ph__icon { font-size: clamp(3.2rem, 7vw, 5rem); }
/* Bez zdjęcia: wąski baner zamiast wielkiego pustego pola. */
.media--empty { aspect-ratio: auto; height: clamp(110px, 14vw, 170px); }
.entry-content { max-width: 70ch; }
.entry-content > * { margin-block: 0 1.1em; }
.entry-content > :first-child { margin-top: 0; }
.entry-content h2 { margin-top: 1.6em; margin-bottom: .45em; }
.entry-content h3 { margin-top: 1.3em; margin-bottom: .4em; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content li { margin-bottom: .35em; }
.entry-content blockquote { margin-inline: 0; padding: .25rem 1.1rem; border-left: 4px solid var(--accent); color: var(--muted); }
.entry-content img { border-radius: 10px; }
.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; }
.post__tags { margin-top: 2rem; }

/* Przepis */
.recipe__head { padding-top: .5rem; }
.facts { display: flex; flex-wrap: wrap; gap: .6rem 1.75rem; margin: 1.25rem 0; padding: 0; }
.facts div { min-width: 6.5rem; }
.facts dt { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; font-size: 1.1rem; }
.recipe__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
.recipe__layout { display: grid; gap: 2rem; padding-bottom: 3rem; }
.recipe__ingredients {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; align-self: start;
}
.recipe__ingredients h2 { font-size: 1.4rem; }
.portions {
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1rem;
  padding: .3rem .4rem .3rem 1rem; background: var(--tint); border-radius: 999px;
}
.portions__label { font-weight: 700; font-size: .95rem; }
.portions__value { min-width: 1.6rem; text-align: center; font-weight: 700; font-size: 1.1rem; }
.portions__btn {
  width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid var(--accent);
  background: #fff; color: var(--accent-d); font: 700 1.3rem/1 var(--font-body); cursor: pointer;
}
.portions__btn:hover { background: var(--accent); color: #fff; }
.ing-group { font-size: 1rem; font-family: var(--font-body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .25rem; }
.ing-list { list-style: none; padding: 0; margin: 0 0 .5rem; }
.ing label { display: flex; gap: .65rem; align-items: flex-start; padding: .4rem 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.ing input:checked + .ing__text { text-decoration: line-through; color: var(--muted); }
.ks-q { font-weight: 700; }

.recipe__method h2 { margin-top: 0; }
.recipe__intro { margin-bottom: 1.5rem; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 1.5rem; max-width: 70ch; }
.steps li { counter-increment: step; position: relative; padding-left: 3.1rem; margin: 0 0 1.35rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: .05rem;
  width: 2.2rem; height: 2.2rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700;
}
.tips { background: var(--tint); border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: .9rem 1.1rem; max-width: 70ch; }
.tips h3 { font-size: 1rem; font-family: var(--font-body); margin-bottom: .25rem; }
.tips p { margin: 0; }

/* Firma */
.firm__head { padding-top: .5rem; }
.firm__layout { display: grid; gap: 2rem; padding-bottom: 3rem; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; align-self: start; }
.info-card h2 { font-size: 1.35rem; }
.info-card h3 { font-size: 1rem; font-family: var(--font-body); margin: 1.25rem 0 .5rem; }
.info-list { margin: 0; }
.info-list > div { padding: .55rem 0; border-bottom: 1px dashed var(--line); }
.info-list dt { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.info-list dd { margin: 0; overflow-wrap: anywhere; }
.info-list dd a + a { margin-left: .9rem; }
.hours { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours th { text-align: left; font-weight: 500; }
.hours td { text-align: right; }
.hours th, .hours td { padding: .3rem .5rem; }
.hours__today { background: var(--tint); font-weight: 700; }

/* Paginacja */
.pagination { margin: 2rem 0; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.pagination .page-numbers {
  padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); text-decoration: none; min-width: 2.6rem; text-align: center;
}
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--accent); }

/* Stopka */
.site-footer { background: var(--ink); color: #f3e9dc; margin-top: 3rem; }
.site-footer a { color: #ffc9a0; }
.site-footer a:hover { color: #fff; }
.site-footer h2 { font-family: var(--font-body); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: #d9c7b2; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; }
.footer-grid { display: grid; gap: 2rem; padding: 2.5rem 0 1.5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-brand { font: 700 1.3rem/1.2 var(--font-head); color: #fff; margin-bottom: .5rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .15); padding: 1rem 0 1.5rem; font-size: .9rem; color: #d9c7b2; }
.footer-bottom p { margin: 0; }

/* Układ szerszy */
@media (min-width: 900px) {
  .recipe__layout { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
  .recipe__ingredients { position: sticky; top: 5.5rem; }
  .firm__layout { grid-template-columns: minmax(0, 1fr) 360px; }
  .field--wide { grid-column: span 2; }
}

/* Menu mobilne */
@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 1rem;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 1rem;
    box-shadow: var(--shadow);
  }
  .js .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; }
  .site-nav { flex-wrap: wrap; }
  .site-search input { width: 100%; flex: 1; }
  .site-search { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
  .card:hover { transform: none; }
}

/* Wydruk przepisu */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .demo-bar, .site-header, .site-footer, .breadcrumbs, .recipe__actions, .portions__btn,
  .recipe__media, .section, .cta, .skip-link, .filters, .pagination { display: none !important; }
  .recipe__layout { display: block; }
  .recipe__ingredients { border: 0; padding: 0; position: static; }
  .wrap { width: 100%; }
  a { color: #000; text-decoration: none; }
  .steps li { break-inside: avoid; }
  .steps li::before { background: #000; }
}
