/* ==========================================================================
   Домът на строителя – prototype styles
   Mobile-first. Breakpoints: 640px (tablet), 960px (desktop), 1200px (wide).
   Blocks map to WordPress template parts:
     .site-header  -> header.php          .hero, .about, .menu,
     .site-footer  -> footer.php          .gallery, .contacts -> template-parts/section-*.php
   ========================================================================== */

/* ---------- Fonts (self-hosted, see assets/fonts) ---------- */

@font-face {
  font-family: "Bewlay Br1 Cyrillic";
  src: url("../fonts/bewlay-br1-cyrillic.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens (DESIGN.md) ---------- */

:root {
  /* Color */
  --color-bg: #fff6da;
  --color-text: #414042;
  --color-brand: #58917f;          /* logo, large display headings, decorative lines only */
  --color-accent: #3a5f53;         /* links, buttons, active tab, focus ring */
  --color-accent-hover: #2f4d43;
  --color-on-accent: #fff6da;
  --color-muted: #5e5d60;
  --color-surface: #f5e9c4;
  --color-border: #8a8a8c;         /* borders that must be visible (3:1) */
  --color-line: rgb(65 64 66 / 0.14); /* decorative hairlines */

  /* Typography */
  --font-display: "Bewlay Br1 Cyrillic", Georgia, serif;
  --font-body: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --weight-body: 500;
  --weight-strong: 600;

  --text-h1: clamp(44px, 31.27px + 3.394vw, 72px);  /* 44 -> 72 between 375 and 1200px */
  --text-h2: clamp(36px, 28.73px + 1.939vw, 52px);  /* 36 -> 52 */
  --text-h3: clamp(28px, 24.36px + 0.97vw, 36px);   /* 28 -> 36 */
  --text-lead: 18px;
  --text-body: 16px;
  --text-small: 14px;
  --text-label: 13px;

  --leading-body: 1.6;
  --leading-tight: 1.35;
  --leading-display: 1.05;
  --tracking-display: 0.02em;
  --tracking-label: 0.14em;

  /* Spacing (8px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;
  --space-9: 128px;

  /* Layout */
  --gutter: 20px;
  --content-max: 1200px;
  --text-max: 680px;
  --menu-max: 760px;
  --section-padding: var(--space-7);

  /* Shape */
  --radius: 6px;
  --radius-photo: 12px;        /* all photos */
  --shadow-subtle: 0 1px 2px rgb(65 64 66 / 0.05), 0 6px 20px rgb(65 64 66 / 0.06);

  /* Header */
  --header-h: 64px;            /* current height (changes when the desktop header condenses) */
  --header-h-condensed: 64px;
  --header-space: 64px;        /* space reserved at the top of the page */

  /* Motion */
  --duration: 250ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (min-width: 640px) {
  :root {
    --gutter: 32px;
  }
}

@media (min-width: 960px) {
  :root {
    --text-lead: 20px;
    --text-body: 18px;
    --text-small: 15px;
    --section-padding: var(--space-8);
    --header-h: 120px;
    --header-h-condensed: 72px;
    --header-space: 120px;
  }

  .site-header.is-condensed {
    --header-h: var(--header-h-condensed);
  }
}

@media (min-width: 1200px) {
  :root {
    --gutter: 40px;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h-condensed) + var(--space-4));
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  padding-top: var(--header-space);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
  font-synthesis-weight: none;
  /* Montserrat switches to Bulgarian letterforms under lang="bg"; the printed menu (Proxima Nova) uses the standard ones */
  font-feature-settings: "locl" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
svg,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

:where(ul[class], ol[class]) {
  padding: 0;
  list-style: none;
}

strong,
b {
  font-weight: var(--weight-strong);
}

p,
li,
dd {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration-thickness: 2px;
}

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

::selection {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

button {
  font: inherit;
  color: inherit;
}

address {
  font-style: normal;
}

/* Display type: Bewlay, 28px and larger only, single weight */
.display,
h1,
h2,
h3.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  color: var(--color-brand);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- Utilities ---------- */

.container {
  width: min(100% - 2 * var(--gutter), var(--content-max));
  margin-inline: auto;
}

.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: var(--weight-strong);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  color: var(--color-on-accent);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: var(--weight-strong);
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

.button--primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.button--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-on-accent);
}

.button--secondary {
  background: transparent;
  color: var(--color-accent);
}

.button--secondary:hover {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.button--small {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 15px;
  gap: 8px;
}

.button .icon {
  width: 18px;
  height: 18px;
}

/* Icon-only round button (lightbox) */
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1.5px solid var(--color-accent);
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-accent);
  cursor: pointer;
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease);
}

.icon-button:hover {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

/* ---------- Header (header.php) ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  background: var(--color-bg);
  border-bottom: 1px solid transparent;
  transition: height var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-line);
  box-shadow: 0 6px 24px rgb(65 64 66 / 0.05);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 100%;
}

.site-header__brand {
  display: block;
  flex: none;
  margin-right: auto;
  padding: var(--space-1) 0;
  border-radius: var(--radius);
}

.site-header__logo {
  width: auto;
}

/* Square mark on mobile and in the condensed desktop header; full logo at the top of the desktop page */
.site-header__logo--mark {
  height: 40px;
}

.site-header__logo--full {
  display: none;
}

.site-header__cta {
  flex: none;
}

.site-header__toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.burger {
  position: relative;
  width: 22px;
  height: 14px;
}

.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.75px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}

.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 6px; }
.burger span:nth-child(3) { top: 12px; }

[aria-expanded="true"] .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
[aria-expanded="true"] .burger span:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Navigation: mobile panel (below 960px) */
.site-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  padding: var(--space-3) var(--gutter) var(--space-6);
  background: var(--color-bg);
  border-top: 1px solid var(--color-line);
  box-shadow: 0 16px 32px rgb(65 64 66 / 0.08);
}

.js .site-nav:not(.is-open) {
  display: none;
}

html:not(.js) .site-header__toggle {
  display: none;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
}

.site-nav__link {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-line);
  color: var(--color-text);
  font-size: 18px;
  font-weight: var(--weight-strong);
  text-decoration: none;
}

.site-nav__link:hover {
  color: var(--color-accent);
}

.site-nav__extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

/* Social links (header, mobile menu, contacts, footer) */
.social-links {
  display: flex;
  gap: var(--space-1);
}

.social-links__link {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  color: var(--color-text);
  transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease);
}

.social-links__link:hover {
  color: var(--color-accent);
  background: var(--color-surface);
}

/* Language switch */
.lang-switch {
  display: flex;
  align-items: center;
}

.lang-switch li + li::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 14px;
  margin: 0 2px;
  background: var(--color-border);
  vertical-align: middle;
}

.lang-switch__link {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 6px;
  border-radius: var(--radius);
  color: var(--color-muted);
  font-size: 14px;
  font-weight: var(--weight-strong);
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease);
}

/* Header hover: green text and the growing underline (as the navigation links) */
.lang-switch__link:hover {
  color: var(--color-accent);
}

.lang-switch__link[aria-current="page"] {
  color: var(--color-text);
}

/* Same underline as the navigation links: grows in on hover, stays under the current language */
.lang-switch__label {
  position: relative;
}

.lang-switch__label::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.06em; /* skip the letter-spacing after the last letter */
  bottom: -7px;  /* on the same line as the navigation underline */
  height: 2px;
  border-radius: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform var(--duration) var(--ease);
}

.lang-switch__link:hover .lang-switch__label::after,
.lang-switch__link[aria-current="page"] .lang-switch__label::after {
  transform: scaleX(1);
}

@media (min-width: 960px) {
  .site-header__inner {
    gap: var(--space-4);
  }

  .site-header__logo--full {
    display: block;
    width: 140px;               /* minimum width of the full logo (DESIGN.md) */
  }

  .site-header__logo--mark,
  .site-header.is-condensed .site-header__logo--full {
    display: none;
  }

  .site-header.is-condensed .site-header__logo--mark {
    display: block;
    height: 44px;
  }

  .site-header__toggle {
    display: none;
  }

  .site-nav,
  .js .site-nav:not(.is-open) {
    position: static;
    display: flex;
    align-items: center;
    flex: 1;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .site-nav__list {
    flex-direction: row;
    gap: var(--space-2);  /* + 2 x 10px padding = the same 28px between words as before */
    margin-inline: auto;
  }

  .site-nav__link {
    position: relative;
    padding: 10px;
    border: 0;
    border-radius: var(--radius);
    font-size: 15px;
    letter-spacing: 0.02em;
    transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease);
  }

  .site-nav__link::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transition: transform var(--duration) var(--ease);
  }

  .site-nav__link:hover::after {
    transform: scaleX(1);
  }

  .site-nav__extras {
    gap: var(--space-2);
    margin: 0;
  }
}

@media (min-width: 960px) and (prefers-reduced-motion: no-preference) {
  .site-header__logo {
    animation: fade-in var(--duration) var(--ease);
  }
}

@media (min-width: 1200px) {
  .site-nav__list {
    gap: var(--space-3);  /* 36px between words, as before */
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--section-padding);
}

.section-header {
  margin-bottom: var(--space-5);
}

.section-header--center {
  text-align: center;
}

.section-header__title {
  font-size: var(--text-h2);
}

.section-header__intro {
  max-width: var(--text-max);
  margin-top: var(--space-3);
  color: var(--color-muted);
}

.section-header--center .section-header__intro {
  margin-inline: auto;
}

@media (min-width: 960px) {
  .section-header {
    margin-bottom: var(--space-6);
  }
}

/* Subtle reveal on scroll (disabled for reduced motion and without JS).
   .reveal fades one block in; .reveal-stagger fades its children in one after another (main.js numbers them). */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal,
  .js .reveal-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 400ms var(--ease), transform 400ms var(--ease);
  }

  .js .reveal-stagger > * {
    transition-delay: calc(var(--i, 0) * 80ms);
  }

  .js .reveal.is-visible,
  .js .reveal-stagger.is-visible > * {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: var(--space-5);
}

.hero__inner {
  display: grid;
  gap: var(--space-5);
}

.hero__title {
  font-size: var(--text-h1);
}

.hero__tagline {
  max-width: 34ch;
  margin-top: var(--space-4);
  font-size: var(--text-lead);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--space-5);
}

.hero__actions .button {
  flex: 1 1 auto;
}

.hero__media {
  margin-inline: calc(-1 * var(--gutter));
}

.hero__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (min-width: 480px) {
  .hero__actions .button {
    flex: 0 0 auto;
  }
}

@media (min-width: 640px) {
  .hero__media {
    margin-inline: 0;
  }

  .hero__image {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-photo);
  }
}

@media (min-width: 960px) {
  .hero {
    padding-top: var(--space-4);
    padding-bottom: var(--space-8);
  }

  .hero__inner {
    grid-template-columns: 5fr 7fr;
    align-items: center;
    gap: var(--space-7);
  }

  .hero__image {
    aspect-ratio: auto;
    height: clamp(480px, 100svh - var(--header-space) - var(--space-8), 720px);
  }
}

/* ---------- About ---------- */

.about__inner {
  display: grid;
  grid-template-areas:
    "header"
    "text"
    "media"
    "values";
  gap: var(--space-5);
}

.about__header { grid-area: header; margin: 0; }
.about__text { grid-area: text; }
.about__media { grid-area: media; }
.values { grid-area: values; }

.about__text {
  max-width: var(--text-max);
}

.about__text p + p {
  margin-top: var(--space-3);
}

.about__image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-photo);
}

.values {
  display: grid;
  gap: var(--space-4);
}

.values__item {
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-line);
}

.values__title {
  font-size: 28px;
}

.values__text {
  margin-top: var(--space-2);
  color: var(--color-muted);
  font-size: var(--text-small);
}

@media (min-width: 640px) {
  .about__inner {
    grid-template-columns: 5fr 6fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "media header"
      "media text"
      "values values";
    column-gap: var(--space-5);
    align-items: start;
  }

  .values {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 960px) {
  /* Photo and story side by side; the values run across the full width underneath, evenly spread */
  .about__inner {
    grid-template-columns: 5fr 1fr 6fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "media . header"
      "media . text"
      "values values values";
    column-gap: 0;
    row-gap: var(--space-5);
  }

  .values {
    margin-top: var(--space-3);
    column-gap: var(--space-6);
  }
}

/* ---------- Menu (template-parts/section-menu.php; items rendered by menu.js) ---------- */

.menu-app__status {
  max-width: var(--menu-max);
  margin: 0 auto;
  color: var(--color-muted);
  text-align: center;
}

/* Plain copies of the menu and the reviews, written into the page by tools/package.py for search engines and
   visitors without JavaScript. With JavaScript they stay hidden and the interactive versions replace them. */
.js .menu-static,
.js .reviews-static,
html:not(.js) .menu-app__status {
  display: none;
}

.menu-static {
  max-width: var(--menu-max);
  margin: 0 auto;
}

.reviews-static {
  display: grid;
  gap: var(--space-4);
  max-width: var(--text-max);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.reviews-static blockquote {
  margin: 0 0 var(--space-1);
}

.reviews-static__meta {
  color: var(--color-muted);
  font-size: var(--text-small);
}

.menu-tabs {
  position: sticky;
  top: var(--header-h-condensed);
  z-index: 10;
  display: flex;
  gap: var(--space-1);
  margin-inline: calc(-1 * var(--gutter));
  padding: var(--space-2) var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-line);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
}

.menu-tabs::-webkit-scrollbar {
  display: none;
}

.menu-tabs__tab {
  position: relative;
  flex: none;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-text);
  font-size: 15px;
  font-weight: var(--weight-strong);
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease);
}

/* Hover: green text on a light pill (only on devices that can hover, so a tapped tab doesn't stay highlighted) */
@media (hover: hover) {
  .menu-tabs__tab:hover {
    color: var(--color-accent);
    background: var(--color-surface);
  }
}

.menu-tabs__tab:focus-visible {
  outline-offset: 2px;  /* outside the pill, so it also shows on the selected (green) tab */
}

.menu-tabs__tab[aria-selected="true"] {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.menu-panels {
  max-width: var(--menu-max);
  margin: var(--space-5) auto 0;
}

.menu-panel:focus-visible {
  outline-offset: 8px;
}

.menu-category + .menu-category {
  margin-top: var(--space-6);
}

.menu-category__title {
  font-size: var(--text-h3);
}

.menu-category__subtitle {
  margin-top: var(--space-1);
  color: var(--color-muted);
  font-size: var(--text-small);
}

.menu-list {
  margin-top: var(--space-2);
}

.menu-item {
  padding-block: var(--space-3);
}

.menu-item + .menu-item {
  border-top: 1px solid var(--color-line);
}

.menu-item__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.menu-item__name {
  font-weight: var(--weight-strong);
  line-height: var(--leading-tight);
}

.menu-item__price {
  flex: none;
  font-variant-numeric: tabular-nums lining-nums;
  text-align: right;
  white-space: nowrap;
}

.menu-item__description,
.menu-item__meta {
  max-width: 62ch;
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: 1.5;
}

.menu-item__description {
  margin-top: 6px;
}

.menu-item__meta {
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.menu-variants {
  margin-top: var(--space-2);
}

.menu-variant {
  padding: var(--space-2) 0 var(--space-2) var(--space-3);
  border-left: 1px solid var(--color-line);
}

.menu-variant .menu-item__name {
  font-weight: var(--weight-body);
}

.menu-note {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-brand);
  border-radius: var(--radius);
  font-weight: var(--weight-strong);
  line-height: 1.5;
  text-align: center;
}

.menu-legend {
  max-width: var(--menu-max);
  margin: var(--space-7) auto 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: 1.5;
}

.menu-legend__title {
  color: var(--color-text);
  font-size: 16px;
  font-weight: var(--weight-strong);
}

.menu-legend__list {
  margin-top: var(--space-3);
  padding-left: 1.8em;
  list-style: decimal;
  column-gap: var(--space-6);
}

.menu-legend__list li {
  padding-left: 2px;
  break-inside: avoid;
}

.menu-legend__list li + li {
  margin-top: 2px;
}

.menu-legend__list li::marker {
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.menu-legend__note {
  margin-top: var(--space-4);
}

@media (min-width: 640px) {
  .menu-legend__list {
    columns: 2;
  }
}

@media (min-width: 960px) {
  /* All eight tabs fit in one row from 1280px; narrower screens scroll the row from its first tab ("safe") */
  .menu-tabs {
    justify-content: center;
    justify-content: safe center;
    margin-inline: 0;
    padding-inline: var(--space-1);
    -webkit-mask-image: none;
    mask-image: none;
  }

  .menu-tabs__tab {
    padding-inline: 12px;
  }

  .menu-panels {
    margin-top: var(--space-6);
  }

  .menu-item__price {
    min-width: 6em;
  }
}

/* ---------- Gallery: bento ----------
   The pattern repeats every six photos: the 1st and 6th of each six are wide, the rest 4:5.
   Phones: 2 columns, wide tiles full width. From 640px: 4 columns, wide tiles two columns.
   Only the first six show at first; the "+N" button on the sixth reveals the rest (main.js). */

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}

.gallery__item {
  position: relative;
  aspect-ratio: 4 / 5;
}

.gallery__item:nth-child(6n + 1),
.gallery__item:nth-child(6n) {
  grid-column: span 2;
  aspect-ratio: 8 / 5;
}

.js .gallery__grid:not(.is-expanded) .gallery__item:nth-child(n + 7) {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .gallery__grid.is-expanded .gallery__item:nth-child(n + 7) {
    animation: rise-in 400ms var(--ease) both;
    animation-delay: calc((var(--i, 6) - 6) * 80ms);
  }
}

.gallery__link {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--radius-photo);
  background: var(--color-surface);
}

.gallery__link picture {
  height: 100%;
}

.gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%); /* per-photo focal point, set inline */
  transition: transform 400ms var(--ease);
}

.gallery__item:hover .gallery__image {
  transform: scale(1.03);
}

/* "+N" button over the sixth tile: a dark green veil that lets the photo show through */
.gallery__more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-photo);
  background: rgb(47 77 67 / 0.6);
  color: var(--color-on-accent);
  font-family: var(--font-body);
  font-size: clamp(36px, 30px + 1.5vw, 48px);
  font-weight: var(--weight-strong);
  line-height: 1;
  text-shadow: 0 1px 16px rgb(0 0 0 / 0.35);
  cursor: pointer;
  transition: background-color var(--duration) var(--ease);
}

.gallery__more:hover {
  background: rgb(47 77 67 / 0.5);
}

@media (min-width: 640px) {
  .gallery__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
  }

  /* Wide tiles take the height of their row, set by the 4:5 tiles next to them */
  .gallery__item:nth-child(6n + 1),
  .gallery__item:nth-child(6n) {
    aspect-ratio: auto;
  }
}

@media (min-width: 1200px) {
  .gallery__grid {
    gap: var(--space-4);
  }
}

/* Lightbox (native <dialog>) */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(255 246 218 / 0.97);
  color: var(--color-text);
}

.lightbox::backdrop {
  background: rgb(255 246 218 / 0.97);
}

html:has(.lightbox[open]) {
  overflow: hidden;
}

.lightbox[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.lightbox__top {
  display: flex;
  justify-content: flex-end;
  padding: var(--space-3) var(--gutter) 0;
}

.lightbox__figure {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: var(--space-3) var(--gutter);
}

.lightbox__image {
  width: auto;
  max-width: min(100%, 1000px);
  height: auto;
  max-height: calc(100dvh - 184px); /* room for the close button and the controls */
  border-radius: var(--radius-photo);
  box-shadow: var(--shadow-subtle);
}

.lightbox__bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0 var(--gutter) var(--space-4);
}

.lightbox__counter {
  min-width: 4em;
  color: var(--color-muted);
  font-size: var(--text-small);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] {
    animation: fade-in var(--duration) var(--ease);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Reviews (Google Maps) ----------
   A bento that scrolls sideways: tall cards alternate with pairs of stacked cards (reviews.js places them).
   Cards carry no photos: name, stars, date and the review in quotation marks, as on Google Maps.
   Phones get a single row; the next card peeks in to show there is more. */

.reviews__track {
  position: relative; /* keeps visually hidden text of off-screen cards inside the scroller */
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(82%, 320px);
  gap: 12px;
  margin: 0 calc(-1 * var(--gutter));
  padding: var(--space-1) var(--gutter);
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}

.reviews__track::-webkit-scrollbar {
  display: none;
}

.reviews__track:focus-visible {
  outline-offset: -2px;
}

.review {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 20px;
  border-radius: var(--radius-photo);
  background: var(--color-surface);
  scroll-snap-align: start;
}

.review__header {
  display: grid;
  gap: 4px;
}

.review__author {
  font-size: 15px;
  font-weight: var(--weight-strong);
  line-height: var(--leading-tight);
}

.review__author a {
  color: inherit;
  text-decoration: none;
}

.review__author a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.review__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  color: var(--color-muted);
  font-size: var(--text-label);
  line-height: var(--leading-tight);
}

.review__stars {
  display: inline-flex;
  gap: 2px;
  color: var(--color-accent);
}

.review__star {
  width: 14px;
  height: 14px;
}

.review__star.is-empty {
  color: var(--color-border);
}

.review__quote {
  margin: 0;
}

.review__text {
  --lines: 6;
  font-size: 15px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--lines);
  line-clamp: var(--lines);
  overflow: hidden;
}

.review__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin-top: auto;
  font-size: var(--text-label);
}

.review__translated {
  color: var(--color-muted);
}

.review__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-block: 10px;
  margin-block: -10px;
  font-weight: var(--weight-strong);
}

.review__more[hidden] {
  display: none;
}

.review__more .icon {
  width: 14px;
  height: 14px;
  align-self: center;
}

.reviews__controls {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.reviews__controls[hidden] {
  display: none;
}

.icon-button[aria-disabled="true"] {
  opacity: 0.35;
  cursor: default;
}

.icon-button[aria-disabled="true"]:hover {
  background: var(--color-bg);
  color: var(--color-accent);
}

/* Invitation to leave a review */
.reviews__footer {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  text-align: center;
}

.reviews__cta-title {
  font-size: 28px;
}

.reviews__cta-text {
  max-width: var(--text-max);
  color: var(--color-muted);
}

.reviews__footer .button {
  margin-top: var(--space-2);
}

@media (min-width: 640px) {
  /* Whole columns only, so no card is cut at the edge: two fit side by side (tall and pair columns alternate,
     so any two neighbours add up to the full width); the rest come in with the arrows or a swipe */
  .reviews__track {
    --col-feature: calc((100% - 12px) * 0.57);
    --col-pair: calc((100% - 12px) * 0.43);
    margin-inline: 0;
    padding-inline: 0;
    scroll-padding-inline: 0;
    grid-template-columns: var(--columns);
    grid-template-rows: repeat(2, 1fr);
    grid-auto-columns: var(--col-pair);
  }

  .review {
    grid-column: var(--col);
    grid-row: var(--row);
  }

  .review--pair .review__text {
    --lines: 4;
  }

  .review--feature .review__text {
    --lines: 9;
    font-size: 17px;
  }
}

@media (min-width: 960px) {
  /* Three whole columns. Five reviews make exactly three (pair, tall, pair), so all of them show and the long
     review keeps a wider middle column; with more reviews every column is a third, so any three fit */
  .reviews__track {
    --col-feature: calc((100% - 24px) / 3);
    --col-pair: calc((100% - 24px) / 3);
  }

  .reviews__track[data-columns="3"] {
    --col-feature: calc((100% - 24px) * 0.4);
    --col-pair: calc((100% - 24px) * 0.3);
  }

  .reviews__footer {
    margin-top: var(--space-6);
  }
}

/* ---------- Contacts ----------
   Grouped by what visitors need: how to reach us (phone, email), when (hours), where (address + map), social last.
   Spacing recipe: one step between the items of a group, two steps between groups. */

.contacts {
  --contact-gap: 16px;
}

.contacts__inner {
  display: grid;
  grid-template-areas:
    "header"
    "channels"
    "hours"
    "address"
    "map"
    "follow";
  row-gap: calc(2 * var(--contact-gap));
}

.contacts__header { grid-area: header; margin: 0; }
.contacts__channels { grid-area: channels; }
.contacts__hours { grid-area: hours; }
.contacts__address { grid-area: address; }
.contacts__map { grid-area: map; }
.contacts__follow { grid-area: follow; }

.contact-group {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: var(--contact-gap);
}

.contact-group__title {
  font-size: 28px;
}

.contact-group__list {
  display: grid;
  gap: var(--contact-gap);
}

/* Directions, phone and email share one style; the padding gives 44px touch targets without adding visible space */
.contact-group__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-block: 10px;
  margin-block: -10px;
  font-weight: var(--weight-strong);
}

.contact-group__link .icon {
  width: 16px;
  height: 16px;
}

.contact-group a[href^="mailto:"],
.site-footer a[href^="mailto:"] {
  overflow-wrap: anywhere;
}

.footer-block__title {
  color: var(--color-muted);
  font-size: var(--text-label);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* Standalone phone and email links in the footer get full 44px touch targets */
.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.hours {
  display: grid;
  gap: 2px;
}

.hours div {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.3em;
}

.hours dt {
  font-weight: var(--weight-body);
}

.hours dt::after {
  content: ":";
}

.hours dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* Footer: day and time on separate lines */
.hours--stacked {
  gap: var(--space-2);
}

.hours--stacked div {
  display: block;
}

.hours--stacked dt::after {
  content: none;
}

/* Contacts: a two-column table, days | times, so the times line up */
.hours--table {
  grid-template-columns: minmax(0, max-content) max-content;
  column-gap: var(--space-4);
  row-gap: var(--contact-gap);
}

.hours--table div {
  display: contents;
}

.hours--table dt::after {
  content: none;
}

/* The icons sit in 44px boxes; pull the boxes out so the visible icons follow the spacing recipe */
.contacts__social {
  margin: -12px 0 -12px -12px;
}

.contacts__map {
  overflow: hidden;
  border-radius: var(--radius-photo);
  background: var(--color-surface);
}

.contacts__map iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  aspect-ratio: 4 / 3;
  border: 0;
}

@media (min-width: 640px) {
  .contacts__inner {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "header header"
      "channels hours"
      "address follow"
      "map map";
    column-gap: var(--space-5);
  }
}

@media (min-width: 960px) {
  /* Left: how and when to reach us. Right: where we are, with the map under the address */
  .contacts__inner {
    grid-template-columns: 5fr 7fr;
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "header header"
      "channels address"
      "hours map"
      "follow map";
    column-gap: var(--space-7);
  }

  .contacts__header {
    margin-bottom: var(--contact-gap);
  }

  .contacts__map iframe {
    aspect-ratio: auto;
    min-height: 400px;
  }
}

/* ---------- Footer (footer.php) ---------- */

.site-footer {
  padding-block: var(--space-7) var(--space-5);
  background: var(--color-surface);
  font-size: var(--text-small);
}

.site-footer__inner {
  display: grid;
  gap: var(--space-5);
}

.site-footer__brand {
  display: inline-block;
  border-radius: var(--radius);
}

.site-footer__logo {
  width: 160px;
}

.footer-block__title {
  margin-bottom: var(--space-2);
}

.footer-list li {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
}

.site-footer .social-links {
  margin-left: -12px;
}

@media (min-width: 640px) {
  .site-footer__inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .site-footer__inner {
    grid-template-columns: 1.2fr 1fr 1fr 0.8fr;
    align-items: start;
  }
}

/* ---------- Motion ----------
   Small and calm: only opacity and transform, 120–600ms, nothing that loops or moves on its own.
   All of it is off under prefers-reduced-motion. */

/* The lightbox photo fades in once it has loaded (main.js adds .is-loading while it loads) */
.lightbox__image {
  transition: opacity var(--duration) var(--ease);
}

.lightbox__image.is-loading {
  opacity: 0;
}

/* The hero photo is clipped to its own frame, so it can settle into place */
.hero__media {
  overflow: hidden;
}

@media (min-width: 640px) {
  .hero__media {
    border-radius: var(--radius-photo);
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Hero on page load: name, tagline and buttons rise in one after another; the photo settles from a slight zoom.
     The photo only scales (no fade), so it is visible from the first frame. */
  .hero__title,
  .hero__tagline,
  .hero__actions {
    animation: rise-in 600ms var(--ease) both;
  }

  .hero__tagline {
    animation-delay: 120ms;
  }

  .hero__actions {
    animation-delay: 240ms;
  }

  .hero__image {
    animation: settle 1400ms var(--ease) both;
  }

  /* Menu: the newly selected category fades in */
  .menu-panel:not([hidden]) {
    animation: panel-in 300ms var(--ease) both;
  }

  /* Buttons and tabs give a small press under the finger or cursor */
  .button,
  .icon-button,
  .menu-tabs__tab {
    transition-property: background-color, color, border-color, transform;
    transition-duration: var(--duration), var(--duration), var(--duration), 120ms;
  }

  .button:active,
  .icon-button:active:not([aria-disabled="true"]),
  .menu-tabs__tab:active {
    transform: scale(0.97);
  }
}

/* Mobile navigation drops in below the header */
@media (max-width: 959.98px) and (prefers-reduced-motion: no-preference) {
  .site-nav.is-open {
    animation: drop-in 220ms var(--ease) both;
  }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
}

@keyframes settle {
  from { transform: scale(1.04); }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
}

@keyframes drop-in {
  from { opacity: 0; transform: translateY(-8px); }
}

/* ---------- Reduced motion & print ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .menu-tabs,
  .reviews__controls,
  .contacts__map,
  .lightbox {
    display: none !important;
  }

  body {
    padding-top: 0;
  }

  .reveal,
  .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .menu-panel[hidden] {
    display: block !important;
  }
}
