/* Kudissama, Elvas
   Direction: "The place carries it" (tasteskill seed 2117204637). The square at the door fills the
   first screen and the name sits along its bottom edge; after it, large pictures and short words.
   Brand kept: the stencil name and the yellow of the house's sign, Literata for text,
   on the dealt "Putty and black" proportions. */

:root {
  --ground: #dedad3;      /* putty: the page */
  --paper: #f0efeb;       /* cal: the menu sheet and light fields */
  --surface: #d3cec6;     /* a tone step: alternate rows, pictures before they load */
  --ink: #0a0a0a;
  --muted: #514c44;
  --ochre: #fdc102;       /* the yellow of the house's sign: the action and the booking field */
  --ochre-deep: #e8ad00;
  --night: #15130f;
  --on-night: #f0efeb;
  --deep: #3a352d;
  --frame: clamp(6px, 0.8vw, 12px);   /* the paper mat round every photograph */

  --font-display: "Stardos Stencil", "Stencil", "Rockwell", Georgia, serif;
  --font-text: "Literata", Georgia, "Times New Roman", serif;

  --step-small: clamp(0.9375rem, 0.9rem + 0.15vw, 1.0625rem);
  --step-body: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.75rem);
  --step-big: clamp(2rem, 1.4rem + 1.8vw, 3rem);
  --step-head: clamp(2rem, 1.2rem + 2.8vw, 4rem);

  --margin: clamp(1rem, 2.4vw, 2rem);
  --gutter: clamp(0.75rem, 1.6vw, 1.5rem);
  --section: clamp(7.5rem, 12vw, 12rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --t-press: 140ms;
  --t-hover: 200ms;

  --scallop-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23f0efeb'/%3E%3C/svg%3E");
  --scallop-paper-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Ccircle cx='12' cy='0' r='12' fill='%23f0efeb'/%3E%3C/svg%3E");
}

/* ---------- reset and platform ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background: var(--ground); }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--font-text); font-size: var(--step-body); line-height: 1.55;
  font-kerning: normal; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, figure, blockquote, ul, ol, dl, dd, table { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button, a, [role="button"], select, label { touch-action: manipulation; }
button, .button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
:target { scroll-margin-top: 1.5rem; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--margin); top: -4rem; z-index: 30; background: var(--paper); padding: 0.6rem 1rem; text-decoration: none; }
.skip:focus { top: 1rem; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; line-height: 0.9; text-wrap: balance; }
h2 { font-size: var(--step-head); }
/* sub-headings in the text face: the stencil is kept for the name and the section titles */
h3 { font-family: var(--font-text); font-weight: 600; text-transform: none; font-size: var(--step-lead); letter-spacing: 0; line-height: 1.2; }
p { max-width: 62ch; text-wrap: pretty; }
.lead { font-size: var(--step-lead); line-height: 1.38; }
.small { font-size: var(--step-small); line-height: 1.5; }
.muted { color: var(--muted); }
.nums, .price, time { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- controls ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 3.25rem; padding: 0 1.5rem;
  background: var(--ochre); color: var(--ink);
  font-family: var(--font-text); font-weight: 600; font-size: var(--step-body);
  text-decoration: none; white-space: nowrap; border: 0; cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); background: var(--ochre-deep); }
.text-link { text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 0.07em; transition: text-decoration-thickness var(--t-hover) ease; }
.text-link:active { opacity: 0.7; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--ochre-deep); }
  .text-link:hover { text-decoration-thickness: 0.14em; }
}
.sheet { position: relative; background: var(--paper); }

/* ---------- 1. hero: the name, the words, then the house in three photographs ---------- */
.hero { padding: 0 var(--margin) var(--margin); display: grid; gap: clamp(1.25rem, 2.6vh, 2.25rem); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; font-size: var(--step-small); }
.top__mark img { width: 40px; height: 40px; }
.top__links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; }
.top a { text-decoration: none; padding-block: 0.4rem; display: inline-block; }
.top .top__menu { display: none; }
.top__lang { display: flex; gap: 0.25rem; margin-left: 0.75rem; padding-left: 1.25rem; border-left: 1px solid currentColor; }
.top__lang a { padding-inline: 0.45rem; opacity: 0.75; }
.top__lang a[aria-current] { opacity: 1; font-weight: 700; text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
@media (hover: hover) and (pointer: fine) { .top__links a:hover { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px; } }
.hero__name { font-size: min(calc((100vw - 2 * var(--margin)) / 6.05), 15svh); line-height: 0.8; letter-spacing: 0.01em; text-align: center; white-space: nowrap; }
.hero__name .l { display: inline-block; }
.hero__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1.25rem 3rem; }
.hero__say { display: grid; gap: 0.75rem; }
.hero__say p:first-child { font-size: var(--step-lead); line-height: 1.35; max-width: 46ch; }
.now { font-size: var(--step-small); display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; color: var(--muted); }
.now__state { font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 0.45rem; }
.now__state::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--muted); flex: none; }
.now[data-open="true"] .now__state::before { background: #2f8a4a; }
.now[data-open="false"] .now__state::before { background: #b23a26; }
.hero__call { justify-self: end; }
/* three photographs of the house, each 4:5, butted into one framed strip (12:5); it shrinks to fit the
   screen's height but never changes shape */
.hero__trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--frame); background: var(--paper); border: var(--frame) solid var(--paper); width: 100%; aspect-ratio: 12 / 5; margin-inline: auto; }
.hero__shot { display: block; overflow: hidden; min-height: 0; }
.hero__trio img { width: 100%; height: 100%; object-fit: cover; background: var(--surface); min-height: 0; }
@media (min-width: 641px) and (min-aspect-ratio: 1/1) {
  .hero { height: 100svh; min-height: 34rem; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr); }
  .hero__trio { width: auto; height: 100%; max-width: 100%; justify-self: center; align-self: start; min-height: 0; }
  /* the words above share the strip's width (set by site.js), so their edges line up with the photographs */
  .hero__foot { width: clamp(min(100%, 44rem), var(--trio-w, 100%), 100%); justify-self: center; }
}
/* phone and upright tablet: the door leads full width, the room and the table side by side under it */
@media (max-width: 640px), (max-aspect-ratio: 1/1) {
  .hero__trio { grid-template-columns: 1fr 1fr; aspect-ratio: auto; }
  .hero__trio > * { aspect-ratio: 1 / 1; }
  .hero__trio > :nth-child(2) { order: -1; grid-column: 1 / -1; aspect-ratio: 16 / 10; }
}

/* ---------- 2. the house: heading, wide photograph, yellow tile and facts ---------- */
.about { padding: var(--section) var(--margin); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.about__head { grid-column: 1 / span 8; display: grid; gap: 1.5rem; margin-bottom: clamp(3rem, 5vw, 4.5rem); }
.about__head .lead { max-width: 40ch; }
.about__photo { grid-column: 1 / span 8; align-self: start; overflow: hidden; background: var(--surface); border: var(--frame) solid var(--paper); }
.about__photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.about__side { grid-column: 9 / span 4; display: grid; align-content: start; gap: 1.5rem; }
/* the yellow tile: the year the house opened, with one line under it so it reads as ours, not the square's */
.about__year { background: var(--ochre); aspect-ratio: 4 / 3; display: grid; align-content: center; justify-items: center; gap: 0.6rem; text-align: center; padding: clamp(1rem, 1.6vw, 1.5rem); font-size: var(--step-small); font-weight: 600; line-height: 1.2; max-width: none; }
.about__year b { font-family: var(--font-display); font-weight: 700; font-size: clamp(3.5rem, 2rem + 4.5vw, 7rem); line-height: 1; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem var(--gutter); font-size: var(--step-small); }
.facts dt { color: var(--muted); }
.facts dd { font-size: var(--step-body); font-weight: 600; line-height: 1.3; }
.about__text { grid-column: 1 / span 6; margin-top: 2rem; }
.about__quote { grid-column: 8 / span 5; margin: 2rem 0 0; font-style: italic; font-size: var(--step-lead); line-height: 1.35; }

/* ---------- 3. dishes: photographs with their label strips ---------- */
.dishes { padding: 0 var(--margin) var(--section); }
/* capped so the 532 px photographs stay sharp and the grid reads as a display, not a wall */
.dishes > * { max-width: 75rem; margin-inline: auto; }
.dishes h2 { margin-bottom: 2.5rem; }
.dishes__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 12px; }
.plate { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: var(--frame) solid var(--paper); background: var(--paper); }
.plate img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--surface); transition: transform 600ms var(--ease-out); }
.plate__strip { position: relative; min-height: 5.5rem; padding: 12px; display: grid; align-content: start; gap: 0.3rem; font-size: var(--step-small); line-height: 1.3; max-width: none; }
.plate__row { display: flex; justify-content: space-between; gap: 0.75rem; }
.plate__row b { font-weight: 600; font-size: var(--step-body); line-height: 1.2; }
.plate__row span { color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .plate:hover img { transform: scale(1.05); } }

/* ---------- 4. the menu: one printed sheet on a black field ---------- */
.menu { background: var(--surface); color: var(--ink); padding: var(--section) var(--margin); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.menu__aside { grid-column: 1 / span 5; position: sticky; top: 2rem; display: grid; gap: 1.5rem; }
.menu__aside .lead { max-width: 32ch; }
.menu__photo { width: min(100%, 22rem); margin-top: 1rem; border: var(--frame) solid var(--paper); }
.menu__photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.menu__sheet { grid-column: 7 / span 6; color: var(--ink); padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.75rem, 4.5vw, 4.5rem); text-align: center; }
.menu__title { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: var(--step-big); line-height: 0.9; margin-inline: auto; }
.menu__note { font-size: var(--step-small); margin: 0.85rem auto 0; max-width: 40ch; }
.menu-group { margin-top: 2.75rem; scroll-margin-top: 2rem; }
.menu-group h3 { margin-bottom: 1.1rem; }
.menu-group ul { display: grid; gap: 0.9rem; max-width: 30rem; margin-inline: auto; padding: 0; text-align: left; }
.dish { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.25rem; align-items: baseline; }
.dish__name { font-weight: 600; overflow-wrap: anywhere; hyphens: auto; }
.dish__price { white-space: nowrap; font-weight: 600; }
.dish__desc { grid-column: 1 / -1; font-size: var(--step-small); color: var(--muted); line-height: 1.45; margin-top: 0.1rem; overflow-wrap: anywhere; }
.menu__more summary { display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 2.75rem; padding: 0.75rem 1.3rem; background: var(--ink); color: var(--paper); font-size: var(--step-small); cursor: pointer; list-style: none; transition: transform var(--t-press) var(--ease-out); }
.menu__more:not([open]) > :not(summary) { display: none; }
.menu__more summary::-webkit-details-marker { display: none; }
.menu__more summary::after { content: ""; width: 0.45em; height: 0.45em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-0.15em) rotate(45deg); }
.menu__more[open] summary::after { transform: translateY(0.1em) rotate(-135deg); }
.menu__more summary:active { transform: scale(0.97); }
.menu__end { margin-top: 2.75rem; font-size: var(--step-small); }
.menu__end p { margin-inline: auto; }
.menu__legal { color: var(--muted); max-width: 42ch; }

/* ---------- 4b. guests: three real reviews, word for word, with name and month ---------- */
.voices { padding: var(--section) var(--margin); }
.voices h2 { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.voices__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 4rem) var(--gutter); align-items: start; }
.voice { margin: 0; display: grid; gap: 1.1rem; padding-top: 1.25rem; border-top: 3px solid var(--ink); }
.voice blockquote { margin: 0; font-style: italic; font-size: var(--step-lead); line-height: 1.35; }
.voice blockquote p::before { content: "“"; } .voice blockquote p::after { content: "”"; }
.voice figcaption { font-size: var(--step-small); font-weight: 600; }
.voices__source { margin-top: clamp(2rem, 4vw, 3rem); color: var(--muted); }
@media (max-width: 900px) { .voices__list { grid-template-columns: 1fr; } }

/* ---------- 4c. groups: what the house arranges for visiting groups (from the owner's flyer) ---------- */
.groups { padding: 0 var(--margin) var(--section); }
.groups h2 { margin-bottom: 1rem; }
.groups .lead { max-width: 40ch; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.groups__list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem var(--gutter); }
.groups__list li { padding-top: 1.25rem; border-top: 3px solid var(--ink); display: grid; gap: 0.6rem; align-content: start; }
.groups__list h3 { font-size: var(--step-lead); line-height: 1.2; }
.groups__contact { margin-top: clamp(1.75rem, 3vw, 2.5rem); font-size: var(--step-body); }
@media (max-width: 900px) { .groups__list { grid-template-columns: 1fr; } }

/* ---------- 5. booking: three photographs, then the yellow field ---------- */
/* every photograph keeps its own shape at every width: only its size changes */
.book__strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--frame); background: var(--paper); border: var(--frame) solid var(--paper); }
.book__strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface); }
.book__field { position: relative; background: var(--ochre); min-height: 44svh; padding: clamp(3rem, 6vw, 5rem) var(--margin); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
/* the number is the sign of this section: stencilled, as wide as the field, and the thing you tap */
.book__title { grid-column: 1 / -1; }
.book__phone { grid-column: 1 / -1; justify-self: start; margin: 0.3em 0 0.5em; font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 14.5vw, 11.5rem); line-height: 0.9; letter-spacing: 0.01em; white-space: nowrap; text-decoration: underline; text-decoration-thickness: 0.05em; text-underline-offset: 0.12em; transition: text-underline-offset var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .book__phone:hover { text-underline-offset: 0.18em; } }
.book__phone:active { opacity: 0.75; }
.book__cc { display: block; font-size: 0.28em; letter-spacing: 0.04em; margin-bottom: 0.15em; }
.book__words { grid-column: 1 / span 6; display: grid; gap: 1.25rem; align-content: start; }
.book__say { font-size: var(--step-lead); line-height: 1.3; max-width: 30ch; }
.book__link { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; font-weight: 600; white-space: nowrap; transition: text-underline-offset var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .book__link:hover { text-underline-offset: 9px; } }
.book__small { grid-column: 8 / span 5; align-self: start; border: var(--frame) solid var(--paper); background: var(--surface); }
.book__small img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- 6. where: the address in display rows, then the way here ---------- */
.visit { padding-top: var(--section); }
.visit > h2 { padding: 0 var(--margin); margin-bottom: clamp(2rem, 4vw, 3.5rem); }
/* the address as an index card: a small label, the value set large, space between the lines */
.rows { margin: 0 var(--margin); }
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: baseline; padding-block: clamp(1rem, 2vw, 1.75rem); }
.row dt { grid-column: 1 / span 3; font-size: var(--step-body); color: var(--muted); }
.row dd { grid-column: 4 / -1; margin: 0; font-size: var(--step-big); line-height: 1.15; letter-spacing: -0.01em; }
.row a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .row a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; } }
.row__hours { display: flex; flex-wrap: wrap; column-gap: 0.75em; }
.visit__note { margin: 1rem var(--margin) 0; padding-left: calc((100% - 11 * var(--gutter)) / 12 * 3 + 3 * var(--gutter)); max-width: none; color: var(--muted); }

.route { padding: clamp(3rem, 6vw, 5rem) var(--margin) var(--section); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 2.5rem; align-items: start; }
.route__map { grid-column: 1 / span 7; margin: 0; background: var(--paper); padding: var(--frame); }
.route__mapimg { display: block; overflow: hidden; position: relative; }
/* the door is the map picture's centre: the round K sits on it, the name above with a point down to it */
.map__pin { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.map__pin img { position: absolute; width: clamp(26px, 3vw, 34px); height: clamp(26px, 3vw, 34px); max-width: none; left: 0; top: 0; translate: -50% -50%; border-radius: 50%; outline: 3px solid var(--ochre); }
.map__pin b { position: absolute; left: 0; bottom: calc(clamp(13px, 1.5vw, 17px) + 10px); translate: -50% 0; background: var(--ochre); color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: clamp(0.75rem, 0.6rem + 0.35vw, 0.9375rem); letter-spacing: 0.06em; text-transform: uppercase; line-height: 1; padding: 0.4em 0.6em 0.35em; white-space: nowrap; }
.map__pin b::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ochre); }
.route__mapimg > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface); }
.route__map figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; padding: 0.85rem 0.25rem 0.25rem; }
.route__ways { grid-column: 9 / span 4; display: grid; gap: 2.25rem; }
.route__ways h3 { margin-bottom: 0.75rem; }
.route__ways p + p { margin-top: 0.75em; }

/* ---------- 7. footer: photograph half, menu half ---------- */
/* the footer is one screen tall: the photograph keeps 4:5 at the screen's height, the words beside it,
   and the last lines sit on the bottom edge */
.end { display: grid; grid-template-columns: auto minmax(0, 1fr); min-height: 100svh; background: var(--paper); }
.end__photo { width: min(calc(100svh * 0.8), 50vw); overflow: hidden; background: var(--surface); border: var(--frame) solid var(--paper); border-right-width: 0; }
.end__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.end__side { padding: clamp(2rem, 5vh, 4rem) var(--margin) var(--margin); padding-left: clamp(2rem, 6vw, 7rem); display: grid; grid-template-rows: auto auto auto 1fr; gap: clamp(1.5rem, 4vh, 3.5rem); }
.end__mark { display: flex; align-items: center; gap: 0.75rem; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: var(--step-lead); letter-spacing: 0.04em; }
.end__menu { display: grid; gap: 0.6rem; }
.end__menu a { display: inline-block; text-decoration: none; font-weight: 600; font-size: var(--step-big); line-height: 1.1; transition: transform var(--t-hover) var(--ease-out), color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .end__menu:hover a { color: var(--muted); }
  .end__menu a:hover { color: var(--ink); transform: translateX(12px); }
}
.end__blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; font-size: var(--step-small); }
.end__blocks a { text-decoration: none; }
.end__legal { font-size: var(--step-small); color: var(--muted); align-self: end; max-width: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.end__legal a { white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .end__blocks a:hover, .end__legal a:hover { text-decoration: underline; text-underline-offset: 0.2em; } }

/* ---------- tablet ---------- */
/* ---------- gallery: the room, the people, the table ---------- */
.gallery { padding: 0 var(--margin) var(--section); }
.gallery > * { max-width: 75rem; margin-inline: auto; }
.gallery h2 { margin-bottom: 1rem; }
.gallery .lead { margin-bottom: clamp(2rem, 4vw, 3rem); }
.gallery__grid { columns: 3; column-gap: var(--frame); padding: var(--frame) var(--frame) 0; background: var(--paper); }
.gallery__item { break-inside: avoid; margin-bottom: var(--frame); }
.gallery__item a { display: block; overflow: hidden; cursor: zoom-in; }
.gallery__item img { display: block; width: 100%; height: auto; background: var(--surface); transition: transform 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .gallery__item a:hover img { transform: scale(1.04); } }
@media (max-width: 900px) { .gallery__grid { columns: 2; } }
.viewer { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; }
.viewer[open] { display: grid; place-items: center; }
.viewer::backdrop { background: rgb(10 10 10 / 0.9); }
.viewer img { width: auto; height: auto; max-width: calc(100vw - 2 * var(--margin)); max-height: calc(100vh - 7rem); border: var(--frame) solid var(--paper); background: var(--paper); }
.viewer__close { position: fixed; top: var(--margin); right: var(--margin); min-height: 44px; padding: 0.6rem 1.1rem; border: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: var(--step-small); cursor: pointer; }

@media (max-width: 1100px) {
  .dishes__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .route__map { grid-column: 1 / -1; }
  .route__ways { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); gap: 2rem var(--gutter); }
}
@media (max-width: 900px) {
  .about__head, .about__photo, .about__side, .about__text, .about__quote { grid-column: 1 / -1; }
  .about__side { grid-template-columns: 1fr 1fr; align-items: start; margin-top: var(--gutter); }
  .about__year { aspect-ratio: 3 / 2; }
  .facts { grid-template-columns: 1fr; }
  .menu__aside, .menu__sheet { grid-column: 1 / -1; }
  .menu__aside { position: static; margin-bottom: 3rem; justify-items: center; text-align: center; }
  .menu__aside .lead, .menu__aside p { margin-inline: auto; }
  .book__words { grid-column: 1 / -1; }
  .book__small { grid-column: 1 / -1; margin-top: 2rem; }
  .route__ways { grid-template-columns: 1fr; }
  /* upright screens: the pelourinho keeps its 4:5 beside the name and the menu (a wide band would cut it),
     the contacts and the last lines run underneath */
  /* the footer ends with its last line: no empty band to fill a screen */
  .end { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-rows: auto auto auto auto; min-height: 0; gap: 1.5rem var(--gutter); padding: var(--margin); }
  .end__side { display: contents; }
  .end__photo { grid-column: 1; grid-row: 2; width: auto; align-self: start; margin: 0; border-width: var(--frame); }
  .end__photo img { height: auto; aspect-ratio: 4 / 5; }
  .end__mark { grid-column: 1 / -1; grid-row: 1; }
  .end__menu { grid-column: 2; grid-row: 2; align-self: end; }
  .end__blocks, .end__legal { grid-column: 1 / -1; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .top__links { display: none; }
  .top .top__menu { display: inline-block; font-size: var(--step-body); }
  .top__lang { margin-left: auto; padding-left: 0; border-left: 0; }
  .top__lang a { padding-block: 0.6rem; }
  .hero__foot { grid-template-columns: 1fr; row-gap: 1rem; }
  .hero__call { justify-self: stretch; min-height: 3.5rem; }
  .about__side { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .dishes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 8px; }
  .plate__strip { min-height: 0; padding: 10px; }
  .plate__row { flex-direction: column; gap: 0.1rem; }
  .menu { padding: 5rem 10px; }
  .menu__aside { padding-inline: 6px; }
  .menu__sheet { padding: 2.5rem 1.4rem; }
  .book__strip { grid-template-columns: 1fr 1fr; }
  /* phone: the door (the middle photograph on wider screens) leads, full width */
  .book__strip img:nth-child(2) { order: -1; grid-column: 1 / -1; }
  .row { grid-template-columns: 5.5rem minmax(0, 1fr); column-gap: 1rem; }
  .row dt { grid-column: 1; }
  .row dd { grid-column: 2; font-size: var(--step-lead); line-height: 1.3; }
  .visit__note { padding-left: 0; }
  .route__map figcaption .button { width: 100%; }
  .end__blocks { grid-template-columns: 1.4fr 1fr; gap: 1rem; }
  .end { row-gap: 1.1rem; }
  .end__legal { row-gap: 0; }
  .end__legal a { padding-block: 0.5rem; }
  /* phone: every link in the footer and under the map gets a finger-sized row */
  .end__blocks p { line-height: 2; }
  .end__menu a { font-size: var(--step-lead); }
  .end__menu { gap: 0.15rem; }
  .end__menu a { padding-block: 0.35rem; }
  .route__map figcaption .text-link { padding-block: 0.6rem; }
  /* phone: the map is zoomed on the door (the pin sits at the picture's centre), so the name stays readable */
  .route__mapimg > img { transform: scale(2); }
  .top .top__menu { padding-block: 0.6rem; }
}



/* ---------- motion (the reduced page is the finished page) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero [data-load] { animation: rise 800ms var(--ease-expo) both; animation-delay: calc(200ms + var(--i, 0) * 90ms); }
  /* the letters slide in one by one */
  .js .hero__name .l { animation: letter-in 900ms var(--ease-expo) both; animation-delay: calc(250ms + var(--n) * 75ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-expo); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .plate[data-reveal] { opacity: 1; transform: none; }
  .js .plate[data-reveal] img { opacity: 0; transform: scale(1.06); transition: opacity 700ms var(--ease-out), transform 1100ms var(--ease-expo); transition-delay: calc(var(--i, 0) * 70ms); }
  .js .plate[data-reveal] .plate__strip { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(220ms + var(--i, 0) * 70ms); }
  .js .plate[data-reveal].is-in img, .js .plate[data-reveal].is-in .plate__strip { opacity: 1; transform: none; }
  /* the three photographs of the house breathe: a slow zoom in and out, each out of step with the others */
  /* the pin drops onto the door when the map comes into view, then the name follows */
  .js .route__map[data-reveal] .map__pin img { opacity: 0; transform: translateY(-60px); transition: opacity 300ms var(--ease-out) 350ms, transform 700ms cubic-bezier(0.34, 1.56, 0.64, 1) 350ms; }
  .js .route__map[data-reveal] .map__pin b { opacity: 0; transform: translateY(8px); transition: opacity 500ms var(--ease-out) 950ms, transform 600ms var(--ease-out) 950ms; }
  .js .route__map[data-reveal].is-in .map__pin img, .js .route__map[data-reveal].is-in .map__pin b { opacity: 1; transform: none; }
  /* the full menu unfolds like a printed sheet: each group drops into place, one after another */
  .menu__more[open] .menu-group { animation: unfold 700ms var(--ease-expo) both; }
  .menu__more[open] .menu-group:nth-of-type(2) { animation-delay: 80ms; }
  .menu__more[open] .menu-group:nth-of-type(3) { animation-delay: 160ms; }
  .menu__more[open] .menu-group:nth-of-type(4) { animation-delay: 240ms; }
  .menu__more[open] .menu-group:nth-of-type(5) { animation-delay: 320ms; }
  .menu__more summary::after { transition: transform 300ms var(--ease-out); }
  @media (hover: hover) and (pointer: fine) { .js .plate[data-reveal].is-in:hover img { transform: scale(1.05); transition: transform 600ms var(--ease-out); transition-delay: 0s; } }
}
/* with reduced motion the letters still arrive one by one, by fading only: no travel */
@media (prefers-reduced-motion: reduce) {
  .js .hero__name .l { animation: letter-fade 700ms ease both; animation-delay: calc(150ms + var(--n) * 90ms); }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes letter-in { from { opacity: 0; transform: translateY(0.3em); } to { opacity: 1; transform: none; } }
@keyframes letter-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes unfold { from { opacity: 0; transform: translateY(-16px); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }
@media print {
  .hero__trio, .book__strip, .end__photo, .gallery { display: none; }
}
