/* ============================================================
   Coffee Boom · hotel delivery
   Warm editorial menu: paper, ink, terracotta.
   ============================================================ */

:root {
  --paper: #ECE7DF;
  --paper-2: #F4F0E9;
  --paper-3: #FBF8F3;
  --ink: #2A1F1B;
  --ink-2: #5A4A43;
  --ink-3: #8C7C74;
  --line: rgba(42, 31, 27, 0.12);
  --brand: #B95742;
  --brand-deep: #8F4D42;
  --brand-soft: #E8C9BF;
  --brand-tint: rgba(185, 87, 66, 0.08);
  --ok: #4F7A4B;

  --font-display: 'Cormorant Garamond', 'Cormorant', 'Times New Roman', Georgia, serif;
  --font-body: 'Onest', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --shadow-1: 0 1px 2px rgba(42, 31, 27, 0.05), 0 8px 24px -12px rgba(42, 31, 27, 0.18);
  --shadow-2: 0 2px 4px rgba(42, 31, 27, 0.06), 0 24px 48px -16px rgba(42, 31, 27, 0.28);
  --wrap: 1240px;
  --gutter: clamp(18px, 4vw, 48px);
  --nav-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[lang="zh-CN"] {
  --font-display: 'Noto Serif SC', 'Cormorant Garamond', serif;
  --font-body: 'Noto Sans SC', 'Onest', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  /* fine paper grain */
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.12 0 0 0 0 0.10 0 0 0 0.10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea { font: inherit; color: inherit; }
::selection { background: var(--brand); color: #fff; }

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; position: relative; z-index: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 500; letter-spacing: 0.01em;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s;
  box-shadow: 0 8px 20px -10px rgba(185, 87, 66, 0.7);
  white-space: nowrap;
}
.btn:hover { background: var(--brand-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { background: var(--paper-3); color: var(--ink); }
.btn--block { width: 100%; }

/* ============================================================
   Language selection page
   ============================================================ */
.lang-page {
  min-height: 100svh; display: grid; place-items: center; padding: 40px var(--gutter);
  position: relative; z-index: 1;
}
.lang-card { width: min(840px, 100%); text-align: center; }
.lang-logo {
  width: clamp(150px, 24vw, 220px); margin: 0 auto 28px;
  animation: rise .9s var(--ease) both;
}
.lang-logo img { width: 100%; height: auto; }
.lang-title {
  font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em;
  font-size: clamp(30px, 5.2vw, 54px); line-height: 1.05; margin: 0 0 8px;
  animation: rise .9s .1s var(--ease) both;
}
.lang-title em { font-style: italic; color: var(--brand); }
.lang-sub { color: var(--ink-3); margin: 0 0 40px; font-size: 15px; animation: rise .9s .18s var(--ease) both; }
.lang-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lang-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 22px;
  padding: 22px 22px 20px; text-align: left;
  background: var(--paper-3); border-radius: var(--r-md);
  box-shadow: var(--shadow-1); border: 1px solid rgba(255,255,255,0.6);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s;
  animation: rise .8s var(--ease) both;
}
.lang-tile:nth-child(1) { animation-delay: .25s }
.lang-tile:nth-child(2) { animation-delay: .32s }
.lang-tile:nth-child(3) { animation-delay: .39s }
.lang-tile:nth-child(4) { animation-delay: .46s }
.lang-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); background: #fff; }
.lang-tile__code {
  font-family: var(--font-display); font-size: 44px; line-height: 1; font-weight: 500; color: var(--brand);
  letter-spacing: -0.02em;
}
.lang-tile__label { font-size: 13px; color: var(--ink-3); line-height: 1.3; }
.lang-tile__label b { display: block; color: var(--ink); font-weight: 500; font-size: 15px; margin-bottom: 2px; }
.lang-tile__arrow {
  position: absolute; right: 18px; top: 18px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; color: var(--brand); background: var(--brand-tint);
  transition: transform .35s var(--ease), background .35s, color .35s;
}
.lang-tile:hover .lang-tile__arrow { background: var(--brand); color: #fff; transform: rotate(-45deg); }
.lang-foot { margin-top: 44px; color: var(--ink-3); font-size: 13px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; animation: rise .9s .6s var(--ease) both; }
.lang-foot a:hover { color: var(--brand); }

@media (max-width: 720px) {
  .lang-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) { .lang-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Top bar
   ============================================================ */
.top {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.top__in { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { width: 42px; height: 42px; }
.brand__logo img { width: 100%; height: 100%; }
.brand__name { font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1; letter-spacing: -0.01em; }
.brand__name small { display: block; font-family: var(--font-body); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; font-weight: 500; }
.top__right { display: flex; align-items: center; gap: 10px; }

.langsw { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(42,31,27,0.06); }
.langsw a {
  padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--ink-2);
  transition: background .2s, color .2s;
}
.langsw a:hover { color: var(--brand); }
.langsw a.is-active { background: var(--paper-3); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.cartbtn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 12px; border-radius: 999px; background: var(--ink); color: var(--paper-3);
  font-weight: 500; font-size: 14px; transition: transform .25s var(--ease), background .25s;
}
.cartbtn:hover { background: var(--brand); transform: translateY(-1px); }
.cartbtn svg { width: 18px; height: 18px; }
.cartbtn__count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; transition: transform .3s var(--ease);
}
.cartbtn:hover .cartbtn__count { background: #fff; color: var(--brand); }
.cartbtn__count.bump { animation: bump .45s var(--ease); }
.cartbtn__sum { display: none; }
@media (min-width: 640px) { .cartbtn__sum { display: inline; color: rgba(251,248,243,0.75); } }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.hero__in { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: clamp(24px, 5vw, 64px); }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brand); font-weight: 600; margin-bottom: 22px;
  animation: rise .9s var(--ease) both;
}
.kicker::before { content: ""; width: 28px; height: 1.5px; background: currentColor; }
.hero h1 {
  font-family: var(--font-display); font-weight: 500; margin: 0 0 22px;
  font-size: clamp(50px, 8.6vw, 116px); line-height: 0.94; letter-spacing: -0.025em;
  animation: rise 1s .08s var(--ease) both;
}
.hero h1 em { font-style: italic; color: var(--brand); font-weight: 400; display: block; }
html[lang="zh-CN"] .hero h1 { letter-spacing: 0; line-height: 1.12; font-size: clamp(40px, 7vw, 92px); }
.hero p { max-width: 520px; font-size: clamp(16px, 1.6vw, 18px); color: var(--ink-2); margin: 0 0 32px; animation: rise 1s .16s var(--ease) both; }
.hero__actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; animation: rise 1s .24s var(--ease) both; }
.hero__note { font-size: 13px; color: var(--ink-3); max-width: 240px; line-height: 1.4; }

.stamp {
  position: relative; aspect-ratio: 1; width: min(100%, 460px); margin-left: auto;
  display: grid; place-items: center;
  animation: fade 1.4s .2s var(--ease) both;
}
.stamp__logo { width: 62%; position: relative; z-index: 2; filter: drop-shadow(0 30px 40px rgba(143,77,66,0.25)); animation: float 7s ease-in-out infinite; }
.stamp__ring { position: absolute; inset: 0; animation: spin 60s linear infinite; }
.stamp__ring text { font-family: var(--font-body); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; fill: var(--brand); font-weight: 600; }
.stamp__disc { position: absolute; inset: 11%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0%, var(--paper-3) 45%, var(--paper-2) 100%); box-shadow: inset 0 0 0 1px rgba(185,87,66,0.15), var(--shadow-2); }

.hero__in > * { min-width: 0; }
@media (max-width: 880px) {
  .hero__in { grid-template-columns: 1fr; }
  .stamp { width: min(64%, 300px); margin: 8px auto 0; order: -1; }
  .hero__note { max-width: none; }
}
@media (max-width: 640px) {
  .brand__name { display: none; }
  .langsw a { padding: 6px 8px; }
  .cartbtn { padding: 9px 10px; }
  .top__right { gap: 8px; }
}

/* ============================================================
   Category nav (sticky chips)
   ============================================================ */
.catnav {
  position: sticky; top: var(--nav-h); z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-block: 1px solid var(--line);
}
.catnav__scroll {
  display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.catnav__scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: background .25s, color .25s, transform .25s var(--ease); scroll-snap-align: start; white-space: nowrap;
}
.chip:hover { background: rgba(42,31,27,0.06); color: var(--ink); }
.chip.is-active { background: var(--brand); color: #fff; }

/* ============================================================
   Menu sections
   ============================================================ */
.menu { padding: clamp(24px, 4vw, 48px) 0 80px; }
.section { padding-top: 44px; scroll-margin-top: calc(var(--nav-h) + 64px); }
.section__head {
  display: flex; align-items: baseline; gap: 18px; margin-bottom: 26px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section__num { font-family: var(--font-display); font-style: italic; font-size: 18px; color: var(--brand); min-width: 32px; }
.section__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(32px, 4.4vw, 52px); line-height: 1; letter-spacing: -0.02em; margin: 0; }
.section__count { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.subsection { padding-top: 22px; scroll-margin-top: calc(var(--nav-h) + 64px); }
.subsection__title {
  font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 26px; margin: 0 0 16px; color: var(--ink-2);
  display: flex; align-items: center; gap: 14px;
}
.subsection__title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 18px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper-3); border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-1); border: 1px solid rgba(255,255,255,0.55);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.card__media { position: relative; aspect-ratio: 4 / 4.6; overflow: hidden; background: #E3DDD3; cursor: zoom-in; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__title { font-size: 15px; font-weight: 500; line-height: 1.3; margin: 0; }
.card__descr { font-size: 13px; color: var(--ink-3); margin: 0; }
.card__foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1; white-space: nowrap; }
.price small { font-size: 0.72em; font-weight: 500; margin-left: 2px; color: var(--ink-2); }

.add {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; box-shadow: 0 6px 14px -6px rgba(185,87,66,0.8);
  transition: transform .3s var(--ease), background .25s;
}
.add:hover { background: var(--brand-deep); transform: scale(1.08); }
.add:active { transform: scale(0.94); }
.add svg { width: 18px; height: 18px; }

.stepper {
  display: none; align-items: center; gap: 2px; border-radius: 999px; background: var(--ink); color: #fff; height: 38px; padding: 0 4px;
}
.stepper button { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
.stepper button:hover { background: rgba(255,255,255,0.14); }
.stepper button svg { width: 14px; height: 14px; }
.stepper output { min-width: 22px; text-align: center; font-weight: 600; font-size: 14px; }
.card.in-cart .add { display: none; }
.card.in-cart .stepper { display: inline-flex; }
.card.in-cart .card__media::after {
  content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--brand); border-radius: inherit; pointer-events: none;
}

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   Footer
   ============================================================ */
.foot { border-top: 1px solid var(--line); padding: 52px 0 40px; background: linear-gradient(180deg, transparent, rgba(42,31,27,0.035)); }
.foot__in { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.foot__brand { display: flex; gap: 16px; align-items: flex-start; }
.foot__brand img { width: 64px; height: 64px; }
.foot__brand b { font-family: var(--font-display); font-size: 24px; font-weight: 600; display: block; line-height: 1; }
.foot__brand span { display: block; font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.foot h4 { margin: 0 0 12px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.foot a:hover { color: var(--brand); }
.foot__bottom { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
@media (max-width: 760px) { .foot__in { grid-template-columns: 1fr; gap: 26px; } }

/* ============================================================
   Cart drawer
   ============================================================ */
.veil {
  position: fixed; inset: 0; z-index: 90; background: rgba(42,31,27,0.45); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.veil.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(460px, 100%);
  background: var(--paper-2); box-shadow: -20px 0 60px -30px rgba(0,0,0,0.5);
  transform: translateX(104%); transition: transform .5s var(--ease);
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.drawer__title { font-family: var(--font-display); font-size: 30px; font-weight: 500; margin: 0; letter-spacing: -0.01em; }
.iconbtn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
.iconbtn:hover { background: rgba(42,31,27,0.07); }
.iconbtn svg { width: 18px; height: 18px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; }
.drawer__foot { padding: 16px 24px 24px; border-top: 1px solid var(--line); background: var(--paper-2); }

.cart-empty { text-align: center; padding: 60px 10px; color: var(--ink-3); }
.cart-empty svg { width: 54px; height: 54px; margin: 0 auto 14px; color: var(--brand-soft); }
.cart-empty b { display: block; color: var(--ink); font-weight: 500; font-size: 17px; margin-bottom: 6px; }

.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); animation: rise .4s var(--ease) both; }
.line img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.line__name { font-size: 14px; font-weight: 500; line-height: 1.3; }
.line__price { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.line .stepper { display: inline-flex; height: 34px; }
.line .stepper button { width: 26px; height: 26px; }
.line__sum { font-family: var(--font-display); font-size: 18px; font-weight: 600; text-align: right; grid-column: 3; }

.totals { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.totals span { color: var(--ink-3); font-size: 14px; }
.totals b { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -0.01em; }
.drawer__actions { display: flex; gap: 10px; }
.drawer__actions .btn { flex: 1; }
.drawer__actions .btn--ghost { flex: 0 0 auto; }

/* form */
.form { display: grid; gap: 14px; }
.form h3 { font-family: var(--font-display); font-size: 24px; font-weight: 500; margin: 8px 0 2px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.field label i { color: var(--brand); font-style: normal; }
.field input, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px; background: var(--paper-3);
  border: 1.5px solid var(--line); outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.field.is-bad input, .field.is-bad textarea { border-color: #C0392B; }
.field textarea { min-height: 84px; resize: vertical; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); line-height: 1.4; cursor: pointer; }
.check input { margin: 3px 0 0; accent-color: var(--brand); width: 16px; height: 16px; flex: 0 0 auto; }
.check a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.check.is-bad { color: #C0392B; }
.form__msg { font-size: 13px; color: #C0392B; min-height: 1em; }
.hp { position: absolute; left: -9999px; opacity: 0; }

.success { text-align: center; padding: 50px 14px; animation: rise .6s var(--ease) both; }
.success__icon { width: 74px; height: 74px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; margin: 0 auto 22px; animation: pop .6s .1s var(--ease) both; }
.success__icon svg { width: 34px; height: 34px; }
.success h3 { font-family: var(--font-display); font-size: 28px; font-weight: 500; margin: 0 0 10px; line-height: 1.15; }
.success p { color: var(--ink-3); margin: 0 0 26px; }

/* ============================================================
   Product modal
   ============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__box {
  width: min(880px, 100%); max-height: 92vh; overflow: auto; background: var(--paper-3); border-radius: var(--r-lg);
  display: grid; grid-template-columns: 1.05fr 1fr; box-shadow: var(--shadow-2);
  transform: translateY(20px) scale(0.98); transition: transform .45s var(--ease);
}
.modal.is-open .modal__box { transform: none; }
.modal__img { aspect-ratio: 1 / 1.1; background: #E3DDD3; }
.modal__img img { width: 100%; height: 100%; object-fit: cover; }
.modal__body { padding: 34px 32px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.modal__body h3 { font-family: var(--font-display); font-size: 32px; font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
.modal__descr { color: var(--ink-3); margin: 0; }
.modal__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 20px; }
.modal__foot .price { font-size: 30px; }
.modal__close { position: absolute; top: 14px; right: 14px; }
@media (max-width: 700px) {
  .modal { padding: 0; align-items: end; }
  .modal__box { grid-template-columns: 1fr; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 94vh; }
  .modal__img { aspect-ratio: 4 / 3; }
  .modal__body { padding: 22px 20px 26px; }
}

/* floating cart on mobile */
.fab {
  position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 120%); z-index: 60;
  display: none; align-items: center; gap: 14px; padding: 13px 18px 13px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; box-shadow: 0 20px 40px -14px rgba(0,0,0,0.5);
  transition: transform .5s var(--ease); white-space: nowrap;
}
.fab.is-on { transform: translate(-50%, 0); }
.fab b { font-family: var(--font-display); font-size: 20px; }
.fab span { font-size: 13px; opacity: .75; }
@media (max-width: 640px) { .fab { display: flex; } }

/* toast */
.toast {
  position: fixed; left: 50%; top: 84px; transform: translate(-50%, -20px); z-index: 120; opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px;
  transition: opacity .3s, transform .4s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   Document pages
   ============================================================ */
.doc { padding: clamp(32px, 6vw, 72px) 0 80px; }
.doc__in { width: min(820px, 100% - var(--gutter) * 2); margin-inline: auto; position: relative; z-index: 1; }
.doc__back { font-size: 14px; color: var(--ink-3); display: inline-block; margin-bottom: 26px; }
.doc__back:hover { color: var(--brand); }
.doc h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(34px, 5vw, 58px); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 8px; text-transform: none; }
.doc__meta { color: var(--ink-3); font-size: 14px; margin-bottom: 36px; }
.doc__body { background: var(--paper-3); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 48px); box-shadow: var(--shadow-1); font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
.doc__body h3 { font-family: var(--font-display); font-weight: 600; font-size: 24px; color: var(--ink); margin: 34px 0 10px; line-height: 1.2; }
.doc__body h3:first-child { margin-top: 0; }
.doc__body p { margin: 0 0 14px; }
.doc__body strong { color: var(--ink); font-weight: 600; }
.doc__body ul { margin: 0 0 14px; padding-left: 22px; }
.doc__body li { margin: 4px 0; }
.doc__body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.doc__nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }

/* ============================================================
   Keyframes
   ============================================================ */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}
