/* BITE&Go Roma, direction "Roma pop" (docs/direzione.md): white page, red bands, dark text, one font.
   Mobile first. Below 48em the header holds the logo and "Ordina", and a fixed bar at the bottom holds
   "Ordina", "Menu", "Dove siamo". From 48em the header holds all of them and the bar goes away.
   Archivo comes from site/fonts (T8d). The fallbacks after it include fonts that have the fullwidth
   ampersand U+FF06, used in a dish name: Hiragino Sans, Apple SD Gothic Neo, Noto Sans CJK JP,
   Yu Gothic, Malgun Gothic, Meiryo. */

:root {
  --rosso: #c0353c;
  --bianco: #ffffff;
  --salsa: #3b1518;
  --miele: #f2b134;
  --rosa: #fbe7e4;
  --anello: var(--salsa);
  --margine: clamp(1rem, 4vw, 2.5rem);
  --largo: 72rem;
  --lato: max(var(--margine), calc((100% - var(--largo)) / 2));
  --lato-sx: max(var(--lato), env(safe-area-inset-left));
  --lato-dx: max(var(--lato), env(safe-area-inset-right));
  --testata: 5.5rem;
  --barra: 4.25rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scroll-padding-top: var(--testata);
  scroll-padding-bottom: calc(var(--barra) + env(safe-area-inset-bottom));
}

html:has(.pannello[open]) {
  overflow: hidden;
}

body {
  margin: 0;
  padding-bottom: calc(var(--barra) + env(safe-area-inset-bottom));
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Sans",
    "Apple SD Gothic Neo", "Noto Sans CJK JP", "Noto Sans JP", "Yu Gothic", "Malgun Gothic", Meiryo, sans-serif;
  font-size: 1.0625rem;
  font-weight: 420;
  line-height: 1.5;
  overflow-wrap: anywhere;
  color: var(--salsa);
  background: var(--bianco);
}

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

h1,
h2,
h3,
p,
ul,
figure,
address {
  margin: 0;
}

address {
  font-style: normal;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

button {
  font: inherit;
  color: inherit;
}

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

main:focus {
  outline: none;
}

h1,
h2 {
  font-stretch: 62%;
  font-weight: 900;
  line-height: 0.92;
}

h1 {
  font-size: clamp(2.75rem, 12vw, 5rem);
}

h2 {
  font-size: clamp(2.25rem, 10vw, 3.75rem);
}

h3 {
  font-size: 1.5rem;
  font-stretch: 75%;
  font-weight: 800;
  line-height: 1.05;
}

/* Skip link: shows over the red header on the first Tab, with a white focus ring. */
.salta {
  --anello: var(--bianco);
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 30;
  padding: 0.75rem 1rem;
  background: var(--salsa);
  color: var(--bianco);
  font-weight: 700;
}

.salta:focus {
  top: 1rem;
}

/* Buttons: pills, text only. The transparent border shows up in forced-colors mode. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.625rem 1.375rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.btn-primario {
  background: var(--rosso);
  color: var(--bianco);
}

.btn-chiaro {
  background: var(--bianco);
  color: var(--rosso);
}

@media (hover: hover) {
  .btn:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
  }
}

/* Header: a red band, sticky. */
.testata {
  --anello: var(--bianco);
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem var(--lato-dx) 0.5rem var(--lato-sx);
  background: var(--rosso);
  color: var(--bianco);
}

.logo {
  display: block;
  flex: none;
}

.logo img {
  width: 5rem;
  filter: brightness(0) invert(1);
}

.testata ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0;
  list-style: none;
}

.testata .solo-largo {
  display: none;
}

.testata a:not(.btn, .logo) {
  display: block;
  padding: 0.75rem 0;
  font-weight: 700;
  text-decoration: none;
}

.testata a[aria-current="page"],
.barra a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Generic padded block, inside the 72rem column. */
.blocco {
  display: grid;
  gap: 1rem;
  padding: 2.5rem var(--lato-dx) 2.5rem var(--lato-sx);
}

/* section#ordina: the same app links as the panel, reachable without JavaScript. Cards are plain rectangles. */
.ordina {
  --anello: var(--bianco);
  padding: 3rem var(--lato-dx) 3.5rem var(--lato-sx);
  background: var(--rosso);
  color: var(--bianco);
}

.ordina-modi {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.ordina-modo {
  --anello: var(--salsa);
  display: grid;
  align-content: start;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--bianco);
  color: var(--salsa);
}

.ordina-modo h3 {
  font-stretch: 70%;
  font-weight: 900;
  color: var(--rosso);
}

.ordina-app {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}

.ordina-modo .btn {
  width: 100%;
}

/* The panel: a sheet from the bottom on mobile, a centred window from 48em. */
.pannello {
  width: 100%;
  max-width: 100%;
  max-height: calc(100% - 2.5rem);
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: 1.25rem 1.25rem 0 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--bianco);
  color: var(--salsa);
}

.pannello::backdrop {
  background: rgb(59 21 24 / 0.6);
}

.pannello-dentro {
  display: grid;
  gap: 1.5rem;
  padding: 1.25rem max(var(--margine), env(safe-area-inset-right)) calc(1.5rem + env(safe-area-inset-bottom))
    max(var(--margine), env(safe-area-inset-left));
}

.pannello-testa {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pannello h2 {
  font-size: clamp(2rem, 9vw, 2.75rem);
  color: var(--rosso);
}

.chiudi {
  flex: none;
  min-height: 3rem;
  padding: 0.5rem 1.125rem;
  border: 2px solid var(--salsa);
  border-radius: 999px;
  background: var(--bianco);
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.pannello .ordina-modi {
  gap: 1.25rem;
  margin-top: 0;
}

.pannello .ordina-modo {
  padding: 0;
}

.pannello .ordina-modo + .ordina-modo {
  padding-top: 1.25rem;
  border-top: 2px solid var(--rosa);
}

/* Bottom bar, below 48em only. body keeps its height free at the bottom. */
.barra {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 0.375rem;
  padding: 0.5rem max(var(--margine), env(safe-area-inset-right)) calc(0.5rem + env(safe-area-inset-bottom))
    max(var(--margine), env(safe-area-inset-left));
  background: var(--bianco);
  border-top: 2px solid var(--rosso);
}

.barra a {
  display: grid;
  place-items: center;
  min-height: 3rem;
  padding: 0.25rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  white-space: nowrap;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.barra .barra-ordina {
  background: var(--rosso);
  color: var(--bianco);
}

@media (min-width: 48em) {
  html {
    scroll-padding-bottom: 0;
  }

  body {
    padding-bottom: 0;
  }

  .barra {
    display: none;
  }

  .testata .solo-largo {
    display: block;
  }

  .logo img {
    width: 6rem;
  }

  .ordina .ordina-modi {
    grid-template-columns: none;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
  }

  .pannello {
    width: min(34rem, calc(100% - 2rem));
    max-height: calc(100% - 4rem);
    margin: auto;
    border-radius: 1.25rem;
  }

  .pannello-dentro {
    padding: 1.75rem 2rem 2rem;
  }
}

/* Home (T8b). */
.btn-bordo {
  border-color: var(--bianco);
  color: var(--bianco);
}

.hero {
  display: grid;
  gap: 1.5rem;
  padding: 2rem var(--lato-dx) 2.5rem var(--lato-sx);
  background: var(--rosso);
  color: var(--bianco);
  --anello: var(--bianco);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.25rem, 9vw, 4rem);
  line-height: 1.02;
}

.hero-riga {
  margin: 0 0 1.25rem;
  font-size: 1.1875rem;
}

.azioni {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.hero-immagine {
  position: relative;
}

.hero-foto,
.scheda-foto,
.gusto-foto,
.mappa {
  margin: 0;
}

.hero-foto img {
  border-radius: 1.25rem;
}

.adesivo {
  position: absolute;
  top: -0.75rem;
  right: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  background: var(--miele);
  color: var(--salsa);
  font-weight: 800;
  transform: rotate(6deg);
}

.didascalia {
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

.blocco-rosa {
  background: var(--rosa);
}

.schede {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scheda {
  display: grid;
  align-content: start;
  gap: 0.5rem;
}

.scheda h3 {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.2;
}

.scheda .prezzo {
  margin: 0;
  font-weight: 800;
}

.scheda-vuota {
  display: grid;
  place-items: center;
  min-height: 6rem;
  padding: 0.5rem;
  border-radius: 1rem;
  background: var(--rosa);
  text-align: center;
  font-weight: 800;
}

.scheda img,
.gusto-foto img,
.mappa img {
  border-radius: 1rem;
}

.gusti-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.gusti-lista legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.gusto-radio {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.gusti-lista label {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.625rem;
  border: 2px solid var(--rosso);
  border-radius: 999px;
  background: var(--bianco);
  font-size: 0.9375rem;
  font-weight: 800;
  cursor: pointer;
}

.gusto-radio:checked + label {
  background: var(--rosso);
  color: var(--bianco);
}

@media (forced-colors: active) {
  .gusto-radio:checked + label {
    outline: 3px solid Highlight;
  }
}

.gusto-radio:focus-visible + label {
  outline: 3px solid var(--anello);
  outline-offset: 3px;
}

.gusto-pannello {
  display: none;
  order: 1;
  flex-basis: 100%;
  gap: 1rem;
  margin-top: 0.5rem;
}

.gusto-radio:checked + label + .gusto-pannello {
  display: grid;
}

.gusto-testo h3 {
  margin: 0 0 0.25rem;
}

.gusto-testo p {
  margin: 0 0 0.5rem;
}

.piccante {
  font-weight: 800;
  color: var(--rosso);
}

.passi {
  margin: 0;
  padding-left: 1.5rem;
}

.righe {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.righe a {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  min-height: 2.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rosso);
  color: inherit;
  text-decoration: none;
}

.riga-nome {
  font-weight: 800;
}

.dove {
  display: grid;
  gap: 1.5rem;
}

.dove-testo p,
.dove-testo address {
  margin: 0 0 0.75rem;
  font-style: normal;
}

.piede {
  display: grid;
  gap: 0.75rem;
  padding: 2rem var(--lato-dx) 2rem var(--lato-sx);
  background: var(--salsa);
  color: var(--bianco);
  --anello: var(--bianco);
}

.piede p {
  margin: 0;
}

.piede a {
  color: inherit;
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social a,
.piede p a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

@media (min-width: 48em) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    padding-block: 3rem;
  }

  .schede {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gusto-pannello {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }

  .dove {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .pannello[open] {
    animation: pannello-sale 0.22s ease-out;
  }

  .pannello[open]::backdrop {
    animation: pannello-sfondo 0.22s ease-out;
  }
}

@media (prefers-reduced-motion: no-preference) and (min-width: 48em) {
  .pannello[open] {
    animation-name: pannello-appare;
  }
}

@keyframes pannello-sale {
  from {
    transform: translateY(100%);
  }
}

@keyframes pannello-appare {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
}

@keyframes pannello-sfondo {
  from {
    opacity: 0;
  }
}

/* /menu/: category nav, dish rows, notes. Photos keep their own width and height (no crop). */
.menu-testa h1 {
  margin: 0;
}

.cat-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cat-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.25rem 1rem;
  border: 2px solid var(--rosso);
  border-radius: 999px;
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}

.categoria {
  display: grid;
  gap: 1rem;
  padding: 2rem var(--lato-dx) 2rem var(--lato-sx);
  border-top: 1px solid var(--rosso);
}

.categoria h2 {
  margin: 0;
}

.piatti,
.note-lista {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.piatto {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.piatto-foto {
  flex: 0 0 7rem;
  width: 7rem;
  margin: 0;
}

.piatto-foto img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.piatto-testo {
  display: grid;
  flex: 1 1 0;
  gap: 0.25rem;
  min-width: 0;
}

.piatto-testo h3,
.piatto-testo p {
  margin: 0;
  overflow-wrap: anywhere;
}

.piatto-testo h3 {
  font-size: 1.0625rem;
  line-height: 1.2;
}

.piatto .prezzo {
  font-weight: 800;
}

.allergeni,
.piatto .descrizione {
  font-size: 0.9375rem;
}

.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--rosa);
  font-size: 0.875rem;
  font-weight: 800;
}

/* 404 and /privacy/: outline button on white, and long text kept to a readable line length. */
.btn-contorno {
  border-color: var(--rosso);
  color: var(--rosso);
}

.testo > * {
  max-width: 44rem;
}

.testo h2 {
  margin: 1.5rem 0 0;
}

.testo p,
.testo ul {
  margin: 0;
}

.testo ul {
  padding-left: 1.25rem;
}

.testo li + li {
  margin-top: 0.25rem;
}
