/* =========================================================
   Пенка — кофейня. Стили
   ========================================================= */

:root {
  --bg: #f6efe4;
  --paper: #fffaf2;
  --card: #ffffff;
  --ink: #2a1a12;
  --ink-2: #4a3428;
  --muted: #86705f;
  --line: rgba(42, 26, 18, .1);
  --line-2: rgba(42, 26, 18, .18);
  --accent: #e2592b;
  --accent-2: #c8461b;
  --yellow: #f4b740;
  --green: #3f6b4a;
  --green-soft: #dfe8d6;
  --peach: #fbd9c4;

  --display: 'Unbounded', system-ui, sans-serif;
  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 28px;
  --radius-sm: 18px;
  --container: 1240px;
  --header-h: 80px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 20px 50px -20px rgba(74, 40, 20, .25);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
html { overflow-x: clip; }
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
svg { flex-shrink: 0; }
use, svg:not([viewBox]) { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--accent); color: #fff; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-block; margin: 0 0 16px;
  font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow--light { color: var(--yellow); }
.h2 { margin: 0 0 22px; font: 700 clamp(32px, 4.4vw, 58px)/1.05 var(--display); letter-spacing: -.02em; }
.hl { position: relative; color: var(--accent); white-space: nowrap; }
.hl--light { color: var(--yellow); }

/* ---------- Buttons ---------- */
.btn {
  --h: 56px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 28px; border-radius: 999px;
  font-weight: 600; font-size: 16px; white-space: nowrap;
  transition: transform .25s var(--ease), background .2s, color .2s, box-shadow .25s, border-color .2s, opacity .2s;
}
.btn svg { width: 20px; height: 20px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn--sm { --h: 44px; padding: 0 20px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 12px 28px -12px rgba(226, 89, 43, .7); }
.btn--accent:hover { background: var(--accent-2); transform: translateY(-2px); }
.btn--ghost { border: 1.5px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--yellow); }
.btn--outline-light { border: 1.5px solid rgba(255, 250, 242, .35); color: var(--paper); }
.btn--outline-light:hover { border-color: var(--paper); }
.btn:disabled { opacity: .4; pointer-events: none; }
.link-btn { color: var(--accent); font-weight: 600; border-bottom: 1.5px dashed currentColor; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line);
  transition: all .2s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.sticker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
}
.sticker svg { width: 18px; height: 18px; }
.sticker--green { background: var(--green-soft); color: var(--green); }
.sticker--yellow { background: var(--yellow); color: var(--ink); }

.add-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  transition: transform .25s var(--ease), background .2s;
}
.add-btn svg { width: 20px; height: 20px; stroke-width: 2.4; }
.add-btn:hover { background: var(--accent); transform: rotate(90deg); }
.add-btn.is-added { background: var(--green); }

/* ---------- Header ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); transition: background .3s, box-shadow .3s, height .3s; }
.header.is-scrolled { --header-h: 68px; background: rgba(246, 239, 228, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 36px; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__icon { width: 42px; height: 42px; border-radius: 14px; background: var(--accent); color: var(--paper); display: grid; place-items: center; transform: rotate(-8deg); transition: transform .3s var(--ease); }
.logo:hover .logo__icon { transform: rotate(4deg); }
.logo__icon svg { width: 26px; height: 26px; stroke-width: 2.2; }
.logo__text { font: 800 26px/1 var(--display); letter-spacing: -.03em; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav__link { padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 15px; transition: background .2s, color .2s; }
.nav__link:hover { background: rgba(42, 26, 18, .06); }
.nav__link.is-active { background: var(--ink); color: var(--paper); }
.header__actions { display: flex; align-items: center; gap: 18px; }
.header__phone { font-weight: 600; font-size: 15px; }
.header__phone:hover { color: var(--accent); }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 20px 0 16px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px;
  transition: background .2s, transform .25s var(--ease);
}
.cart-btn svg { width: 22px; height: 22px; }
.cart-btn:hover { background: var(--accent); }
.cart-btn.is-bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.12); } }
.cart-btn__count {
  position: absolute; top: -4px; left: 30px;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--yellow); color: var(--ink); font-size: 12px; font-weight: 700;
  border: 2px solid var(--bg);
}
.burger { display: none; width: 44px; height: 44px; position: relative; border-radius: 50%; background: var(--card); border: 1px solid var(--line); }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: calc(var(--header-h) + 40px) 0 70px; position: relative; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.hero__title { margin: 22px 0 22px; font: 800 clamp(44px, 6.6vw, 92px)/.98 var(--display); letter-spacing: -.035em; }
.hero__title .hl { display: inline-block; }
.hero__title .hl::after {
  content: ''; position: absolute; left: -2%; right: -2%; bottom: .02em; height: .2em;
  background: var(--yellow); border-radius: 999px; z-index: -1; opacity: .7;
  transform: scaleX(0); transform-origin: left; animation: underline .9s .6s var(--ease) forwards;
}
@keyframes underline { to { transform: scaleX(1); } }
.hero__lead { max-width: 520px; margin: 0 0 34px; font-size: 18px; color: var(--ink-2); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }
.hero__facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.hero__facts li { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; background: var(--paper); border-radius: 20px; border: 1px solid var(--line); }
.hero__facts svg { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--peach); color: var(--accent); }
.hero__facts span { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); line-height: 1.3; }
.hero__facts b { font-size: 16px; color: var(--ink); }

.hero__media { position: relative; justify-self: center; width: 100%; max-width: 500px; aspect-ratio: 1 / 1.08; }
.hero__blob {
  position: absolute; inset: 4% -2% -2% 6%;
  background: var(--accent);
  border-radius: 58% 42% 48% 52% / 46% 54% 46% 54%;
  animation: blob 12s ease-in-out infinite;
}
@keyframes blob { 50% { border-radius: 44% 56% 58% 42% / 56% 44% 56% 44%; transform: rotate(6deg); } }
.hero__img { position: absolute; inset: 0 8% 6% 0; border-radius: 48% 52% 44% 56% / 52% 46% 54% 48%; overflow: hidden; box-shadow: var(--shadow); }
.hero__img img { width: 100%; height: 100%; object-fit: cover; }
.hero__card {
  position: absolute; left: -36px; bottom: 12%;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 10px 10px 10px; padding-right: 12px;
  background: var(--paper); border-radius: 22px; box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
.hero__card img { width: 58px; height: 58px; border-radius: 16px; object-fit: cover; }
.hero__card div { display: flex; flex-direction: column; line-height: 1.25; min-width: 120px; }
.hero__card small { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.hero__card b { font-size: 16px; }
.hero__card span { font-size: 14px; color: var(--muted); }
.hero__open {
  position: absolute; top: 6%; right: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: var(--paper); border-radius: 999px; box-shadow: var(--shadow);
  font-size: 14px; font-weight: 600;
  animation: float 6s ease-in-out -3s infinite;
}
@keyframes float { 50% { transform: translateY(-10px); } }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #3fae5a; box-shadow: 0 0 0 0 rgba(63, 174, 90, .5); animation: pulse 2s infinite; }
.dot.is-closed { background: var(--accent); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(63, 174, 90, 0); } }
.hero__badge {
  position: absolute; right: 2%; bottom: -2%;
  width: 130px; height: 130px; color: var(--ink);
  animation: spin 22s linear infinite;
}
.hero__badge text { font: 700 15px var(--display); fill: var(--paper); letter-spacing: .06em; }
.hero__badge path { animation: spin 22s linear infinite reverse; transform-origin: 100px 100px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Marquee ---------- */
.marquee { background: var(--ink); color: var(--paper); padding: 20px 0; overflow: hidden; transform: rotate(-1.2deg); margin: 10px -10px; }
.marquee__track { display: flex; gap: 34px; align-items: center; width: max-content; animation: marquee 32s linear infinite; }
.marquee span { font: 700 28px/1 var(--display); white-space: nowrap; letter-spacing: -.02em; }
.marquee i { font-style: normal; color: var(--yellow); font-size: 24px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(70px, 10vw, 120px) 0; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 30px; }
.section__head .h2 { margin: 0; }

/* ---------- Menu ---------- */
.search { position: relative; width: 340px; max-width: 100%; }
.search svg { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 52px; padding: 0 20px 0 50px;
  border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--paper);
  font-size: 15px; transition: border-color .2s, box-shadow .2s;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(226, 89, 43, .12); }
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.cat {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px;
  background: var(--paper); border: 1.5px solid var(--line);
  font-weight: 600; font-size: 15px; transition: all .2s;
}
.cat small { font-size: 12px; color: var(--muted); font-weight: 600; }
.cat:hover { border-color: var(--line-2); }
.cat.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cat.is-active small { color: var(--yellow); }

.menu__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.item {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius); padding: 10px 10px 18px;
  border: 1px solid var(--line);
  cursor: pointer; transition: transform .35s var(--ease), box-shadow .35s;
  animation: pop .45s var(--ease) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.item:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.item__img { position: relative; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--bg); margin-bottom: 16px; }
.item__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.item:hover .item__img img { transform: scale(1.06); }
.item__tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.tag { padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--paper); }
.tag--hit { background: var(--accent); color: #fff; }
.tag--new { background: var(--yellow); color: var(--ink); }
.tag--vegan { background: var(--green); color: #fff; }
.item__body { flex: 1; display: flex; flex-direction: column; padding: 0 8px; }
.item__title { margin: 0 0 4px; font: 700 18px/1.2 var(--display); letter-spacing: -.02em; }
.item__desc { margin: 0 0 14px; font-size: 14px; color: var(--muted); line-height: 1.45; flex: 1; }
.item__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.item__price { font: 700 20px/1 var(--display); }
.item__price small { display: block; margin-top: 4px; font: 500 12px var(--sans); color: var(--muted); }
.item__qty { position: absolute; top: 18px; right: 18px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 700; display: grid; place-items: center; animation: pop .3s var(--ease); }
.menu__empty { padding: 60px 0; text-align: center; font-size: 18px; color: var(--muted); }
.menu__note { margin: 30px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Coffee ---------- */
.coffee { background: var(--paper); border-radius: 48px; margin: 0 16px; }
.coffee__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.coffee__media { position: relative; padding: 0 70px 70px 0; }
.coffee__img1 { width: 100%; aspect-ratio: 4 / 3.6; object-fit: cover; border-radius: var(--radius); }
.coffee__img2 { position: absolute; right: 0; bottom: 0; width: 44%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); border: 8px solid var(--paper); transform: rotate(4deg); }
.coffee__sticker { position: absolute; top: -14px; left: 26px; transform: rotate(-6deg); font-family: var(--display); font-size: 15px; padding: 12px 20px; box-shadow: var(--shadow); }
.coffee__content > p { margin: 0 0 28px; font-size: 17px; }
.origins { display: grid; gap: 10px; margin-bottom: 30px; }
.origin { display: flex; align-items: center; gap: 16px; padding: 14px 18px 14px 14px; border-radius: 20px; background: var(--bg); transition: transform .25s var(--ease); }
.origin:hover { transform: translateX(6px); }
.origin__flag { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--ink); color: var(--yellow); font: 700 13px var(--display); }
.origin div { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.origin small { font-size: 14px; color: var(--muted); }
.origin__score { font: 700 22px var(--display); color: var(--accent); }
.origin__score::after { content: ' SCA'; font: 600 11px var(--sans); color: var(--muted); }
.numbers { list-style: none; padding: 0; margin: 0; display: flex; gap: 40px; }
.numbers li { display: flex; flex-direction: column; gap: 6px; }
.numbers b { font: 800 44px/1 var(--display); letter-spacing: -.03em; }
.numbers span { font-size: 14px; color: var(--muted); line-height: 1.35; }

/* ---------- Loyalty ---------- */
.loyalty__card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center;
  padding: 64px; border-radius: 40px;
  background: var(--green); color: var(--paper);
}
.loyalty__card::before { content: ''; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; background: rgba(255, 250, 242, .07); }
.loyalty__text p:not(.eyebrow) { max-width: 460px; margin: 0 0 30px; color: rgba(255, 250, 242, .78); font-size: 17px; }
.loyalty__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.loyalty__actions svg { width: 20px; height: 20px; }
.stamps { position: relative; padding: 28px; border-radius: 28px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35); transform: rotate(2deg); }
.stamps__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; font: 700 13px var(--display); text-transform: lowercase; }
.stamps__head b { font-size: 15px; color: var(--accent); }
.stamps__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--line-2); display: grid; place-items: center; color: var(--line-2); transition: all .3s; }
.stamp svg { width: 50%; height: 50%; }
.stamp.is-on { border: 0; background: var(--accent); color: var(--paper); animation: stampIn .5s var(--ease); }
.stamp.is-gift { border-style: solid; border-color: var(--yellow); background: rgba(244, 183, 64, .15); color: var(--ink); font: 700 12px var(--display); text-align: center; line-height: 1.1; }
.stamp.is-gift.is-on { background: var(--yellow); }
@keyframes stampIn { 0% { transform: scale(1.6) rotate(-20deg); opacity: 0; } 60% { transform: scale(.9); } }
.stamps__hint { margin: 18px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Gallery strip ---------- */
.gallery-strip { overflow: hidden; padding: 0 0 20px; }
.gallery-strip__track { display: flex; gap: 16px; width: max-content; animation: marquee 50s linear infinite; }
.gallery-strip:hover .gallery-strip__track { animation-play-state: paused; }
.gallery-strip img { height: 300px; width: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.gallery-strip img:nth-child(even) { margin-top: 40px; }

/* ---------- Reviews ---------- */
.rating { display: flex; align-items: center; gap: 14px; }
.rating > b { font: 800 56px/1 var(--display); letter-spacing: -.04em; }
.rating div { display: flex; flex-direction: column; }
.rating small { font-size: 14px; color: var(--muted); }
.stars { color: var(--yellow); letter-spacing: 2px; font-size: 18px; }
.reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review { padding: 30px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.review:nth-child(2) { background: var(--peach); border-color: transparent; transform: rotate(-1.2deg); }
.review p { margin: 0; flex: 1; font-size: 16px; line-height: 1.65; }
.review__who { display: flex; align-items: center; gap: 12px; }
.review__ava { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font: 700 17px var(--display); }
.review__who div { display: flex; flex-direction: column; line-height: 1.3; }
.review__who small { color: var(--muted); font-size: 13px; }
.review .stars { margin-left: auto; font-size: 14px; }

/* ---------- Places ---------- */
.places__inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: stretch; }
.places__list { display: grid; gap: 12px; margin-top: 10px; }
.place {
  text-align: left; padding: 22px 24px; border-radius: 24px;
  background: var(--paper); border: 1.5px solid var(--line);
  transition: all .25s;
}
.place:hover { border-color: var(--line-2); }
.place.is-active { border-color: var(--ink); box-shadow: var(--shadow); }
.place__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.place__title { font: 700 19px var(--display); letter-spacing: -.02em; }
.place__status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.place__row { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-2); margin-top: 4px; }
.place__row svg { width: 18px; height: 18px; color: var(--accent); }
.place__note { display: inline-block; margin-top: 10px; padding: 4px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 600; }
.places__phone { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; font: 700 22px var(--display); letter-spacing: -.02em; }
.places__phone svg { width: 24px; height: 24px; color: var(--accent); }
.places__phone:hover { color: var(--accent); }
.places__map { position: relative; min-height: 440px; border-radius: 32px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.places__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: sepia(.25) saturate(.9); }

/* ---------- Footer ---------- */
.footer { padding: 50px 0 40px; border-top: 1px solid var(--line); }
.footer__inner { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.footer__nav { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; font-weight: 500; }
.footer__nav a:hover { color: var(--accent); }
.footer__copy { width: 100%; margin: 10px 0 0; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- Cart bar (mobile) ---------- */
.cart-bar {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 45;
  display: none; align-items: center; gap: 12px;
  height: 60px; padding: 0 22px 0 10px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-weight: 600;
  box-shadow: 0 20px 40px -12px rgba(42, 26, 18, .55);
  animation: slideUp .4s var(--ease);
}
.cart-bar b { margin-left: auto; font: 700 17px var(--display); }
.cart-bar__count { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: 15px; }
@keyframes slideUp { from { transform: translateY(120%); } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.hero .reveal { opacity: 1; transform: none; animation: fadeUp .9s var(--ease) both; }
.hero__content .reveal:nth-child(2) { animation-delay: .07s; }
.hero__content .reveal:nth-child(3) { animation-delay: .14s; }
.hero__content .reveal:nth-child(4) { animation-delay: .21s; }
.hero__content .reveal:nth-child(5) { animation-delay: .28s; }
.hero__media.reveal { animation: popIn 1.1s .15s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } }
@keyframes popIn { from { opacity: 0; transform: scale(.9) rotate(-3deg); } }

/* =========================================================
   MODAL / DRAWER
   ========================================================= */
.modal, .drawer { position: fixed; inset: 0; z-index: 100; }
.modal { display: grid; place-items: center; padding: 24px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(42, 26, 18, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .3s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal__dialog { position: relative; width: 100%; background: var(--paper); border-radius: 32px; box-shadow: 0 40px 100px -30px rgba(42, 26, 18, .5); animation: modalIn .4s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.modal.is-closing .modal__backdrop, .drawer.is-closing .modal__backdrop { animation: fadeIn .25s reverse forwards; }
.modal.is-closing .modal__dialog { animation: modalIn .25s reverse forwards; }
.modal__close { position: absolute; top: 16px; right: 16px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); box-shadow: 0 6px 16px -6px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.modal__close svg { width: 20px; height: 20px; }
.modal__close:hover { transform: rotate(90deg); }

/* product */
.product { max-width: 860px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; max-height: calc(100vh - 48px); }
.product__img { background: var(--bg); }
.product__img img { width: 100%; height: 100%; object-fit: cover; min-height: 100%; }
.product__body { padding: 36px 34px 30px; display: flex; flex-direction: column; overflow-y: auto; }
.product__tags { display: flex; gap: 6px; margin-bottom: 12px; min-height: 4px; }
.product__title { margin: 0 0 8px; font: 800 30px/1.1 var(--display); letter-spacing: -.03em; padding-right: 40px; }
.product__desc { margin: 0 0 4px; color: var(--ink-2); }
.product__meta { margin: 0 0 22px; font-size: 14px; color: var(--muted); }
.product__opts { display: grid; gap: 18px; margin-bottom: 26px; }
.opt-group h4 { margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.opt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line-2); font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s; }
.opt span em { font-style: normal; font-size: 12px; color: var(--muted); }
.opt input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.opt input:checked + span em { color: var(--yellow); }
.opt input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.product__foot { margin-top: auto; display: flex; gap: 12px; align-items: center; }
.product__add { flex: 1; }
.qty { display: inline-flex; align-items: center; height: 56px; border-radius: 999px; background: var(--bg); padding: 0 6px; }
.qty button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
.qty button:hover { background: var(--paper); }
.qty button svg { width: 18px; height: 18px; stroke-width: 2.2; }
.qty span { min-width: 28px; text-align: center; font-weight: 700; font-size: 17px; }
.qty--sm { height: 38px; padding: 0 3px; }
.qty--sm button { width: 32px; height: 32px; }
.qty--sm span { min-width: 22px; font-size: 15px; }

/* drawer */
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 460px; max-width: 100%;
  display: flex; flex-direction: column;
  background: var(--paper);
  box-shadow: -30px 0 80px -30px rgba(42, 26, 18, .4);
  animation: drawerIn .45s var(--ease);
}
.drawer.is-closing .drawer__panel { animation: drawerIn .3s reverse forwards; }
@keyframes drawerIn { from { transform: translateX(100%); } }
.drawer__head { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer__head h3 { margin: 0; flex: 1; font: 800 24px var(--display); letter-spacing: -.03em; }
.drawer__view { flex: 1; display: flex; flex-direction: column; min-height: 0; animation: viewIn .35s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateX(20px); } }
.drawer__body { flex: 1; overflow-y: auto; padding: 20px 24px; overscroll-behavior: contain; }
.drawer__foot { padding: 18px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.drawer__warn { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--accent-2); font-weight: 600; }
.drawer__fine { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

.cart-empty { text-align: center; padding: 60px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cart-empty__icon { width: 90px; height: 90px; border-radius: 30px; background: var(--peach); color: var(--accent); display: grid; place-items: center; transform: rotate(-8deg); margin-bottom: 10px; }
.cart-empty__icon svg { width: 46px; height: 46px; }
.cart-empty b { font: 700 20px var(--display); }
.cart-empty p { margin: 0 0 14px; color: var(--muted); }

.cart-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); animation: pop .3s var(--ease); }
.line img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }
.line__info { min-width: 0; }
.line__info b { display: block; font-size: 15px; line-height: 1.3; }
.line__info small { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.line__right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.line__price { font: 700 15px var(--display); white-space: nowrap; }
.line.is-removing { animation: lineOut .3s var(--ease) forwards; }
@keyframes lineOut { to { opacity: 0; transform: translateX(40px); } }

.cart-extra { margin-top: 18px; display: grid; gap: 14px; }
.switch { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 999px; background: var(--bg); }
.switch button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: all .2s; }
.switch button svg { width: 20px; height: 20px; }
.switch button.is-active { background: var(--card); box-shadow: 0 4px 12px -4px rgba(42,26,18,.2); }
.free-ship { padding: 14px 16px; border-radius: 18px; background: var(--green-soft); color: var(--green); }
.free-ship p { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.free-ship__bar { height: 6px; border-radius: 999px; background: rgba(63, 107, 74, .2); overflow: hidden; }
.free-ship__bar span { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .5s var(--ease); }
.promo { display: flex; gap: 8px; }
.promo input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--card); text-transform: uppercase; }
.promo input:focus { outline: none; border-color: var(--accent); }
.promo.is-applied input { border-color: var(--green); background: var(--green-soft); }
.promo__hint { margin: -4px 0 0; font-size: 13px; color: var(--muted); }

.totals { margin: 0 0 14px; display: grid; gap: 6px; font-size: 15px; }
.totals div { display: flex; justify-content: space-between; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 600; }
.totals .is-discount dd { color: var(--green); }
.totals .is-total { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.totals .is-total dt { color: var(--ink); font-weight: 700; }
.totals .is-total dd { font: 800 24px var(--display); letter-spacing: -.02em; }

/* checkout form */
.form { display: grid; gap: 18px; }
.fs { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.fs legend { padding: 0; margin-bottom: 10px; font: 700 16px var(--display); letter-spacing: -.02em; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field textarea, .select {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px;
  border: 1.5px solid var(--line-2); background: var(--card); font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { height: auto; padding: 12px 16px; resize: vertical; }
.field input:focus, .field textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(226, 89, 43, .12); }
.field__error { display: none; font-style: normal; font-size: 12.5px; color: var(--accent-2); font-weight: 600; }
.field.is-invalid input { border-color: var(--accent-2); }
.field.is-invalid .field__error { display: block; }
.field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.radio-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pills label { position: relative; }
.radio-pills input { position: absolute; opacity: 0; pointer-events: none; }
.radio-pills span { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-2); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s; }
.radio-pills input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.radio-pills input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.radio-cards { display: grid; gap: 8px; }
.radio-cards label { position: relative; cursor: pointer; }
.radio-cards input { position: absolute; opacity: 0; pointer-events: none; }
.radio-cards span { display: flex; flex-direction: column; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line-2); transition: all .15s; }
.radio-cards span b { font-size: 15px; }
.radio-cards span small { font-size: 13px; color: var(--muted); }
.radio-cards input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.select { appearance: none; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386705f' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 20px; cursor: pointer; }

/* done */
.done { text-align: center; }
.done__icon svg { width: 84px; height: 84px; margin: 10px auto 0; fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.done__icon circle { stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .8s var(--ease) forwards; }
.done__icon path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done h3 { margin: 16px 0 6px; font: 800 26px/1.15 var(--display); letter-spacing: -.03em; }
.done > p { margin: 0 0 24px; }
.tracker { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; display: grid; gap: 0; }
.tracker li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; color: var(--muted); }
.tracker li:last-child { padding-bottom: 0; }
.tracker li::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line-2); }
.tracker li:last-child::before { display: none; }
.tracker i { position: relative; z-index: 1; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--paper); display: grid; place-items: center; transition: all .4s var(--ease); }
.tracker i svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 3; opacity: 0; }
.tracker div { display: flex; flex-direction: column; line-height: 1.35; padding-top: 3px; }
.tracker b { font-size: 15px; }
.tracker small { font-size: 13px; }
.tracker li.is-done { color: var(--ink); }
.tracker li.is-done i { background: var(--green); border-color: var(--green); }
.tracker li.is-done i svg { opacity: 1; }
.tracker li.is-done::before { background: var(--green); }
.tracker li.is-current { color: var(--ink); }
.tracker li.is-current i { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(226, 89, 43, .15); }
.tracker li.is-current i::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulseDot 1.2s infinite; }
@keyframes pulseDot { 50% { transform: scale(.6); } }
.done__summary { text-align: left; padding: 16px 18px; border-radius: 18px; background: var(--bg); font-size: 14px; display: grid; gap: 6px; }
.done__summary div { display: flex; justify-content: space-between; gap: 16px; }
.done__summary span:first-child { color: var(--muted); }
.done__summary span:last-child { text-align: right; font-weight: 600; }

/* toasts + fly */
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 150; display: grid; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 500; box-shadow: 0 16px 34px -10px rgba(42,26,18,.5); animation: toastIn .35s var(--ease); }
.toast svg { width: 18px; height: 18px; color: var(--yellow); }
.toast.is-leaving { animation: toastIn .25s reverse forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.fly { position: fixed; z-index: 160; border-radius: 50%; object-fit: cover; pointer-events: none; transition: transform .7s cubic-bezier(.5, -0.3, .7, .4), opacity .7s; box-shadow: var(--shadow); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1140px) {
  .header__phone { display: none; }
  .menu__grid { grid-template-columns: repeat(3, 1fr); }
  .hero__card { left: -10px; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .burger { display: block; }
  .header__actions { margin-left: auto; }
  .nav {
    position: fixed; top: var(--header-h); left: 12px; right: 12px; z-index: -1;
    flex-direction: column; gap: 4px; padding: 14px;
    background: var(--paper); border-radius: 24px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .3s, visibility .3s, transform .3s var(--ease);
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__link { font: 700 20px var(--display); padding: 14px 16px; border-radius: 16px; }
  .menu-open .header { backdrop-filter: none; -webkit-backdrop-filter: none; }

  .hero__inner, .coffee__inner, .loyalty__card, .places__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__media { max-width: 440px; }
  .coffee { margin: 0 8px; border-radius: 36px; }
  .coffee__media { max-width: 560px; }
  .loyalty__card { padding: 44px 32px; }
  .stamps { max-width: 420px; }
  .reviews__grid { grid-template-columns: 1fr; }
  .review:nth-child(2) { transform: none; }
  .product { grid-template-columns: 1fr; max-width: 520px; overflow-y: auto; }
  .product__img { aspect-ratio: 16 / 10; }
  .product__body { overflow: visible; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .cart-btn { padding: 0 14px; height: 44px; }
  .cart-btn__sum { display: none; }
  .cart-btn__count { left: 26px; }
  .logo__icon { width: 38px; height: 38px; }
  .logo__text { font-size: 23px; }
  .btn { --h: 52px; padding: 0 22px; }

  .hero { padding-bottom: 50px; }
  .hero__title { font-size: clamp(38px, 11.5vw, 56px); }
  .h2 .hl { white-space: normal; }
  .hero__lead { font-size: 16px; }
  .hero__cta .btn { flex: 1; }
  .hero__facts { gap: 8px; }
  .hero__facts li { flex: 1 1 140px; padding: 10px 12px 10px 10px; }
  .hero__facts svg { width: 34px; height: 34px; padding: 7px; }
  .hero__card { left: -6px; bottom: 6%; padding: 8px; gap: 10px; }
  .hero__card img { width: 48px; height: 48px; }
  .hero__card div { min-width: 0; }
  .hero__badge { width: 96px; height: 96px; }
  .hero__open { font-size: 13px; padding: 8px 12px; }
  .marquee span { font-size: 21px; }

  .section__head { margin-bottom: 22px; }
  .search { width: 100%; }
  .cats { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 22px; padding: 0 16px; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cat { flex-shrink: 0; height: 42px; padding: 0 16px; font-size: 14px; }
  .menu__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .item { padding: 6px 6px 12px; border-radius: 22px; }
  .item__img { border-radius: 17px; margin-bottom: 10px; }
  .item__body { padding: 0 6px; }
  .item__title { font-size: 15px; }
  .item__desc { font-size: 12.5px; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .item__price { font-size: 16px; }
  .item .add-btn { width: 38px; height: 38px; }
  .tag { font-size: 10.5px; padding: 4px 8px; }
  .item__qty { top: 12px; right: 12px; }

  .coffee__media { padding: 0 40px 50px 0; }
  .coffee__sticker { left: 10px; font-size: 13px; }
  .numbers { gap: 24px; }
  .numbers b { font-size: 34px; }
  .loyalty__card { padding: 34px 20px; border-radius: 32px; gap: 34px; }
  .stamps { padding: 20px; transform: none; }
  .stamps__grid { gap: 8px; }
  .gallery-strip img { height: 220px; }
  .rating > b { font-size: 44px; }
  .review { padding: 24px; }
  .places__map { min-height: 320px; }
  .footer { padding-bottom: 100px; }
  .footer__nav { margin-left: 0; width: 100%; }

  .cart-bar:not([hidden]) { display: flex; }
  .toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .modal { padding: 0; align-items: end; }
  .modal__dialog { border-radius: 28px 28px 0 0; animation-name: sheetIn; }
  @keyframes sheetIn { from { transform: translateY(100%); } }
  .product { max-height: 92vh; max-height: 92dvh; }
  .product__body { padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); }
  .product__title { font-size: 24px; }
  .product__foot { position: sticky; bottom: 0; background: var(--paper); padding-top: 12px; margin-bottom: -4px; }
  .qty { height: 52px; }
  .drawer__panel { width: 100%; }
  .drawer__head, .drawer__body { padding-left: 18px; padding-right: 18px; }
  .drawer__foot { padding-left: 18px; padding-right: 18px; }
  .field-row { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
