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

/* Subpages have no hero under the header, so the header is solid from the start */
.page .site-header::before {
  opacity: 1;
}

.site-nav__links a[aria-current='page'] {
  border-color: var(--ochre);
}

/* Wine band at the top of every subpage */
.page-head {
  padding-top: var(--header-h);
}

/* Menu and pintxos: their own pictures (wine waves, a Spanish illustration); a shade on the left
   keeps the title readable */
.page-head--menu,
.page-head--pintxos {
  background-color: var(--night);
  background-image: linear-gradient(to right, rgb(30 10 18 / 0.6), rgb(30 10 18 / 0) 70%), var(--page-head-bg);
  background-position: center;
  background-size: cover;
}

.page-head--menu {
  --page-head-bg: url("../images/bg-menu.24b00170789c.jpg");
}

.page-head--pintxos {
  --page-head-bg: url("../images/bg-pintxos.ea19c2744484.webp");
}

.page-head__inner {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(2.5rem, 6vw, 4.5rem);
}

/* Title and text on the left, a stamp or badge on the right (menu, pintxos) */
.page-head__split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-l);
}

.page-head__badge {
  width: clamp(10rem, 18vw, 15rem);
}

/* Under the title, as on the home page */
.page-head__kicker {
  margin: var(--space-s) 0 0;
}

.page-head__title {
  font-size: var(--step-hero);
  line-height: 1;
  letter-spacing: -0.01em;
}

.page-head__text {
  max-width: 46ch;
  margin: var(--space-m) 0 0;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.45;
}

/* Postmark from the printed pintxos menu */
.stamp {
  display: grid;
  place-items: center;
  flex: none;
  width: 8.5rem;
  aspect-ratio: 1;
  margin: 0;
  padding: 0.5rem;
  border: 2px solid var(--ochre);
  border-radius: 50%;
  outline: 1px solid var(--ochre);
  outline-offset: 4px;
  color: var(--ochre);
  font-family: var(--font-accent);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 0.95;
  text-align: center;
  white-space: nowrap;
  transform: rotate(-10deg);
}

.stamp--large {
  width: clamp(10rem, 17vw, 13rem);
  margin-right: var(--space-m);
  font-size: clamp(2.8rem, 4.2vw, 3.6rem);
}

/* The pills follow right under the title */
.page-head:has(+ .category-nav) .page-head__inner {
  padding-bottom: var(--space-l);
}

/* Menu: a taller head, so more of the wave picture shows */
.page-head.page-head--menu .page-head__inner {
  padding-block: clamp(5rem, 13vw, 11rem) clamp(4rem, 9vw, 8rem);
}

/* /menu/: the categories as pills right under the title. The row sticks under the header
   while scrolling, like its continuation, so any category is one tap away. */
.category-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  padding: 0.75rem var(--gutter);
  background: var(--plum);
  box-shadow: 0 1px 0 var(--cellar-line);
  backdrop-filter: blur(10px);
}

.category-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: calc(var(--max) - 2 * var(--gutter));
  margin: 10px auto;
  padding: 0;
  list-style: none;
}

.category-nav a {
  display: block;
  padding: 0.55rem 1.25rem;
  border: 1px solid rgb(245 237 219 / 0.35);
  border-radius: var(--radius-pill);
  color: var(--paper);
  font-size: var(--step-0);
  text-decoration: none;
  white-space: nowrap;
}

.category-nav a:hover {
  border-color: var(--paper);
  color: var(--paper);
}

.category-nav a[aria-current='true'] {
  border-color: var(--ochre);
  background: var(--ochre);
  color: var(--ink);
  font-weight: 600;
}

/* Jumping to a category leaves its title clear of the pills (html's scroll-padding-top
   already makes room for the header). */
.menu-category {
  scroll-margin-top: calc(var(--category-nav-h, 4rem) + var(--space-m));
}

.menu-category + .menu-category {
  margin-top: var(--space-section);
}

/* Highlighted category (admin: "zvýraznit"): an ochre band across the whole width. The box shadow
   paints the band beyond the content column without widening the page. */
.menu-category--highlight {
  padding-block: var(--space-section);
  background: var(--ochre);
  box-shadow: 0 0 0 100vmax var(--ochre);
  clip-path: inset(0 -100vmax);
}

/* First in the menu: the band starts right under the category navigation */
.menu-category--highlight:first-child {
  margin-top: calc(-1 * var(--space-section));
}

.menu-category--highlight + .menu-category {
  margin-top: var(--space-section);
}

/* Muted text is too faint on ochre */
.menu-category--highlight :is(.menu-category__intro, .dish__text) {
  color: var(--ink);
}

.menu-category__title {
  margin-bottom: var(--space-l);
  font-size: var(--step-3);
}

.menu-category__intro {
  max-width: 60ch;
  margin: calc(-1 * var(--space-m)) 0 var(--space-l);
  color: var(--ink-muted);
}

/* Items, set like the printed menu: name, rule, price */
.dishes__labels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-xl);
  margin-bottom: var(--space-s);
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.dishes__labels p,
.dish__prices {
  display: flex;
  justify-content: flex-end;
  max-width: none;
  margin: 0;
}

.dishes__labels span,
.dish__prices > span {
  min-width: 4.25rem;
  text-align: right;
}

.dishes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-l) var(--space-xl);
  margin: 0;
  padding: 0;
  list-style: none;
}

.dish__head {
  display: flex;
  align-items: baseline;
  gap: var(--space-s);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgb(42 21 32 / 0.35);
}

.dish__name {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.dish__badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.55rem;
  border-radius: var(--radius-pill);
  background: rgb(74 16 40 / 0.1);
  color: var(--wine);
  font-size: 0.8rem;
  font-weight: 600;
  vertical-align: 0.1em;
  white-space: nowrap;
}

.dish__prices {
  color: var(--wine);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dish__subtitle {
  margin: 0.5rem 0 0;
}

.dish__text {
  margin: 0.35rem 0 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
  line-height: 1.55;
}

.dishes__note {
  margin: var(--space-l) 0 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
}

/* /pintxos/ */

.stops {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: var(--space-xl) var(--space-l);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* City, picture and ingredients line up across a row even when a city name wraps */
.stop {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  align-content: start;
  row-gap: 0;
}

/* Five a row, as on the printed menu */
@media (min-width: 75rem) {
  .stops {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.stop__city {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
}

.stop__number {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--wine);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
}

/* The illustrations are cut from the printed menu: multiply and feathered edges let
   them lie on this page's paper without a visible rectangle. */
.stop__image {
  width: 100%;
  margin-block: var(--space-s);
  mix-blend-mode: multiply;
  mask-image: radial-gradient(ellipse closest-side, #000 72%, transparent);
}

.stop__ingredients {
  margin: var(--space-s) 0 0;
  padding: 0;
  font-size: var(--step--1);
  list-style: none;
}

.stop__image + .stop__ingredients {
  margin-top: 0;
}

.stop__ingredients li {
  position: relative;
  padding-left: 1rem;
}

.stop__ingredients li::before {
  content: '';
  position: absolute;
  top: 0.65em;
  left: 0.2rem;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--wine);
}

.how h2 {
  margin-bottom: var(--space-l);
}

.how__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-l);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.how__steps li {
  padding-top: var(--space-s);
  border-top: 1px solid var(--cellar-line);
  font-size: var(--step-1);
  line-height: 1.4;
  counter-increment: step;
}

.how__steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.5rem;
  color: var(--ochre);
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1;
}

.how__outro {
  margin: var(--space-xl) 0 var(--space-l);
}

.how__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
}

@media (max-width: 45rem) {
  .dishes,
  .dishes__labels,
  .how__steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .dishes__labels p:nth-child(2) {
    display: none;
  }

  .page-head__split {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-head__badge {
    order: -1;
    width: 9rem;
  }

  .stamp--large {
    order: -1;
    width: 8.5rem;
    margin: 0 0 var(--space-xs) 0.5rem;
    font-size: 2.3rem;
  }

  /* One swipeable row instead of a tall stack of pills */
  .category-nav {
    padding-inline: 0;
  }

  .category-nav ul {
    flex-wrap: nowrap;
    padding-inline: var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
  }
}
