/* Munisa milliy taomlar — страница как бумажный чек и меню чайханы.
   Две краски, как в дешёвой типографии: тёмно-красная на серой бумаге. */

:root {
  --bg: #e2e2e2;
  --surface: #d6d6d6;
  --surface-2: #cbcbcb;
  --ink: #7d0c14;
  --muted: #7a4a4e;
  --accent: #7d0c14;
  --accent-deep: #5e0910;
  --accent-ink: #f1f1f1;
  --night: #2a1416;

  --font: "Bitter", "Rockwell", Georgia, serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1.02rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.25rem, 1.3rem + 3.4vw, 4.25rem);

  --gutter: clamp(16px, 2.4vw, 36px);
  --section: clamp(110px, 13vw, 220px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.5; overflow-x: clip; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, fieldset { margin: 0; padding: 0; }
ul { list-style: none; }
p { max-width: 58ch; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--ink); color: var(--accent-ink); padding: 10px 16px; z-index: 50; }
.skip:focus { top: 8px; }
h2 { font-size: var(--step-head); font-weight: 700; letter-spacing: -0.025em; line-height: 1; text-wrap: balance; }

/* ---------- кнопки: сплошной прямоугольник, как штамп ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 0;
  font: 600 var(--step-body)/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--accent-deep); } }
.btn-block { width: 100%; }
.link { font-weight: 500; text-underline-offset: 4px; }

/* ---------- первый экран ---------- */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 48px var(--gutter); overflow: hidden; background: var(--night); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; filter: brightness(0.62) saturate(0.85); transform: scale(1.06); animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.0) translateY(-1.5%); } }
.hero-card {
  position: relative; width: min(100%, 820px); min-height: min(64svh, 620px);
  background: var(--bg); color: var(--ink); padding: clamp(24px, 3.4vw, 44px);
  display: grid; grid-template-rows: auto 1fr auto; gap: 32px;
  /* нижний край чека — зубцы */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), 97.5% 100%, 95% calc(100% - 12px), 92.5% 100%, 90% calc(100% - 12px), 87.5% 100%, 85% calc(100% - 12px), 82.5% 100%, 80% calc(100% - 12px), 77.5% 100%, 75% calc(100% - 12px), 72.5% 100%, 70% calc(100% - 12px), 67.5% 100%, 65% calc(100% - 12px), 62.5% 100%, 60% calc(100% - 12px), 57.5% 100%, 55% calc(100% - 12px), 52.5% 100%, 50% calc(100% - 12px), 47.5% 100%, 45% calc(100% - 12px), 42.5% 100%, 40% calc(100% - 12px), 37.5% 100%, 35% calc(100% - 12px), 32.5% 100%, 30% calc(100% - 12px), 27.5% 100%, 25% calc(100% - 12px), 22.5% 100%, 20% calc(100% - 12px), 17.5% 100%, 15% calc(100% - 12px), 12.5% 100%, 10% calc(100% - 12px), 7.5% 100%, 5% calc(100% - 12px), 2.5% 100%, 0 calc(100% - 12px));
  padding-bottom: calc(clamp(24px, 3.4vw, 44px) + 12px);
  animation: card-in 900ms var(--ease-out) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(28px); } }
.hero-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: clamp(2.25rem, 1rem + 4.2vw, 4.75rem); font-weight: 800; letter-spacing: -0.03em; line-height: 0.95; }
.hero-title span:nth-child(2) { font-weight: 500; font-style: normal; }
.hero-mid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-content: center; }
.hero-facts { font-size: var(--step-lead); font-weight: 600; line-height: 1.4; }
.hero-lead { max-width: 32ch; }
.hero-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.hero-credit { font-size: var(--step-small); color: var(--muted); }
.hero-foot .link { justify-self: end; }

/* ---------- меню и чек ---------- */
.menu { padding: var(--section) var(--gutter) 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: clamp(32px, 5vw, 80px); align-items: start; max-width: 1360px; margin: 0 auto; }
.menu-col { container-type: inline-size; min-width: 0; }
.giant { font-size: 31cqw; font-weight: 800; letter-spacing: -0.04em; line-height: 0.8; margin-left: -0.04em; }
.menu-intro { margin-top: 24px; font-size: var(--step-lead); max-width: 40ch; }
.bars { margin-top: 40px; display: flex; flex-direction: column; gap: 6px; }
.bar { background: var(--surface); }
.bar summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; min-height: 60px; padding: 0 20px;
  font-weight: 600; font-size: var(--step-lead);
  transition: background-color 200ms ease;
}
.bar summary::-webkit-details-marker { display: none; }
.bar summary .count { margin-left: auto; font-size: var(--step-small); font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar summary .plus { width: 28px; height: 28px; display: grid; place-items: center; background: var(--ink); color: var(--accent-ink); font-size: 20px; line-height: 1; transition: transform 220ms var(--ease-out); flex: none; }
.bar[open] summary .plus { transform: rotate(45deg); }
@media (hover: hover) and (pointer: fine) { .bar summary:hover { background: var(--surface-2); } }
.panel { padding: 4px 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.panel-pic { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; filter: saturate(0.85); margin-bottom: 8px; }
.panel-note { font-size: var(--step-small); color: var(--muted); }
.dish { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 14px; align-items: center; }
.dish-name { font-weight: 600; }
.dish-desc { grid-column: 1; font-size: 0.95rem; color: var(--muted); max-width: 46ch; }
.dish-price { font-variant-numeric: tabular-nums; white-space: nowrap; grid-row: 1; grid-column: 2; }
.dish-ctl { grid-row: 1 / span 2; grid-column: 3; display: flex; align-items: center; }
.add {
  width: 44px; height: 44px; border: 0; border-radius: 0; background: var(--ink); color: var(--accent-ink);
  font: 500 1.4rem/1 var(--font); cursor: pointer; transition: transform 140ms var(--ease-out), background-color 200ms ease;
}
.add:active { transform: scale(0.92); }
@media (hover: hover) and (pointer: fine) { .add:hover { background: var(--accent-deep); } }
.qty { display: inline-flex; align-items: center; background: var(--ink); color: var(--accent-ink); }
.qty button { width: 40px; height: 44px; border: 0; background: transparent; color: inherit; font: 500 1.25rem/1 var(--font); cursor: pointer; transition: transform 120ms var(--ease-out); }
.qty button:active { transform: scale(0.88); }
.qty output { min-width: 2ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.menu-note { margin-top: 32px; font-size: var(--step-small); color: var(--muted); }

/* чек: держится на экране, пока листаешь меню */
.receipt-wrap { position: sticky; top: 16px; }
.receipt {
  background: #f1f1f1; color: var(--ink); padding: 28px 26px 40px; display: flex; flex-direction: column; gap: 18px;
  max-height: calc(100svh - 32px); overflow-y: auto; overscroll-behavior: contain;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 95% 100%, 90% calc(100% - 10px), 85% 100%, 80% calc(100% - 10px), 75% 100%, 70% calc(100% - 10px), 65% 100%, 60% calc(100% - 10px), 55% 100%, 50% calc(100% - 10px), 45% 100%, 40% calc(100% - 10px), 35% 100%, 30% calc(100% - 10px), 25% 100%, 20% calc(100% - 10px), 15% 100%, 10% calc(100% - 10px), 5% 100%, 0 calc(100% - 10px));
}
.r-head { text-align: center; display: flex; flex-direction: column; gap: 4px; padding-bottom: 14px; border-bottom: 5px dotted var(--surface-2); }
.r-head h2 { font-size: var(--step-lead); letter-spacing: 0; }
.r-meta { font-size: var(--step-small); color: var(--muted); margin: 0 auto; font-variant-numeric: tabular-nums; }
.r-lines { display: flex; flex-direction: column; gap: 10px; }
.r-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; animation: print 360ms var(--ease-out); }
@keyframes print { from { opacity: 0; transform: translateY(-8px); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.r-lines .l-name { font-weight: 600; }
.r-lines .l-sum { font-variant-numeric: tabular-nums; text-align: right; }
.r-lines .l-meta { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.r-lines .l-meta button { width: 30px; height: 30px; border: 0; background: var(--surface); color: var(--ink); font: 600 1rem/1 var(--font); cursor: pointer; transition: transform 120ms var(--ease-out); }
.r-lines .l-meta button:active { transform: scale(0.9); }
.r-empty { color: var(--muted); font-style: italic; }
.r-sum { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 5px dotted var(--surface-2); font-variant-numeric: tabular-nums; }
.r-sum p { display: flex; align-items: baseline; gap: 8px; max-width: none; }
.r-sum .dots { flex: 1; border-bottom: 4px dotted var(--surface-2); transform: translateY(-4px); }
.r-total { font-size: var(--step-lead); }
.r-total b { font-weight: 800; }
.r-block { border: 0; display: flex; flex-direction: column; gap: 8px; }
.r-block legend { font-weight: 600; margin-bottom: 8px; }
.branches, .seg { display: flex; flex-wrap: wrap; gap: 6px; }
.branches label, .seg label { position: relative; flex: 1 1 auto; cursor: pointer; }
.branches input, .seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.branches span, .seg span { display: grid; place-items: center; min-height: 44px; padding: 0 12px; background: var(--surface); font-weight: 500; font-size: 0.95rem; text-align: center; transition: background-color 180ms ease, color 180ms ease; }
.branches input:checked + span, .seg input:checked + span { background: var(--ink); color: var(--accent-ink); }
.branches input:focus-visible + span, .seg input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.r-fields { display: flex; flex-direction: column; gap: 8px; }
.r-fields input { width: 100%; height: 50px; padding: 0 14px; border: 2px solid transparent; border-radius: 0; background: var(--surface); color: var(--ink); font: 400 1rem/1 var(--font); transition: border-color 160ms ease; }
.r-fields input::placeholder { color: var(--muted); }
.r-fields input:focus { outline: none; border-color: var(--ink); }
.r-fields input[aria-invalid="true"] { border-color: var(--ink); background: #ead2d3; }
[data-address-field][hidden] { display: none; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; } /* taste-skill-ignore: hidden spam trap, not a rule */
.btn[disabled] { opacity: 0.6; cursor: progress; }
.r-msg { min-height: 1.5em; font-weight: 600; }
.r-msg.ok { font-size: var(--step-lead); }

/* ---------- письмо ---------- */
.letter-sec { margin-top: var(--section); background: var(--accent); padding: var(--section) var(--gutter); }
.letter {
  max-width: 680px; margin: 0 auto; background: var(--bg); padding: clamp(28px, 5vw, 60px); display: flex; flex-direction: column; gap: 22px;
}
.letter-pic { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; filter: saturate(0.85); }
.letter p { font-size: var(--step-body); line-height: 1.6; }
.letter-sign { font-style: italic; font-size: var(--step-lead); line-height: 1.4; }
.letter-sign small { font-size: var(--step-small); color: var(--muted); font-style: normal; }
.tear { margin: 12px calc(-1 * clamp(28px, 5vw, 60px)) calc(-1 * clamp(28px, 5vw, 60px)); padding: 22px clamp(28px, 5vw, 60px); border-top: 5px dotted var(--accent); background: var(--surface); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.tear b { font-size: var(--step-lead); font-variant-numeric: tabular-nums; user-select: all; }

/* ---------- как приходит заказ ---------- */
.how { padding: var(--section) var(--gutter) 0; max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.how-text { display: flex; flex-direction: column; gap: 24px; }
.how-video video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface); }
.cap { margin-top: 8px; font-size: var(--step-small); color: var(--muted); }
.slip {
  background: #f1f1f1; padding: 32px 30px 48px; max-width: 520px; width: 100%; justify-self: end; font-variant-numeric: tabular-nums;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), 95% 100%, 90% calc(100% - 12px), 85% 100%, 80% calc(100% - 12px), 75% 100%, 70% calc(100% - 12px), 65% 100%, 60% calc(100% - 12px), 55% 100%, 50% calc(100% - 12px), 45% 100%, 40% calc(100% - 12px), 35% 100%, 30% calc(100% - 12px), 25% 100%, 20% calc(100% - 12px), 15% 100%, 10% calc(100% - 12px), 5% 100%, 0 calc(100% - 12px));
}
.slip h3 { font-size: var(--step-body); font-weight: 700; margin: 28px 0 10px; }
.slip h3:first-child { margin-top: 0; }
.slip .row { display: flex; align-items: baseline; gap: 8px; max-width: none; margin: 6px 0; }
.slip .row i { flex: 1; border-bottom: 4px dotted var(--surface-2); transform: translateY(-4px); min-width: 16px; }
.slip .row b { font-weight: 600; white-space: nowrap; }
.slip .row-total { margin-top: 28px; background: var(--ink); color: var(--accent-ink); padding: 12px 14px; justify-content: space-between; }

/* ---------- кафе ---------- */
.cafes { position: relative; margin-top: var(--section); min-height: 100svh; padding: 60px var(--gutter); display: flex; justify-content: flex-end; align-items: flex-start; overflow: hidden; background: var(--night); }
.cafes-bg { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; filter: saturate(0.85); }
.visit { position: relative; width: min(100%, 420px); background: var(--bg); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.visit h2 { font-size: clamp(2rem, 1.4rem + 1.8vw, 2.75rem); }
.branch-list { display: flex; flex-direction: column; gap: 14px; }
.branch-list b { display: block; }
.branch-list span { font-size: 0.95rem; color: var(--muted); }
.visit-row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; max-width: none; }

/* ---------- обратная сторона ---------- */
.back { padding: var(--section) var(--gutter) 40px; background: var(--accent); }
.back-card {
  max-width: 1180px; margin: 0 auto; background: var(--bg); padding: 64px clamp(24px, 5vw, 64px) 28px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px 64px;
  -webkit-mask: radial-gradient(circle 24px at 50% 0, #0000 98%, #000) 0 0 / 96px 100% repeat-x; /* taste-skill-ignore: scalloped postcard edge, not a visible gradient */
          mask: radial-gradient(circle 24px at 50% 0, #0000 98%, #000) 0 0 / 96px 100% repeat-x; /* taste-skill-ignore: scalloped postcard edge, not a visible gradient */
}
.back-msg { display: flex; flex-direction: column; gap: 16px; }
.back-sign { font-size: clamp(2rem, 1.4rem + 1.8vw, 2.75rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.back-nav { display: flex; gap: 24px; font-weight: 500; }
.back-nav a { text-underline-offset: 4px; }
.back-addr { position: relative; display: flex; flex-direction: column; gap: 12px; font-size: var(--step-lead); padding-right: 110px; }
.back-addr a { text-underline-offset: 4px; }
.stamp { position: absolute; top: 0; right: 0; width: 88px; aspect-ratio: 3 / 4; object-fit: cover; outline: 6px solid #f1f1f1; outline-offset: -6px; }
.imprint { grid-column: 1 / -1; text-align: center; font-size: var(--step-small); color: var(--muted); max-width: 70ch; margin: 24px auto 0; }

/* ---------- плашка чека на телефоне ---------- */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; display: none; justify-content: space-between; align-items: center;
  min-height: 56px; padding: 0 22px; background: var(--ink); color: var(--accent-ink); text-decoration: none; font-weight: 600;
  box-shadow: 0 10px 30px rgba(60, 6, 10, 0.35); /* taste-skill-ignore: floating cart bar */
  transition: transform 260ms var(--ease-out), opacity 200ms ease;
}
.dock[hidden] { display: none !important; }
.dock.away { transform: translateY(140%); opacity: 0; }

/* ---------- появление ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-bg, .hero-card, .r-lines li { animation: none; }
  .js .reveal { transform: none; transition: opacity 300ms ease; }
}

/* ---------- планшет и телефон ---------- */
@media (max-width: 960px) {
  .menu { grid-template-columns: minmax(0, 1fr); }
  .receipt-wrap { position: static; }
  .receipt { max-height: none; }
  .how { grid-template-columns: minmax(0, 1fr); }
  .slip { justify-self: stretch; max-width: none; }
  .dock { display: flex; }
}
@media (max-width: 640px) {
  .hero { padding: 16px; }
  .hero-card { min-height: 78svh; }
  .hero-title { flex-wrap: wrap; font-size: 12.5vw; gap: 0 12px; justify-content: flex-start; }
  .hero-mid { grid-template-columns: 1fr; gap: 18px; }
  .hero-foot { grid-template-columns: 1fr; justify-items: stretch; gap: 12px; }
  .hero-foot .link { justify-self: start; }
  .hero-credit { order: 3; }
  .dish { grid-template-columns: minmax(0, 1fr) auto; }
  .dish-price { grid-column: 1; grid-row: auto; }
  .dish-ctl { grid-column: 2; grid-row: 1 / span 3; }
  .panel { padding: 4px 14px 20px; }
  .bar summary { padding: 0 14px; }
  .cafes { min-height: 0; flex-direction: column; padding: 0; }
  .cafes-bg { position: static; height: 70svh !important; }
  .visit { width: auto; margin: -80px 16px 0; }
  .back { padding-inline: 0; }
  .back-card { grid-template-columns: 1fr; padding-top: 56px; -webkit-mask-size: 64px 100%; mask-size: 64px 100%; }
  .back-addr { font-size: var(--step-body); padding-right: 80px; }
  .stamp { width: 64px; }
}
