/* Cotton Coffee.  Mobile-first, без зовнішніх залежностей. */
:root {
  --espresso: #3B2A20;
  --cappuccino: #A67B5B;
  --cream: #F5E9DA;
  --latte: #E8D3B9;
  --caramel: #C8813A;
  /* Похідні кольори для тексту (контраст WCAG перевіряє tests/palette.test.mjs) */
  --ink-on-caramel: #2A1C14;
  --muted: #6B4A36;
  --accent-text: #7C461A;

  --font-head: "Lora", "PT Serif", Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 16px;
  --space: 8px;
  --container: 1120px;
  --shadow: 0 1px 2px rgb(59 42 32 / .08), 0 8px 24px rgb(59 42 32 / .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font: 400 1rem/1.6 var(--font-body);
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
/* Атрибут hidden має перемагати display компонентів (.btn тощо), інакше кнопка карти не ховається. */
[hidden] { display: none !important; }
/* Цілі якорів не ховаються під липким хедером. */
main, section[id] { scroll-margin-top: 72px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 calc(var(--space) * 2); overflow-wrap: break-word; }
h2 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 calc(var(--space) * 2); }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--espresso);
  outline-offset: 3px;
  border-radius: 6px;
  box-shadow: 0 0 0 6px var(--cream);
}

.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 100;
  background: var(--espresso); color: var(--cream); padding: 8px 16px; border-radius: 8px;
}
.skip-link:focus { top: 8px; }

.container { width: 100%; max-width: min(100vw, var(--container)); margin: 0 auto; padding: 0 calc(var(--space) * 2.5); }
.section { padding: calc(var(--space) * 7) 0; }
.section--latte { background: var(--latte); }
.section__lead { color: var(--muted); max-width: 60ch; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: var(--space);
}

/* Хедер */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgb(245 233 218 / .94); backdrop-filter: blur(6px);
  border-bottom: 1px solid rgb(59 42 32 / .1);
}
.site-header__inner > * { min-width: 0; }
.site-header__inner .btn { flex: none; padding: 8px 12px; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--espresso); text-decoration: none; font: 700 1.15rem var(--font-head); }
.site-header .brand { gap: 8px; font-size: 1.05rem; }
@media (min-width: 400px) {
  .site-header__inner { gap: 16px; }
  .site-header__inner .btn { padding: 8px 16px; }
  .site-header .brand { gap: 10px; font-size: 1.15rem; }
}
.brand svg, .brand img { width: 36px; height: 36px; }
.nav { display: none; }
.nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--espresso); text-decoration: none; font-weight: 500; }
.nav a:hover { text-decoration: underline; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--caramel); color: var(--ink-on-caramel); }
.btn--primary:hover { background: #D18E49; }
.btn--ghost { background: transparent; color: var(--cream); border-color: rgb(245 233 218 / .7); }
.btn--ghost:hover { background: rgb(245 233 218 / .1); }
.btn--dark { background: var(--espresso); color: var(--cream); }
.btn--large { min-height: 56px; padding: 16px 32px; font-size: 1.0625rem; }
.btn--small { min-height: 44px; padding: 8px 16px; font-size: .9375rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Hero: фото напою + темний кавовий градієнт, м'яка поява (без JS), легкий параллакс через main.js */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, #4A3528, var(--espresso) 60%, #2E2019);
  color: var(--cream);
  padding: calc(var(--space) * 8) 0 calc(var(--space) * 6);
  min-height: min(86vh, 760px); display: flex; align-items: center;
}
.hero > .container { position: relative; z-index: 1; }
.hero__bg {
  position: absolute; inset: -4% 0 -4% 0; z-index: -2; width: 100%; height: 108%;
  object-fit: cover; object-position: 60% 50%;
  transform: translate3d(0, var(--hero-shift, 0px), 0) scale(1.04);
  animation: hero-photo 1.6s ease-out both;
  will-change: transform;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(46 32 25 / .62) 0%, rgb(46 32 25 / .45) 50%, rgb(46 32 25 / .72) 100%),
    radial-gradient(90% 70% at 100% 0%, rgb(200 129 58 / .22), transparent 60%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center; }
.hero .eyebrow { color: var(--latte); }
.hero h1 { font-size: clamp(2rem, 10.5vw, 5.25rem); margin-bottom: 14px; letter-spacing: -.015em; text-shadow: 0 2px 24px rgb(0 0 0 / .35); }
.hero__lead { font-size: 1.125rem; font-weight: 600; color: var(--latte); max-width: 44ch; margin-bottom: 20px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 28px; padding: 0; }
.hero__facts li {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgb(46 32 25 / .45); border: 1px solid rgb(245 233 218 / .25); backdrop-filter: blur(4px);
  border-radius: 999px; padding: 5px 14px; font-size: .875rem; color: var(--cream);
  max-width: 100%; white-space: normal; overflow-wrap: anywhere;
}
.hero__facts svg { width: 16px; height: 16px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__copy > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
/* Контент першого екрана завжди видимий з першого кадра: анімуємо лише зсув, без opacity: 0 і без затримок. */
@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
@keyframes hero-photo { from { transform: translate3d(0, var(--hero-shift, 0px), 0) scale(1.1); } to { transform: translate3d(0, var(--hero-shift, 0px), 0) scale(1.04); } }
/* Про нас */
.about__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
/* Довгі слова (напр. «Севастопольської» при збільшеному тексті) не розпирають колонку сітки. */
.about__grid > *, .hero__grid > * { min-width: 0; }
.about__lead { font-family: var(--font-head); font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); line-height: 1.45; color: var(--espresso); margin-bottom: 16px; }
.about__lead + p { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; list-style: none; padding: 0; margin: 0; }
.stats li { background: var(--latte); border-radius: var(--radius); padding: 14px; }
/* На вузьких екранах «08:00–21:00» і «Pet-friendly» мають вміщатися в один рядок. */
.stats strong { display: block; font: 700 1.125rem/1.2 var(--font-head); }
.stats span { font-size: .875rem; color: var(--muted); }
.stats li:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* 320 px: плавно стискаємо відступи й розмір значень, щоб «08:00–21:00» не переносилось (на 360+ значення не змінюються). */
.stats { gap: clamp(8px, 3.3vw, 12px); }
.stats li { padding: clamp(10px, 3.9vw, 14px); }
.stats strong { font-size: clamp(1rem, 5vw, 1.125rem); }

/* Особливості меню */
.features { display: grid; gap: 16px; list-style: none; padding: 0; margin: 24px 0 0; }
.feature {
  background: var(--cream); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px; align-items: start;
}
.feature__icon {
  grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; background: var(--latte);
  display: grid; place-items: center; color: var(--espresso);
}
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 { margin: 2px 0 0; font-size: 1.125rem; }
.feature p { margin: 0; color: var(--muted); font-size: .9375rem; }

/* Меню */
.filters { display: none; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.js .filters { display: flex; }
.filter {
  min-height: 44px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--espresso); background: transparent; color: var(--espresso);
  font: 600 .9375rem/1 var(--font-body);
}
.filter[aria-pressed="true"] { background: var(--espresso); color: var(--cream); }
.filter:hover { background: var(--latte); }
.filter[aria-pressed="true"]:hover { background: var(--espresso); }
.menu-grid { display: grid; gap: 16px; margin-top: 16px; }
.menu-cat { background: var(--latte); border-radius: var(--radius); padding: 20px; }
.menu-cat[hidden] { display: none; }
.menu-cat h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-bottom: 2px solid rgb(59 42 32 / .15); padding-bottom: 8px; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-item { padding: 10px 0; border-bottom: 1px dashed rgb(59 42 32 / .2); }
.menu-item:last-child { border-bottom: 0; }
.menu-item__row { display: flex; align-items: baseline; gap: 8px; }
.menu-item__name { font-weight: 600; }
.menu-item__dots { flex: 1; border-bottom: 2px dotted rgb(59 42 32 / .25); transform: translateY(-4px); min-width: 16px; }
.menu-item__price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.menu-item__note { display: block; font-size: .875rem; color: var(--muted); }
.demo-mark {
  display: inline-block; font-size: .75rem; font-weight: 600; color: var(--muted);
  border: 1px dashed var(--muted); border-radius: 6px; padding: 0 6px; margin-left: 4px;
}
.menu-foot { font-size: .875rem; color: var(--muted); margin-top: 16px; }

/* Фірмові напої */
.section--signature { background: var(--cream); }
.drinks > *, .reviews > *, .features > *, .menu-grid > *, .contacts__grid > *, .stats > * { min-width: 0; }
.drinks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 28px 0 0; }
.drink { background: #FBF4EA; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.drink:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgb(59 42 32 / .1), 0 16px 32px rgb(59 42 32 / .14); }
.drink__photo { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--latte); }
.drink__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.drink:hover .drink__photo img { transform: scale(1.04); }
.drink__body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.drink h3 { font-size: 1.0625rem; margin: 0; }
.drink p { margin: 0; font-size: .8125rem; color: var(--muted); }
.drink__price { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.signature__cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn--ghost-dark { background: transparent; color: var(--espresso); border-color: rgb(59 42 32 / .5); }
.btn--ghost-dark:hover { background: rgb(59 42 32 / .07); }

/* Відгуки */
.reviews { display: grid; gap: 18px; list-style: none; padding: 0; margin: 28px 0 0; }
.review { background: var(--cream); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin: 0; display: flex; flex-direction: column; position: relative; }
.review::before { content: "\201C"; position: absolute; top: 6px; right: 18px; font: 700 4rem/1 var(--font-head); color: rgb(166 123 91 / .3); }
.review__stars { color: var(--accent-text); letter-spacing: 2px; font-size: 1rem; margin-bottom: 10px; }
.review blockquote { margin: 0 0 16px; flex: 1; }
.review blockquote p { font-family: var(--font-head); font-size: 1.0625rem; line-height: 1.55; white-space: pre-line; margin: 0; overflow-wrap: anywhere; }
.review footer { display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid rgb(59 42 32 / .12); font-size: .8125rem; color: var(--muted); }
.review cite { font-style: normal; font-weight: 700; font-size: .9375rem; color: var(--espresso); }
.reviews__more { font-size: .8125rem; color: var(--muted); margin: 20px 0 0; }
/* Години та контакти */
.contacts__grid { display: grid; gap: 16px; margin-top: 24px; }
.card { background: var(--latte); border-radius: var(--radius); padding: 20px; }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { text-align: left; padding: 6px 0; border-bottom: 1px solid rgb(59 42 32 / .15); }
.hours td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.contact-list li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.contact-list svg { width: 22px; height: 22px; margin-top: 2px; }
.contact-list a { color: var(--espresso); word-break: break-word; }
.hint-inline { font-size: .875rem; color: var(--muted); }
.hint { font-size: .875rem; color: var(--muted); margin: 12px 0 0; }
.card--visit { display: flex; flex-direction: column; }
.card__sub { margin-top: 24px; }
.visit__address, .card--visit .contact-list { margin: 0 0 20px; }
.visit__route { margin-top: auto; align-self: flex-start; }

/* Карта */
.map { margin-top: 24px; border-radius: var(--radius); overflow: hidden; background: var(--latte); box-shadow: var(--shadow); }
.map__frame { position: relative; aspect-ratio: 4 / 3; background: var(--cream); }
.map__frame > svg, .map__frame > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 16px; background: var(--cream); }
.map__bar .btn { flex: 1 1 auto; }
.map__links { display: flex; flex-wrap: wrap; gap: 0 16px; width: 100%; font-size: .9375rem; }
.map__links a { display: inline-flex; align-items: center; min-height: 44px; }
.map__note { width: 100%; margin: 0; font-size: .8125rem; color: var(--muted); }
.map__note:empty { display: none; }

/* Футер */
.site-footer { background: var(--espresso); color: var(--latte); padding: calc(var(--space) * 4) 0; font-size: .875rem; text-align: center; }
.site-footer p { margin: 0; }
.site-footer .site-footer__demo { margin-top: 4px; font-size: .75rem; opacity: .75; }

@media (min-width: 768px) {
  .section { padding: calc(var(--space) * 10) 0; }
  .hero { padding: calc(var(--space) * 12) 0; }
  .hero::before { background: linear-gradient(95deg, rgb(46 32 25 / .8) 0%, rgb(46 32 25 / .6) 42%, rgb(46 32 25 / .18) 100%); }
  .drinks { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .drink__body { padding: 18px 18px 20px; }
  .drink h3 { font-size: 1.2rem; }
  .stats li { padding: 16px; }
  .stats strong { font-size: 1.5rem; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .menu-grid { grid-template-columns: repeat(2, 1fr); align-items: start; }
  .reviews { grid-template-columns: repeat(2, 1fr); }
  .contacts__grid { grid-template-columns: repeat(2, 1fr); }
  .map__frame { aspect-ratio: 16 / 7; }
  .map__bar .btn { flex: 0 0 auto; }
  .map__links { width: auto; }
}
/* Навігація й дві колонки «Про нас» — лише з 1024 px: на 768 px пункти меню й значення статистики переносилися. */
@media (min-width: 1024px) {
  .nav { display: block; }
  .about__grid { grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
}
@media (min-width: 1100px) {
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(3, 1fr); }
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
