/* ==========================================================================
   Рестобар «Камин» — главная визитка
   ========================================================================== */

:root {
  --bg:        #0b0b0d;
  --surface:   #17171b;
  --surface-2: #202027;
  --text:      #f5f5f7;
  --muted:     #a1a1aa;
  --border:    rgba(255,255,255,.08);
  --accent:    #f97316;
  --accent-ink:#1a1105;
  --ok:        #22c55e;
  --off:       #ef4444;
  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 10px 30px rgba(0,0,0,.35);
  --maxw:      600px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:#f7f7f8; --surface:#ffffff; --surface-2:#f0f0f2;
    --text:#16161a; --muted:#6b7280; --border:rgba(0,0,0,.08);
    --accent:#ea580c; --shadow:0 10px 24px rgba(0,0,0,.10);
  }
}

/* Ручной выбор темы перекрывает системный */
:root[data-theme="dark"] {
  --bg:#0b0b0d; --surface:#17171b; --surface-2:#202027;
  --text:#f5f5f7; --muted:#a1a1aa; --border:rgba(255,255,255,.08);
  --accent:#f97316; --accent-ink:#1a1105; --shadow:0 10px 30px rgba(0,0,0,.35);
}
:root[data-theme="light"] {
  --bg:#f7f7f8; --surface:#ffffff; --surface-2:#f0f0f2;
  --text:#16161a; --muted:#6b7280; --border:rgba(0,0,0,.08);
  --accent:#ea580c; --accent-ink:#1a1105; --shadow:0 10px 24px rgba(0,0,0,.10);
}

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

* { -webkit-tap-highlight-color: transparent; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
  padding:
    calc(16px + env(safe-area-inset-top))
    calc(16px + env(safe-area-inset-right))
    calc(16px + env(safe-area-inset-bottom))
    calc(16px + env(safe-area-inset-left));
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.page {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

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

.hero {
  position: relative;
  text-align: center;
  padding: 24px 8px 8px;
}

.hero__logo {
  display: block;
  width: clamp(210px, 62vw, 300px);
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 auto 16px;
  border-radius: 26px;
  background: #26170d;
  box-shadow: 0 18px 46px rgba(0,0,0,.45);
}

.hero__sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
}

.hero__status {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}

.status.is-open {
  color: var(--text);
}

.status.is-open .status__dot {
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(34,197,94,.6);
  animation: pulse 2s ease-out infinite;
}

.status.is-closed .status__dot {
  background: var(--off);
}

.badge-lunch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(249,115,22,.12);
  border: 1px solid rgba(249,115,22,.35);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 700;
}

.badge-lunch .icon {
  width: 16px;
  height: 16px;
}

.badge-lunch[hidden] { display: none; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* --------------------------------------------------------------------------
   Переключатель темы
   -------------------------------------------------------------------------- */

/* без JS статус и переключатель темы не нужны */
html:not(.js) .status,
html:not(.js) .theme-toggle { display: none; }

.theme-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, transform .15s ease;
}

.theme-toggle:active { transform: scale(.94); }

.theme-toggle .icon {
  width: 20px;
  height: 20px;
}

.theme-toggle__sun,
.theme-toggle__moon { display: none; }

/* светлая тема → показываем луну (переключить на тёмную) */
:root .theme-toggle__moon { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle__sun  { display: block; }
}
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun  { display: block; }
:root[data-theme="light"] .theme-toggle__sun { display: none; }
:root[data-theme="light"] .theme-toggle__moon{ display: block; }

/* --------------------------------------------------------------------------
   Секции / сетка
   -------------------------------------------------------------------------- */

.section {
  margin-top: 28px;
}

.section__title {
  margin: 0 0 12px;
  padding-left: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section__hint {
  margin: 18px 0 10px;
  padding-left: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Плитки
   -------------------------------------------------------------------------- */

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 96px;
  padding: 18px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background-color .3s ease,
    color .3s ease,
    border-color .3s ease;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0,0,0,.28);
  background: var(--surface-2);
}

.tile:active { transform: scale(.98); }

.tile__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--accent);
  transition: background-color .3s ease, color .3s ease;
}

.tile__icon .icon {
  width: 22px;
  height: 22px;
}

.tile__label {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.tile--soon {
  opacity: .55;
  cursor: default;
  box-shadow: none;
}

.tile--soon:hover {
  transform: none;
  background: var(--surface);
  box-shadow: none;
}

.tile--soon .tile__icon { color: var(--muted); }

.tile__soon {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* --------------------------------------------------------------------------
   Главная кнопка «Меню»
   -------------------------------------------------------------------------- */

.cta {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(249,115,22,.28);
  transition: transform .18s ease, box-shadow .18s ease, background-color .3s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(249,115,22,.36);
}

.cta:active { transform: scale(.99); }

.cta__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(0,0,0,.14);
}

.cta__icon .icon {
  width: 22px;
  height: 22px;
}

.cta__label { flex: 1; }

.cta__arrow {
  width: 22px;
  height: 22px;
  transition: transform .2s ease;
}

.cta:hover .cta__arrow { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Кнопка «Позвонить»
   -------------------------------------------------------------------------- */

.call {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background-color .3s ease,
    color .3s ease,
    border-color .3s ease;
}

.call:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
  box-shadow: 0 16px 34px rgba(0,0,0,.28);
}

.call:active { transform: scale(.99); }

.call__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(34,197,94,.14);
  color: var(--ok);
}

.call__icon .icon {
  width: 22px;
  height: 22px;
}

.call__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.call__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.call__number {
  font-size: 17px;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Часы работы
   -------------------------------------------------------------------------- */

.info-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}

.info-row + .info-row {
  border-top: 1px solid var(--border);
}

.info-row__icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.info-row__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-row__main {
  font-size: 15px;
  font-weight: 600;
}

.info-row__sub {
  font-size: 13.5px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Футер
   -------------------------------------------------------------------------- */

.footer {
  margin-top: 36px;
  padding: 22px 8px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.footer p { margin: 0; }

.footer__brand {
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

.footer__addr { margin-top: 2px !important; }

.footer__meta {
  margin-top: 6px !important;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.footer__meta a {
  color: var(--muted);
  text-decoration: none;
}

.footer__meta a:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   Доступность
   -------------------------------------------------------------------------- */

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

.tile:focus-visible,
.cta:focus-visible,
.call:focus-visible,
.theme-toggle:focus-visible {
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Анимации появления
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: reveal .5s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: calc(var(--i, 0) * 50ms);
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Адаптив
   -------------------------------------------------------------------------- */

@media (min-width: 540px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { padding-top: 32px; }
}

@media (max-width: 340px) {
  .tile { min-height: 88px; padding: 14px 8px; }
  .tile__label { font-size: 14px; }
}

/* --------------------------------------------------------------------------
   Уменьшение движения
   -------------------------------------------------------------------------- */

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

  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .status.is-open .status__dot { animation: none; box-shadow: none; }
  .tile:hover,
  .cta:hover,
  .call:hover { transform: none; }
}
