/* ============================================================
   Лобби-кафе «Кочеты» — сайт поддомена lobby.kochety.ru
   Токены унаследованы от основного сайта kochety.ru
   (см. DESIGN-TOKENS.md): палитра, Prata + Montserrat,
   кнопки, радиусы, контейнер 1200px, брейкпоинты 640/1024.
   ============================================================ */

:root {
  --dark: #201E1F;
  --brown: #503822;
  --cream: #EDE6D5;
  --muted: #947D69;
  --accent: #C63126;
  --white: #FFFFFF;

  --font-display: 'Prata', serif;
  --font-text: 'Montserrat', sans-serif;

  --radius-btn: 10px;
  --radius-photo: 4px;
  --radius-sign: 6px;

  --header-h: 64px;
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }

a { color: inherit; }

h1, h2, h3, h4, p, ul { margin: 0; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

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

/* ---------- Типографика ---------- */

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4.6vw, 50px);
  line-height: 1.15;
  color: var(--brown);
  margin-bottom: 20px;
}

.section-text {
  max-width: 560px;
  color: var(--dark);
}

.section-text + .section-text { margin-top: 14px; }
.section-text + .btn { margin-top: 28px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-btn);
  padding: 14px 24px;
  min-height: 48px;
  transition: background-color 0.3s ease, color 0.3s ease,
              border-color 0.3s ease, transform 0.3s ease;
}

.btn:active { transform: scale(0.98); }

.btn-accent {
  background: var(--accent);
  color: var(--white);
}

.btn-accent:hover { background: #A82820; }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline {
  background: transparent;
  color: var(--brown);
  border: 1.5px solid rgba(80, 56, 34, 0.5);
}

.btn-outline:hover {
  border-color: var(--brown);
  background: rgba(80, 56, 34, 0.05);
}

.btn-lg { padding: 16px 28px; min-height: 56px; }

/* ---------- Секции ---------- */

.section {
  position: relative;
  padding: 60px 0;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.section-cream { background: var(--cream); }
.section-white { background: var(--white); }

.section-divider {
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  border-top: 1px dashed rgba(148, 125, 105, 0.35);
}

/* Едва заметное зерно на кремовых секциях (CSS, без картинок) */
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

.grain > .container { position: relative; }

/* ---------- Фотографии ---------- */

.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-photo);
  aspect-ratio: 4 / 3;
  background: #D8CFBC;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Шапка ---------- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  background: transparent;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.2;
}

.logo-name {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--white);
  transition: color 0.35s ease;
}

.logo-km {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.35s ease;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.25s ease;
}

.nav-link:hover { color: var(--white); }

/* Ссылка «Отель» — со стрелкой-указателем на основной сайт */
.header-hotel {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.header.is-scrolled {
  background: var(--cream);
  box-shadow: 0 1px 10px rgba(32, 30, 31, 0.12);
}

.header.is-scrolled .logo-name { color: var(--brown); }
.header.is-scrolled .logo-km { color: var(--muted); }
.header.is-scrolled .nav-link { color: var(--brown); }
.header.is-scrolled .nav-link:hover { color: var(--accent); }

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  max-height: 800px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
  color: var(--white);
}

/* Фото зала с медленным приближением (Ken Burns) */
.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--dark);
  animation: kenburns 26s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

/* Тёмный оверлей: плотнее слева, где текст.
   Усилен под светлое фото lobby-05 */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(32, 30, 31, 0.88), rgba(32, 30, 31, 0.55));
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 84px;
  padding-bottom: 72px;
}

/* Табличка «КОЧЕТЫ / 24/7 / круглосуточно» — в стиле km-знака */
.cafe-sign {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 18px 9px;
  margin-bottom: 28px;
  background: var(--white);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-sign);
  box-shadow: 0 2px 0 rgba(32, 30, 31, 0.35);
}

.cafe-sign-brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.cafe-sign-num {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  color: var(--dark);
}

.cafe-sign-sub {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 6.5vw, 68px);
  line-height: 1.12;
  max-width: 16ch;
  margin-bottom: 22px;
}

.hero-sub {
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.6;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  max-width: 420px;
}

/* Пунктирная «разметка» внизу первого экрана */
.hero-roadline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  z-index: 1;
  border-top: 2px dashed rgba(255, 255, 255, 0.3);
}

/* ---------- Карточки-преимущества ---------- */

.features {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 14px;
  margin-top: 40px;
}

.feature {
  background: var(--white);
  border-radius: var(--radius-photo);
  padding: 28px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(80, 56, 34, 0.14);
}

.feature-icon {
  display: inline-block;
  width: 32px;
  height: 32px;
  margin-bottom: 16px;
}

.feature-icon svg { width: 100%; height: 100%; }

.feature-title {
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 18px;
  color: var(--brown);
  margin-bottom: 8px;
}

.feature-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--dark);
}

/* ---------- Меню ---------- */

.menu-board { margin-top: 36px; }

.menu-group { margin-bottom: 36px; }

.menu-group-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 25px;
  color: var(--brown);
  margin-bottom: 14px;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 640px;
}

.menu-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
}

.menu-name {
  font-size: 15px;
  font-weight: 500;
}

.menu-note {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

/* Пунктирный лидер — штрихи «дорожной разметки» до цены */
.menu-dots {
  flex: 1;
  min-width: 24px;
  border-bottom: 1px dashed rgba(148, 125, 105, 0.45);
  transform: translateY(-4px);
}

.menu-price {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1;
  color: var(--brown);
  white-space: nowrap;
}

/* Летние разделы — под общим подзаголовком, отбиты пунктиром */
.menu-summer {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px dashed rgba(148, 125, 105, 0.45);
}

.menu-summer-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.2;
  color: var(--brown);
  margin-bottom: 24px;
}

.menu-summer .menu-group-title { font-size: 20px; }

.menu-takeaway {
  margin-top: 8px;
  max-width: 640px;
  font-size: 15px;
  color: var(--dark);
}

/* ---------- Сплит-секция о кафе ---------- */

.split {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.split-media { position: relative; }

.split-body { max-width: 560px; }

/* Две фотографии зала — небольшой коллаж */
.about-collage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Призрачная цифра 24/7 за секцией.
   Клип только по горизонтали: по вертикали фото .bleed-up
   должно свободно наезжать на предыдущую секцию */
.section-ghostnum {
  overflow-x: clip;
  overflow-y: visible;
}

.ghost-num {
  position: absolute;
  top: 10px;
  right: -10px;
  font-family: var(--font-display);
  font-size: clamp(110px, 22vw, 260px);
  line-height: 1;
  color: rgba(80, 56, 34, 0.06);
  pointer-events: none;
  user-select: none;
}

.section-ghostnum .container { position: relative; }

/* ---------- Как нас найти ---------- */

/* Уменьшенный километровый знак (как на основном сайте) */
.km-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  margin-bottom: 18px;
  background: var(--white);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-sign);
  box-shadow: 0 2px 0 rgba(80, 56, 34, 0.18);
}

.km-tag-road {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.km-tag-num {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1;
  color: var(--dark);
}

.km-tag-unit {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- Баннер «Не только на кофе» ----------
   По образцу booking-баннера основного сайта: тёмная карточка
   на ширину контейнера, радиус 12px, внутри — пунктирная
   «дорожная» линия */

.bridge-banner {
  background: var(--dark);
  border-radius: 12px;
  padding: 28px;
  color: var(--cream);
}

/* Красная фокус-обводка на тёмном не видна — заменяем кремовой */
.bridge-banner :focus-visible {
  outline-color: var(--cream);
}

.bridge-roadline {
  border-top: 2px dashed rgba(237, 230, 213, 0.25);
  margin-bottom: 24px;
}

.bridge-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.bridge-eyebrow { color: rgba(237, 230, 213, 0.6); }

.bridge-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 28px);
  line-height: 1.25;
  color: var(--white);
  margin-bottom: 8px;
}

.bridge-sub {
  font-size: 15px;
  color: rgba(237, 230, 213, 0.8);
}

/* Кнопки баннера: на мобильном — в столбик на всю ширину */
.bridge-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

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

.footer {
  background: var(--dark);
  color: var(--cream);
  padding: 26px 0 40px;
}

.footer-roadline {
  border-top: 2px dashed rgba(237, 230, 213, 0.25);
  margin-bottom: 36px;
}

.footer-main {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-logo {
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 10px;
}

.footer-line {
  font-size: 14px;
  color: rgba(237, 230, 213, 0.8);
  margin-bottom: 4px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.footer-link {
  font-size: 14px;
  color: rgba(237, 230, 213, 0.8);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-link:hover { color: var(--white); }

/* Юридический блок — мелко и приглушённо, отбит пунктирной линией */
.footer-legal {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px dashed rgba(237, 230, 213, 0.3);
  font-size: 12px;
  line-height: 1.5;
  color: rgba(237, 230, 213, 0.45);
}

/* ============================================================
   Планшет: ≥ 640px
   ============================================================ */

@media (min-width: 640px) {
  .features { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .hero-actions { flex-direction: row; max-width: none; }
  .hero-actions .btn { flex: 0 1 auto; }
  .about-collage { grid-template-columns: 1fr 1fr; }
  .bridge-actions { flex-direction: row; }
  .bridge-actions .btn { flex: 0 1 auto; }
}

/* ============================================================
   Десктоп: ≥ 1024px
   ============================================================ */

@media (min-width: 1024px) {
  body { font-size: 17px; }

  .container {
    padding-left: 40px;
    padding-right: 40px;
  }

  .header-inner { padding: 0 40px; }

  .section { padding: 96px 0; }

  .features { grid-template-columns: repeat(4, 1fr); gap: 22px; }

  /* Меню в две колонки; разделы не разрываются */
  .menu-columns {
    columns: 2;
    column-gap: 72px;
  }

  .menu-group,
  .menu-summer { break-inside: avoid; }

  .menu-summer { margin-top: 0; }

  /* Сплит: коллаж с одной стороны, текст с другой */
  .split {
    flex-direction: row;
    align-items: center;
    gap: 64px;
  }

  .split-media { flex: 1 1 52%; }
  .split-body { flex: 1 1 48%; min-width: 480px; }

  .about-collage { grid-template-columns: 1fr; gap: 20px; }

  /* Фото наезжает на предыдущую (белую) секцию меню */
  .bleed-up { margin-top: -150px; }

  .bridge-banner { padding: 40px; }

  .bridge-main {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
  }

  .bridge-actions { flex-shrink: 0; }

  .footer-main {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer-nav {
    flex-direction: column;
    gap: 8px;
    text-align: right;
  }
}

/* ============================================================
   prefers-reduced-motion: отключаем анимации
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
