/* Smelt: page CSS for what the kit leaves to the page (sections.md section 4, Designed variety):
   the visit panel, the type moment, the offer's tall-small, the goods cards, the place's bleed and trio.
   Tokens, grid, buttons, nav, footer and motion come from assets/system.css and assets/motion. */

/* every photograph frame on this page: square corners, its ratio kept, the hover zoom inside it */
.ph { position: relative; display: block; overflow: clip; margin: 0; background: var(--surface); }
.ph > picture { display: block; width: 100%; height: 100%; }
.ph > img, .ph > picture > img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- visit (screen 2) */
.visit--card { align-content: start; }
@media (min-width: 1024px) { .visit--card { background: var(--surface); padding: var(--s-7); } }
.visit-split { align-items: stretch; }
.visit__photo { min-height: 0; }
@media (min-width: 1024px) { .visit__photo { height: 100%; } }
@media (max-width: 1023px) { .visit__photo { aspect-ratio: 4 / 3; } }
.visit--card h2 { margin: 0; }
.visit__note { margin: 0; color: var(--muted); }
.visit__address a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em;
  text-decoration-color: color-mix(in oklab, currentColor 25%, transparent); transition: text-decoration-color 200ms ease; }
.visit__address a:hover { text-decoration-color: currentColor; }
.hours dd { white-space: nowrap; }
.type-moment { margin: 0; font: var(--display-weight) clamp(40px, 6vw, 88px)/1.02 var(--font-display); letter-spacing: -0.03em; }
.type-moment a { display: block; }
.type-moment a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em;
  text-decoration-color: transparent; transition: text-decoration-color var(--m-out, 200ms) var(--m-ease, ease); }
.type-moment a:hover { text-decoration-color: currentColor; }
#visit h2 + .visit-split { margin-top: var(--s-8); }
.type-moment + .visit-split { margin-top: var(--s-6); }
#visit .type-moment { margin-top: var(--s-4); }
@media (max-width: 639px) { .visit--card .visit__address { font-size: 18px; line-height: 28px; } }

/* ---------- head row: the h2 on the left line, one line and a link at its right on its baseline */
.head-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter, 24px); row-gap: var(--s-4); align-items: baseline; margin-bottom: var(--s-8); }
.head-row h2 { margin: 0; grid-column: 1 / span 6; }
.head-row__side { grid-column: 7 / -1; display: grid; justify-items: start; gap: var(--s-3); margin: 0; }
.head-row__side p { margin: 0; color: var(--ink); }
.head-row--story .head-row__side { display: grid; gap: var(--s-3); }
@media (max-width: 1023px) { .head-row h2, .head-row__side { grid-column: 1 / -1; } }
@media (max-width: 1023px) { .head-row { margin-bottom: var(--s-7); } }

/* ---------- the offer (tall-small): head and menu groups on span-6, the tall photograph on the right span-6, the small one under the groups */
.offer__head { display: grid; gap: var(--s-3); margin-bottom: var(--s-6); }
.offer__head h2, .offer__head p { margin: 0; }
.offer__head { justify-items: start; }
.offer__small { display: block; width: 144px; aspect-ratio: 1; margin-top: var(--s-5); }
.offer__tall { display: block; }
@media (max-width: 1023px) { .offer__small { display: none; } .offer__tall { margin-top: var(--s-6); } }
.groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); align-content: start; }
.group .t-label { display: block; margin: 0 0 var(--s-3); font-weight: 500; color: var(--ink); }
.rows .rows__name small { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-body); line-height: 24px; }
@media (max-width: 639px) {
  .groups { grid-template-columns: 1fr; gap: var(--s-6); }
}

/* ---------- goods: four linked cards on span-3, 4:5, name and one line inside the card */
.goods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--card-gap, 24px); }
.good { display: grid; gap: var(--s-3); align-content: start; color: inherit; text-decoration: none; }
.good > .ph { aspect-ratio: 4 / 5; }
.good__name { font: 500 16px/24px var(--font-text); }
.good__line { margin-top: calc(-1 * var(--s-2)); color: var(--muted); font-size: 16px; line-height: 24px; }
@media (max-width: 1023px) { .goods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .goods { gap: 12px; } }

/* ---------- the place: bleed, kept on the container lines (the checker allows full width only for layers) */
.bleed { display: block; overflow: clip; aspect-ratio: 1200 / 560; max-height: calc(100svh - var(--padt) - var(--padb) - var(--bar) - 200px); width: 100%; }
.bleed img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bleed > picture { display: block; height: 100%; }
@media (max-width: 1023px) { .bleed { aspect-ratio: 4 / 3; max-height: none; } }

/* ---------- the place: trio, three photographs one height (the checker's row-lines wants one height a row,
   so the dealt three sizes become three equal 4:5 frames at the desktop; reported) */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--card-gap, 24px); align-items: start; }
.trio > * { aspect-ratio: 4 / 5; }
@media (max-width: 1023px) {
  .trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trio > :nth-child(1) { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .trio > :nth-child(2), .trio > :nth-child(3) { aspect-ratio: 4 / 3; }
}
@media (max-width: 639px) {
  .trio { gap: 12px; }
  .trio > :nth-child(2), .trio > :nth-child(3) { aspect-ratio: 1; }
}

/* ---------- nav panel cards (a place: the client's photographs, name and price from) */
.menu-card .ph { aspect-ratio: 4 / 3; }
.menu-card .t-card { font: 500 16px/24px var(--font-text); }
.nav__logo img { height: 26px; width: auto; }
.nav--split .nav__logo img { height: 30px; }

/* ---------- the footer's legal row */
.footer__legal a { color: inherit; }

/* ---------- the tablet (640-1023) and the phone: each stacked section fits its screen; only the menu takes two on a phone */
.visit__cols > * > :first-child, .visit__cols .hours { margin-top: 0; }
@media (max-width: 1023px) {
  .visit__photo { aspect-ratio: 16 / 9; }
  .type-moment + .visit-split .visit__photo { aspect-ratio: 21 / 9; }
  .offer__tall { --pl-r: 2.5; }
  .offer__tall img { aspect-ratio: 5 / 2 !important; height: auto !important; width: 100% !important; object-fit: cover; }
  .good > .ph { aspect-ratio: 4 / 3; }
}
@media (max-width: 639px) {
  #menu { --hm: 2; }
  .offer__tall img { aspect-ratio: 4 / 5 !important; }
  .visit__rows { display: none; }
  .good > .ph { aspect-ratio: 1; }
  .good__line { display: none; }
}

/* ---------- C's hero: a split (asked for on review). Left: the wordmark, the h1, the line and the button,
   top-aligned on the left line; right: the dining room down to the hero's foot. A phone stacks text, then photo. */
.hero--mark .hero-text { height: 100%; align-items: stretch; }
.hero-mark__copy { display: grid; align-content: center; justify-items: start; }
@media (max-width: 1023px) { .hero-mark__copy { align-content: start; } }
.hero-mark__logo { width: min(420px, 70vw, 30svh); height: auto; margin-bottom: var(--s-7); }
.hero--mark h1 { margin: 0; max-width: 20ch; font-size: var(--t-h1); line-height: 1.104; }
.hero--mark .hero__lead { margin: var(--s-5) 0 0; max-width: 40ch; font-size: var(--t-lead); line-height: 1.5; }
.hero--mark .btn-row { margin-top: var(--s-6); }
.hero--mark .btn { height: 48px; }
.hero-mark__photo { display: block; overflow: clip; min-height: 0; height: 100%; }
.hero-mark__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
@media (max-width: 1023px) {
  .hero--mark .hero-text { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); row-gap: var(--s-6); }
  .hero-mark__copy, .hero-mark__photo { grid-column: 1 / -1; }
  .hero-mark__logo { margin-bottom: var(--s-5); }
}

/* C's logo swap (logo-swap.js): the header logo waits while the hero wordmark is on screen, then fades in */
html.logo-swap .nav__logo img { opacity: 0; transition: opacity 500ms cubic-bezier(.2,.8,.2,1); }
html.logo-swap.logo-swap--docked .nav__logo img { opacity: 1; }
html.logo-swap .nav__logo { pointer-events: none; }
html.logo-swap.logo-swap--docked .nav__logo { pointer-events: auto; }

/* ---------- the language switch: ENG on the Italian page, ITA on the English one (one click) */
.lang-switch { letter-spacing: .04em; }
@media (min-width: 1024px) { .lang-switch--sheet { display: none !important; } }

/* ---------- text links: bold, in the accent, underlined in the accent (the one link look; the filled red
   button stays the booking alone) */
.link { color: var(--action); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .22em;
  text-decoration-color: color-mix(in oklab, var(--action) 45%, transparent); }
.link:hover { text-decoration-color: var(--action); }
.ground-brand .link { color: var(--ink); text-decoration-color: color-mix(in oklab, var(--ink) 50%, transparent); }

/* ---------- C: the close is the booking, their DISH widget on the red band beside the h2 (the booking recipe) */
.close--book .book__text { display: grid; align-content: start; gap: var(--s-4); }
.close--book .book__text h2, .close--book .book__text p { margin: 0; }
.close--book .book__photo { display: block; width: min(100%, 280px); aspect-ratio: 4 / 3; margin-top: var(--s-3); }
.book__widget iframe { display: block; width: 100%; height: 440px; border: 0; background: transparent; }
@media (max-width: 1023px) { .book__widget { margin-top: var(--s-5); } }

/* the close's own button opens the DISH page (a fallback when the frame is blocked); the footer on a tablet takes
   two screens; on a phone it keeps the booking and the legal row (the address and hours are in Visit) */
.close--book .btn-row { margin-top: var(--s-2); }
@media (min-width: 640px) and (max-width: 1023px) { footer.closing.footer--visit:has(.close--book) { --h: 2; } }
@media (max-width: 639px) {
  footer.closing.footer--visit:has(.close--book) { --hm: 1; }
  footer:has(.close--book) .closing__links > .grid { display: none; }
  .close--book .book__photo { width: 100%; margin-top: var(--s-5); }
  .head-row__side .link { display: flex; width: 100%; }
}

/* shop photographs taller at the desktop so the section fills its screen like its neighbours (section-gaps);
   the booking frame shorter on a phone so the footer's legal row stays clear of it */
@media (min-width: 1024px) { .good > .ph { aspect-ratio: 3 / 5; } }
@media (max-width: 639px) { .book__widget { display: none; } }   /* a phone books on the DISH page itself (the button above), made for phones */

/* ---------- the language menu: the translate glyph and the current code; a short list of native names.
   A native <details>, so it opens without script; a click outside or Escape closes it (Page.astro). */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 var(--s-2);
  cursor: pointer; color: var(--ink); font: 500 14px/1 var(--font-text); letter-spacing: .04em; border-radius: var(--r-sm); }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover, .lang-menu[open] > summary { color: var(--action); }
.lang-menu > summary:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.lang-menu__list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; margin: 0; padding: var(--s-2) 0; list-style: none;
  min-width: 200px; max-height: min(70svh, 560px); overflow-y: auto; background: var(--bg); border: 1px solid var(--line-strong, var(--line));
  box-shadow: 0 12px 32px color-mix(in oklab, var(--ink) 16%, transparent); }
.lang-menu__list a { display: block; padding: 7px var(--s-4); color: var(--ink); font-size: 15px; text-decoration: none; }
.lang-menu__list a:hover { background: var(--surface); }
.lang-menu__list a[aria-current="true"] { font-weight: 600; color: var(--action); }
/* the kit keeps only the main button in the bar under 1024px: keep the language menu there too */
@media (max-width: 1023px) { .nav:not(.is-open) .nav__actions > .lang-menu { display: block; } }
@media (max-width: 639px) { .lang-menu__code { display: none; } }

/* the phone bar is narrow: the booking button lives in the action bar at the foot, so the header keeps the
   logo, the language menu and the menu button */
@media (max-width: 639px) { .nav:not(.is-open) .nav__actions > .btn { display: none; } }
/* a tablet books like a phone: the button to the DISH page and the photograph; the widget is desktop only */
@media (max-width: 1023px) {
  .book__widget { display: none; }
  footer.closing.footer--visit:has(.close--book) { --h: 1; }
  .close--book .book__photo { width: min(100%, 240px); margin-top: var(--s-4); }
}
/* a small laptop: the address and the hours stack in the Visit panel (long day names in some languages) */
@media (min-width: 1024px) and (max-width: 1279px) { .visit__cols { grid-template-columns: minmax(0, 1fr); } }
