/* ==========================================================
   Шаблон сайта кафе. Все цвета, шрифты и скругления приходят
   из config.js (theme) через CSS-переменные. Значения ниже —
   запасные, на случай если config не загрузился.
   ========================================================== */

:root {
  /* тема (перезаписывается из config.js) */
  --bg: #F4EFE7;
  --surface: #E9E2D5;
  --text: #221E19;
  --muted: #675E53;
  --accent: #234F3E;
  --accent-text: #ffffff;
  --line: #D5CCBB;

  /* производные, считает main.js */
  --accent-ink: var(--accent);      /* акцент, пригодный как цвет текста на фоне страницы */
  --accent-edge: transparent;       /* обводка кнопки, если акцент сливается с фоном */

  --font-display: "STIX Two Text", "Times New Roman", Georgia, serif;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --r-ctl: 0px;                     /* кнопки, поля, плашки */
  --r-img: 0px;                     /* фотографии */

  --logo-h: 36px;
  --header-h: 64px;

  /* сетка */
  --gutter: clamp(1rem, 5vw, 5rem);
  --gap: clamp(0.75rem, 1.6vw, 1.5rem);
  --space-section: clamp(3.5rem, 2rem + 6vw, 7.5rem);
  --overlap: clamp(2rem, 5vw, 5rem);

  /* пять ступеней кегля */
  --step-small: 0.9375rem;
  --step-body: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 3.75rem);
  --step-hero: clamp(2rem, 0.9rem + 4.9vw, 6rem);
}

:root[data-radius="soft"]  { --r-ctl: 8px;   --r-img: 6px; }
:root[data-radius="round"] { --r-ctl: 999px; --r-img: 18px; }

/* ---------- База ---------- */

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

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

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

.sprite { position: absolute; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 1320px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--text);
  color: var(--bg);
}
.skip:focus { top: 0.5rem; }

.vh {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-head);
  line-height: 1.06;
  letter-spacing: -0.026em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: color 0.2s;
}
.link:hover { color: var(--accent-ink); }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 3rem;
  padding: 0.7em 1.4em;
  border: 1px solid transparent;
  border-radius: var(--r-ctl);
  font-family: var(--font-body);
  font-size: var(--step-body);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.btn:active { transform: translateY(1px); }

.btn--accent {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent-edge);
}
.btn--accent:hover { background: color-mix(in srgb, var(--accent) 84%, var(--text)); }

.btn--invert {
  background: var(--accent-text);
  color: var(--accent);
}
.btn--invert:hover { background: color-mix(in srgb, var(--accent-text) 88%, var(--accent)); }

/* ---------- Фотографии ----------
   Любой слот: фиксированные пропорции, cover, точка фокуса из config.
   Если файл не загрузился, остаётся ровная плашка цвета surface. */

.ph {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: var(--ar, 4 / 5);
  background: var(--surface);
  border-radius: var(--r-img);
}
.ph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* одна лёгкая обработка на все фото: чуть теплее и плотнее */
  filter: sepia(0.07) saturate(1.04) contrast(1.03);
}
.menu .ph, .contact .ph { background: var(--line); }

/* ---------- Появление при прокрутке ---------- */

.reveal-on [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal-on [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ==========================================================
   Шапка
   ========================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled,
.site-header.is-open { border-bottom-color: var(--line); }

.site-header__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4rem;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-right: auto;
  text-decoration: none;
}
.brand__name {
  overflow: hidden;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: var(--step-lead);
  line-height: 1.3;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.brand__logo {
  width: auto;
  height: var(--logo-h);
  max-width: min(46vw, 16rem);
  max-height: 3.5rem;
  object-fit: contain;
  object-position: left center;
}

.nav { display: none; }
.nav__list { display: flex; gap: clamp(1rem, 1.8vw, 1.75rem); }
.nav__link {
  font-size: var(--step-small);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.nav__link:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  flex: none;
  padding: 0.45em 0.8em;
  background: var(--surface);
  border-radius: var(--r-ctl);
  font-size: var(--step-small);
  line-height: 1.2;
  white-space: nowrap;
}
.status__dot {
  flex: none;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--accent-ink);
}
.status[data-open="false"] .status__dot {
  background: transparent;
  border: 1.5px solid var(--muted);
}
.status__full {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.site-header__cta {
  display: none;
  min-height: 2.5rem;
  padding: 0.5em 1.1em;
  font-size: var(--step-small);
  white-space: nowrap;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.6rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.nav-toggle .icon { width: 1.6rem; height: 1.6rem; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

.nav-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-panel__inner {
  display: grid;
  gap: 1.5rem;
  padding-block: 1rem 2rem;
}
.nav-panel__link {
  display: block;
  padding: 0.45rem 0;
  font-family: var(--font-display);
  font-size: var(--step-head);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav-panel__status { color: var(--muted); }
.nav-panel__cta { justify-self: start; }

@media (min-width: 720px) {
  .site-header__row { min-height: 4.5rem; gap: 1rem; }
  .site-header__cta { display: inline-flex; }
  .status__full { position: static; width: auto; height: auto; clip-path: none; }
  .status__short { display: none; }
  .nav-panel__cta { display: none; }
}

@media (min-width: 1140px) {
  .nav { display: block; margin-right: clamp(0.5rem, 2vw, 2rem); }
  .nav-toggle, .nav-panel { display: none !important; }
  .brand { max-width: 22rem; }
}

/* ==========================================================
   1. Первый экран
   ========================================================== */

.hero {
  padding-top: clamp(1.5rem, 3.5vw, 3.5rem);
  padding-bottom: var(--space-section);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: clamp(1.5rem, 4vw, 2.5rem);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-hero);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
/* кегль зависит от длины заголовка, чтобы длинное название не ломало экран */
.hero__title[data-len="xl"] { font-size: clamp(3.25rem, 1rem + 11vw, 11rem); line-height: 0.95; }
.hero__title[data-len="m"]  { font-size: clamp(1.75rem, 0.9rem + 3.6vw, 4.25rem); line-height: 1.08; }
.hero__title[data-len="s"]  { font-size: clamp(1.5rem, 0.9rem + 2.4vw, 3rem); line-height: 1.12; letter-spacing: -0.02em; }

.hero__text {
  display: grid;
  gap: 1.25rem;
  max-width: 36rem;
}
.hero__subtitle {
  font-family: var(--font-display);
  font-size: var(--step-lead);
  line-height: 1.32;
  letter-spacing: -0.01em;
}
.hero__facts {
  display: grid;
  gap: 0.15rem;
}
.hero__facts li { font-size: var(--step-body); }
.hero__facts .is-muted { color: var(--muted); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 0.5rem;
}

.hero__media {
  position: relative;
  margin-left: 14%;
  margin-right: calc(var(--gutter) * -1);
  margin-bottom: 9%;
}
.hero__main { --ar: 4 / 5; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.hero__print {
  --ar: 4 / 5;
  position: absolute;
  left: -16.5%;
  bottom: -10%;
  width: 40%;
  border: clamp(5px, 0.7vw, 9px) solid var(--bg);
  background: var(--surface);
}
.hero--no-print .hero__media { margin-bottom: 0; }

@media (min-width: 600px) {
  .hero__media { margin-left: 26%; }
  .hero__main { --ar: 1 / 1; }
  .hero__print { left: -22%; width: 34%; }
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    row-gap: clamp(2rem, 3.2vw, 3.5rem);
  }
  .hero__title { grid-column: 1 / -1; }
  .hero__text {
    grid-column: 1 / span 5;
    grid-row: 2;
    align-self: start;
    padding-right: 1rem;
  }
  .hero__media {
    grid-column: 7 / -1;
    grid-row: 2;
    margin: 0 0 8% 0;
  }
  .hero__main { --ar: 6 / 5; border-radius: var(--r-img); }
  .hero__print { left: -13%; bottom: -11%; width: 34%; }

  .hero--no-media .hero__text { grid-column: 1 / span 7; }
}

@media (min-width: 1200px) {
  .hero__text { grid-column: 1 / span 4; padding-right: 0; }
  .hero__print { left: -23%; }
}

/* ==========================================================
   2. Фирменное: две колонки со сдвигом, фото разных пропорций
   ========================================================== */

.sig {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 8vw, 3.5rem);
}
.sig__col { display: contents; }
.sig__title { order: -1; max-width: 12em; }

.sig-item { order: var(--i, 0); width: var(--w-m, 100%); }
.sig-item[data-n="2"], .sig-item[data-n="3"] { margin-left: auto; }

.sig-item__cap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1rem;
  row-gap: 0.3rem;
  align-items: baseline;
  margin-top: 0.9rem;
}
.sig-item__name,
.sig-item__price {
  font-family: var(--font-display);
  font-size: var(--step-lead);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.sig-item__price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sig-item__desc { grid-column: 1 / -1; max-width: 40ch; }

/* пропорции и ширина по порядку: 1-я высокая, 2-я широкая, 3-я квадрат, 4-я высокая поуже */
.sig-item[data-n="0"] { --ar: 4 / 5; --w-m: 100%; --w-d: 100%; }
.sig-item[data-n="1"] { --ar: 4 / 3; --w-m: 86%;  --w-d: 100%; }
.sig-item[data-n="2"] { --ar: 1 / 1; --w-m: 72%;  --w-d: 66%; }
.sig-item[data-n="3"] { --ar: 4 / 5; --w-m: 86%;  --w-d: 62%; }
.sig-item[data-n="4"] { --ar: 3 / 2; --w-m: 100%; --w-d: 100%; }
.sig-item[data-n="5"] { --ar: 1 / 1; --w-m: 72%;  --w-d: 70%; }

/* планшет: одна колонка, но фото меньше и вразбежку */
@media (min-width: 600px) and (max-width: 899px) {
  .sig-item[data-n="0"] { --w-m: 64%; }
  .sig-item[data-n="1"] { --w-m: 72%; margin-left: auto; }
  .sig-item[data-n="2"] { --w-m: 46%; margin-left: 8%; }
  .sig-item[data-n="3"] { --w-m: 56%; }
  .sig-item[data-n="4"] { --w-m: 72%; }
  .sig-item[data-n="5"] { --w-m: 46%; margin-left: auto; }
}

@media (min-width: 900px) {
  .sig {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: start;
  }
  .sig__col {
    display: flex;
    flex-direction: column;
    gap: clamp(3.5rem, 6vw, 6rem);
  }
  .sig__col--a { grid-column: 1 / span 5; }
  .sig__col--b { grid-column: 7 / -1; }
  .sig__title { order: 0; margin-bottom: -1rem; }
  .sig-item { order: 0; width: var(--w-d, 100%); }
  .sig-item[data-n="3"] { margin-left: 0; }
}

/* ==========================================================
   3. Меню: печатный лист на поле цвета surface
   ========================================================== */

.menu { background: var(--surface); }

.menu__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.menu__side { display: contents; }

.menu__note {
  max-width: 34rem;
  margin-top: 0.9rem;
  color: var(--muted);
}

/* разделы: на телефоне липкая лента с горизонтальной прокруткой */
.menu__cats {
  position: sticky;
  top: var(--header-h);
  z-index: 5;
  margin: 1.5rem calc(var(--gutter) * -1) 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.menu__cats-list {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0 var(--gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.menu__cats-list::-webkit-scrollbar { display: none; }
.menu__cat {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: var(--step-small);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.menu__cat:hover { color: var(--text); }
.menu__cat[aria-current="true"] {
  color: var(--text);
  border-bottom-color: var(--accent-ink);
}

.menu__list { min-width: 0; }

.menu-cat {
  padding-top: 2.25rem;
  scroll-margin-top: calc(var(--header-h) + 3rem);
}
.menu-cat__name {
  margin-bottom: 0.9rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-lead);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.mi {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 0.9rem;
  padding: 0.6rem 0;
}
.mi--thumb { grid-template-columns: 3.5rem minmax(0, 1fr); }
.mi__thumb { --ar: 1 / 1; grid-row: 1 / span 2; align-self: start; }
.mi__row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.mi__name { font-weight: 500; }
.mi__dots {
  flex: 1 1 1.5rem;
  min-width: 1.5rem;
  border-bottom: 1px dotted color-mix(in srgb, var(--muted) 70%, transparent);
  transform: translateY(-0.28em);
}
.mi__price {
  flex: none;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mi__desc {
  max-width: 46ch;
  margin-top: 0.1rem;
  padding-right: 3.5rem;
  color: var(--muted);
  font-size: var(--step-small);
  line-height: 1.4;
}
.tag {
  margin-left: 0.4em;
  color: var(--accent-ink);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .menu__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: start;
  }
  .menu__side {
    display: block;
    grid-column: 1 / span 4;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
  .menu__list { grid-column: 6 / -1; margin-top: -2.25rem; }

  .menu__cats {
    position: static;
    margin: 2.25rem 0 0;
    border-bottom: 0;
  }
  .menu__cats-list {
    display: grid;
    gap: 0.1rem;
    overflow: visible;
    padding: 0;
  }
  .menu__cat {
    display: inline-block;
    padding: 0.2rem 0;
    border-bottom: 0;
    font-family: var(--font-display);
    font-size: var(--step-lead);
    font-weight: 400;
    letter-spacing: -0.015em;
    white-space: normal;
  }
  .menu__cat[aria-current="true"] {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
    text-decoration-color: var(--accent-ink);
  }
  .menu-cat { padding-top: 3rem; scroll-margin-top: calc(var(--header-h) + 0.5rem); }
  .menu-cat:first-child { padding-top: 2.25rem; }
}

/* ==========================================================
   4. О нас: фото заходит на предыдущую секцию
   ========================================================== */

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 2.25rem;
}
.about__text { display: grid; gap: 1.5rem; }
.about__paras { display: grid; gap: 1em; max-width: 60ch; }

.about__media {
  width: calc(84% + var(--gutter));
  margin-left: calc(var(--gutter) * -1);
}
.about__media .ph { --ar: 4 / 5; border-top-left-radius: 0; border-bottom-left-radius: 0; }

.about__facts {
  display: grid;
  gap: 0.55rem;
}
.about__facts li {
  font-family: var(--font-display);
  font-size: var(--step-lead);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    row-gap: 3rem;
    align-items: start;
  }
  .about__media {
    grid-column: 1 / span 5;
    grid-row: 1 / span 2;
    width: auto;
    margin: calc((var(--space-section) + var(--overlap)) * -1) 0 0;
  }
  .about__media .ph { border-radius: var(--r-img); }
  .about__text { grid-column: 7 / -1; }
  .about__facts { grid-column: 7 / -1; }

  .about--no-media .about__text { grid-column: 1 / span 7; }
  .about--no-media .about__facts { grid-column: 9 / -1; grid-row: 1; padding-top: 0.6rem; }
}

/* ==========================================================
   5. Галерея: неровная сетка
   ========================================================== */

.gallery__title { margin-bottom: clamp(1.75rem, 4vw, 3.5rem); }

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}
.gallery__grid > li {
  grid-column: span var(--m, 6);
  margin-top: var(--mt-m, 0);
}
.g-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.g-btn .ph { --ar: var(--ar-m, 4 / 3); }
.g-btn .ph img { transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.g-btn:hover .ph img { transform: scale(1.025); }

@media (min-width: 760px) {
  .gallery__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    row-gap: calc(var(--gap) * 2);
  }
  .gallery__grid > li {
    grid-column: var(--d-start, auto) / span var(--d, 4);
    margin-top: var(--mt-d, 0);
  }
  .g-btn .ph { --ar: var(--ar-d, 4 / 5); }
}

/* ==========================================================
   6. Как добраться: сплошное поле акцентного цвета
   ========================================================== */

.info {
  --on: var(--accent-text);
  --on-muted: color-mix(in srgb, var(--accent-text) 78%, var(--accent));
  --on-line: color-mix(in srgb, var(--accent-text) 26%, transparent);
  background: var(--accent);
  color: var(--on);
}
.info :focus-visible { outline-color: var(--on); }
.info ::selection { background: var(--on); color: var(--accent); }

.info__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 2.5rem;
}

.info__lead { display: grid; gap: 1.25rem; justify-items: start; }
.info__address {
  font-family: var(--font-display);
  font-size: var(--step-lead);
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.info__transport { max-width: 44ch; }

.info__sub {
  margin-bottom: 0.6rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-lead);
  letter-spacing: -0.015em;
}

.hours {
  width: 100%;
  max-width: 30rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.hours th,
.hours td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--on-line);
  font-weight: 400;
  text-align: left;
  vertical-align: baseline;
}
.hours th { padding-left: 0; }
.hours td { padding-right: 0; text-align: right; white-space: nowrap; }
.hours tr.is-today th,
.hours tr.is-today td {
  background: color-mix(in srgb, var(--accent-text) 13%, transparent);
  font-weight: 600;
}
.hours tr.is-today th { padding-left: 0.75rem; }
.hours tr.is-today td { padding-right: 0.75rem; }
.hours__mark {
  margin-left: 0.6em;
  font-size: 0.8125rem;
  font-weight: 400;
}
.info__holidays {
  max-width: 30rem;
  margin-top: 0.9rem;
  color: var(--on-muted);
  font-size: var(--step-small);
}

.info__map {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent-text) 14%, var(--accent));
  border-radius: var(--r-img);
}
.info__map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.info__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem var(--gap);
}
.info__list dt {
  margin-bottom: 0.15rem;
  color: var(--on-muted);
  font-size: var(--step-small);
}
.info__list dd a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.info__list dd a + a { margin-left: 1.25em; }

@media (min-width: 600px) {
  .info__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .info__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    row-gap: 3rem;
  }
  .info__lead  { grid-column: 1 / span 5; grid-row: 1; }
  .info__hours { grid-column: 1 / span 5; grid-row: 2; }
  .info__map   { grid-column: 7 / -1; grid-row: 1 / span 2; aspect-ratio: auto; min-height: 26rem; }
  .info__list  { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2rem; padding-top: 1rem; }
  .info__list > div { max-width: 34ch; }

  .info--no-map .info__lead  { grid-column: 1 / span 6; }
  .info--no-map .info__hours { grid-column: 8 / -1; grid-row: 1; }
}

/* ==========================================================
   7. Отзывы: один крупно, остальные колонками
   ========================================================== */

.reviews__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 2.25rem;
}
.reviews__head { display: grid; gap: 0.75rem; }
.reviews__rating { color: var(--muted); }

.review__text { quotes: none; }
.review__meta {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: var(--step-small);
}
.review__author { color: var(--text); font-weight: 500; }

.review--lead .review__text {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1rem + 1.5vw, 2.125rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.review--lead .review__meta { margin-top: 1.1rem; }

.reviews__rest { display: grid; gap: 2rem; }

@media (min-width: 760px) {
  .reviews__rest {
    display: block;
    columns: 2;
    column-gap: calc(var(--gap) * 2.5);
  }
  .reviews__rest .review { break-inside: avoid; margin-bottom: 2.25rem; }
}

@media (min-width: 900px) {
  .reviews__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    row-gap: 3.5rem;
  }
  .reviews__head {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 2rem;
  }
  .reviews__lead { grid-column: 1 / span 9; }
  .reviews__rest { grid-column: 5 / -1; }
}

/* ==========================================================
   8. Контакты и бронь
   ========================================================== */

.contact { background: var(--surface); }

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 2.5rem;
}
.contact__lead { display: grid; gap: 1.25rem; justify-items: start; align-content: start; }
.contact__text { max-width: 44ch; }
.contact__phone {
  font-family: var(--font-display);
  font-size: var(--step-head);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.contact__phone:hover { color: var(--accent-ink); }
.contact__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }

.form { display: grid; gap: 1.1rem; }
.form__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-lead);
  letter-spacing: -0.015em;
}
.form__row { display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr); }
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field__label { font-size: var(--step-small); font-weight: 500; }
.field__opt { color: var(--muted); font-weight: 400; }
.field__input {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--text) 38%, var(--surface));
  border-radius: min(var(--r-ctl), 14px);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: max(1rem, var(--step-body));
  line-height: 1.3;
}
textarea.field__input { min-height: 6rem; resize: vertical; }
.field__input::placeholder { color: var(--muted); opacity: 1; }
.field__input:focus-visible { outline-offset: 1px; border-color: var(--accent-ink); }
.field__input[aria-invalid="true"] { border-color: var(--text); border-width: 2px; padding: calc(0.65rem - 1px) calc(0.85rem - 1px); }
.field__error {
  font-size: var(--step-small);
  font-weight: 500;
}
.form__submit { justify-self: start; margin-top: 0.4rem; }

.demo-note {
  max-width: 36ch;
  font-family: var(--font-display);
  font-size: var(--step-lead);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

@media (min-width: 520px) {
  .form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__row--3 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 0.8fr); }
}

@media (min-width: 900px) {
  .contact__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
  }
  .contact__lead { grid-column: 1 / span 5; }
  .contact__action { grid-column: 7 / -1; }
}

/* ==========================================================
   Подвал
   ========================================================== */

.site-footer {
  --on-muted: color-mix(in srgb, var(--bg) 68%, var(--text));
  padding-block: clamp(3rem, 6vw, 5.5rem) calc(5.5rem + env(safe-area-inset-bottom));
  background: var(--text);
  color: var(--bg);
}
.site-footer :focus-visible { outline-color: var(--bg); }

.site-footer__brand { margin-left: -0.04em; }
.site-footer__wordmark {
  display: block;
  font-family: var(--font-display);
  /* кегль подбирается под длину названия: короткое встаёт во всю ширину */
  font-size: clamp(2.5rem, calc((100vw - 2 * var(--gutter)) / (var(--wm-len, 6) * 0.5)), 15rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  overflow-wrap: break-word;
}
.site-footer__logo {
  width: auto;
  height: clamp(3rem, calc(var(--logo-h) * 2), 7.5rem);
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}
.site-footer__tagline {
  margin-top: 1rem;
  color: var(--on-muted);
}
.site-footer__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem var(--gap);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}
.site-footer__col { font-size: var(--step-small); }
.site-footer__label {
  margin-bottom: 0.5rem;
  color: var(--on-muted);
}
.site-footer__nav { display: grid; gap: 0.3rem; }
.site-footer__nav a,
.site-footer__col a { text-decoration: none; }
.site-footer__nav a:hover,
.site-footer__col a:hover { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
.site-footer__legal {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--on-muted);
  font-size: var(--step-small);
}

@media (min-width: 720px) {
  .site-footer__cols { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .site-footer__col:nth-child(1) { grid-column: 1 / span 3; }
  .site-footer__col:nth-child(2) { grid-column: 5 / span 4; }
  .site-footer__col:nth-child(3) { grid-column: 9 / -1; }
}

/* ==========================================================
   Бейдж студии
   ========================================================== */

.badge {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.55em 0.8em 0.55em 0.95em;
  border: 1px solid #DDD8CF;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(30, 25, 18, 0.1);
  color: #1F1C18;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.badge .icon { width: 1.05em; height: 1.05em; }
.badge:hover { border-color: #1F1C18; }
.badge:focus-visible { outline-color: #1F1C18; }
.badge.is-tucked { visibility: hidden; }

@media (max-width: 599px) {
  .badge {
    right: max(0.6rem, env(safe-area-inset-right));
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    padding: 0.45em 0.65em 0.45em 0.8em;
    font-size: 0.75rem;
  }
}

/* ==========================================================
   Просмотр фото
   ========================================================== */

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(24, 21, 18, 0.97);
  color: #fff;
}
.lightbox::backdrop { background: rgba(24, 21, 18, 0.97); }
.lightbox[open] {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) 3.5rem;
  grid-template-rows: 3.5rem minmax(0, 1fr);
  align-items: center;
}
.lightbox :focus-visible { outline-color: #fff; }

.lightbox__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.14); }
.lightbox__btn .icon { width: 1.6rem; height: 1.6rem; }
.lightbox__close { grid-column: 3; grid-row: 1; justify-self: center; }
.lightbox__prev  { grid-column: 1; grid-row: 2; justify-self: center; }
.lightbox__next  { grid-column: 3; grid-row: 2; justify-self: center; }
.lightbox__prev .icon { transform: rotate(-135deg); }
.lightbox__next .icon { transform: rotate(45deg); }
.lightbox__prev[hidden] + .lightbox__figure { grid-column: 1 / -1; }

.lightbox__figure {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  gap: 0.75rem;
  height: 100%;
  min-height: 0;
  padding-bottom: 1rem;
}
.lightbox__img {
  align-self: center;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
}
.lightbox__caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  max-width: 60ch;
  font-size: var(--step-small);
  text-align: center;
}
.lightbox__counter { color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; }

@media (max-width: 599px) {
  .lightbox[open] { grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem; }
  .lightbox__btn { width: 2.75rem; height: 2.75rem; }
}

/* ==========================================================
   Меньше движения
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-on [data-reveal] { opacity: 1; transform: none; }
  .g-btn:hover .ph img { transform: none; }
}
