@import url("tokens.css");

/* ============================================================
   Barback — menu
   Mobile-first; on tablet/desktop the menu reads as a printed
   "sheet" (light skeuomorphism). No scroll animations.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--espresso);
  background-color: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint warm paper grain — very subtle, fixed overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; }

/* ---------- language toggle (CSS-only) ------------------- */
.lang-input { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
.en { display: none; }
.lang-input:checked ~ * .mk { display: none; }
.lang-input:checked ~ * .en { display: inline; }

.lang {
  display: inline-flex;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  font: 600 12px/1 var(--font-body);
}
.lang-opt { padding: 7px 13px; letter-spacing: 0.08em; color: var(--coffee); transition: background-color .15s, color .15s; }
.lang-opt.is-mk { background: var(--espresso); color: var(--cream); }
.lang-input:checked ~ * .lang-opt.is-mk { background: transparent; color: var(--coffee); }
.lang-input:checked ~ * .lang-opt.is-en { background: var(--espresso); color: var(--cream); }

/* ---------- page + sheet --------------------------------- */
.page { padding: 18px 0 40px; }

.sheet {
  max-width: var(--sheet-max);
  margin: 0 auto;
  padding: 4px var(--space) var(--space);
  position: relative;
}

/* engraved-glass watermark — FIXED, so it follows the scroll; bleeds off the
   bottom-right and is cut off further on the right than before. It's a faint,
   click-through layer. Pure CSS: a scroll-driven animation makes it sink a
   little further out of frame in the last stretch of the page ("at the end"),
   degrading to a plain fixed watermark where scroll timelines aren't supported. */
.glass {
  position: fixed;
  right: -64px;
  bottom: -48px;
  width: clamp(190px, 50vw, 360px);
  aspect-ratio: 421 / 556;
  background: url("/assets/img/glass.png") no-repeat right bottom / contain;
  opacity: 0.06;
  pointer-events: none;
  z-index: 2;
}
@keyframes glass-sink {
  0%, 85% { transform: none; }
  100%    { transform: translate(20px, 66px); }
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .glass {
      animation-name: glass-sink;
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(root block);
    }
  }
}

/* ---------- masthead ------------------------------------- */
.masthead { position: relative; text-align: center; padding: 22px 44px 18px; }
.lang-wrap { position: absolute; top: 14px; right: 0; }
.wordmark { height: clamp(32px, 8vw, 48px); width: auto; margin: 6px auto 0; }
.tagline {
  margin-top: 12px;
  font: 600 11px/1 var(--font-body);
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--coffee);
  padding-left: 0.36em;
}
.ornament { width: 30px; height: 30px; margin: 16px auto 0; opacity: 0.92; }
.note {
  text-align: center;
  font: 400 12px/1.4 var(--font-body);
  color: var(--coffee);
  margin: 8px auto 4px;
}

/* ---------- categories + items --------------------------- */
.cat { margin-top: clamp(30px, 6vw, 46px); }
.cat-title {
  font: 600 clamp(20px, 5vw, 26px)/1.15 var(--font-display);
  color: var(--espresso);
  letter-spacing: 0.01em;
  margin: 0 0 14px;
  display: flex; align-items: center; gap: 14px; justify-content: center;
  text-align: center;
}
.cat-title::before, .cat-title::after {
  content: ""; height: 1px; background: var(--hairline-strong);
  flex: 1 1 auto; max-width: 52px;
}

/* sub-group heading inside a category (e.g. Whiskey / Vodka under "On the Rocks") */
.subcat {
  text-align: center;
  font: 600 12px/1 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coffee);
  margin: 22px 0 6px;
}

.items { list-style: none; margin: 0; padding: 0; }
.item { padding: 8px 0; }
.item-line { display: flex; align-items: baseline; gap: 8px; }
.name { font: 500 15px/1.35 var(--font-body); color: var(--espresso); }
.desc {
  margin: 3px 0 0;
  font: 400 12.5px/1.45 var(--font-body);
  color: var(--coffee);
  max-width: 54ch;
}
.leader {
  flex: 1 1 auto; min-width: 16px;
  border-bottom: 1.5px dotted var(--hairline-strong);
  transform: translateY(-4px);
}
.price {
  font: 500 16px/1 var(--font-body);
  color: var(--burgundy);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.price::after {
  content: " ден"; font-size: 11px; font-weight: 500;
  color: var(--coffee); letter-spacing: 0.02em;
}

/* ---------- opening-night sign-off (opening build only) -- */
.opening-note {
  margin-top: clamp(34px, 7vw, 48px);
  padding-top: 24px;
  text-align: center;
}
.opening-note .thanks {
  font: 500 clamp(15px, 4.4vw, 18px)/1.4 var(--font-display);
  color: var(--espresso);
  margin: 0;
}

/* ---------- colophon / footer ---------------------------- */
.colophon {
  margin-top: clamp(40px, 8vw, 56px);
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
  text-align: center;
}
.seal-foot { width: 64px; height: 64px; margin: 0 auto 18px; }
.contact { display: flex; flex-direction: column; gap: 11px; align-items: center; margin: 0; }
.contact a, .contact span { color: var(--espresso); text-decoration: none; }
.contact .row { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; }
.contact a.row:hover { color: var(--burgundy); }
.contact .ic { width: 17px; height: 17px; flex: none; color: var(--coffee); }
.contact a.row:hover .ic { color: var(--burgundy); }
.ig-link { margin-top: 4px; font-weight: 500; }
.legal { margin-top: 20px; font: 400 11px/1.5 var(--font-body); color: var(--coffee); letter-spacing: 0.02em; }
.legal .copy { display: block; margin-top: 6px; opacity: 0.8; }

/* ---------- tablet / desktop: the menu becomes a sheet --- */
@media (min-width: 760px) {
  .page { padding: 48px 24px 72px; }
  .sheet {
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sheet);
    padding: 52px 64px 60px;
  }
  .sheet::before {
    content: ""; position: absolute; inset: 16px;
    border: 1px solid var(--hairline); border-radius: 8px; pointer-events: none;
  }
  .masthead { padding-top: 8px; }
  .cat-title::before, .cat-title::after { max-width: 80px; }
  /* bigger glass, pushed further off the right edge on wide screens */
  .glass { width: 400px; right: -110px; bottom: -64px; }
}

/* respect reduced-motion: kill smooth scroll */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
