/* A restaurant's home page (public/home.twig), loaded on that page alone: the menu never pays for it (MenuWeightTest).
   The look's colours and fonts arrive as custom properties on <body> (Looks); the template (HomeThemes) is a class on
   it, body.home-t-*, and cuts the top of the page around the photo. Logical properties throughout: one sheet, both
   directions. */

/* Wide like a site of its own: the header, banners and foot widen with the page. */
body.home .wrap { max-inline-size: 72rem; padding-inline: clamp(1rem, 4vw, 2rem); }
body.home .site-foot { margin-block-start: 0; }
body.home .home-block:last-of-type { padding-block-end: clamp(2rem, 4vw, 3.5rem); }

/* The bar of links under the header, kept in reach while the page scrolls. */
.home-nav { position: sticky; inset-block-start: 0; z-index: 3; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-block-end: 1px solid var(--line); }
.home-nav .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; padding-block: 0.5rem; }
.home-nav a:not(.btn) { display: inline-flex; align-items: center; min-block-size: var(--tap); font-weight: 600; color: var(--ink); text-decoration: none; }
.home-nav a:not(.btn):hover { text-decoration: underline; }
.home-nav .btn { margin-inline-start: auto; }
/* On a phone the bar is one row that scrolls sideways, as the menu's sections do: wrapped, it was a sixth of the screen. */
@media (max-width: 40rem) {
  .home-nav .wrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 0 1rem; padding-block: 0.25rem; }
  .home-nav .wrap::-webkit-scrollbar { display: none; }
  .home-nav a { flex: none; white-space: nowrap; }
}
/* A link of the bar lands on its block with its heading clear of the bar. */
.home-hero, .home-block { scroll-margin-block-start: 4.5rem; }
/* A text the restaurant wrote reads in its own direction (dir=auto) but lines up with the page's. */
body.home [dir=auto] { text-align: match-parent; }

/* The top: the words, and the photo beside them; the template moves the photo about. */
.home-hero { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(1.5rem, 4vw, 3rem); }
.has-media .home-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
@media (max-width: 56rem) { .has-media .home-hero { grid-template-columns: 1fr; } .home-hero-media { order: -1; } }
.home-hero-media { border-radius: calc(var(--radius) * 1.5); overflow: hidden; box-shadow: 0 30px 60px -36px rgb(0 0 0 / 0.55); }
.home-hero-media .cover { aspect-ratio: 4 / 3; max-block-size: none; display: block; }
.home-kicker { margin: 0 0 0.6rem; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-text); }
:lang(ar) .home-kicker { letter-spacing: 0; text-transform: none; }
.home-hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.05; margin: 0 0 0.7rem; max-inline-size: 16ch; overflow-wrap: anywhere; }
:lang(ar) .home-hero h1 { line-height: 1.3; }
.home-lead { font-size: clamp(1.1rem, 2vw, 1.3rem); margin: 0 0 0.8rem; max-inline-size: 36rem; }
.home-text p { color: var(--muted); margin: 0 0 0.6rem; max-inline-size: 38rem; }
.home-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.25rem 0 0; }
.home-note { margin: 0.8rem 0 0; font-size: 0.85rem; color: var(--muted); }
/* No photo at all: the words carry the top, larger. */
.no-media .home-hero h1 { font-size: clamp(2.4rem, 7vw, 5rem); max-inline-size: 14ch; }

/* The points: a strip of four. */
.home-points { background: var(--surface); border-block: 1px solid var(--line); }
.home-points ul { list-style: none; margin-block: 0; padding-block: 1.5rem; display: grid; gap: 1rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.home-points li { display: grid; gap: 0.25rem; }
.home-points strong { font-family: var(--font-heading); font-size: 1.08rem; }
.home-points span { color: var(--muted); font-size: 0.93rem; }

/* The blocks under the top. */
.home-block { padding-block: clamp(2rem, 4vw, 3.5rem) 0; }
.home-block h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-block-end: 1rem; }
.home-block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.75rem; }

/* The dishes as cards: the photo, the name, a line, the price. */
.home-dishes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.home-dishes a { display: grid; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.2); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.home-dishes a:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -28px rgb(0 0 0 / 0.45); }
.home-dishes img { inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.home-dish-body { display: grid; gap: 0.3rem; padding: 0.9rem 1rem 1rem; }
.home-dish-body strong { font-family: var(--font-heading); font-size: 1.1rem; }
.home-dish-body small { color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
.home-dish-foot { font-weight: 700; font-size: 1.05rem; margin-block-start: 0.2rem; }
@media (prefers-reduced-motion: reduce) { .home-dishes a { transition: none; } .home-dishes a:hover { transform: none; } }

/* As tiles: the name and the price on the photo. */
.home-dishes-tiles .home-dishes { grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); gap: 1rem; }
.home-dishes-tiles .home-dishes a { position: relative; aspect-ratio: 4 / 5; border: 0; color: #fff; background: var(--ink); }
.home-dishes-tiles .home-dishes img { position: absolute; inset: 0; block-size: 100%; }
.home-dishes-tiles .home-dish-body { position: absolute; inset-block-end: 0; inset-inline: 0; padding: 2.5rem 1rem 1rem; background: linear-gradient(to top, rgb(0 0 0 / 0.78), rgb(0 0 0 / 0)); }
.home-dishes-tiles .home-dish-body small { display: none; }
.home-dishes-tiles .home-dish-body strong { font-size: 1.15rem; text-shadow: 0 1px 2px rgb(0 0 0 / 0.4); }

/* As a list, like a printed menu: a round photo, the name and its line, the price at the end. */
.home-dishes-list .home-dishes { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 0 2.5rem; }
.home-dishes-list .home-dishes a { grid-template-columns: 4.25rem minmax(0, 1fr) auto; grid-template-areas: 'img name price' 'img desc price'; column-gap: 1rem; align-items: center; padding-block: 0.8rem; background: none; border: 0; border-block-end: 1px dashed var(--line); border-radius: 0; }
.home-dishes-list .home-dishes a:hover { transform: none; box-shadow: none; }
.home-dishes-list .home-dishes img { grid-area: img; inline-size: 4.25rem; aspect-ratio: 1; border-radius: 50%; }
.home-dishes-list .home-dish-body { display: contents; }
.home-dishes-list .home-dish-body strong { grid-area: name; align-self: end; }
.home-dishes-list .home-dish-body small { grid-area: desc; align-self: start; }
.home-dishes-list .home-dish-foot { grid-area: price; margin: 0; }

/* The story beside what makes the food good; then where to find the place. */
.home-two { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: start; }
.home-prose p { font-size: 1.05rem; }
.home-quality { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.2); padding-inline: clamp(1.25rem, 3vw, 2rem); padding-block: 1.5rem; }
.home-status { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; }
.home-address { margin: 0 0 0.5rem; color: var(--muted); }
/* The restaurant's pin under its address (map-pick.js sizes the map itself): no wider than a line of text. */
.home-map { max-inline-size: 40rem; }
.home-align-center .home-map { margin-inline: auto; }

/* The closing band. */
.home-band { margin-block-start: clamp(2rem, 4vw, 3.5rem); background: var(--ink); color: var(--bg); }
.home-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: clamp(1.75rem, 3vw, 2.75rem); }
.home-band h2 { margin: 0; color: inherit; font-size: clamp(1.3rem, 3vw, 2rem); }

/* The words in the middle. */
.home-align-center .home-hero-words, .home-align-center .home-points li, .home-align-center .home-block h2, .home-align-center .home-visit .wrap { text-align: center; }
.home-align-center .home-hero h1, .home-align-center .home-lead, .home-align-center .home-text p { margin-inline: auto; }
.home-align-center .home-cta, .home-align-center .home-status { justify-content: center; }
.home-align-center .home-block-head { flex-direction: column; align-items: center; }
.home-align-center .home-band .wrap { justify-content: center; text-align: center; }

/* ---- The templates (HomeThemes): how the top is cut around the photo. The first, classic, is the base above. ---- */

/* Full cover: the photo fills the top, the words on it. */
.home-t-cover.has-media .home-hero { position: relative; isolation: isolate; max-inline-size: none; grid-template-columns: 1fr; min-block-size: min(78vh, 46rem); align-items: end; padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 4rem); }
.home-t-cover.has-media .home-hero-media { position: absolute; inset: 0; z-index: -1; order: 0; border-radius: 0; box-shadow: none; }
.home-t-cover.has-media .home-hero-media .cover { block-size: 100%; aspect-ratio: auto; }
.home-t-cover.has-media .home-hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / 0.85) 0%, rgb(0 0 0 / 0.6) 55%, rgb(0 0 0 / 0.45) 100%); }
.home-t-cover.has-media .home-hero-words { max-inline-size: 72rem; inline-size: 100%; margin-inline: auto; color: #fff; }
.home-t-cover.has-media .home-hero-words { text-shadow: 0 1px 3px rgb(0 0 0 / 0.45); }
.home-t-cover.has-media .home-hero-words :is(.home-kicker, .home-text p, .home-note) { color: #fff; }
.home-t-cover.has-media .home-hero h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); max-inline-size: 18ch; text-shadow: 0 2px 12px rgb(0 0 0 / 0.3); }
.home-t-cover.has-media .home-hero .btn-quiet { color: #fff; border-color: rgb(255 255 255 / 0.6); }
.home-t-cover .home-points { border-block-start: 0; }

/* Poster: the words first, the photo wide under them. */
.home-t-poster.has-media .home-hero { grid-template-columns: 1fr; gap: 2rem; }
.home-t-poster .home-hero-media { order: 1; inline-size: 100%; }
.home-t-poster .home-hero-media .cover { aspect-ratio: 21 / 9; }
.home-t-poster .home-hero h1 { max-inline-size: 22ch; }
.home-t-poster .home-kicker::before, .home-t-poster.home-align-center .home-kicker::after { content: ''; display: inline-block; inline-size: 2rem; block-size: 1px; background: currentColor; vertical-align: middle; margin-inline: 0.6rem; }
.home-t-poster .home-kicker::before { margin-inline-start: 0; }
.home-t-poster.home-align-center .home-kicker::before { margin-inline-start: 0.6rem; }

/* Arch: the photo in an arched window, the points under a line of colour. */
.home-t-arch .home-hero-media { border-radius: 50% 50% calc(var(--radius) * 1.5) calc(var(--radius) * 1.5) / 36% 36% calc(var(--radius) * 1.5) calc(var(--radius) * 1.5); max-inline-size: 30rem; margin-inline: auto; }
/* The cover video's pause sits in the media's top corner (site.css), which the arch and the plate cut off: on those it
   sits at the foot, in the middle, where the shape is whole. */
.home-t-arch .cover-pause, .home-t-plate .cover-pause { inset-block: auto 0.9rem; inset-inline: 0; inline-size: max-content; margin-inline: auto; }
.home-t-arch .home-hero-media .cover { aspect-ratio: 4 / 5; }
.home-t-arch .home-points { background: none; border: 0; }
.home-t-arch .home-points li { padding-block-start: 0.75rem; border-block-start: 2px solid var(--brand); }

/* Split: the photo edge to edge on one side, the words on a wash of colour on the other. On the wash, the colour's words
   and the quiet ones go a step towards the ink, to stay readable on the tint (Plate's wash too). */
.home-t-split.has-media .home-top { background: color-mix(in srgb, var(--brand) 10%, var(--bg)); }
.home-t-split.has-media .home-top, .home-t-plate .home-top { --brand-text: color-mix(in srgb, var(--brand-text) 78%, var(--ink)); --muted: color-mix(in srgb, var(--muted) 70%, var(--ink)); }
.home-t-split.has-media .home-hero { max-inline-size: none; padding: 0; gap: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.home-t-split.has-media .home-hero-words { align-self: center; padding-block: clamp(2.5rem, 7vw, 6rem); padding-inline: clamp(1rem, 4vw, 2rem) clamp(1.5rem, 5vw, 4rem); max-inline-size: 36rem; inline-size: 100%; justify-self: end; }
.home-t-split.has-media .home-hero-media { border-radius: 0; box-shadow: none; }
.home-t-split.has-media .home-hero-media .cover { block-size: 100%; aspect-ratio: auto; min-block-size: 24rem; }
@media (max-width: 56rem) {
  .home-t-split.has-media .home-hero { grid-template-columns: 1fr; }
  .home-t-split.has-media .home-hero-words { max-inline-size: none; justify-self: stretch; padding-block: 2rem; }
  .home-t-split.has-media .home-hero-media .cover { aspect-ratio: 4 / 3; min-block-size: 0; }
}

/* Board: the whole page dark, the photo in a thin frame, the dishes as a priced list; the band in the colour. A light
   look turns dark by swapping its ink and paper; a dark look (Noir, Chalk, Diwan) is dark already and keeps its own. */
.home-t-board:not(.dark) main { background: var(--ink); color: var(--bg); --surface: color-mix(in srgb, var(--ink) 88%, var(--bg)); --line: color-mix(in srgb, var(--bg) 22%, var(--ink)); --muted: color-mix(in srgb, var(--bg) 72%, var(--ink)); --brand-text: color-mix(in srgb, var(--brand) 55%, var(--bg)); --focus: var(--bg); }
.home-t-board:not(.dark) .home-nav { background: color-mix(in srgb, var(--ink) 92%, transparent); }
.home-t-board:not(.dark) .home-nav a:not(.btn), .home-t-board:not(.dark) .btn-quiet { color: var(--bg); }
.home-t-board .home-hero-media { border-radius: 0; box-shadow: none; outline: 1px solid var(--line); outline-offset: 0.5rem; margin: 0.5rem; }
.home-t-board .home-hero-media .cover { aspect-ratio: 1; }
.home-t-board .home-hero h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
.home-t-board:not(.dark) .home-kicker { color: color-mix(in srgb, var(--brand) 55%, var(--bg)); }
.home-t-board .home-points { background: none; border-color: var(--line); }
.home-t-board .home-band { background: var(--brand); color: var(--on-brand); --focus: var(--on-brand); }
.home-t-board .home-band .btn { background: var(--on-brand); color: var(--brand); }

/* Diagonal: the photo cut on a slant, the points in the colour, the band cut the same way. */
.home-t-diagonal.has-media .home-hero { max-inline-size: none; padding: 0; gap: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: stretch; }
.home-t-diagonal.has-media .home-hero-words { align-self: center; padding-block: clamp(2.5rem, 7vw, 6rem); padding-inline: clamp(1rem, 4vw, 2rem) clamp(2rem, 6vw, 5rem); max-inline-size: calc(36rem * 1 / 1.05); inline-size: 100%; justify-self: end; }
.home-t-diagonal.has-media .home-hero-media { border-radius: 0; box-shadow: none; clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); }
[dir=rtl] .home-t-diagonal.has-media .home-hero-media { clip-path: polygon(0 0, 86% 0, 100% 100%, 0 100%); }
.home-t-diagonal.has-media .home-hero-media .cover { block-size: 100%; aspect-ratio: auto; min-block-size: 24rem; }
.home-t-diagonal .home-points { background: var(--brand); color: var(--on-brand); border: 0; }
.home-t-diagonal .home-points span { color: inherit; }
.home-t-diagonal .home-band { clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%); padding-block-start: 1.5rem; }
[dir=rtl] .home-t-diagonal .home-band { clip-path: polygon(0 0, 100% 12%, 100% 100%, 0 100%); }
@media (max-width: 56rem) {
  .home-t-diagonal.has-media .home-hero { grid-template-columns: 1fr; }
  .home-t-diagonal.has-media .home-hero-words { max-inline-size: none; justify-self: stretch; padding-block: 2rem; }
  .home-t-diagonal.has-media .home-hero-media { clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%); }
  [dir=rtl] .home-t-diagonal.has-media .home-hero-media { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 86%); }
  .home-t-diagonal.has-media .home-hero-media .cover { aspect-ratio: 4 / 3; min-block-size: 0; }
}

/* Plate: the photo round, like a plate, on a wash of the restaurant's colour; the points as pills, the band in the colour. */
.home-t-plate .home-top { background: color-mix(in srgb, var(--brand) 12%, var(--bg)); }
.home-t-plate .home-hero-media { border-radius: 50%; max-inline-size: 28rem; margin-inline: auto; box-shadow: 0 0 0 0.75rem var(--surface), 0 0 0 0.8rem var(--line), 0 40px 70px -40px rgb(0 0 0 / 0.5); }
.home-t-plate .home-hero-media .cover { aspect-ratio: 1; }
.home-t-plate .home-points { background: none; border: 0; }
.home-t-plate .home-points li { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding-block: 0.8rem; padding-inline: 1.25rem; text-align: center; }
.home-t-plate .home-band { background: var(--brand); color: var(--on-brand); --focus: var(--on-brand); }
.home-t-plate .home-band .btn { background: var(--on-brand); color: var(--brand); }
