/* «Дворик» — кав'ярня в одеському дворику.
   Перший екран — живе фото кав'ярні на всю ширину (паралакс), далі світлі розділи з орнаментом
   одеської плитки між ними. Кольори: морська бірюза, охра ракушняку, еспресо, білий.
   Шрифти як у сайтів-прикладів: вузький жирний гротеск у заголовках, спокійний — у тексті. */
:root {
  --sea: #155e75;       /* морська синь — кнопки, перший екран */
  --sea-dark: #0c3a49;  /* глибока синь */
  --tile: #2b8fb0;      /* бірюза плитки */
  --ochre: #d9a441;     /* охра ракушняку — акценти */
  --stone: #f1e8d8;     /* світлий ракушняк — підкладки */
  --ink: #23160f;       /* текст — еспресо */
  --muted: #6b5d52;     /* приглушений текст */
  --bg: #ffffff;
  --pale: #eef6f8;      /* ледь блакитний фон розділів */
  --line: #e3e8ea;

  --font-display: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', 'Comic Sans MS', cursive;
  --gap: clamp(14px, 2.6vw, 28px);
  color-scheme: light;

  --tiles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Crect width='48' height='48' fill='%23ffffff'/%3E%3Cpath d='M24 6c4 6 4 12 0 18-4-6-4-12 0-18zm0 36c-4-6-4-12 0-18 4 6 4 12 0 18zM6 24c6-4 12-4 18 0-6 4-12 4-18 0zm36 0c-6 4-12 4-18 0 6-4 12-4 18 0z' fill='%232b8fb0'/%3E%3Ccircle cx='24' cy='24' r='3' fill='%23d9a441'/%3E%3Cpath d='M0 0h9L0 9zM48 0v9l-9-9zM0 48v-9l9 9zM48 48h-9l9-9z' fill='%23155e75'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
body:has(dialog[open]) { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1; letter-spacing: 0.005em; text-transform: uppercase; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
section[id] { scroll-margin-top: 76px; }

.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.kicker { font: 600 0.78rem/1.4 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--tile); }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 52ch; }
.link { color: var(--sea); font-weight: 600; text-underline-offset: 3px; }
.tiles { height: 28px; background: var(--tiles) repeat-x center / 28px 28px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border: 2px solid var(--sea); border-radius: 999px;
  font: 600 0.98rem/1 var(--font-body); text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn--solid { background: var(--sea); color: #fff; }
.btn--solid:hover { background: var(--sea-dark); border-color: var(--sea-dark); }
.btn--outline { background: transparent; color: var(--sea); }
.btn--outline:hover { background: var(--sea); color: #fff; }
.btn--light { background: var(--ochre); border-color: var(--ochre); color: var(--ink); }
.btn--light:hover { background: #fff; border-color: #fff; }

.demo-bar { background: var(--ink); color: #fff; font: 500 0.75rem/1.4 var(--font-body); text-align: center; padding: 8px max(16px, env(safe-area-inset-left, 0px)); }

/* Шапка */
.header { position: sticky; top: 0; z-index: 20; background: rgba(12, 58, 73, .92); backdrop-filter: blur(10px); color: #fff; }
.header__inner { display: flex; align-items: center; gap: var(--gap); min-height: 64px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.05; }
.brand__name { font: 700 1.6rem/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; color: #fff; }
.brand__tag { font-size: 0.72rem; color: #b9d6df; margin-top: 3px; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; color: #e6f2f5; }
.nav a:hover { color: var(--ochre); }
.open-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); font: 500 0.82rem/1 var(--font-body); white-space: nowrap; }
.open-pill::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: #ef4444; }
.open-pill.is-open::before { background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .25); }
.open-pill--inline { background: var(--pale); color: var(--ink); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .25); color: inherit; background: transparent; cursor: pointer; flex: none; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-btn:hover { border-color: var(--ochre); }

/* 1. Живе фото */
.hero { position: relative; min-height: min(92vh, 880px); min-height: min(92dvh, 880px); display: grid; align-items: end; overflow: hidden; color: #fff; background: var(--sea-dark); }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 118%; object-fit: cover; object-position: center 40%; will-change: transform; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 22, 27, .82) 0%, rgba(10, 22, 27, .45) 42%, rgba(10, 22, 27, .08) 72%, rgba(10, 22, 27, .2) 100%); }
.hero__content { position: relative; display: grid; gap: 18px; padding-block: 120px clamp(40px, 8vh, 88px); }
.hero__kicker { font: 600 0.8rem/1.4 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ochre); }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.8rem); max-width: 12ch; }
.hero__lead { font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 46ch; color: #e7eef0; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.open-pill--hero { background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(6px); }

/* Розділи */
.section { padding-block: clamp(48px, 7vw, 96px); }
.section__head { display: grid; gap: 12px; margin-bottom: clamp(22px, 3.4vw, 36px); }

/* 2. Меню */
.menu { background: var(--pale); }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 22px; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 44px; padding: 0 20px; border: 2px solid var(--line); border-radius: 999px; background: #fff; font: 600 0.95rem/1 var(--font-body); color: var(--ink); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--sea); border-color: var(--sea); color: #fff; }
.menu__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: var(--gap); }
.dish { display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; background: #fff; box-shadow: 0 1px 0 var(--line), 0 18px 30px -24px rgba(12, 58, 73, .45); min-width: 0; }
.dish__photo { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; background: var(--stone); }
.dish__body { display: grid; gap: 6px; padding: 14px 16px 16px; flex: 1; align-content: start; }
.dish__name { font: 600 1.08rem/1.25 var(--font-body); text-transform: none; }
.dish__desc { font-size: 0.9rem; color: var(--muted); }
.dish__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }
.dish__price { font: 700 1.05rem/1 var(--font-body); color: var(--sea-dark); white-space: nowrap; }
.dish__btn { min-height: 40px; padding: 0 18px; font-size: 0.9rem; }
.dish.is-out { opacity: .55; }
.dish__out { font-size: 0.85rem; color: var(--muted); }
.notice { background: #fff; border: 2px solid var(--ochre); border-radius: 20px; padding: 18px; display: grid; gap: 12px; justify-items: start; }

/* 3. Команда */
.team__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.person { margin: 0; display: grid; gap: 10px; }
.person__photo { aspect-ratio: 4 / 5; width: 100%; border-radius: 160px 160px 24px 24px; background: var(--stone) no-repeat; background-size: auto 200%; }
/* одна картинка 2×2: показываем нужную четверть (лицо по центру четверти) */
.person__photo--tl { background-position: 17.7% 0; }
.person__photo--tr { background-position: 82.3% 0; }
.person__photo--bl { background-position: 17.7% 100%; }
.person__photo--br { background-position: 82.3% 100%; }
.person__name { font: 600 1.5rem/1.1 var(--font-display); text-transform: uppercase; }
.person__role { font: 600 0.8rem/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--tile); }
.person__fact { font-size: 0.95rem; color: var(--muted); }

/* 4. Дворик */
.place { background: var(--stone); }
.place__inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.place__text { display: grid; gap: 16px; }
.facts { margin: 8px 0 0; display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px dashed #d8c8ad; }
.facts dt { font: 600 0.75rem/1.8 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; }
.place__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.gallery { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; height: clamp(360px, 46vw, 560px); }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; }
.gallery img:first-child { grid-row: 1 / span 2; border-radius: 200px 200px 24px 24px; }

/* Відгуки */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.review { margin: 0; display: grid; gap: 14px; align-content: start; padding: 26px; border-radius: 24px; background: var(--pale); }
.review blockquote { margin: 0; font: 500 1.05rem/1.55 var(--font-body); }
.review figcaption { font: 600 0.8rem/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--tile); }

.footer { color: var(--muted); font-size: 0.85rem; padding-bottom: 96px; }
.footer__inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 20px; }

/* Полоса «У стаканчику» */
.bar { position: fixed; z-index: 15; inset: auto 0 0 0; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: rgba(35, 22, 15, .94); color: #fff; backdrop-filter: blur(8px); }
.bar__inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.bar__text { font-size: 0.98rem; }
.bar .btn--solid { background: var(--ochre); border-color: var(--ochre); color: var(--ink); }

/* Вікна */
.sheet { width: min(860px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 0; border-radius: 28px; background: #fff; color: var(--ink); overflow: auto; }
.sheet::backdrop { background: rgba(12, 58, 73, .6); backdrop-filter: blur(3px); }
.sheet__close { position: absolute; top: 12px; right: 12px; z-index: 2; background: #fff; color: var(--ink); border-color: var(--line); }
#drink { width: min(720px, calc(100% - 32px)); }
#drink[open] { display: grid; grid-template-columns: 0.9fr 1.1fr; }
.sheet__photo { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
.sheet__body { display: grid; gap: 16px; padding: 26px 24px 24px; align-content: start; }
.sheet__body h2 { font-size: 1.9rem; padding-right: 40px; }
.sheet__desc { color: var(--muted); }
.opt { display: grid; gap: 8px; }
.opt__label { font: 600 0.78rem/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.opt__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border: 2px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: 500 0.9rem/1 var(--font-body); cursor: pointer; }
.chip small { color: var(--muted); font-size: 0.78rem; margin-left: 4px; }
.chip[aria-pressed="true"] { border-color: var(--sea); background: var(--sea); color: #fff; }
.chip[aria-pressed="true"] small { color: #cfe7ee; }
.sheet__add { width: 100%; margin-top: 4px; }

.order__layout { display: grid; grid-template-columns: 0.8fr 1.2fr; }
.takeaway { background: var(--pale) var(--tiles) center / 40px; display: grid; place-items: center; padding: 32px 20px; }
.takeaway__cup { width: min(220px, 100%); filter: drop-shadow(0 20px 24px rgba(12, 58, 73, .3)); }
.takeaway__name { font: 700 34px/1 var(--font-hand); fill: #fff; }
.takeaway__time { font: 600 15px/1 var(--font-body); fill: var(--sea-dark); }
.order__main { padding: 26px 24px 24px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.order__main h2 { font-size: 2rem; padding-right: 40px; }
.checkout, .done { display: grid; gap: 14px; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lines li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.lines__name { font-weight: 500; }
.lines__sum { font-weight: 700; white-space: nowrap; }
.lines__empty { color: var(--muted); }
.lines__total { text-align: right; font-size: 1.05rem; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; }
.qty button { width: 34px; height: 34px; border: 0; background: none; font-size: 1.1rem; color: var(--sea); cursor: pointer; border-radius: 999px; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.pickup__when { font: 700 1.05rem/1.3 var(--font-body); color: var(--sea); }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 500; font-size: 0.9rem; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; font: 400 16px/1.4 var(--font-body); color: var(--ink); background: #fff; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sea); }
.field [aria-invalid="true"] { border-color: #c2410c; }
.field__error { color: #c2410c; font-size: 0.85rem; }
.field__error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order__submit { width: 100%; }
.order__submit:disabled { opacity: .6; cursor: not-allowed; }
.foot-note { text-align: center; font-size: 0.82rem; color: var(--muted); }
.done h3 { font-size: 2rem; }

.toast { position: fixed; z-index: 30; inset: auto auto 90px 50%; transform: translateX(-50%); margin: 0; width: max-content; max-width: calc(100% - 32px); padding: 12px 18px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: 500 0.92rem/1.4 var(--font-body); }

.has-reveal .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--delay, 0ms); }
.has-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* Планшет і телефон */
@media (max-width: 900px) {
  .nav { display: none; }
  .hero { min-height: 86vh; min-height: 86dvh; }
  .hero__content { padding-top: 96px; }
  .open-pill { margin-left: auto; }
  .team__grid { grid-template-columns: repeat(2, 1fr); }
  .place__inner { grid-template-columns: 1fr; }
  .reviews { grid-template-columns: 1fr; }
  #drink[open] { grid-template-columns: 1fr; }
  .sheet__photo { height: 220px; min-height: 0; }
  .order__layout { grid-template-columns: 1fr; }
  .takeaway { padding: 20px; }
  .takeaway__cup { width: 140px; }
}
@media (max-width: 560px) {
  .brand__tag { display: none; }
  .header .open-pill { display: none; } /* на телефоне плашка «Відкрито» — в разделе «Дворик» */
  .header .icon-btn { margin-left: auto; }
  .menu__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dish { border-radius: 18px; }
  .dish__body { padding: 10px 10px 12px; }
  .dish__name { font-size: 1.05rem; }
  .dish__desc { display: none; }
  .dish__foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .dish__btn { width: 100%; }
  .gallery { height: 360px; }
  .sheet { width: 100%; max-width: 100%; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  #drink { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__media img { transform: none !important; }
  * { transition: none !important; }
}
