/* Отель «Героев России»
   Каркас: огромная строчная типографика, журнальные колонки, воздух.
   Своя деталь: бирки ключей в цветах стен номеров, висят на одной планке. */

/* Шрифты лежат локально (woff2, кириллица + латиница), без Google Fonts */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/cormorant-600-cyr.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/cormorant-600-lat.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300 500; font-display: swap; src: url("../fonts/jost-cyr.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300 500; font-display: swap; src: url("../fonts/jost-lat.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/literata-italic-cyr.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/literata-italic-lat.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f5f1e8;     /* тёплое молоко */
  --paper-2: #ebe5d9;
  --milk: #f8f4ec;      /* светлый текст на зелёном */
  --ink: #1e201f;
  --ink-2: #565a57;
  --line: rgba(30, 32, 31, .16);
  --teal: #3d5b58;
  --teal-d: #2b4340;
  --terra: #9a553f;      /* кнопка: белый текст 5.6:1 */
  --terra-d: #7f4433;
  --sign-y: #e2b23c;     /* жёлтые торцы настоящей вывески */
  --rail: #5d4433;
  --sign-bg: #1d1f1e;
  --sign-fg: #f4f1e8;
  --cord: #3b3d3c;
  --ring: #8f8b84;
  --on-dark: #e9eeeb;

  --r101: #4f7372;
  --r102: #d4c19b;
  --r103: #6f6b66;
  --r104: #8a6446;

  /* Шкала: 14 / 17 / 22 / 32 / 46 / 82 / дисплей */
  --t1: 14px;
  --t2: 17px;
  --t3: 22px;
  --t4: clamp(26px, 2.4vw, 32px);
  --t5: clamp(34px, 3.6vw, 46px);
  --t6: clamp(52px, 6.4vw, 82px);
  --t7: clamp(72px, 16.4vw, 300px);

  --wrap: 1280px;
  --gut: clamp(16px, 4vw, 48px);
  --head-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --f: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --f-serif: "Literata", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 12px); }
body { margin: 0; font: 400 var(--t2)/1.6 var(--f); color: var(--ink); background: var(--paper); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; flex: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 16px; text-decoration: none; }
.skip:focus { top: 12px; }

.h2 { font: 300 var(--t6)/.95 var(--f); letter-spacing: -.035em; }
.label { font: 500 var(--t1)/1.2 var(--f); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 16px; }
.h3 { font: 400 var(--t3)/1.2 var(--f); letter-spacing: -.01em; margin-bottom: 16px; }

/* Рисунки от руки */
.draw { display: inline-block; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.draw--arrow { --m: url("../img/draw/arrow.png"); aspect-ratio: 640 / 82; }
.draw--bell { --m: url("../img/draw/bell.png"); aspect-ratio: 420 / 358; }
.draw--circle { --m: url("../img/draw/circle.png"); aspect-ratio: 640 / 218; }

/* ---------- Ссылка-подчёркивание: стрелка сдвигается на 4px ---------- */
.ulink {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 400; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
}
/* Стрелка вынесена из потока, чтобы на неё не переходило подчёркивание текста */
.ulink { position: relative; padding-right: 1.4em; }
.ulink::after { content: "→"; position: absolute; right: 0; top: 50%; margin-top: -.62em; line-height: 1.2; text-decoration: none; transition: transform .3s var(--ease); }
.ulink:hover::after, .ulink:focus-visible::after { transform: translateX(4px); }
.ulink:hover { text-decoration-thickness: 2px; }

/* ---------- Кнопка ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  background: var(--terra); color: #fff;
  font: 500 var(--t2)/1 var(--f); letter-spacing: .01em; text-decoration: none;
  border-radius: 3px;
  transition: background-color .25s;
}
.btn svg { width: 19px; height: 19px; }
.btn:hover { background: var(--terra-d); }
.btn:focus-visible { outline-color: var(--ink); }
.hero .btn:focus-visible, .mobile-bar .btn:focus-visible { outline-color: var(--milk); }
.btn:active { transform: translateY(1px); }
.btn--block { width: 100%; }
.btn--sm { min-height: 46px; padding: 0 18px; }

/* ---------- Логотип: как вывеска над дверью и на стойке ----------
   Антиква, «ОТЕЛЬ» с разрядкой, линия с ромбиком, тёмная плашка с жёлтыми торцами.
   Живёт только здесь: в остальном сайте ни ромбиков, ни капса с разрядкой. */
.sign {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 9px 22px 8px; min-height: 44px;
  background: var(--sign-bg); color: var(--sign-fg);
  border-left: 6px solid var(--sign-y); border-right: 6px solid var(--sign-y);
  text-decoration: none; line-height: 1;
}
.sign { --logo: 25px; }
.sign--sm { --logo: 21px; padding: 6px 16px 6px; }
.sign__name { font: 600 var(--logo)/1 "Cormorant Garamond", Georgia, serif; white-space: nowrap; }
.sign__mark { width: calc(var(--logo) * 3.8); height: calc(var(--logo) * .76); margin-top: 3px; overflow: visible; color: var(--sign-y); }
.sign__mark text { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; fill: var(--sign-fg); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Шапка ---------- */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 40; color: var(--milk); transition: background-color .35s, color .35s, box-shadow .35s; }
.header.is-solid, .header--solid { background: rgba(245, 241, 232, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.header--solid { position: sticky; }
.header__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: var(--head-h); padding: 0 var(--gut); }
.header .sign { justify-self: start; }
.header.is-solid .sign:focus-visible, .header--solid .sign:focus-visible { outline-color: var(--ink); }
.nav__list { display: flex; gap: clamp(16px, 2.6vw, 40px); }
.nav__link { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t2); text-decoration: none; text-underline-offset: 6px; }
.nav__link:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.header__call { justify-self: end; display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t2); text-decoration: none; }
.header__call:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.burger { display: none; }

/* ---------- Первый экран ----------
   Кадр фасада начинается под вывеской, поэтому её место занимает огромное название. */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: auto 1fr;
  background: var(--teal);
  color: var(--milk);
  padding-top: var(--head-h);
  overflow: hidden;
  height: min(100svh, 1020px);
  min-height: 600px;
}
.hero__h1 { grid-column: 1 / -1; grid-row: 1; position: relative; z-index: 2; padding: clamp(10px, 2.4vh, 32px) var(--gut) 0; margin: 0; font-weight: 300; }
.hero__kicker { display: block; font: 400 var(--t2)/1.2 var(--f); letter-spacing: .02em; margin-bottom: clamp(4px, 1vh, 12px); }
.hero__word { display: block; font: 300 var(--t7)/.8 var(--f); letter-spacing: -.055em; margin-left: -.05em; white-space: nowrap; }
.hero__dash { display: inline-block; margin: 0 .09em 0 .06em; transform: scaleX(1.3) translateY(.035em); }
.hero__photo { grid-column: 2; grid-row: 2; position: relative; z-index: 1; margin: calc(var(--t7) * -.02) 0 clamp(40px, 6vh, 56px); min-height: 300px; }
/* Подложка под фото: тёмно-зелёная, слева ровная, справа волна, вправо уходит за экран */
.hero__photo::before { content: ""; position: absolute; inset: calc(var(--t7) * -.22) 0 -30px -38px; background: #324c49; -webkit-clip-path: url(#cut-frame); clip-path: url(#cut-frame); }
.hero__shapes { position: absolute; }
.hero__photo .slide { -webkit-clip-path: url(#cut-photo); clip-path: url(#cut-photo); }
/* Высокое фото: те же контуры с углами под его пропорции, иначе скругление вытягивается */
@media (max-width: 600px), (min-width: 861px) and (max-aspect-ratio: 1/1) {
  .hero__photo::before { -webkit-clip-path: url(#cut-frame-tall); clip-path: url(#cut-frame-tall); }
  .hero__photo .slide { -webkit-clip-path: url(#cut-photo-tall); clip-path: url(#cut-photo-tall); }
}
/* Фото тонировано в общий тёплый свет сайта */
.slide { position: absolute; inset: 0; margin: 0; overflow: hidden; opacity: 0; transition: opacity 2s ease-in-out; }
.slide.is-on { opacity: 1; z-index: 1; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; filter: sepia(.14) saturate(.88) brightness(.86); }
/* сверху кадр чуть притемнён */
.slide::before { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(to bottom, rgba(24, 38, 36, .34), rgba(24, 38, 36, .06) 38%, rgba(24, 38, 36, 0) 60%); pointer-events: none; }
.slide::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: linear-gradient(to top, rgba(20, 22, 21, .6), transparent); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .slide img { transform: scale(1.04); transition: transform 8s ease-out; }
  .slide.is-on img { transform: scale(1); }
}

.hero__text { grid-column: 1; grid-row: 2; align-self: start; padding: 32px clamp(24px, 4vw, 56px) clamp(32px, 6vh, 64px) var(--gut); }
.hero__lead { font: 400 var(--t3)/1.45 var(--f); max-width: 22em; margin-bottom: 28px; text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.hero .ulink { color: var(--milk); }
.hero__how { margin-top: 20px; font-size: var(--t2); color: var(--on-dark); }

/* ---------- Вступление со штампом ---------- */
.intro { padding: clamp(72px, 10vw, 144px) 0 clamp(48px, 6vw, 88px); }
.intro__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px clamp(40px, 7vw, 120px); align-items: center; }
.intro__slogan { font: italic 400 var(--t4)/1.15 var(--f-serif); letter-spacing: -.01em; margin-bottom: 18px; }
.intro__lead { font: 400 var(--t4)/1.35 var(--f); letter-spacing: -.01em; max-width: 30em; text-wrap: pretty; }

.bell { display: grid; justify-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.bell .draw--bell { width: clamp(56px, 5vw, 72px); color: var(--teal); transform-origin: 50% 12%; }
.bell__text { font: italic 400 var(--t2)/1.2 var(--f-serif); }
.bell:hover .bell__text { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
@media (prefers-reduced-motion: no-preference) { .bell:hover .draw--bell, .bell:focus-visible .draw--bell { animation: ring .7s var(--ease); } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 45% { transform: rotate(11deg); } 70% { transform: rotate(-6deg); } }

/* ---------- Ключница ---------- */
.rooms { padding: clamp(32px, 5vw, 72px) 0 clamp(72px, 9vw, 128px); }
.rooms__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.rooms__note { color: var(--ink-2); max-width: 30em; }
.board { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
/* Одна планка и одна тень: от планки вниз на стену. У бирок своих теней нет */
.board__rail { position: relative; z-index: 2; height: 12px; margin: 0 calc(var(--gut) * -.4); background: var(--rail); box-shadow: 0 10px 16px -8px rgba(30, 32, 31, .35); }
.board__keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 3vw, 48px); align-items: start; }
.prices { margin-top: clamp(36px, 4.5vw, 64px); }
.prices__table { width: 100%; max-width: 860px; border-collapse: collapse; font-size: var(--t2); font-variant-numeric: tabular-nums; }
.prices__table caption { text-align: left; color: var(--ink-2); padding-bottom: 14px; }
.prices__table th, .prices__table td { padding: 0 0 0 12px; height: 48px; text-align: right; font-weight: 400; border-top: 1px solid var(--line); }
.prices__table thead th { height: 36px; border: 0; font-size: var(--t1); color: var(--ink-2); }
.prices__table th:first-child { text-align: left; padding-left: 0; }
.prices__table tbody a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.prices__table tbody a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.prices__table tbody b { font-weight: 500; min-width: 2.6em; }
.prices__no { color: var(--ink-2); opacity: .5; }
.prices__note { margin-top: 14px; font-size: var(--t1); color: var(--ink-2); }

.key {
  --c: var(--r101); --fg: #fff; --cord-len: 20px; --tilt: 0deg;
  position: relative; display: flex; flex-direction: column; align-items: center;
  text-decoration: none; color: var(--fg);
  transform-origin: 50% 0;
  transform: rotate(var(--tilt));
  -webkit-tap-highlight-color: transparent;
}
.key[data-room="102"] { --c: var(--r102); --fg: var(--ink); }
.key[data-room="103"] { --c: var(--r103); }
.key[data-room="104"] { --c: var(--r104); }
.key__cord { width: 2px; height: var(--cord-len); background: var(--cord); }
.key__ring { width: 30px; height: 30px; margin-top: -2px; border-radius: 50%; border: 2.5px solid var(--ring); }
.key__tag {
  position: relative;
  width: min(100%, 236px); aspect-ratio: 5 / 8; margin-top: -10px;
  display: flex; flex-direction: column; align-items: center;
  padding: 38px 16px 22px; text-align: center;
  background: var(--c);
  border-radius: 46% 46% 14px 14px / 20% 20% 14px 14px;
  -webkit-mask: radial-gradient(circle at 50% 18px, transparent 7px, #000 7.5px);
          mask: radial-gradient(circle at 50% 18px, transparent 7px, #000 7.5px);
}
.key__num { font: 400 var(--t5)/1 var(--f); letter-spacing: -.045em; margin-top: 4%; }
.key__name { font: italic 400 var(--t3)/1.2 var(--f-serif); margin-top: 6px; }
.key__facts { font-size: var(--t1); margin-top: auto; padding-top: 10px; line-height: 1.35; }
.key__note { font-size: var(--t1); margin-top: 4px; }
.key__diff { font: 400 var(--t1)/1.3 var(--f); margin-top: 10px; padding-top: 10px; border-top: 1px solid currentColor; width: 84%; }
.key__price { font-size: var(--t1); line-height: 1.3; margin-top: 8px; }
.key__price b { font-weight: 500; }
.key__photo { width: 78%; aspect-ratio: 4 / 3; object-fit: cover; margin-top: 12px; border-radius: 4px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 70%, #000 30%); filter: sepia(.1) saturate(.92); }
.key:focus-visible { outline: none; }
.key:focus-visible .key__tag { outline: 3px solid var(--ink); outline-offset: 4px; -webkit-mask: none; mask: none; }
/* Качание запускает main.js и оно доигрывает до конца: с :hover бирка уходила из-под курсора и дёргалась.
   Ловит курсор только сама бирка */
.key { pointer-events: none; }
.key__tag { pointer-events: auto; }
@media (prefers-reduced-motion: no-preference) {
  .key.is-swinging, .key:focus-visible { animation: swing 1.6s var(--ease); }
}
@keyframes swing {
  0% { transform: rotate(var(--tilt)); }
  16% { transform: rotate(calc(var(--tilt) + 6deg)); }
  36% { transform: rotate(calc(var(--tilt) - 4deg)); }
  56% { transform: rotate(calc(var(--tilt) + 2deg)); }
  76% { transform: rotate(calc(var(--tilt) - .8deg)); }
  100% { transform: rotate(var(--tilt)); }
}
.key--mini { width: 128px; }
.key--mini .key__tag { width: 128px; aspect-ratio: 5 / 6; padding: 30px 8px 14px; }
.key--mini .key__num { font-size: var(--t5); margin-top: 6%; }
.key--mini .key__name { font-size: var(--t1); }
.key--mini .key__ring { width: 24px; height: 24px; }

/* ---------- Условия ---------- */
.rules { background: var(--paper-2); padding: clamp(72px, 9vw, 128px) 0 clamp(40px, 5vw, 64px); }
.rules__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 48px clamp(40px, 7vw, 120px); }
.times { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); margin: 0 0 28px; }
.times > span:not(.draw) { display: grid; font: 400 var(--t2)/1.2 var(--f); color: var(--ink-2); }
.times b { font: 300 var(--t5)/.9 var(--f); font-style: normal; color: var(--ink); letter-spacing: -.04em; margin-bottom: 6px; }
.times .draw--arrow { flex: none; width: clamp(44px, 5vw, 80px); color: var(--ink); margin-top: -.8em; }
.rules__aside { color: var(--ink-2); max-width: 24em; margin-top: clamp(28px, 4vw, 56px); padding: 22px 24px 14px; background: var(--paper); }
.rules__aside p { margin-bottom: 6px; }
.rules__aside .ulink { color: var(--ink); font-size: var(--t3); }
.rules__list { columns: 2; column-gap: 48px; padding-top: 8px; }
.rules__list > div { break-inside: avoid; padding: 16px 0 20px; border-top: 1px solid var(--line); }
.rules__list dt { font: 500 var(--t2)/1.3 var(--f); margin-bottom: 4px; }
.rules__list dd { font-size: var(--t2); line-height: 1.55; color: var(--ink-2); }
.desk { margin-top: clamp(56px, 8vw, 112px); }
.desk img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 62%; }
.desk figcaption { margin-top: 12px; font: italic 400 var(--t2)/1.4 var(--f-serif); color: var(--ink-2); max-width: 36em; }

/* ---------- Отзывы ---------- */
.reviews { background: var(--teal); color: var(--milk); padding: clamp(72px, 9vw, 128px) 0; overflow: hidden; }
.reviews__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 28px 48px; }
.scores { display: flex; gap: clamp(36px, 5vw, 80px); }
.score { display: flex; align-items: center; gap: 16px; min-height: 48px; text-decoration: none; }
.score b { position: relative; font: 300 var(--t6)/.9 var(--f); letter-spacing: -.04em; padding: 0 .12em; }
.score:first-child { gap: 44px; padding-left: 18px; }
.score > span { font-size: var(--t1); line-height: 1.45; }
.score:hover > span { text-decoration: underline; text-underline-offset: 3px; }
/* Овал обводит цифру с запасом: растянут по высоте, чтобы линия не проходила через знаки */
.score .draw--circle { position: absolute; left: 50%; top: 50%; width: 150%; height: 175%; aspect-ratio: auto; translate: -50% -50%; color: #fff; pointer-events: none; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.big-quote { margin: clamp(56px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); max-width: 1000px; }
.big-quote p { font: italic 400 var(--t5)/1.25 var(--f-serif); letter-spacing: -.01em; text-wrap: pretty; }
.big-quote figcaption, .quote figcaption { margin-top: 16px; font-size: var(--t1); }
.big-quote a, .quote a { color: inherit; }
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.quote { padding-top: 20px; border-top: 1px solid rgba(255,255,255,.35); }
.quote p { font-size: var(--t2); line-height: 1.6; }
.reviews__more { margin-top: 36px; color: var(--milk); }
.reviews__more:focus-visible { outline-color: #fff; }

/* ---------- Как найти ---------- */
.contacts { padding: clamp(72px, 9vw, 128px) 0; }
.findus { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: end; }
.findus__photo { margin: 0; }
.findus__frame { overflow: hidden; }
.findus__cap { margin-top: 10px; font: italic 400 var(--t3)/1.2 var(--f-serif); color: var(--ink-2); }
.findus__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: sepia(.1) saturate(.95); transform: scale(1.3); transform-origin: 18% 62%; }
.findus .map { grid-column: 1 / -1; }
.findus .map__img img { aspect-ratio: 1200 / 751; }
.findus__card { padding-bottom: 8px; }
.findus__h { font: 400 var(--t5)/1.05 var(--f); letter-spacing: -.02em; margin-bottom: 14px; }
.findus__note { color: var(--ink-2); margin-bottom: 10px; line-height: 1.5; }
.contacts__phone { display: block; font: 400 var(--t4)/1.1 var(--f); letter-spacing: -.01em; text-decoration: none; padding: 8px 0; min-height: 44px; }
.contacts__phone:hover { color: var(--terra); }
.contacts__phone2 { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t1); color: var(--ink-2); }
.findus .ulink { display: flex; width: max-content; }
.findus__hours { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px clamp(20px, 2.4vw, 36px); margin-top: clamp(24px, 3vw, 40px); padding-top: 20px; border-top: 1px solid var(--line); }
.findus__hours dt { font: italic 400 var(--t1)/1.3 var(--f-serif); color: var(--ink-2); }
.findus__hours dd { margin: 2px 0 0; font-size: var(--t2); }
.map__img { position: relative; display: block; overflow: hidden; background: var(--paper-2); }
.map__img img { width: 100%; aspect-ratio: 1200 / 751; object-fit: cover; }
.map__route { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map__route path { fill: none; stroke: var(--terra); stroke-width: 4; stroke-dasharray: 2 9; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map__route .map__route-alt { stroke: var(--ink-2); stroke-width: 3; }
.map__route circle { fill: var(--paper); stroke: var(--ink); stroke-width: 3; vector-effect: non-scaling-stroke; }
.map__pin { position: absolute; width: 44px; height: 44px; margin: -50px 0 0 -22px; display: grid; place-items: center; }
.map__pin::before { content: ""; position: absolute; inset: 0; background: var(--terra); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 0 0 3px var(--paper); }
.map__pin span { position: relative; color: #fff; font: 500 var(--t1)/1 var(--f); }
.map__img:hover .map__pin::before { background: var(--terra-d); }
.map__label, .map__time { position: absolute; padding: 3px 8px; background: var(--paper); color: var(--ink); font: 500 var(--t1)/1.2 var(--f); white-space: nowrap; box-shadow: 0 0 0 1px var(--line); }
.map__label--metro { transform: translate(-50%, 16px); }
.map__label--station { transform: translate(-100%, -150%); }
.map__time { background: var(--terra); color: #fff; box-shadow: none; font-style: italic; font-family: var(--f-serif); font-weight: 400; transform: translate(-50%, -150%) rotate(-8deg); }
.map__credit { margin-top: 4px; font-size: var(--t1); color: var(--ink-2); }
.map__credit a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Подвал ---------- */
.footer { background: var(--teal-d); color: var(--on-dark); padding-top: clamp(56px, 7vw, 88px); }
.footer__grid { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 32px clamp(32px, 4vw, 64px); font-size: var(--t2); line-height: 1.5; padding-bottom: clamp(48px, 6vw, 72px); }
.footer__label { font: 500 var(--t1)/1.2 var(--f); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; opacity: .8; }
.footer__phone { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t3); text-decoration: none; }
.footer__phone2 { display: flex; align-items: center; min-height: 44px; text-decoration: none; opacity: .85; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.footer__links b { font-weight: 500; margin-right: 6px; }
.footer__way { display: inline-flex; align-items: center; min-height: 44px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 32px; padding-top: 18px; padding-bottom: 22px; font-size: var(--t1); border-top: 1px solid rgba(255,255,255,.14); opacity: .8; }
.footer__bottom a { display: inline-block; padding: 12px 0; margin: -12px 0; }

/* ---------- Страница номера ---------- */
.room-page { --c: var(--r101); --cfg: #fff; }
.room-page[data-room="102"] { --c: var(--r102); --cfg: var(--ink); }
.room-page[data-room="103"] { --c: var(--r103); }
.room-page[data-room="104"] { --c: var(--r104); }
.room { padding-top: 12px; }
.room__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px clamp(32px, 4vw, 64px); align-items: start; }
.crumbs { font-size: var(--t1); color: var(--ink-2); }
.crumbs a { display: inline-block; color: var(--ink); padding: 12px 0; }
.crumbs span { margin: 0 4px; opacity: .6; }
.room__title { display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); margin: 2px 0 clamp(18px, 2.4vw, 28px); }
.room__tag {
  flex: none; display: grid; place-items: center;
  width: clamp(64px, 6vw, 84px); aspect-ratio: 5 / 6; padding-top: 12px;
  background: var(--c); color: var(--cfg);
  font: 400 clamp(24px, 2.4vw, 32px)/1 var(--f); letter-spacing: -.03em;
  border-radius: 46% 46% 8px 8px / 26% 26% 8px 8px;
  -webkit-mask: radial-gradient(circle at 50% 12px, transparent 5px, #000 5.5px);
          mask: radial-gradient(circle at 50% 12px, transparent 5px, #000 5.5px);
  transform: rotate(-3deg);
}
.room__title h1 { font: 300 var(--t6)/.9 var(--f); letter-spacing: -.045em; }

.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px 8px; }
.gallery__item { display: flex; flex-direction: column; min-width: 0; }
.gallery__item:first-child { grid-row: 1 / 3; }
.gallery__item[hidden] { display: none; }
.gallery__btn { position: relative; display: block; flex: 1; padding: 0; border: 0; background: var(--paper-2); cursor: zoom-in; overflow: hidden; }
.gallery__item:not(:first-child) .gallery__btn { flex: none; aspect-ratio: 4 / 3; }
.gallery__btn img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.gallery__item:first-child .gallery__btn img { position: absolute; inset: 0; }
.gallery__btn:hover img { opacity: .88; }
.gallery__btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.gallery__item figcaption { margin-top: 6px; font: italic 400 var(--t1)/1.3 var(--f-serif); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery__all { margin-top: 8px; border: 0; background: none; padding: 0 1.4em 0 0; color: var(--ink); cursor: pointer; font-size: var(--t2); }

.room__lead { font: 400 var(--t3)/1.45 var(--f); max-width: 34em; margin-top: clamp(32px, 4vw, 48px); text-wrap: pretty; }
.notice { font: italic 400 var(--t2)/1.4 var(--f-serif); padding: 14px 18px; margin-top: 24px; background: color-mix(in srgb, var(--c) 22%, var(--paper)); border-left: 4px solid var(--c); max-width: 34em; }
.room__cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px clamp(32px, 4vw, 56px); margin-top: clamp(40px, 5vw, 64px); }
.equip { margin-bottom: 8px; }
.equip li { padding: 10px 0; border-top: 1px solid var(--line); font-size: var(--t2); }

.fit { margin-top: clamp(40px, 5vw, 64px); }
.fit__list > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4px 32px; padding: 14px 0 16px; border-top: 1px solid var(--line); font-size: var(--t2); line-height: 1.55; }
.fit__list dd { color: var(--ink-2); }
.fit__list a { color: var(--ink); }

.price-card { position: sticky; top: calc(var(--head-h) + 20px); margin-top: 56px; padding: 28px 26px 24px; background: #fff; border-top: 6px solid var(--c); }
.price-card__price { font-size: var(--t2); color: var(--ink-2); }
.price-card__price b { display: block; font: 400 var(--t5)/1 var(--f); color: var(--ink); letter-spacing: -.02em; margin-bottom: 6px; }
.price-card__note { font-size: var(--t1); color: var(--ink-2); margin: 12px 0 22px; line-height: 1.5; }
.price-card__list { margin: 14px 0 22px; font-size: var(--t2); }
.price-card__list > div { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.price-card__list dt { color: var(--ink-2); }
.price-card__city { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-size: var(--t1); color: var(--ink-2); }
.price-card__desk { font: italic 400 var(--t1)/1.4 var(--f-serif); color: var(--ink-2); margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }

.others { padding: clamp(64px, 8vw, 112px) 0; }
.others__keys { display: flex; flex-wrap: wrap; gap: 24px 40px; padding-left: 24px; }
.board--mini { padding: 0; max-width: 720px; margin: 0; }
.board--mini .board__rail { margin: 0; }
.mobile-bar { display: none; }

/* ---------- Как добраться ---------- */
.way__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px clamp(32px, 6vw, 96px); align-items: start; margin: clamp(40px, 5vw, 72px) 0 clamp(64px, 8vw, 112px); }
.way { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px 32px; padding: 22px 0 26px; border-top: 1px solid var(--line); }
.way__h { font: 400 var(--t3)/1.25 var(--f); letter-spacing: -.01em; }
.way__fact { font: italic 400 var(--t3)/1.25 var(--f-serif); margin-bottom: 8px; }
.way__p { font-size: var(--t2); line-height: 1.6; color: var(--ink-2); }
.way__src { font-size: var(--t1); color: var(--ink-2); padding-top: 18px; border-top: 1px solid var(--line); }
.way__card .ulink { display: flex; width: max-content; }
.way__addr { font: 400 var(--t3)/1.35 var(--f); margin: 22px 0 6px; }
.way__qa .rules__list { margin-bottom: 28px; }

/* ---------- 404 ---------- */
.nf { min-height: 100svh; display: flex; }
.nf__main { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 28px; padding-top: 40px; padding-bottom: 48px; }
.nf__h1 { font: 300 var(--t6)/.95 var(--f); letter-spacing: -.045em; margin-top: 4vh; max-width: 12em; }
.nf__p { color: var(--ink-2); max-width: 32em; }
.nf .board--mini { width: 100%; }

/* ---------- Лайтбокс ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(23, 27, 26, .96); display: none; align-items: center; justify-content: center; padding: 56px 80px 96px; }
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__btn { position: absolute; width: 56px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.45); border-radius: 3px; background: transparent; color: #fff; cursor: pointer; transition: background-color .25s, color .25s; }
.lightbox__btn:hover { background: #fff; color: var(--ink); }
.lightbox__btn:focus-visible { outline-color: #fff; }
.lightbox__btn svg { width: 22px; height: 22px; }
.lightbox__close { top: 14px; right: 14px; }
.lightbox__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__cap { position: absolute; bottom: 48px; left: 50%; transform: translateX(-50%); width: min(90%, 40em); text-align: center; color: #fff; font: italic 400 var(--t2)/1.35 var(--f-serif); }
.lightbox__count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #fff; font: italic 400 var(--t1) var(--f-serif); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================= Адаптив ================= */
@media (max-height: 760px) and (min-width: 861px) {
  :root { --t7: clamp(72px, 14.5vw, 240px); }
}

@media (max-width: 1100px) {
  .board__keys { gap: 14px; }
  .key__tag { padding: 36px 10px 18px; }
  .board__keys .key__tag { width: min(90%, 236px); }
  .map { grid-column: 1 / -1; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room__grid { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 860px) {
  :root { --head-h: 60px; --t3: 20px; --t5: 30px; --t6: clamp(44px, 12vw, 64px); --t7: 19.5vw; }
  .header__inner { grid-template-columns: 1fr auto auto; gap: 6px; }
  .header:not(.is-solid):not(.header--solid) { background: var(--teal); } /* Safari красит строку состояния по шапке */
  .burger { display: grid; place-content: center; gap: 7px; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 0; }
  .burger span { display: block; width: 26px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
  .burger[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
  .nav { position: fixed; left: 0; right: 0; top: var(--head-h); height: calc(100vh - var(--head-h)); height: calc(100dvh - var(--head-h)); background: var(--paper); color: var(--ink); padding: 16px var(--gut); display: none; overflow-y: auto; }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link { display: flex; font: 300 var(--t5)/1.2 var(--f); letter-spacing: -.02em; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .header__call { font-size: var(--t1); padding: 0 4px; }

  /* Мобильный первый экран на всю высоту окна: название, фото (забирает лишнюю высоту), лид и кнопка */
  .hero { display: flex; flex-direction: column; height: auto; min-height: 100vh; min-height: 100lvh; }
  .hero__h1 { padding-top: 20px; }
  .hero__kicker { font-size: var(--t2); margin-bottom: 8px; }
  .hero__word { line-height: .8; }
  /* фото берёт только то место, что осталось от текста и кнопки */
  .hero__photo { margin: 6px 0 20px 28px; min-height: 0; flex: 1 0 190px; }
  .hero__photo .slide, .hero__photo .slide img { position: absolute; inset: 0; width: 100%; height: 100%; }
  .slide img { object-position: 47% 50%; }
  .hero__photo::before { inset: -20px 0 -18px -18px; }
  .hero__text { padding: 22px var(--gut) 36px; }
  /* поле уходит под панель браузера, а кнопки остаются над ней */
  @supports (height: 1svh) { .hero__text { padding-bottom: calc(36px + 100lvh - 100svh); } }
  /* iPhone: 100lvh не достаёт до низа экрана на высоту строки состояния */
  @supports (-webkit-touch-callout: none) and (height: 1svh) {
    .hero { min-height: calc(100lvh + 64px); }
    .hero__text { padding-bottom: calc(100px + 100lvh - 100svh); }
  }
  .hero__lead { font-size: var(--t3); margin-bottom: 20px; }
  .hero__how { display: none; }

  .intro__grid { grid-template-columns: 1fr; }
  .intro__lead { font-size: var(--t3); }
  .bell { justify-content: start; grid-auto-flow: column; align-items: center; gap: 14px; }
  .bell .draw--bell { width: 44px; }
  .rooms__head { grid-template-columns: 1fr; }

  /* Телефон: ключница сеткой 2×2, у каждого ряда своя планка. Ряд фиксированной высоты, чтобы планки встали ровно */
  .board { padding: 0 var(--gut); --row: 436px; --rowgap: 22px; }
  .board__rail { display: none; }
  .board__keys {
    grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: var(--row); gap: var(--rowgap) 12px; overflow: hidden;
    background:
      linear-gradient(var(--rail), var(--rail)) 0 0 / 100% 12px no-repeat,
      linear-gradient(rgba(30, 32, 31, .16), transparent) 0 12px / 100% 14px no-repeat,
      linear-gradient(var(--rail), var(--rail)) 0 calc(var(--row) + var(--rowgap)) / 100% 12px no-repeat,
      linear-gradient(rgba(30, 32, 31, .16), transparent) 0 calc(var(--row) + var(--rowgap) + 12px) / 100% 14px no-repeat;
  }
  .board__keys .key__tag { width: clamp(138px, 39vw, 158px); aspect-ratio: auto; min-height: 300px; padding: 34px 8px 16px; }
  .board__keys .key__diff { width: 88%; }
  .board__keys .key__facts { font-size: var(--t1); }
  .rules__grid { grid-template-columns: 1fr; }
  .rules__list { columns: 1; }
  .quotes { grid-template-columns: 1fr; gap: 28px; }
  .scores { flex-direction: column; gap: 28px; }
  .score:first-child { gap: 40px; }
  .big-quote p { font-size: var(--t4); line-height: 1.3; }
  .findus { grid-template-columns: 1fr; gap: 24px; }
  .findus__card { order: -1; padding: 0; }
  .map__label--station { transform: translate(-100%, -170%); }
  .footer__grid { grid-template-columns: 1fr; }

  .room { padding-top: 0; }
  .room__grid { grid-template-columns: 1fr; gap: 32px; }
  .room__tag { width: 56px; font-size: var(--t3); padding-top: 10px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 12px 6px; }
  .gallery__item:first-child { grid-column: 1 / -1; grid-row: auto; }
  .gallery__item:first-child .gallery__btn { flex: none; aspect-ratio: 4 / 3; }
  /* на телефоне видны комната, кухня (или холодильник) и санузел, остальное в просмотре */
  .gallery__item:nth-child(2), .gallery__item:nth-child(3) { display: none; }
  .room__cols { grid-template-columns: 1fr; }
  .price-card { position: static; margin-top: 0; }
  .way__grid { grid-template-columns: 1fr; }
  .way { grid-template-columns: 1fr; }
  .fit__list > div { grid-template-columns: 1fr; }
  .prices__table th, .prices__table td { padding-left: 4px; }
  .prices__table { font-size: var(--t1); }
  .prices__table tbody span:not(.visually-hidden) { display: none; }
  .board--mini .board__rail { display: block; }
  .others__keys { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 8px 12px; gap: 14px; }
  .others__keys::-webkit-scrollbar { display: none; }
  .others__keys .key { flex: none; }
  .key--mini, .key--mini .key__tag { width: 92px; }
  .board--mini { padding: 0; }
  /* 404: четыре ключа сеткой 2×2 на двух планках, как на главной */
  .nf .board--mini .board__rail { display: none; }
  .nf .others__keys {
    display: grid; grid-template-columns: repeat(2, 120px); grid-auto-rows: 168px; gap: 20px 28px; overflow: visible; padding: 0 0 0 8px;
    background:
      linear-gradient(var(--rail), var(--rail)) 0 0 / 100% 10px no-repeat,
      linear-gradient(var(--rail), var(--rail)) 0 188px / 100% 10px no-repeat;
  }
  .nf .key--mini, .nf .key--mini .key__tag { width: 120px; }

  .has-mobile-bar { padding-bottom: 72px; }
  /* visibility: спрятанная панель не ловит фокус и не красит низ окна в Safari */
  .mobile-bar--home { transform: translateY(110%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s; }
  .mobile-bar--home.is-shown { transform: none; visibility: visible; transition: transform .3s var(--ease), visibility 0s; }
  .footer { padding-bottom: 88px; }
  .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--gut); padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--ink); color: #fff; }
  .mobile-bar b { font: 400 var(--t3)/1 var(--f); }
  .mobile-bar small { font-size: var(--t1); font-weight: 400; }
  .lightbox { padding: 64px 8px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 10px; transform: none; }
}

@media (max-width: 420px) {
  .header .sign { --logo: 18px; padding: 5px 12px; }
}

@media (max-width: 860px) and (max-height: 620px) {
  .hero__photo { flex-basis: 130px; margin-bottom: 12px; }
  .hero__h1 { padding-top: 10px; }
  .hero__text { padding-top: 14px; }
  .hero__lead { margin-bottom: 14px; }
}

@media (max-width: 360px) {
  .header__inner { gap: 2px; padding: 0 12px; }
  .header__call { font-size: 13px; white-space: nowrap; padding: 0; }
  .header .sign { --logo: 16px; padding: 5px 9px; }
}

/* Телефон боком: слева текст и кнопка, справа фото */
@media (min-width: 560px) and (max-height: 520px) {
  /* --gut обходит вырез экрана: страница растянута под него */
  :root { --head-h: 50px; --t7: min(19.5vw, 22vh); --gut: max(16px, env(safe-area-inset-left), env(safe-area-inset-right)); }
  @supports (height: 1svh) { :root { --t7: min(19.5vw, 22svh); } }
  .header .sign { --logo: 16px; padding: 4px 12px; }
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; height: 100svh; min-height: 300px; }
  .hero__h1 { padding-top: 6px; }
  .hero__kicker { font-size: var(--t1); margin-bottom: 4px; }
  .hero__text { grid-column: 1; grid-row: 2; align-self: start; padding: 8px 20px 12px var(--gut); }
  .hero__lead { font-size: 16px; line-height: 1.3; margin-bottom: 10px; }
  .hero__how { display: none; }
  .hero__photo { grid-column: 2; grid-row: 1 / 3; min-height: 0; margin: 16px 0 24px 20px; }
  .hero__photo::before { inset: -10px 0 -14px -16px; }
}
