/* Райський смак. Look: the approved mock «C · Тепла кухня» (solid orange, Nunito headings, Rubik body, no emoji). */
:root {
  --orange: #ff8a2b;      /* every orange surface, solid */
  --o4: #c2410c;          /* filled controls with white text: 5.2:1 */
  --ink: #4a2208;         /* text on white and off-white */
  --deep: #2e1404;        /* text straight on orange: 7.3:1 */
  --muted: #7a4a22;
  --bg: #fff8f1;
  --line: #ffe0c2;
  --r: 34px;
  --rc: 28px;             /* cards and photos */
  --shadow: 0 10px 30px rgba(120, 40, 0, .18);
  --pill-shadow: 0 6px 18px rgba(120, 40, 0, .18);
  --head: Nunito, "Nunito fallback", Rubik, system-ui, sans-serif;
  --bar: 68px;
}

/* Arial Black sized to Nunito 900 (measured: 89 % of its width) with Nunito's ascent and descent, so a heading keeps its lines while Nunito is on its way. */
@font-face { font-family: "Nunito fallback"; src: local("Arial Black"); font-weight: 800 900; size-adjust: 89%; ascent-override: 101%; descent-override: 35%; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-bottom: calc(var(--bar) + 60px); }
body {
  margin: 0;
  font: 400 17px/1.5 Rubik, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom));
}
body.has-cart { padding-bottom: calc(var(--bar) + 48px + env(safe-area-inset-bottom)); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
b { font-weight: 700; }
:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
section, footer { padding: 32px 0; scroll-margin-top: 8px; }
/* Not after a hidden one: with «Скоро» empty, «Як отримати» comes straight after the orange order block and needs its own space. */
section.light:not([hidden]) + section.light { padding-top: 0; }

.orange { background: var(--orange); color: var(--deep); }

h1, h2 { font-family: var(--head); font-weight: 900; }
h1 { font-size: 38px; line-height: 44px; text-align: center; }
h2 { font-size: 30px; line-height: 36px; margin-bottom: 16px; }
#soon h2, #delivery h2 { font-size: 26px; line-height: 32px; margin-bottom: 12px; }
.orange h2 { text-align: center; }
.card + h2 { margin-top: 28px; }

/* Hero */
.hero { padding: 28px 0 30px; border-radius: 0 0 var(--r) var(--r); text-align: center; }
.lead { font-size: 19px; font-weight: 500; line-height: 26px; margin-top: 8px; }
.hero .lead { max-width: 30ch; margin-left: auto; margin-right: auto; text-wrap: balance; }
.photo img { width: 100%; background: var(--line); }
.hero-photo { margin-top: 18px; position: relative; }
.hero-photo img { border-radius: var(--rc); box-shadow: 0 10px 30px rgba(120, 40, 0, .25); aspect-ratio: 16 / 9; object-fit: cover; }
/* The changing picture (app.js): the next one is laid over the first in the same box, only its opacity moves. */
.hero-photo .next { position: absolute; top: 0; left: 0; height: 100%; box-shadow: none; opacity: 0; transition: opacity .6s ease-in-out; }
.hero-photo .next.on { opacity: 1; }

.phone {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  max-width: 440px; margin: 14px auto 0; min-height: 60px; padding: 8px 18px;
  background: #fff; color: var(--o4); border-radius: 60px; box-shadow: var(--pill-shadow);
  font: 900 24px/1.2 var(--head); text-decoration: none; white-space: nowrap;
}

/* White pills: every contact button; the three messengers stand in one row */
.pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.pill {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 52px; padding: 6px 8px;
  background: #fff; color: var(--ink); border: 0; border-radius: 60px; box-shadow: var(--pill-shadow);
  font: 700 15px/1.2 Rubik, system-ui, sans-serif; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pill, .phone, .step button { transition: transform .12s ease-out; }
.pill:active, .phone:active, .bar-row a:active, .step button:active { transform: scale(.97); }
.pill.go { margin-top: 10px; min-height: 56px; background: var(--deep); color: #fff; box-shadow: none; font-size: 17px; }
.pill.small { min-height: 48px; display: inline-flex; padding: 8px 18px; box-shadow: none; background: var(--bg); border: 2px solid var(--line); }
.ic { flex: none; width: 26px; height: 26px; font-size: 22px; line-height: 26px; text-align: center; }
.pills .ic { width: 20px; height: 20px; }
.ic.viber { fill: #7360f2; }
.ic.whatsapp { fill: #1faf54; }
.ic.telegram { fill: #1f9bd8; }
.ic.tel { fill: var(--o4); }
.nojs, .load-error { margin-top: 14px; font-weight: 500; }

/* Everything below the hero is drawn from data.json; it appears in one piece, so nothing jumps. */
#rest { display: none; }
.ready #rest { display: block; }

/* Catalogue */
#catalog h2 { margin-bottom: 8px; }
.sub { color: var(--muted); font-size: 16px; line-height: 23px; }
.sub b { color: var(--ink); display: inline-block; }
.deal { background: var(--line); color: var(--ink); font-size: 16px; font-weight: 500; line-height: 22px; text-wrap: pretty; padding: 12px 16px; border-radius: 18px; margin-top: 12px; }
.deal.banner { margin-top: 8px; }
.cards { display: grid; gap: 16px; margin-top: 22px; }
.cards > * { min-width: 0; }
.cards > .group { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 10px 0 -4px; font: 800 20px/26px var(--head); }
.cards > .group::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.cards > .group:first-child { margin-top: 0; }
.card { background: #fff; color: var(--ink); border-radius: var(--rc); box-shadow: 0 10px 30px rgba(120, 40, 0, .10); }
.product, .soon { overflow: hidden; }
.light .product { box-shadow: 0 10px 30px rgba(120, 40, 0, .14); }
.product .photo img, .soon .photo img { aspect-ratio: 16 / 9; object-fit: cover; }
.product > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 8px; padding: 16px; }
.card h3 { flex: 1 0 100%; font: 800 20px/26px var(--head); }
.price { font-size: 15px; color: var(--muted); white-space: nowrap; }
.buy { display: flex; flex-direction: column; }
.price b { font: 900 28px/32px var(--head); color: var(--o4); }
.step { display: flex; align-items: center; gap: 6px; padding: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 60px; }
.step button {
  width: 44px; height: 44px; border-radius: 50%; flex: none; cursor: pointer;
  font: 400 24px/1 Rubik, system-ui, sans-serif; padding: 0 0 2px;
  border: 0; background: var(--o4); color: #fff;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.step button:disabled { background: var(--line); color: var(--muted); cursor: default; }
.step output { min-width: 54px; text-align: center; font-size: 16px; font-weight: 700; white-space: nowrap; }
.step button:disabled + output { color: var(--muted); font-weight: 400; }
.line-sum { font-size: 15px; font-weight: 700; line-height: 20px; white-space: nowrap; }
.line-sum:empty { display: none; }

.product.out .photo img { filter: grayscale(.7); opacity: .7; }
.product.out .price b { color: var(--muted); }
.out-note { flex: 1 0 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px; color: var(--ink); font-weight: 700; }

/* Soon */
.cards.two { grid-template-columns: 1fr 1fr; gap: 12px; }
.soon { position: relative; }
.soon h3 { padding: 10px 14px 14px; font-size: 18px; line-height: 24px; color: var(--muted); }
.badge { position: absolute; top: 12px; left: 12px; background: #fff; color: var(--ink); font-weight: 700; font-size: 14px; padding: 5px 12px; border-radius: 40px; }

/* Order */
#order { border-radius: var(--r); }
.order-card { padding: 20px; box-shadow: 0 10px 30px rgba(120, 40, 0, .2); }
.empty { font-size: 18px; text-align: center; padding: 6px 0 4px; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 22px; }
.lines li span:last-child { white-space: nowrap; font-weight: 700; }
.lines small { display: block; color: var(--muted); font-size: 15px; }
.totals { margin-top: 10px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.totals dd { font-weight: 700; white-space: nowrap; }
.totals .pay { flex-wrap: wrap; align-items: baseline; margin-top: 4px; }
.totals .pay dt { white-space: nowrap; }
.totals .pay dd { margin-left: auto; color: var(--o4); font: 900 34px/40px var(--head); }
.hint { margin-top: 10px; background: var(--bg); border-radius: 14px; padding: 8px 14px; font-size: 15px; line-height: 20px; }
.order-pills { margin-top: 14px; }
.order-pills .pill { flex-direction: column; gap: 3px; min-height: 64px; padding: 6px 2px; box-shadow: none; background: var(--bg); border: 2px solid var(--line); border-radius: 22px; font-size: 14px; }
.order-pills .primary { grid-column: 1 / -1; flex-direction: row; gap: 10px; min-height: 56px; padding: 8px 14px; border: 0; border-radius: 60px; background: var(--o4); color: #fff; font-size: 18px; }
.order-pills .primary .ic { width: 24px; height: 24px; fill: #fff; }
/* The order form: only with "order_form": true in data.json (app.js) */
.order-form { position: relative; display: grid; gap: 14px; margin-top: 14px; }
.field { display: grid; gap: 4px; font-size: 15px; font-weight: 500; line-height: 20px; }
.field input, .field textarea {
  width: 100%; height: 50px; padding: 0 16px; border: 2px solid var(--line); border-radius: 16px;
  background: var(--bg); color: var(--ink); font: 400 17px/1.3 Rubik, system-ui, sans-serif;
}
.field textarea { height: auto; min-height: 72px; padding: 12px 16px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--o4); }
.how { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.how legend { padding: 0; margin-bottom: 4px; font-size: 15px; font-weight: 500; line-height: 20px; }
.how label { display: flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--bg); font-size: 16px; cursor: pointer; }
.how label:has(input:checked) { border-color: var(--o4); font-weight: 500; }
.how input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--o4); }
.order-form .pill { min-height: 58px; box-shadow: none; background: var(--o4); color: #fff; font-size: 18px; }
.order-form .pill:disabled { opacity: .6; cursor: default; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg, .sent { background: var(--line); border-radius: 14px; padding: 8px 14px; font-weight: 500; }
.sent { margin-top: 14px; padding: 12px 14px; font-weight: 700; text-align: center; }
.order-text { margin-top: 14px; }
.order-text summary { cursor: pointer; font-weight: 500; text-decoration: underline; min-height: 44px; display: flex; align-items: center; }
.order-text p { white-space: pre-wrap; background: var(--bg); border-radius: 16px; padding: 12px 14px; margin: 4px 0 10px; font-size: 16px; }
.fine { font-size: 14px; line-height: 20px; margin-top: 12px; }
.fine a { color: inherit; font-weight: 700; }
.card .fine { color: var(--muted); font-size: 13px; line-height: 19px; margin-top: 14px; }

/* Delivery and steps */
.plain, .steps { display: grid; padding: 18px; }
.plain { gap: 8px; }
.cook { gap: 10px; }
.plain li { display: flex; gap: 12px; }
.plain li::before { content: ''; flex: none; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--orange); }
.steps { gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 12px; }
.steps li::before {
  content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--o4); color: #fff; font: 900 16px/30px var(--head); text-align: center;
}

footer { text-align: center; border-radius: var(--r) var(--r) 0 0; padding-top: 28px; }
footer h2 { margin-bottom: 0; font-size: 32px; line-height: 40px; }

/* Bottom bar: phones only */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: #fff; box-shadow: 0 -6px 20px rgba(120, 40, 0, .16);
  padding-bottom: env(safe-area-inset-bottom);
}
.bar-row { display: grid; grid-template-columns: repeat(4, 1fr); height: var(--bar); }
.bar-row a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 13px; font-weight: 700; line-height: 1.1; text-decoration: none; color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.bar-cart {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 10px; height: 48px; padding: 0 12px;
  background: var(--deep); color: #fff; font-weight: 700; font-size: 16px; line-height: 48px; text-decoration: none; white-space: nowrap;
  overflow: hidden;   /* the hint that does not fit wraps to a second line and is cut off whole */
}
.bar-cart #bar-sum::after { content: ' ↓'; }
.past-order .bar-cart #bar-sum::after { content: ' ↑'; }
.bar-cart .next { font-weight: 500; font-size: 13px; color: #ffd9b0; }
.at-order .bar-cart { display: none; }

.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--bar) + 60px + env(safe-area-inset-bottom)); z-index: 20;
  max-width: 440px; margin: 0 auto; padding: 14px 18px; border-radius: 20px;
  background: var(--deep); color: #fff; font-weight: 500; text-align: center; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease-out, transform .2s ease-out, visibility 0s .2s;
}
.toast.show { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

/* Wider than a phone: the photo stands beside the name and the price instead of above them. */
@media (min-width: 600px) {
  .product { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .product .photo img { height: 100%; }
  .product > div { align-content: center; padding: 20px 22px; }
  .product h3 { font-size: 22px; line-height: 28px; }
}

@media (min-width: 768px) {
  body, body.has-cart { padding-bottom: 0; }
  .bar { display: none; }
  .hero { padding: 44px 0 48px; }
  h1 { font-size: 56px; line-height: 64px; }
  .hero .lead { max-width: none; font-size: 22px; line-height: 30px; }
  h2 { font-size: 36px; line-height: 42px; }
  #soon h2, #delivery h2 { font-size: 30px; line-height: 36px; }
  .phone { font-size: 28px; }
  .pills .pill { font-size: 17px; }
  .pills .ic { width: 24px; height: 24px; }
  .order-pills .pill { font-size: 15px; }
  section, footer { padding: 52px 0; }
  .toast { bottom: 28px; }
}

@media (hover: hover) and (pointer: fine) {
  .pill:hover, .phone:hover { transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .pill:hover, .phone:hover, .pill:active, .phone:active, .bar-row a:active, .step button:active { transform: none; }
}
