/* ==========================================================================
   Bistro Borek — boxy imprezowe (/boxy)

   Strona ma jedno zadanie: pokazać, co jest w boxie, i zebrać TERMIN. Zdjęć
   produktowych nie ma i układ jest pod to zaprojektowany — nośnikiem jest
   skład wypisany w trzech blokach (Przekąski / Dodatki / Sosy), tak samo jak
   na grafice, która poszła na Facebooka.

   Element wiodący: licznik gości w hero. Box jest definiowany liczbą osób,
   a cała historia cenowa to „ile wychodzi na osobę” — dlatego liczba gości
   steruje kartami (podpowiedź ilości, wyróżnienie dopasowanego boxu), a cena
   na osobę stoi przy każdej cenie. To jest informacja, nie ozdoba.

   Paleta i typografia jak w reszcie serwisu: butelkowa zieleń, czerń, złoto,
   Palatino w nagłówkach.
   ========================================================================== */

:root {
  --green: #0f3b2d;
  --green-dark: #082a1f;
  --green-deep: #061f17;
  --green-mid: #1d5a45;
  --green-soft: #e5ede7;
  --gold: #c69a43;
  --gold-light: #e5c982;
  --gold-deep: #8a6727;
  --gold-wash: #f9f0da;
  --cream: #f4efe3;
  --paper: #fffdf8;
  --ink: #20241f;
  --muted: #5d635c;
  --line: #e4decd;
  --line-strong: #cfc7b0;
  --danger: #a63d20;

  --radius-s: 8px;
  --radius-m: 13px;
  --radius-l: 20px;
  --shadow-1: 0 1px 2px rgba(24, 30, 26, 0.05), 0 4px 14px rgba(24, 30, 26, 0.06);
  --shadow-2: 0 10px 34px rgba(8, 24, 17, 0.22);

  --font-display: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --touch: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
/* Atrybut `hidden` musi wygrywać z każdą klasą, która ustawia `display`.
   Reguła wbudowana przeglądarki ma specyficzność elementu, więc zwykłe
   `.pole { display: block }` ją przykrywało i pole adresu pokazywało się przy
   odbiorze osobistym. Sterujemy widocznością wyłącznie przez `hidden`. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  /* Miejsce na przyklejony pasek wyboru, żeby nie zasłaniał stopki. */
  padding-bottom: 0;
}
body[data-pasek="1"] { padding-bottom: 88px; }
h1, h2, h3, p, ul, li { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green-mid); }
:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ukryte { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.wrap { width: min(1080px, 100%); margin: 0 auto; padding: 0 20px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- Nagłówek ------------------------------------------------------------- */

.top { background: var(--green-deep); }
.top__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px;
}
.top__home { display: inline-flex; }
.top__logo { height: 30px; width: auto; }
.top__order {
  color: var(--gold-light); text-decoration: none;
  font-size: 14px; font-weight: 600; letter-spacing: 0.04em;
  border: 1px solid rgba(229, 201, 130, 0.45);
  border-radius: 999px; padding: 8px 16px;
  transition: background 0.18s ease, color 0.18s ease;
}
.top__order:hover { background: var(--gold-light); color: var(--green-deep); }

/* --- Hero ----------------------------------------------------------------- */

.hero {
  background: var(--green-deep);
  color: var(--cream);
  padding: 28px 0 44px;
  /* Cienka złota nitka na styku z ofertą — ten sam znak co ramka na grafice. */
  border-bottom: 1px solid rgba(198, 154, 67, 0.35);
}
.hero__eyebrow {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(46px, 12vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.015em;
  margin: 10px 0 0;
  color: var(--cream);
}
.hero__lead {
  max-width: 46ch; margin-top: 18px;
  font-size: clamp(16px, 2.4vw, 18px);
  color: rgba(244, 239, 227, 0.82);
}

/* Na szerokim ekranie licznik gości staje obok tytułu, a nie pod nim: inaczej
   prawa połowa hero zostaje pusta, a licznik — element wiodący strony —
   ląduje nisko i wygląda jak dopisek. */
@media (min-width: 900px) {
  .hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    grid-template-areas:
      "eyebrow dial"
      "title   dial"
      "lead    dial";
    align-items: start;
    column-gap: 48px;
  }
  .hero__eyebrow { grid-area: eyebrow; }
  .hero__title { grid-area: title; }
  .hero__lead { grid-area: lead; }
  .dial { grid-area: dial; align-self: center; margin-top: 0; max-width: none; }
}

/* Licznik gości — element wiodący strony. */
.dial {
  margin-top: 30px; padding: 18px 20px;
  background: rgba(255, 253, 248, 0.06);
  border: 1px solid rgba(198, 154, 67, 0.32);
  border-radius: var(--radius-l);
  max-width: 520px;
}
.dial__label {
  font-family: var(--font-display); font-size: 20px;
  color: var(--gold-light);
}
.dial__row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.dial__step {
  width: var(--touch); height: var(--touch); flex: none;
  border-radius: 50%; border: 1px solid rgba(229, 201, 130, 0.5);
  background: transparent; color: var(--gold-light);
  font-size: 22px; line-height: 1;
  transition: background 0.18s ease, color 0.18s ease;
}
.dial__step:hover { background: var(--gold-light); color: var(--green-deep); }
.dial__input {
  width: 104px; padding: 6px 10px;
  font-family: var(--font-display); font-size: 34px; font-weight: 700;
  text-align: center;
  color: var(--cream); background: transparent;
  border: 0; border-bottom: 2px solid rgba(229, 201, 130, 0.5);
}
/* Strzałki przeglądarki psują tu rytm — liczba zmienia się przyciskami. */
.dial__input::-webkit-outer-spin-button,
.dial__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dial__input { -moz-appearance: textfield; appearance: textfield; }
.dial__unit { font-size: 15px; color: rgba(244, 239, 227, 0.7); }
.dial__hint {
  margin-top: 10px; font-size: 14.5px; min-height: 1.5em;
  color: var(--gold-light);
}

/* --- Sekcje --------------------------------------------------------------- */

.oferta, .rezerwacja, .gotowe { padding: 44px 20px 8px; }
.sekcja__tytul {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 4.5vw, 36px);
  color: var(--green-dark);
}
.sekcja__lead { margin-top: 8px; color: var(--muted); max-width: 60ch; }

/* --- Karty boxów ---------------------------------------------------------- */

.boxy {
  margin-top: 26px;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}
.box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
/* Dopasowanie do liczby gości — jedyne wyróżnienie na karcie. */
.box[data-dopasowany="1"] {
  border-color: var(--gold);
  box-shadow: var(--shadow-1), 0 0 0 3px var(--gold-wash);
}
.box__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.box__name { font-family: var(--font-display); font-size: 25px; font-weight: 700; color: var(--green-dark); }
.box__people { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
.box__badge {
  align-self: flex-start;
  font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700;
  color: var(--gold-light); background: var(--green-dark);
  border-radius: 999px; padding: 5px 12px;
}
.box__desc { font-size: 14.5px; color: var(--muted); }

/* Cena i „na osobę” stoją razem — to jest oś porównania między boxami. */
.box__cena { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.box__kwota { font-family: var(--font-display); font-size: 40px; font-weight: 700; color: var(--green-dark); line-height: 1; }
.box__osoba { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }

.box__sekcje { display: grid; gap: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
.box__sekcja-label {
  font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 700; margin-bottom: 6px;
}
.box__items { display: grid; gap: 5px; font-size: 14.5px; }
.box__items li { padding-left: 16px; position: relative; }
.box__items li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}
.box__items--inline { display: block; font-size: 14.5px; color: var(--ink); }
.box__items--inline li { display: inline; padding: 0; }
.box__items--inline li::before { content: none; }
.box__items--inline li + li::before { content: " · "; position: static; background: none; width: auto; height: auto; color: var(--line-strong); }

/* Sterowanie ilością */
.box__akcja { margin-top: auto; padding-top: 4px; }
.licznik { display: flex; align-items: center; gap: 10px; }
.licznik__btn {
  width: var(--touch); height: var(--touch); flex: none;
  border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--paper); color: var(--green-dark);
  font-size: 20px; line-height: 1;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.licznik__btn:hover:not(:disabled) { background: var(--green-soft); border-color: var(--green-mid); }
.licznik__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.licznik__ile { font-family: var(--font-display); font-size: 22px; font-weight: 700; min-width: 2.5ch; text-align: center; }
.licznik__opis { font-size: 14px; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--touch); padding: 12px 24px;
  border: 0; border-radius: 999px;
  background: var(--green); color: var(--paper);
  font-weight: 600; font-size: 15.5px; letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.12s ease;
}
.btn:hover { background: var(--green-mid); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--wide { width: 100%; }
.btn--maly { min-height: 40px; padding: 8px 18px; font-size: 14.5px; }
.btn--ghost { background: transparent; color: var(--green-dark); border: 1px solid var(--line-strong); }
.btn--ghost:hover { background: var(--green-soft); }
.btn--dodaj { background: var(--green-dark); }

/* --- Pasek wyboru --------------------------------------------------------- */

.pasek {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--green-deep);
  border-top: 1px solid rgba(198, 154, 67, 0.35);
  box-shadow: var(--shadow-2);
}
.pasek__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.pasek__info { display: flex; flex-direction: column; }
.pasek__ile { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(244, 239, 227, 0.72); }
.pasek__suma { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--cream); line-height: 1.15; }
.pasek .btn--maly { background: var(--gold); color: var(--green-deep); font-weight: 700; }
.pasek .btn--maly:hover { background: var(--gold-light); }

/* --- Formularz ------------------------------------------------------------ */

.form { margin-top: 24px; max-width: 720px; }
.pola { border: 0; padding: 0; margin: 0 0 24px; }
.pola__legenda {
  font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 700; padding: 0; margin-bottom: 10px;
}
.dwa { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.pole { display: block; margin-bottom: 14px; }
.pole > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; color: var(--green-dark); }
.pole__opcja { font-style: normal; font-weight: 400; color: var(--muted); }
.pole input, .pole select, .pole textarea {
  width: 100%; min-height: var(--touch); padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: var(--radius-s);
}
.pole textarea { min-height: 92px; resize: vertical; }
.pole input:focus, .pole select:focus, .pole textarea:focus { border-color: var(--green-mid); }

.wybor { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-bottom: 14px; }
.wybor__opcja {
  display: grid; gap: 2px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: var(--radius-m);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.wybor__opcja:has(input:checked) { border-color: var(--green-mid); background: var(--green-soft); }
.wybor__opcja input { position: absolute; opacity: 0; width: 0; height: 0; }
.wybor__opcja:has(input:focus-visible) { outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.wybor__tytul { font-weight: 600; color: var(--green-dark); }
.wybor__opis { font-size: 13.5px; color: var(--muted); }

.form__nota { margin-top: 14px; font-size: 13.5px; color: var(--muted); }

.komunikat { margin-top: 12px; font-size: 14.5px; border-radius: var(--radius-s); }
.komunikat--blad { color: var(--danger); background: #fbeeea; border: 1px solid #edcfc6; padding: 10px 12px; }
.komunikat--info { color: var(--green-dark); background: var(--green-soft); border: 1px solid #cfe0d6; padding: 10px 12px; }

.box__zadatek {
  font-size: 13.5px; color: var(--gold-deep);
  background: var(--gold-wash);
  border-radius: var(--radius-s);
  padding: 8px 10px;
}

/* --- Etap 2: rezerwacja i zadatek ------------------------------------------ */

.status { padding-bottom: 40px; }
.status__krok {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 700; margin-bottom: 6px;
}
.status__karta {
  margin-top: 20px; max-width: 620px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  padding: 24px;
}
.status__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.status__numer { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--gold-deep); letter-spacing: 0.05em; }
.status__termin { font-family: var(--font-display); font-size: 26px; color: var(--green-dark); }
.status__chip {
  font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700;
  border-radius: 999px; padding: 6px 13px;
  background: var(--green-soft); color: var(--green-dark);
}
.status__chip[data-status="accepted"] { background: var(--green-dark); color: var(--gold-light); }
.status__chip[data-status="rejected"], .status__chip[data-status="cancelled"] { background: #fbeeea; color: var(--danger); }

.status__pozycje { margin-top: 18px; display: grid; gap: 4px; font-size: 15px; }
.status__pozycje li { padding-left: 16px; position: relative; }
.status__pozycje li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}

.status__rachunek {
  margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr auto; gap: 7px 16px;
  font-size: 15px;
}
.status__rachunek dt { color: var(--muted); }
.status__rachunek dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.status__rachunek dd.is-strong { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--green-dark); }

.status__akcje { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.status__akcje .btn { flex: 1 1 auto; }
.status__nota { margin-top: 14px; font-size: 14px; color: var(--muted); }
.status .btn--ghost { margin-top: 18px; }

/* --- Potwierdzenie -------------------------------------------------------- */

.gotowe { text-align: center; padding-bottom: 40px; }
.gotowe__znak { font-size: 48px; line-height: 1; }
.gotowe__title { font-family: var(--font-display); font-size: clamp(26px, 5vw, 38px); color: var(--green-dark); margin-top: 12px; }
.gotowe__numer {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  color: var(--gold-deep); margin-top: 6px; letter-spacing: 0.06em;
}
.gotowe__lead { margin-top: 12px; color: var(--muted); max-width: 52ch; margin-inline: auto; }
.gotowe__lista {
  margin: 22px auto 0; max-width: 420px; text-align: left;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 16px 18px; display: grid; gap: 8px; font-size: 15px;
}
.gotowe__lista li { display: flex; justify-content: space-between; gap: 14px; }
.gotowe__lista b { font-family: var(--font-display); }
.gotowe__nota { margin-top: 18px; font-size: 14.5px; color: var(--muted); }
.gotowe .btn--ghost { margin-top: 20px; }

/* --- Stopka --------------------------------------------------------------- */

.stopka {
  margin-top: 48px; padding: 28px 0 34px;
  background: var(--green-deep); color: rgba(244, 239, 227, 0.75);
  font-size: 14px; text-align: center;
}
.stopka a { color: var(--gold-light); }
.stopka__linki { margin-top: 8px; }

/* --- Wąski ekran ---------------------------------------------------------- */

@media (max-width: 640px) {
  .dwa, .wybor { grid-template-columns: 1fr; }
  .hero { padding-bottom: 34px; }
  .oferta, .rezerwacja, .gotowe { padding-top: 34px; }
  .box { padding: 20px; }
  .pasek__row { min-height: 64px; }
  body[data-pasek="1"] { padding-bottom: 80px; }
}
