/* RestaurantHub public site.
   Each restaurant page sets --bg, --fg, --accent, --on-accent on <body>,
   and a font preset class sets --font-display / --font-body. */

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

:root {
  --bg: #f3f4f1;
  --fg: #16181d;
  --accent: #2f5d50;
  --on-accent: #ffffff;
  --font-display: system-ui, sans-serif;
  --font-body: system-ui, sans-serif;
  --display-weight: 700;
  --display-tracking: -0.02em;
  --display-scale: 1;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 38rem;
  --radius-s: 6px;
  --radius-m: 14px;
  --open: #23a26d;
  --actions-h: 0px;
  --hero-h: 76svh;
  --hero-max: 720px;
  --radius-btn: 999px;
  --space: 1;
  --name-scale: 1;
  --name-min: 0rem;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color-scheme: var(--scheme, light);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

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

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--fg); color: var(--bg); padding: .6rem 1rem; border-radius: var(--radius-s);
}
.skip:focus { top: 1rem; }

.display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.02;
}
.h1 { font-size: calc(clamp(2.4rem, 9vw, 4.5rem) * var(--display-scale)); }
.h2 { font-size: calc(clamp(1.9rem, 6.5vw, 3rem) * var(--display-scale)); }
.h3 { font-size: calc(clamp(1.45rem, 4.5vw, 1.9rem) * var(--display-scale)); margin-bottom: .9rem; }

.muted { opacity: .72; }

.text-link {
  font-weight: 600;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* --- Preview + notice ------------------------------------------------ */
.preview-bar {
  background: #1d1d1d; color: #fff; padding: .55rem var(--gutter); font-size: .9rem;
  display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between;
}
.preview-bar a { color: #fff; font-weight: 600; }
.notice {
  background: var(--accent); color: var(--on-accent);
  padding: .85rem var(--gutter); font-weight: 600; text-align: center;
}

/* --- Top bar with restaurant tabs ---------------------------------- */
.topbar { padding: .75rem 0 0; }
.topbar-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 var(--gutter);
}
.topbar-home {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 600; text-decoration: none; font-size: .95rem; letter-spacing: .01em;
}
.topbar-home img { width: auto; max-height: 28px; }
.lang-switch {
  font-size: .9rem; font-weight: 600; text-decoration: none;
  padding: .35rem .75rem; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, currentColor 35%, transparent);
}
.lang-switch:hover { border-color: currentColor; }

.tabs { margin-top: .7rem; }
.tabs ul {
  list-style: none; margin: 0; padding: 0 var(--gutter) .7rem;
  display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.tabs ul::-webkit-scrollbar { display: none; }
.tabs li { flex: none; scroll-snap-align: start; }
.tabs a {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem .85rem .45rem .5rem; border-radius: 999px;
  text-decoration: none; font-size: .92rem; font-weight: 500; white-space: nowrap;
  background: color-mix(in srgb, var(--fg) 7%, transparent);
}
.tabs a[aria-current="page"] { background: var(--fg); color: var(--bg); }
.swatch {
  width: 1.15rem; height: 1.15rem; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--sw-bg) 50%, var(--sw-ac) 50%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 25%, transparent);
}

/* --- Hero ------------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(76svh, 720px);
  min-height: min(calc(var(--hero-h) - var(--actions-h)), var(--hero-max));
  display: flex; align-items: flex-end;
  margin: 0 clamp(0rem, 2vw, 1.25rem);
  border-radius: clamp(0px, 2vw, var(--radius-m));
  overflow: hidden;
  color: #fff;
}
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.32) 42%, rgba(0,0,0,0) 70%);
}
.hero-plain { min-height: auto; color: var(--fg); padding-top: clamp(2rem, 8vw, 5rem); }
.hero-plain::after { display: none; }
.hero-text { padding: var(--gutter); padding-bottom: clamp(1.5rem, 5vw, 3rem); max-width: 60rem; min-width: 0; }
.hero-logo { max-height: 72px; max-width: 100%; width: auto; height: auto; object-fit: contain; object-position: left; margin-bottom: 1rem; }
.hero h1 {
  font-size: max(var(--name-min), calc(clamp(3.2rem, 15vw, 8.5rem) * var(--display-scale) * var(--name-scale)));
  line-height: .92;
  overflow-wrap: anywhere;
}
.tagline { margin-top: .8rem; font-size: clamp(1.05rem, 3.5vw, 1.35rem); max-width: 34rem; line-height: 1.4; }

.status {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1rem; font-size: .95rem; font-weight: 600;
  padding: .3rem .8rem .3rem .65rem; border-radius: 999px;
  background: rgba(0,0,0,.35); color: #fff; backdrop-filter: blur(6px);
}
.hero-plain .status, .status-inline, .band .status {
  background: color-mix(in srgb, var(--fg) 9%, transparent); color: inherit; backdrop-filter: none;
}
.dot { width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; opacity: .55; }
.status.is-open .dot { background: var(--open); opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--open) 30%, transparent); }
.status.is-soon .dot { background: #e0a100; box-shadow: 0 0 0 3px rgba(224,161,0,.3); }

/* --- Action bar: sticky at the bottom on phones ---------------------- */
.actions {
  display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none;
  padding: .75rem var(--gutter);
}
.actions::-webkit-scrollbar { display: none; }
.action {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.15rem; border-radius: var(--radius-btn);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  border: 1.5px solid color-mix(in srgb, var(--fg) 30%, transparent);
  background: var(--bg);
}
.action:hover { border-color: var(--fg); }
.action-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.action-primary:hover { border-color: var(--accent); filter: brightness(1.06); }

@media (max-width: 719px) {
  body.themed:not(.menu-page):not(.no-actions) { --actions-h: 76px; padding-bottom: calc(var(--actions-h) + env(safe-area-inset-bottom)); }
  body.themed .actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: .65rem .75rem calc(.65rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(12px);
    border-top: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
  }
  body.themed .action-primary { flex: 1 0 auto; }
}

/* --- Content blocks ------------------------------------------------------ */
.blocks { padding-bottom: clamp(2.5rem, 7vw, 4.5rem); }
.prose { max-width: var(--measure); }
.prose h2 { margin-bottom: 1rem; }
.prose p + p, .prose ul { margin-top: .9em; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: .3em; }
.font-klassisk .prose, .font-elegant .prose { line-height: 1.7; }

/* --- Blocks -------------------------------------------------------------- */
.block { padding: calc(clamp(2.5rem, 7vw, 4.5rem) * var(--space)) var(--gutter) 0; }
.name-long { --name-scale: .75; --name-min: 2.8rem; }
.name-xlong { --name-scale: .58; --name-min: 2.4rem; }
.name-xxlong { --name-scale: .46; --name-min: 2.1rem; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }

/* --- Menus --------------------------------------------------------------- */
.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.chip {
  border: 1.5px solid color-mix(in srgb, var(--fg) 30%, transparent); background: none;
  padding: .5rem 1rem; border-radius: var(--radius-btn); font-weight: 600; cursor: pointer; min-height: 44px;
}
.chip[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.menu-title { font-size: 1.1rem; margin-bottom: .75rem; }
.page { display: block; padding: 0; border: 0; background: #fff; cursor: zoom-in; border-radius: var(--radius-s); overflow: hidden; }
.page img { width: 100%; height: auto; }

.pages-carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 560px);
  gap: .9rem; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) .5rem;
  scrollbar-width: thin;
}
.pages-carousel .page { scroll-snap-align: start; box-shadow: 0 1px 0 color-mix(in srgb, var(--fg) 15%, transparent); align-self: start; }
.pager { margin-top: .5rem; font-size: .9rem; }

.pages-stack { display: grid; gap: 1rem; max-width: 900px; }
.menu-foot { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline; margin-top: 1rem; }

/* --- Gallery -------------------------------------------------------------- */
.gallery {
  list-style: none; margin: 0; padding: 0;
  columns: 2; column-gap: .6rem;
}
@media (min-width: 900px) { .gallery { columns: 3; column-gap: .9rem; } }
.gallery-item { break-inside: avoid; margin-bottom: .6rem; }
@media (min-width: 900px) { .gallery-item { margin-bottom: .9rem; } }
.gallery-open {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  background: color-mix(in srgb, var(--fg) 8%, transparent);
  border-radius: var(--radius-s); overflow: hidden; cursor: zoom-in;
}
.gallery-open img, .gallery-open video { width: 100%; height: auto; }
.play {
  position: absolute; left: 50%; top: 50%; width: 3.4rem; height: 3.4rem; translate: -50% -50%;
  border-radius: 50%; background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
}
.play::after {
  content: ""; position: absolute; left: 54%; top: 50%; translate: -50% -50%;
  border-style: solid; border-width: .65rem 0 .65rem 1.05rem; border-color: transparent transparent transparent #fff;
}
.caption { font-size: .9rem; margin-top: .35rem; opacity: .8; }

/* --- Image + text, button ---------------------------------------------------- */
.media-text { display: grid; gap: 1.25rem; align-items: center; max-width: 64rem; }
.media-text-img { width: 100%; height: auto; border-radius: var(--radius-m); }
@media (min-width: 760px) {
  .media-text { grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
  .media-text.image-right .media-text-img { order: 2; }
}
.cta { display: grid; gap: 1rem; justify-items: start; }
.cta-btn {
  font-size: 1.05rem; padding: .55rem 1.6rem; min-height: 52px; max-width: 100%;
  white-space: normal; text-align: center; line-height: 1.25;
}
/* Long names, e-mail addresses and links must wrap instead of widening the page. */
.prose, address, .info-block, .caption, .menu-foot, .menu-title, .footer, .notice, .tagline { overflow-wrap: anywhere; }
.chip { max-width: 100%; text-align: left; }

/* --- Hours and contact ---------------------------------------------------------- */
.info-block { max-width: 30rem; }
.hours { border-collapse: collapse; width: 100%; max-width: 24rem; font-variant-numeric: tabular-nums; }
.hours th, .hours td { text-align: left; padding: .5rem 0; border-bottom: 1px solid color-mix(in srgb, var(--fg) 14%, transparent); font-weight: 400; }
.hours td { text-align: right; }
.hours tr.today th, .hours tr.today td { font-weight: 700; }
.hours tr.today th::before { content: ""; display: inline-block; width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent); margin-right: .5rem; vertical-align: middle; }
.hours + .muted { margin-top: .8rem; }
address { font-style: normal; display: grid; gap: .35rem; margin-bottom: 1rem; }
.social { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.social a {
  display: inline-flex; min-height: 44px; align-items: center; padding: 0 1rem;
  border-radius: var(--radius-btn); text-decoration: none; font-weight: 600;
  background: color-mix(in srgb, var(--fg) 8%, transparent);
}

/* --- Footer --------------------------------------------------------------- */
.footer {
  padding: 2.5rem var(--gutter) 3rem; margin-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--fg) 14%, transparent);
  display: grid; gap: 1rem; font-size: .95rem;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-links a { font-weight: 600; }
.footer-links a[aria-current="page"] { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

/* --- Menu page ----------------------------------------------------------- */
.menu-header {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .9rem var(--gutter);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px);
}
.back { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.back::before { content: "\2039"; font-size: 1.5em; line-height: 0; translate: 0 -.05em; }
.menu-block { padding-top: 1rem; padding-bottom: 4rem; }
.menu-block > .h1 { margin-bottom: .5rem; }
.menu-block > .status { margin: 0 0 1.5rem; }

/* --- Home: each restaurant is a band in its own colours and type -------- */
body.home { background: var(--paper); color: var(--ink); --fg: var(--ink); --bg: var(--paper); }
.home-head { padding: 1rem 0 clamp(1.5rem, 5vw, 3rem); }
.home-tagline {
  padding: clamp(1.5rem, 6vw, 3.5rem) var(--gutter) 0;
  font-size: clamp(1.6rem, 5.5vw, 3rem); line-height: 1.1; letter-spacing: -.02em; max-width: 22ch; font-weight: 600;
}
.home-intro { padding: 1rem var(--gutter) 0; max-width: var(--measure); }
.home-intro p + p { margin-top: .8em; }

.stack { list-style: none; margin: 0; padding: 0 clamp(.5rem, 2vw, 1.25rem); display: grid; gap: clamp(.5rem, 1.5vw, .9rem); }
.band { background: var(--bg); color: var(--fg); font-family: var(--font-body); border-radius: var(--radius-m); overflow: hidden; }
.band-link {
  display: grid; grid-template-columns: 1fr; text-decoration: none; min-height: 12rem;
}
.band-text { display: flex; flex-direction: column; justify-content: flex-end; gap: .55rem; padding: clamp(1.25rem, 4vw, 2.25rem); container-type: inline-size; }
.band-name {
  /* never wider than the column the card gives it, so a long single word is not split letter by letter */
  font-size: min(calc(clamp(2.6rem, 11vw, 5.75rem) * var(--display-scale)), 17cqw, calc(100cqw / (var(--chars, 8) * .62)));
  line-height: .95;
  overflow-wrap: anywhere;
}
.band-tagline { max-width: 30rem; font-size: 1.05rem; line-height: 1.4; }
.band .status { align-self: flex-start; margin-top: .3rem; }
.band-img { width: 100%; height: 200px; object-fit: cover; order: -1; }
.band-link:hover .band-name { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: .06em; text-underline-offset: .1em; }
@media (min-width: 760px) {
  .band-link { grid-template-columns: 1.15fr 1fr; min-height: 20rem; }
  .band-img { height: 100%; order: 0; }
}
.home-footer { border-top: 0; }
.empty, .not-found { padding: 4rem var(--gutter); max-width: var(--measure); }
.not-found h1 { font-size: clamp(2rem, 7vw, 3.5rem); line-height: 1.05; margin-bottom: 1rem; }
.not-found .footer-links { margin-top: 1.5rem; }

/* --- Lightbox --------------------------------------------------------------- */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(8,8,8,.96); color: #fff;
}
.lightbox::backdrop { background: rgba(0,0,0,.6); }
.lightbox-stage {
  position: absolute; inset: 0 0 3.5rem; display: grid; place-items: center; overflow: auto;
  touch-action: pan-x pan-y pinch-zoom;
}
.lightbox-stage img, .lightbox-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-stage.zoomed { place-items: start; }
.lightbox-stage.zoomed img { max-width: none; max-height: none; width: 200%; cursor: zoom-out; }
.lightbox-stage img { cursor: zoom-in; }
.lightbox-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem 4.5rem; text-align: center; font-size: .95rem; min-height: 3.5rem; }
.lightbox-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; font-size: 1.8rem; line-height: 1;
  display: grid; place-items: center;
}
.lightbox-btn:hover { background: rgba(255,255,255,.26); }
.lightbox-close { top: max(.75rem, env(safe-area-inset-top)); right: .75rem; }
.lightbox-prev { left: .75rem; bottom: .25rem; }
.lightbox-next { right: .75rem; bottom: .25rem; }
.lightbox-btn[hidden] { display: none; }
body.lightbox-open { overflow: hidden; }

/* --- Privacy page and legal footer line ------------------------------------ */
.privacy-page .prose { margin: 0 auto; padding: 1.5rem var(--gutter) 2rem; }
.privacy-page .prose h1 { margin-bottom: 1rem; }
.privacy-page .prose h2 { margin: 1.75rem 0 .5rem; font-size: 1.2rem; }
.footer-legal { margin-top: .5rem; }

/* Very tall or very wide photos must not take over the page. The lightbox shows them whole. */
.gallery-open img, .gallery-open video { max-height: min(78svh, 680px); object-fit: cover; }

/* --- Hidden or unknown page: a friendly dead end with ways forward ------------ */
.unavailable { padding: clamp(2rem, 7vw, 4.5rem) var(--gutter) 1rem; max-width: 46rem; }
.unavailable-title { font-size: clamp(2rem, 7vw, 3.5rem); line-height: 1.05; letter-spacing: -.02em; margin-bottom: 1rem; }
.unavailable-body { font-size: 1.1rem; max-width: 36rem; }
.unavailable-sub { font-size: 1.1rem; margin-top: 2rem; font-weight: 650; }
.unavailable-home { padding: 1.5rem var(--gutter) 0; }

/* Inside the panel's live preview the page is shown as visitors see it, without the staff banners. */
body.embedded .preview-bar { display: none; }
