/* Inside Lounge — mobile-first demo menu */
:root {
  --bg: #050505;
  --bg-elev: #121212;
  --bg-card: #0e0e0e;
  --chips-h: 56px;
  --line: rgba(255,255,255,0.12);
  --line-strong: rgba(255,255,255,0.22);
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --accent: #c9a66b;
  --accent-soft: rgba(201,166,107,0.18);
  --danger: #e8e8e8;
  --radius: 18px;
  --nav-h: 58px;
  --chips-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --shadow: 0 12px 40px rgba(0,0,0,0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }

.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 8px; top: 8px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  background: rgba(5,5,5,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
}
.brand img {
  width: 36px; height: 36px; border-radius: 50%;
  background: #111; object-fit: cover;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  font-weight: 700; letter-spacing: 0.12em;
  font-size: 13px; text-transform: uppercase;
}
.brand-sub { font-size: 11px; color: var(--muted); }
.demo-badge {
  flex-shrink: 0;
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Hero */
.hero {
  position: relative;
  padding: 28px 16px 22px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5,5,5,0.35), rgba(5,5,5,0.92)),
    url("assets/brand/hero-bg.jpg") center/cover no-repeat;
  opacity: 0.55;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.hero-brand {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
.hero-brand img:first-child {
  width: 52px; height: 52px; border-radius: 50%;
  background: #111; object-fit: cover;
  border: 1px solid rgba(255,255,255,0.15);
}
.hero-logo {
  margin-bottom: 0 !important;
}
.hero-logo {
  width: min(220px, 70vw);
  height: auto;
  margin-bottom: 18px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6));
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 6.2vw, 2.35rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero h1 span { color: var(--accent); }
.hero p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  max-width: 36ch;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.pill {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

/* Sticky category chips */
.chips-wrap {
  position: sticky;
  top: var(--nav-h);
  z-index: 35;
  background: rgba(5,5,5,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 10px 14px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.chip.is-active {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.chip:focus-visible, .card:focus-visible, .modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Main */
main { padding: 8px 12px 48px; }
.category {
  padding-top: 18px;
  margin-bottom: 8px;
  scroll-margin-top: calc(var(--nav-h) + var(--chips-h) + 8px);
}
.category-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 12px;
}
.category-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.category-head .count {
  color: var(--muted);
  font-size: 13px;
}

/* Dish grid — big cards on mobile */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  min-height: 0;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03);
  transition: transform .15s ease, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.card:active { transform: scale(0.985); }
.card-photo {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  /* padding-top keeps ratio even inside flex (aspect-ratio alone collapsed to 0) */
  padding-top: 75%; /* 4:3 */
  background: #1a1a1a;
  overflow: hidden;
}
.card-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}
.card-photo .hint {
  position: absolute; right: 10px; top: 10px;
  font-size: 11px; font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--line-strong);
  color: #fff;
  z-index: 2;
}

.card-body {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px 16px 18px;
  flex: 1;
  text-align: center;
  align-items: center;
}
.card-name {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-align: center;
}
.card-row {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: auto;
  width: 100%;
}
.card-weight { color: var(--muted); font-size: 13px; }
.card-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
}

/* Footer */
.footer {
  padding: 28px 16px calc(28px + var(--safe-b));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.footer strong { color: var(--text); }
.footer a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(201,166,107,0.35); }
.footer p { margin: 0 0 8px; }

/* Modal — full-screen, centered, no bleed-through */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: none;
}
.modal.is-open { display: block; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: #000;
  opacity: 0.92;
}
.modal-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  top: 0;
  background: #0a0a0a;
  border-radius: 0;
  border: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: none;
  animation: slideUp .28s ease;
  isolation: isolate;
}
@keyframes slideUp {
  from { transform: translateY(18px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-grab {
  flex: 0 0 auto;
  display: flex; justify-content: center;
  padding: 10px 0 2px;
  background: #0a0a0a;
  position: relative;
  z-index: 3;
}
.modal-grab span {
  width: 42px; height: 4px; border-radius: 999px;
  background: rgba(255,255,255,0.25);
}
.modal-close {
  position: absolute; top: max(10px, env(safe-area-inset-top)); right: 12px; z-index: 5;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.72);
  border: 1px solid var(--line-strong);
  font-size: 22px; line-height: 1;
  display: grid; place-items: center;
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-media {
  flex: 0 0 auto;
  width: 100%;
  height: min(42vh, 360px);
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  background: #111;
}
.modal-content {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 20px calc(32px + var(--safe-b));
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #0a0a0a;
  position: relative;
  z-index: 2;
}
.modal-kicker {
  font-size: 12px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.14em;
  font-weight: 700; margin: 0 0 10px;
  width: 100%;
}
.modal-title {
  margin: 0 0 14px;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 750;
  max-width: 20ch;
  text-wrap: balance;
}
.modal-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 16px;
  justify-content: center;
  align-items: center;
}
.modal-price {
  font-size: 1.4rem; font-weight: 800; color: var(--accent);
  letter-spacing: 0.02em;
}
.modal-weight {
  font-size: 14px; color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.modal-blurb {
  margin: 0 0 20px;
  color: #d4d4d4;
  font-size: 15px;
  line-height: 1.5;
  max-width: 34ch;
}
.modal-sostav {
  width: 100%;
  max-width: 420px;
}
.modal-sostav h3 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.modal-sostav p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  text-align: center;
}
body.modal-open { overflow: hidden; }

/* Desktop polish (secondary) */
@media (min-width: 720px) {
  .hero { padding: 48px 28px 36px; }
  main { padding: 12px 24px 64px; max-width: 1100px; margin: 0 auto; }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .card-photo { padding-top: 100%; }
  .chips { padding-left: 24px; padding-right: 24px; }
  .topbar { padding: 0 24px; }
  .modal-sheet {
    left: 50%; top: 50%; bottom: auto; right: auto;
    width: min(520px, 92vw);
    max-height: min(880px, 92vh);
    transform: translate(-50%, -50%);
    border-radius: 22px;
    border: 1px solid var(--line);
    animation: fadeIn .2s ease;
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -48%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
  }
  .modal-media {
    height: 280px;
    max-height: none;
    border-radius: 22px 22px 0 0;
  }
  .modal-grab { display: none; }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

.hero-wordmark {
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
}
.hero-wordmark .door {
  position: relative;
  display: inline-block;
}
.hero-wordmark .door::after {
  content: "";
  position: absolute;
  left: 42%;
  top: 22%;
  width: 28%;
  height: 56%;
  border: 1.5px solid currentColor;
  border-radius: 1px;
  opacity: 0.9;
}


/* === mobile-first hardening (~390) === */
@media (max-width: 719px) {
  .chip { min-height: 44px; padding: 0 18px; font-size: 15px; }
  .card-photo { padding-top: 80%; }
  .card-name { font-size: 1.14rem; }
  .card-price { font-size: 1.2rem; }
  .card-body { padding: 16px 16px 18px; }
  .modal-sheet { top: 0; border-radius: 0; }
  .modal-media { height: min(40vh, 340px); }
  .modal-title { font-size: 1.55rem; }
  .modal-close { width: 48px; height: 48px; font-size: 26px; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 15px; line-height: 1.5; }
  .topbar { height: 56px; }
  .chips-wrap { top: 56px; }
  .category { scroll-margin-top: calc(56px + 56px + 8px); }
}
