/* ——————————————————————————————————————————
   The Bald Barista — arkusz wspólny (układ, nagłówek, stopka, komponenty)
   —————————————————————————————————————————— */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p  { margin: 0 0 var(--space-2); }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

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

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 var(--space-2);
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--cream); padding: 12px 18px;
}
.skip-link:focus { left: 0; }

/* ——— przyciski ——— */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 26px;
  border: var(--border);
  box-shadow: var(--shadow-hard);
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.btn--primary { background: var(--amber); color: var(--ink); }
.btn--ghost   { background: var(--cream); color: var(--ink); }
.btn:focus-visible { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
@media (hover: hover) {
  .btn:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
}

/* ——— nagłówek: wyspa nad treścią ———
   Kremowy panel z ciemną ramką i żółtym cieniem — ten sam język co przyciski.
   Przyklejony do góry, wygląda tak samo od pierwszej sekundy. */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: transparent; padding-block: 12px;
  margin-bottom: -82px;                 /* wyspa leży NA hero, nie nad nim */
}
.masthead .wrap {
  display: flex; align-items: center; min-height: 58px;
  background: var(--cream); color: var(--ink);
  border: var(--border); box-shadow: 6px 6px 0 var(--amber);
  padding-inline: 18px;
}
/* Logo w pasku: 34 px samego obrazka to za mało jak na cel dotykowy. */
.masthead__logo { padding-block: 6px; }
.masthead__logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.masthead__logo img { width: 34px; height: 34px; }
.masthead__name { font-family: var(--font-display); font-weight: 900; font-size: 1rem; text-transform: uppercase; letter-spacing: -0.01em; color: var(--ink); }

.nav { margin-left: auto; display: flex; gap: 4px; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.09em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; padding: 10px 14px; text-decoration: none; color: var(--ink); transition: background 0.2s var(--ease); }
.nav a:hover, .nav a:focus-visible, .nav a[aria-current="page"] { background: var(--amber); }

/* ——— przycisk menu mobilnego ———
   Ten sam język co przyciski: ramka 2 px i twardy cień. Na dużym ekranie
   i bez JS-a nie istnieje. */
.navtoggle {
  display: none;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  border: var(--border);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.navtoggle:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.navtoggle__bars { display: block; position: relative; width: 22px; height: 14px; }
.navtoggle__bars i {
  position: absolute; left: 0; right: 0; height: 3px; background: currentColor;
  transition: transform 0.3s var(--ease-nav), opacity 0.16s var(--ease);
}
.navtoggle__bars i:nth-child(1) { top: 0; }
.navtoggle__bars i:nth-child(2) { top: 5.5px; }
.navtoggle__bars i:nth-child(3) { top: 11px; }
[data-nav="open"] .navtoggle__bars i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
[data-nav="open"] .navtoggle__bars i:nth-child(2) { opacity: 0; }
[data-nav="open"] .navtoggle__bars i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Blok z adresem i godzinami — widoczny tylko w panelu mobilnym. */
.nav__meta { display: none; }

@media (max-width: 900px) {
  /* Bez JS-a zostaje dawny pasek z przewijanymi linkami — inaczej nie dałoby się
     w ogóle otworzyć nawigacji. */
  html:not(.js) .masthead { margin-bottom: 0; }
  html:not(.js) .masthead .wrap { flex-wrap: wrap; gap: 8px; padding-block: 10px; }
  html:not(.js) .nav { width: 100%; margin-left: 0; overflow-x: auto; }
  html:not(.js) .nav a { padding: 10px 12px; white-space: nowrap; }

  /* Z JS-em pasek wygląda dokładnie tak jak na dużym ekranie: wyspa
     z marginesami ze wszystkich stron, leżąca na treści. */
  html.js .navtoggle { display: inline-flex; }
  /* Na dużym ekranie marginesy wyspy biorą się z `max-width` na .wrap.
     Na telefonie trzeba je dać wprost, żeby pasek nadal był wyspą. */
  html.js .masthead .wrap { margin-inline: 14px; padding-inline: 12px; }
  html.js .masthead__name { font-size: 0.95rem; }

  /* Panel jest dzieckiem wyspy, więc normalnie malowałby się na niej.
     Chrom wyspy przenosimy na warstwę nad panelem, żeby krzyżyk został
     widoczny i klikalny dokładnie tam, gdzie był hamburger. */
  html.js .masthead .wrap { position: relative; background: transparent; border: 0; box-shadow: none; }
  html.js .masthead .wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 55;
    background: var(--cream);
    border: var(--border);
    box-shadow: 6px 6px 0 var(--amber);
  }
  html.js .masthead__logo, html.js .navtoggle { position: relative; z-index: 56; }

  /* Panel: ta sama nawigacja, tylko rozłożona na cały ekran.
     Jeden transform na jednym elemencie — otwarcie i zamknięcie to ten sam ruch. */
  html.js .nav {
    position: fixed;
    inset: 0;
    z-index: 50;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 104px var(--gutter) var(--space-4);
    background: var(--amber);
    color: var(--ink);
    font-size: inherit;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    transform: translateY(-100%);
    transition: transform 0.4s var(--ease-nav-out), visibility 0s linear 0.4s;
  }
  html.js[data-nav] .nav { visibility: visible; }
  html.js[data-nav="open"] .nav {
    transform: translateY(0);
    transition: transform 0.46s var(--ease-nav), visibility 0s;
  }

  /* Wyspa zostaje nad panelem — hamburger składa się w krzyżyk tam,
     gdzie palec go nacisnął. */
  html.js[data-nav] .masthead { z-index: 60; }

  html.js .nav > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 2px;
    border-top: 1px solid rgba(46, 33, 6, 0.3);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.1rem, 10vw, 3.4rem);
    line-height: 1;
    letter-spacing: -0.025em;
    text-transform: uppercase;
    color: var(--ink);
    background: none;
    transition: none;
  }
  html.js .nav > a:last-of-type { border-bottom: 1px solid rgba(46, 33, 6, 0.3); }
  html.js .nav > a::after {
    content: "";
    flex: none;
    width: 13px;
    height: 13px;
    border-right: 3px solid var(--ink);
    border-bottom: 3px solid var(--ink);
    transform: rotate(-45deg);
  }
  html.js .nav > a:active { background: rgba(46, 33, 6, 0.12); }
  html.js .nav > a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-thickness: 5px;
    text-underline-offset: 9px;
  }

  html.js .nav__meta {
    display: block;
    margin-top: auto;
    padding-top: var(--space-4);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.9;
    letter-spacing: 0.03em;
    text-transform: none;
    color: var(--ink);
  }
  html.js .nav__meta p { margin: 0; }
  html.js .nav__meta p + p { margin-top: 10px; }

  /* Niski ekran: sześć pozycji po 71 px + stopka panelu nie mieściły się
     w 667 px. Zmniejszamy pozycje, nie usuwamy niczego. */
  @media (max-height: 720px) {
    html.js .nav { padding-top: 92px; }
    html.js .nav > a { padding-block: 11px; font-size: clamp(1.7rem, 8vw, 2.6rem); }
    html.js .nav__meta { padding-top: var(--space-3); line-height: 1.7; font-size: 0.74rem; }
  }
  /* Odkręcamy to, co .nav a robi linkom w pasku — tu są zwykłymi odnośnikami. */
  html.js .nav__meta a { display: inline; padding: 0; text-decoration: none; border-bottom: 1px solid rgba(46, 33, 6, 0.4); }
  html.js .nav__meta a[href^="tel:"] { display: inline-block; padding-block: 12px; }
  html.js .nav__social a { display: inline-block; padding-block: 12px; }
  html.js .nav__social { display: flex; gap: 20px; }

  /* Pozycje wjeżdżają za panelem i wyjeżdżają razem z nim. */
  html.js[data-nav="open"] .nav > a { animation: nav-in 0.36s var(--ease-nav) backwards; }
  html.js[data-nav="closing"] .nav > a { animation: nav-out 0.2s var(--ease-nav-out) forwards; }
  html.js .nav > a:nth-of-type(1) { --nav-i: 0; }
  html.js .nav > a:nth-of-type(2) { --nav-i: 1; }
  html.js .nav > a:nth-of-type(3) { --nav-i: 2; }
  html.js .nav > a:nth-of-type(4) { --nav-i: 3; }
  html.js .nav > a:nth-of-type(5) { --nav-i: 4; }
  html.js[data-nav="open"] .nav > a { animation-delay: calc(0.12s + var(--nav-i) * 0.045s); }
  html.js[data-nav="closing"] .nav > a { animation-delay: calc((4 - var(--nav-i)) * 0.022s); }
  html.js[data-nav="open"] .nav__meta { animation: nav-in 0.36s var(--ease-nav) 0.32s backwards; }

  body.nav-locked { overflow: hidden; }
}

@keyframes nav-in  { from { opacity: 0; transform: translateY(22px); } }
@keyframes nav-out { to   { opacity: 0; transform: translateY(14px); } }

/* ——— odnośnik do galerii ———
   Kontekstowy: stoi przy tym, o czym właśnie czytasz, i prowadzi do
   właściwego miejsca w galerii, nie do jej początku. */
.seephotos {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--amber);
  padding-bottom: 3px;
  transition: color 0.16s var(--ease), gap 0.16s var(--ease);
}
/* Odnośnik do galerii jest na telefonie zwykłym celem dotykowym — sam tekst
   ma 25 px wysokości, więc dokładamy odstęp wewnętrzny. */
.seephotos { padding-block: 11px; }
.seephotos:focus-visible { color: var(--ink); gap: 14px; }
@media (hover: hover) { .seephotos:hover { color: var(--ink); gap: 14px; } }
.section--dark .seephotos { color: rgba(255, 237, 203, 0.75); }
.section--dark .seephotos:hover, .section--dark .seephotos:focus-visible { color: var(--cream); }

/* ——— nagłówki wjeżdżające literami ———
   Rozbicie na litery robi js/ui.js; tu tylko ruch. Dotyczy każdego [data-letters]
   w serwisie, więc styl jest wspólny, nie per-strona. */
.letters { display: inline-block; overflow: hidden; }
.letters .word { display: inline-block; white-space: nowrap; }
.letters .l { display: inline-block; transform: translateY(105%); opacity: 0; }
.letters.is-in .l { animation: letter-up 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes letter-up { to { transform: translateY(0); opacity: 1; } }

/* ——— miejsce na zdjęcie, którego jeszcze nie mamy ———
   Opis każdego brakującego kadru w Strona/BRAKUJACE-ZDJECIA.md. */
.placeholder {
  border: 3px dashed var(--rose);
  background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(152,108,106,0.08) 12px 24px);
  aspect-ratio: 4 / 3;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: clamp(1rem, 4vw, 2rem); text-align: center; color: var(--ink-soft);
}
.placeholder__label { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--rose); margin: 0; }
.placeholder__desc { font-size: 0.88rem; margin: 0; max-width: 34ch; margin-inline: auto; }
/* Na ciemnym tle różowa kreska ginie — podbijamy ją do amberu. */
.placeholder--dark { border-color: rgba(246, 179, 31, 0.55); color: rgba(255, 237, 203, 0.72); background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(246,179,31,0.07) 12px 24px); }
.placeholder--dark .placeholder__label { color: var(--amber); }

/* ——— pas informacyjny ——— */
.factbar { background: var(--ink); color: var(--cream); padding: 18px 0; }
.factbar .wrap { display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: center; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.factbar b { color: var(--amber); font-weight: 500; }

/* ——— sekcje ——— */
.section { padding-block: var(--space-6); }
.section--dark { background: var(--ink); color: var(--cream); }
.section--dark .eyebrow { color: var(--amber); }

/* ——— skok pod kotwicę ———
   Pasek nawigacji jest wyspą leżącą NA treści, więc każdy element, do którego
   można skoczyć z odnośnika, potrzebuje zapasu u góry. Bez tego pierwsza linia
   sekcji chowa się pod paskiem. Wartość ta sama co przy .gallery__anchor. */
[id]:where(:not(body):not(html)) { scroll-margin-top: 96px; }

/* ——— stopka ——— */
.sitefoot { background: var(--ink); color: var(--cream); padding-block: var(--space-5) var(--space-4); border-top: 4px solid var(--amber); }
.sitefoot .wrap { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.sitefoot h2 { font-size: var(--step-1); margin-bottom: var(--space-2); color: var(--amber); }
.sitefoot ul { list-style: none; margin: 0; padding: 0; display: grid; }
/* Cel dotykowy, nie wygląd: sam tekst ma 19 px wysokości, a palec potrzebuje 44.
   Odstęp wewnętrzny robi z linku pole ok. 43 px; odstęp między pozycjami
   znosimy z listy, żeby stopka nie urosła. */
.sitefoot a { text-decoration: none; display: inline-block; padding-block: 12px; }
.sitefoot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sitefoot__hours { font-family: var(--font-mono); font-size: 0.84rem; }
.sitefoot__hours div { display: flex; justify-content: space-between; gap: 16px; max-width: 260px; padding: 3px 0; }
/* Najbliższy wyjątek (święto, jednorazowa zmiana) dopisany pod tygodniem.
   Wstawia go Worker z panelu; bez wpisów tego wiersza po prostu nie ma. */
.sitefoot__exception { border-top: 1px dashed #54401A; margin-top: 6px; padding-top: 8px !important; color: var(--amber); align-items: baseline; }
/* Nazwa święta schodzi do drugiej linii — w wąskiej kolumnie stopki inaczej
   rozpycha wiersz i godziny łamią się w przypadkowym miejscu. */
.sitefoot__exception i { display: block; font-style: normal; opacity: 0.75; font-size: 0.78rem; }
.sitefoot__exlabel + .sitefoot__exception { border-top: 0; margin-top: 0; padding-top: 2px !important; }
.sitefoot__exception > span + span { flex: 0 0 auto; white-space: nowrap; }
.sitefoot__exlabel { margin: 0 0 4px; max-width: 260px; color: var(--amber); opacity: 0.75; font-size: 0.78rem; }
.sitefoot__legal { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid #54401A; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; display: flex; flex-wrap: wrap; gap: 4px 28px; align-items: center; }
.sitefoot__legal a { padding-block: 14px; }
/* Numer telefonu to najważniejszy odnośnik na stronie kawiarni, a jako cel
   dotykowy miał 17 px. Reguła obejmuje stopkę, panel nawigacji i /contact. */
a[href^="tel:"] { display: inline-block; padding-block: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .letters .l { transform: none; opacity: 1; animation: none; }
}



/* ——— baner zgody na ciasteczka ———
   Ta sama wyspa co pasek nawigacji, tylko przyklejona do dołu.
   Wstawiany przez `js/consent.js`; bez skryptu nie istnieje i nie musi. */
.consent {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  padding: 0 14px 14px;
  transform: translateY(110%);
  transition: transform 0.42s var(--ease-nav);
}
.consent[data-state="open"]    { transform: translateY(0); }
.consent[data-state="closing"] { transform: translateY(110%); }
/* Przy otwartym panelu nawigacji baner tylko zasłania pozycje menu —
   wraca, gdy panel się zamknie. Zgoda nie znika, jest tylko odłożona. */
html[data-nav="open"] .consent { display: none; }

.consent__panel {
  max-width: var(--wrap); margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
  justify-content: space-between;
  background: var(--cream-hi); border: var(--border); box-shadow: 6px 6px 0 var(--amber);
  padding: var(--space-3);
}
.consent__text { flex: 1 1 30ch; }
.consent__text p { margin: 0; font-size: 0.94rem; line-height: 1.5; max-width: 68ch; }
.consent__title {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px !important;
}
.consent__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.consent__actions .btn { padding: 13px 20px; font-size: 0.82rem; cursor: pointer; min-height: 44px; }
/* Dwa warianty zdania: pełny na dużym ekranie, krótki na telefonie. */
.consent__short { display: none; }

@media (max-width: 620px) {
  .consent { padding: 0 10px 10px; }
  /* Na telefonie baner nie może zjeść pół ekranu — mniejszy tekst,
     ciaśniejsze pudełko, w ostateczności przewijane. */
  .consent__panel {
    padding: var(--space-2); gap: var(--space-2);
    max-height: 62svh; overflow-y: auto;
  }
  .consent__text p { font-size: 0.84rem; line-height: 1.45; }
  .consent__actions { width: 100%; gap: 8px; }
  .consent__actions .btn { flex: 1 1 auto; text-align: center; padding: 11px 14px; }
  /* Zmierzone: pełne zdanie robiło z banera 187 px, czyli 27% ekranu 667 px,
     i przykrywało „See the menu" — jedyne główne wezwanie na stronie głównej. */
  .consent__long { display: none; }
  .consent__short { display: block; }
  .consent__title { display: none; }
  .consent__text p a { display: inline-block; padding-block: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .consent { transition: none; }
}

/* ——————————————————————————————————————————
   Punkty kadrowania zdjęć (galeria /about, karty)
   CSP `style-src 'self'` blokuje atrybut style, więc ręcznie dobrany
   `object-position` NIE MOŻE stać w HTML — przez to przez jakiś czas
   wszystkie kadry w galerii siedziały po środku. Wartość jest w nazwie
   klasy, żeby w HTML dalej było widać, jak zdjęcie jest kadrowane.
   —————————————————————————————————————————— */
.pos-40-45 { object-position: 40% 45%; }
.pos-45-50 { object-position: 45% 50%; }
.pos-45-55 { object-position: 45% 55%; }
.pos-45-58 { object-position: 45% 58%; }
.pos-50-30 { object-position: 50% 30%; }
.pos-50-32 { object-position: 50% 32%; }
.pos-50-35 { object-position: 50% 35%; }
.pos-50-40 { object-position: 50% 40%; }
.pos-50-45 { object-position: 50% 45%; }
.pos-50-48 { object-position: 50% 48%; }
.pos-50-50 { object-position: 50% 50%; }
.pos-50-52 { object-position: 50% 52%; }
.pos-50-55 { object-position: 50% 55%; }
.pos-50-58 { object-position: 50% 58%; }
.pos-50-62 { object-position: 50% 62%; }
.pos-50-65 { object-position: 50% 65%; }
.pos-52-50 { object-position: 52% 50%; }

.pos-50-78 { object-position: 50% 78%; }
