/* sapapoland.pl — one stylesheet, mobile first. Works from 320 px and with
   text enlarged to 150 %: sizes in rem, no fixed heights on text boxes,
   grids that drop to one column (min(100%, …)). Colours from the logo. */
:root {
  --ink: #13221c;
  --brand: #1f352c;
  --brand-2: #2c4a3d;
  --lime: #a6c714;
  --muted: #47574f;
  --paper: #ffffff;
  --cream: #f4f6ee;
  --line: #d9dfd2;
  --radius: .75rem;
  --wrap: 72rem;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
button, summary { font: inherit; }
picture { display: contents; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--brand); }
h1 { font-size: clamp(1.75rem, 1.2rem + 3vw, 3rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration-thickness: .08em; text-underline-offset: .15em; }
a:hover { color: var(--brand-2); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: .2rem; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .wrap { padding: 0 1.5rem; } }
.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 1rem; top: -10rem; z-index: 10; background: var(--paper); padding: .5rem 1rem; }
.skip:focus { top: .5rem; }

/* header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: .5rem; padding-bottom: .5rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--brand); min-width: 0; }
.brand__logo { width: 3.5rem; height: auto; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-weight: 800; font-size: 1.15rem; }
.brand__tag { font-size: .85rem; color: var(--muted); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1rem .25rem; }
.nav a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .6rem;
  text-decoration: none; font-weight: 600; border-radius: .4rem;
}
.nav a:hover { background: var(--cream); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--lime); }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
  padding: .55rem 1.1rem; border-radius: .5rem; border: 2px solid var(--lime);
  background: var(--lime); color: var(--ink); font-weight: 700; text-decoration: none; text-align: center;
}
.btn:hover { background: #b9d82a; color: var(--ink); }
.btn--ghost { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn--ghost:hover { background: var(--brand); color: var(--paper); }
.btn--light { background: var(--paper); border-color: var(--paper); color: var(--brand); }
.btn--light:hover { background: var(--cream); color: var(--brand); }

/* hero */
.hero { position: relative; isolation: isolate; color: var(--paper); background: var(--brand); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 22, 16, .86), rgba(10, 22, 16, .62)); }
.hero__in { padding-top: clamp(3rem, 10vw, 7rem); padding-bottom: clamp(3rem, 10vw, 7rem); }
.hero h1 { color: var(--paper); max-width: 18ch; }
.hero__lead { font-size: 1.15rem; max-width: 40ch; }
.hero :focus-visible { outline-color: var(--paper); }

/* sections */
.order, .our-dishes { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.places { padding: clamp(2.5rem, 6vw, 4.5rem) 0; background: var(--cream); }
.order__in { display: grid; gap: 1.5rem; align-items: center; }
.order__art { width: 14rem; max-width: 70%; margin: 0 auto; }
@media (min-width: 48rem) { .order__in { grid-template-columns: 18rem 1fr; } .order__art { width: 18rem; max-width: 100%; } }
.order__text { max-width: 42rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 46rem; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); margin: 0 0 .25rem; }
.band { background: var(--brand); }
.band__img { width: 100%; height: clamp(10rem, 32vw, 24rem); object-fit: cover; }
.more { margin-top: 1.5rem; }
.page { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.sub { margin-top: 2.5rem; }

/* cards */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); margin-top: 1.25rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; min-width: 0; display: flex; flex-direction: column; }
.card h2 { font-size: 1.3rem; }
.card h3 { font-size: 1.05rem; margin-top: .5rem; }
.card .actions { margin-top: auto; padding-top: .75rem; }
.card__addr { margin-bottom: .5rem; }
/* dt and dd share a line when they fit; dd grows to fill it, so the next dt
   starts a new line; a narrow card puts dd under its dt. */
.hours { display: flex; flex-wrap: wrap; gap: .1rem .75rem; margin: 0 0 .75rem; }
.hours dt { font-weight: 600; flex: 0 1 auto; max-width: 100%; }
.hours dd { margin: 0; flex: 1 0 7.5rem; }
.links { display: grid; gap: .35rem; margin-top: auto !important; padding-top: .5rem !important; }
.links a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; }

/* delivery rules */
.rules { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); margin-top: 1.5rem; }
.rules li { border-left: 6px solid var(--lime); background: var(--cream); border-radius: var(--radius); padding: 1rem 1.25rem; min-width: 0; }
.rules h2 { font-size: 1.25rem; }
.rules p { margin: 0; }

/* dishes */
.dishes { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); margin-top: 1.25rem; }
@media (min-width: 40rem) { .dishes { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: 1rem; } }
/* six dishes on the home page, always the full container width and never an
   orphan row: 2 x 3 on a phone, 3 x 2 from 40rem, 6 in one row from 64rem
   (owner, OK 1310). Same gap as the Galeria grid. */
.dishes--home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 40rem) { .dishes--home { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .dishes--home { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.dishes img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--cream); }
.dishes a { display: block; border-radius: var(--radius); }

/* footer */
.site-footer { background: var(--brand); color: #eef3ea; padding: 2.5rem 0 1.5rem; margin-top: 0; }
.site-footer a { color: var(--lime); }
.site-footer a:hover { color: #d4ec6a; }
.site-footer :focus-visible { outline-color: var(--paper); }
.site-footer h2 { color: var(--paper); font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; margin-bottom: 1.5rem; }
.foot-logo { width: 7rem; }
.foot-tag { max-width: 34rem; margin: 0; }
.foot-top p:last-child { margin: 0; }
.foot-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
.foot-loc p { margin-bottom: .5rem; }
.hours--foot { font-size: .95rem; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 0 2.5rem; border-top: 1px solid rgba(255, 255, 255, .2); margin-top: 1.5rem; padding-top: 1.25rem; }
.foot-nav ul { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1rem; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.credit { margin: 1rem 0 0; font-size: .9rem; }

/* /kontakt maps (decision 653): our OSM preview, the Google map after a click */
.map { margin: 0 0 .75rem; }
.map__frame { position: relative; aspect-ratio: 16 / 10; border-radius: .5rem; overflow: hidden; background: var(--cream); border: 1px solid var(--line); }
.map__img, .map__blank { width: 100%; height: 100%; object-fit: cover; }
.map__load { position: absolute; left: 50%; bottom: .6rem; transform: translateX(-50%); width: max-content; max-width: calc(100% - 1.2rem); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.map__load[hidden] { display: none; }
.map__credit { font-size: .8rem; margin-top: .3rem; color: var(--muted); }
.map__credit a { color: var(--muted); }
.map__iframe { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: .5rem; background: var(--cream); }

/* /galeria (owner, 04/11): mosaic with mixed tile sizes, never a hole.
   Rows are as tall as a column is wide (container units), so a 2x2 tile is
   square and a 2x1 tile is two cells wide. */
.mosaic-wrap { container-type: inline-size; margin-top: 1.25rem; }
.mosaic {
  --cols: 2; --gap: .75rem;
  display: grid; gap: var(--gap); grid-auto-flow: dense;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-rows: calc((100cqi - (var(--cols) - 1) * var(--gap)) / var(--cols));
}
@media (min-width: 40rem) { .mosaic { --gap: 1rem; } }
@media (min-width: 64rem) { .mosaic { --cols: 4; } }
.tile { min-width: 0; }
.tile a { display: block; width: 100%; height: 100%; border-radius: var(--radius); overflow: hidden; background: var(--cream); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.tile a:hover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .tile img { transition: none; } .tile a:hover img { transform: none; } }
.tile--l { grid-column: span 2; grid-row: span 2; }
@media (min-width: 64rem) {
  .tile--l2 { grid-column: span 2; grid-row: span 2; }
  .tile--w { grid-column: span 2; }
}
.more-photos { margin-top: 1.5rem; }
.more-photos > summary { list-style: none; cursor: pointer; }
.more-photos > summary::-webkit-details-marker { display: none; }
.more-photos__close, .more-photos[open] .more-photos__open { display: none; }
.more-photos[open] .more-photos__close { display: inline; }

/* lightbox (static/gallery.js) */
body:has(dialog.lightbox[open]) { overflow: hidden; }
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0b120e; color: #fff; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: #0b120e; }
.lightbox__figure { margin: 0; padding: 3.5rem 1rem 1rem; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.lightbox__img { max-width: min(100%, 75rem); max-height: calc(100vh - 9rem); width: auto; height: auto; object-fit: contain; border-radius: .5rem; background: #fff; touch-action: pan-y; }
.lightbox__caption { text-align: center; max-width: 40rem; font-size: .95rem; }
.lightbox__count { font-weight: 700; margin-right: .5rem; }
.lightbox__btn {
  position: absolute; display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; border: 2px solid rgba(255, 255, 255, .7); border-radius: 50%;
  background: rgba(0, 0, 0, .45); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.lightbox__btn:hover { background: rgba(0, 0, 0, .7); }
.lightbox__btn:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.lightbox__prev { left: .75rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: .75rem; top: 50%; transform: translateY(-50%); }
.lightbox__close { right: .75rem; top: .75rem; }
