/* Ristorazione template. Colour-Field Wordmark (design-styles card), one flat colour field per section. */
:root {
  /* colour: three only. --field and --field-ink are set per restaurant by render() */
  --field: #c8102e;
  --field-ink: #fff8e7;
  --light: #fff8e7;
  --dark: #1c1c1c;
  --accent: var(--field-ink);
  --accent-ink: var(--field);
  --strip: var(--light);
  --strip-ink: var(--dark);
  --paper: var(--light);
  --paper-ink: var(--dark);
  /* type */
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --text: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Newsreader', Georgia, serif;
  --fs-small: 14px;
  --fs-body: 17px;
  --fs-h3: 22px;
  --fs-lead: 24px;
  --fs-statement: clamp(28px, 4vw, 56px);
  /* space */
  --gutter: 16px;
  --gap: 12px;
  --sec-pad: clamp(72px, 8.4vw, 120px);
}
@media (prefers-color-scheme: dark) {
  :root { --paper: var(--dark); --paper-ink: var(--light); }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 var(--fs-body)/1.5 var(--text); color: var(--field-ink); background: var(--field); -webkit-font-smoothing: antialiased; }
img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
figure { margin: 0; background: color-mix(in srgb, var(--field-ink) 14%, var(--field)); overflow: hidden; }
a { color: inherit; text-underline-offset: 0.2em; }
h1, h2, h3, p, dl, dd { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

/* shared pieces */
.statement { font: 700 var(--fs-statement)/0.9 var(--text); text-transform: uppercase; text-wrap: balance; }
.info h3, .foot-line, .nav { font: 700 var(--fs-small)/1 var(--text); text-transform: uppercase; letter-spacing: 0.04em; }
.price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; background: var(--accent); color: var(--accent-ink); font: 400 var(--fs-lead)/1 var(--serif); padding: 28px 40px; text-decoration: none; white-space: nowrap; transition: filter .15s; }
.cta:hover { filter: brightness(1.08) saturate(1.1); }
.cta:focus-visible { outline-color: var(--field-ink); }
.contact .cta { background: var(--field); color: var(--field-ink); }
.contact .cta:focus-visible { outline-color: var(--field); }
.cta:active { transform: translateY(1px); filter: brightness(0.96); }

/* the wordmark: size comes from --em (line width in em) and --lines, set by render() */
.hero, .footer, .contact { container-type: inline-size; }
.wm { font: 900 min(calc(100cqw / var(--em)), calc(57svh / var(--lines)))/0.8 var(--display); font-stretch: 125%; letter-spacing: -0.02em; text-transform: uppercase; white-space: nowrap; }
.wm .ln { display: block; }

/* hero */
.hero { min-height: 100svh; display: flex; flex-direction: column; padding: 24px var(--gutter) 0; }
.nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 24px; margin: 16px 0 12px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.nav a:active { opacity: 0.6; }
.nav a.nav-call { text-decoration: underline; text-decoration-thickness: 2px; }
.photo { position: relative; flex: 1 1 auto; min-height: clamp(240px, 38svh, 520px); }
.photo img { position: absolute; inset: 0; }
.hero-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 32px 0 var(--gutter); }
.photo + .hero-foot { margin-top: 0; }
.hero-foot .statement { line-height: 0.95; max-width: 30ch; font-size: clamp(24px, 3.2vw, 46px); }
.hero-foot .statement.long { font-size: clamp(20px, 2.2vw, 32px); }

/* about */
.about { padding: var(--sec-pad) var(--gutter); background: var(--paper); color: var(--paper-ink); }
.about-text { columns: 2 320px; column-gap: 48px; margin: 48px 0 32px; max-width: 1100px; }
.about-text.solo { columns: 1; max-width: 62ch; }
.about-text p { margin-bottom: 1em; break-inside: avoid; }
.signature { font: italic 400 var(--fs-lead)/1.2 var(--serif); }

/* menu */
.menu { padding: var(--sec-pad) var(--gutter); }
.groups { columns: 2 380px; column-gap: 48px; margin: 56px 0 -56px; }
.group { break-inside: avoid; margin-bottom: 56px; }
.group h3 { font: 900 var(--fs-h3)/1.1 var(--display); font-stretch: 125%; text-transform: uppercase; margin-bottom: 20px; overflow-wrap: anywhere; }
.group li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.dish { overflow-wrap: anywhere; font-weight: 700; }
.dish small { display: block; font: 400 var(--fs-body)/1.3 var(--serif); font-weight: 400; margin-top: 2px; }
.ticker { background: var(--strip); color: var(--strip-ink); border-block: 3px solid var(--strip-ink); overflow: hidden; white-space: nowrap; display: flex; font: 900 18px/1 var(--display); font-stretch: 112%; text-transform: uppercase; padding: 14px 0; }
.ticker > span { flex: none; animation: tick 40s linear infinite; }
.tk::after { content: ''; display: inline-block; width: 0.5em; height: 0.5em; background: currentColor; margin: 0 1.5em; }
@keyframes tick { to { transform: translateX(-100%); } }

/* gallery */
.gallery { padding: var(--sec-pad) var(--gutter); }
.menu + .gallery { padding-top: 0; }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); margin-top: 48px; }
.grid figure { grid-column: span 2; aspect-ratio: 1; }
.grid figure.half { grid-column: span 3; aspect-ratio: 4/3; }
.grid figure.wide { grid-column: span 6; aspect-ratio: 16/7; }

/* contact: the field turns into ink and the text takes the field colour */
.contact { padding: var(--sec-pad) var(--gutter); background: var(--field-ink); color: var(--field); }
.contact .big { display: block; font: 900 min(180px, calc(100cqw / var(--em)))/0.9 var(--display); font-stretch: 125%; letter-spacing: -0.02em; text-decoration: none; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.contact .big:hover { text-decoration: underline; text-decoration-thickness: 0.05em; text-underline-offset: 0.08em; }
.info { overflow-wrap: anywhere; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 32px; margin: 48px 0; }
.info h3 { margin-bottom: 12px; }
.info a:hover { text-decoration-thickness: 2px; }
.hours div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 16px; margin-bottom: 8px; }
.hours dd { font-variant-numeric: tabular-nums; text-align: right; }
.contact .big + .cta { margin-top: 48px; }

/* footer: wordmark cropped by the bottom edge */
.footer { overflow: hidden; padding: 32px var(--gutter) 0; }
.foot-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; overflow-wrap: anywhere; }
.foot-line a { text-transform: none; letter-spacing: 0; font-size: var(--fs-body); }
.footer .wm { font-size: min(calc(100cqw / var(--em)), calc(45svh / var(--lines))); margin-top: 24px; margin-bottom: -0.12em; }

.demo-note { background: #111; color: #fff; font: 400 13px/1.4 var(--text); padding: 14px var(--gutter); }
.demo-note a { text-underline-offset: 0.2em; }

@media (max-width: 760px) {
  .hero-foot { flex-direction: column; align-items: stretch; gap: 20px; padding-top: 24px; }
  .cta { white-space: normal; text-align: center; padding: 24px; }
  .nav { gap: 0 16px; }
  .nav a.nav-call { display: none; }
  .groups { column-count: 1; margin-top: 40px; }
  .about-text, .grid { margin-top: 32px; }
  .grid figure, .grid figure.half, .grid figure.wide { grid-column: span 3; aspect-ratio: 1; }
  .grid figure.odd { grid-column: span 6; aspect-ratio: 4/3; }
  .info { margin: 32px 0; gap: 24px; }
}
@media (max-width: 480px) {
  .hours div { flex-direction: column; margin-bottom: 12px; }
  .hours dd { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker > span { animation: none; }
  html { scroll-behavior: auto; }
  .cta { transition: none; }
}
