/* ==========================================================================
   Mr. Hooby Bakery — Menu
   ========================================================================== */
:root {
  --o: #F47933;
  --o-d: #E0601C;
  --o-l: #FFE3D0;
  --cream: #FFF4EC;
  --ink: #2A1A10;
  --ink-2: #5B4536;
  --mute: #9A8577;
  --line: #F0E1D5;
  --white: #fff;
  --wa: #25D366;
  --radius: 22px;
  --shadow: 0 10px 28px -14px rgba(120, 60, 20, .35);
  --shadow-lg: 0 24px 48px -18px rgba(120, 60, 20, .45);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --font: 'Cairo', system-ui, sans-serif;
  --font-num: 'Poppins', 'Cairo', sans-serif;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="en"] body { --font: 'Poppins', 'Cairo', system-ui, sans-serif; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
body.lock { overflow: hidden; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 400px) { :root { --gutter: 20px; } }
@media (min-width: 768px) { :root { --gutter: 32px; } }

.ico { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico--fill { fill: currentColor; stroke: none; }
[dir="ltr"] .ico--flip { transform: scaleX(-1); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--o);
  display: grid; place-items: center;
  transition: opacity .5s ease, visibility .5s;
}
.loader img { width: 74px; animation: loaderPulse 1s var(--ease) infinite alternate; }
body:not(.is-loading) .loader { opacity: 0; visibility: hidden; }
@keyframes loaderPulse { from { transform: scale(.85) rotate(-6deg); } to { transform: scale(1.05) rotate(6deg); } }

/* ---------- Language button ---------- */
.lang-btn {
  background: rgba(255, 255, 255, .2);
  color: #fff;
  border-radius: 30px;
  padding: 6px 14px;
  font: 700 13px/1.2 var(--font-num);
  letter-spacing: .5px;
  transition: background .25s, transform .25s var(--ease-back);
}
.lang-btn:hover { background: rgba(255, 255, 255, .32); }
.lang-btn:active { transform: scale(.92); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--o);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.blob { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08); z-index: -1; animation: blob 14s ease-in-out infinite alternate; }
.blob--1 { width: 340px; height: 340px; top: -110px; inset-inline-end: -130px; }
.blob--2 { width: 220px; height: 220px; top: 38%; inset-inline-start: -120px; animation-duration: 18s; }
.blob--3 { width: 120px; height: 120px; bottom: 12%; inset-inline-end: 8%; animation-duration: 11s; background: rgba(255, 255, 255, .06); }
@keyframes blob { to { transform: translate(24px, 30px) scale(1.12); } }

.hero__lang { position: absolute; top: max(16px, env(safe-area-inset-top)); inset-inline-end: var(--gutter); z-index: 5; }

.hero__inner {
  min-height: 100vh;
  min-height: 100svh;
  max-width: 1200px; margin-inline: auto;
  display: flex; flex-direction: column;
  padding-inline: var(--gutter);
}
.hero__content {
  padding-top: clamp(56px, 10svh, 96px);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.hero__logo { width: clamp(118px, 34vw, 168px); height: auto; filter: drop-shadow(0 12px 24px rgba(120, 40, 0, .25)); }
.hero__title { text-wrap: balance; font-size: clamp(24px, 6.6vw, 30px); font-weight: 800; line-height: 1.35; margin-top: clamp(18px, 3.5svh, 30px); }
.hero__sub { font-size: 15px; font-weight: 500; opacity: .92; margin-top: 4px; }
.hero__cta {
  margin-top: clamp(20px, 3.5svh, 30px);
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: var(--o);
  font-size: 18px; font-weight: 800;
  padding: 14px 34px; border-radius: 40px;
  box-shadow: 0 14px 28px -10px rgba(120, 40, 0, .5);
  position: relative;
  transition: transform .3s var(--ease-back), box-shadow .3s;
}
.hero__cta::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .55);
  animation: ctaPulse 2.4s ease-out infinite 1.8s;
}
.hero__cta:hover { transform: translateY(-3px) scale(1.03); }
.hero__cta:active { transform: scale(.96); }
.hero__cta .ico { transition: transform .3s var(--ease); }
.hero__cta:hover .ico { transform: translateX(-4px); }
[dir="ltr"] .hero__cta:hover .ico { transform: scaleX(-1) translateX(-4px); }
@keyframes ctaPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); } 70%, 100% { box-shadow: 0 0 0 18px rgba(255, 255, 255, 0); } }

.hero__social { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.hero__social a {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .18); color: #fff; font-size: 19px;
  transition: background .25s, transform .3s var(--ease-back);
}
.hero__social a:hover { background: rgba(255, 255, 255, .32); transform: translateY(-3px); }
.hero__info { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 16px; font-size: 13.5px; font-weight: 600; }
.hero__info a, .hero__info span { display: inline-flex; align-items: center; gap: 6px; opacity: .95; }
.hero__info a:hover { text-decoration: underline; }

.hero__visual { position: relative; flex: 1; min-height: 230px; margin-top: 26px; }
.hero__pizza {
  position: absolute; top: 0; left: 50%;
  width: min(100vw, 460px); height: auto;
  translate: -50% 0;
  border-radius: 50%;
  box-shadow: 0 -10px 50px rgba(0, 0, 0, .25), 0 0 0 10px rgba(255, 255, 255, .16);
  animation: spin 70s linear infinite;
}
.hero__ring { display: none; }
@keyframes spin { to { rotate: 360deg; } }

.hero__scroll { display: none; }

/* Hero entrance animation */
.hero__logo, .hero__title, .hero__sub, .hero__cta, .hero__social, .hero__info, .hero__visual { opacity: 0; }
body.ready .hero__logo { animation: popIn .9s var(--ease-back) .05s both; }
body.ready .hero__title { animation: fadeUp .8s var(--ease) .25s both; }
body.ready .hero__sub { animation: fadeUp .8s var(--ease) .35s both; }
body.ready .hero__cta { animation: fadeUp .8s var(--ease) .45s both; }
body.ready .hero__social { animation: fadeUp .8s var(--ease) .55s both; }
body.ready .hero__info { animation: fadeUp .8s var(--ease) .62s both; }
body.ready .hero__visual { animation: riseIn 1.3s var(--ease) .3s both; }
@keyframes popIn { from { opacity: 0; transform: scale(.5) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(160px) rotate(-30deg); } to { opacity: 1; transform: none; } }

@media (min-width: 960px) {
  .hero__inner { flex-direction: row; align-items: center; gap: 40px; padding-inline: 48px; }
  .hero__content { flex: 1; padding: 0; align-items: flex-start; text-align: start; }
  .hero__logo { width: 190px; }
  .hero__title { font-size: clamp(36px, 3.4vw, 46px); text-wrap: balance; }
  .hero__sub { font-size: 19px; }
  .hero__social, .hero__info { justify-content: flex-start; }
  .hero__visual { flex: 1.1; margin: 0; min-height: 0; aspect-ratio: 1; display: grid; place-items: center; }
  .hero__pizza { position: relative; top: auto; left: auto; translate: none; width: 82%; box-shadow: 0 40px 80px -20px rgba(80, 20, 0, .55), 0 0 0 14px rgba(255, 255, 255, .14); }
  .hero__ring { display: block; position: absolute; inset: 2%; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .35); animation: spin 50s linear infinite reverse; }
  .hero__scroll {
    display: block; position: absolute; bottom: 26px; left: 50%; translate: -50% 0;
    width: 28px; height: 44px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 20px;
  }
  .hero__scroll span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; background: #fff; border-radius: 4px; animation: wheel 1.6s ease-in-out infinite; }
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ==========================================================================
   Menu
   ========================================================================== */
.menu__head {
  background: var(--o); color: #fff;
  border-radius: 0 0 34px 34px;
  padding: 18px 0 56px;
}
.menu__bar { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 40px; height: auto; transition: transform .5s var(--ease-back); }
.brand:hover img { transform: rotate(-10deg) scale(1.08); }
.brand b { display: block; font-size: 19px; font-weight: 800; line-height: 1.1; }
.brand small { font: 600 11px var(--font-num); letter-spacing: 3px; opacity: .85; }

.search {
  margin-top: -30px; position: relative; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 18px;
  padding: 0 16px; height: 56px;
  box-shadow: 0 12px 28px -12px rgba(120, 60, 20, .3);
  transition: box-shadow .3s, transform .3s var(--ease);
  max-width: 720px; margin-inline: auto;
}
.search:focus-within { box-shadow: 0 0 0 3px var(--o-l), 0 16px 32px -12px rgba(120, 60, 20, .35); transform: translateY(-2px); }
.search > .ico { color: var(--o); font-size: 20px; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font: 500 16px var(--font); color: var(--ink);
}
.search input::placeholder { color: #B9A598; }
.search input::-webkit-search-cancel-button { display: none; }
.search__clear { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); color: var(--mute); opacity: 0; pointer-events: none; transition: opacity .2s; }
.search.has-value .search__clear { opacity: 1; pointer-events: auto; }

/* Category chips */
.cats {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 244, 236, .88);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  margin-top: 8px;
  transition: box-shadow .3s;
}
.cats.stuck { box-shadow: 0 8px 20px -14px rgba(120, 60, 20, .4); }
.cats__track {
  display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth;
  padding-block: 12px; scrollbar-width: none;
}
.cats__track::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 30px;
  background: #fff; color: var(--ink-2);
  font-size: 14.5px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(120, 60, 20, .06);
  transition: background .3s, color .3s, transform .3s var(--ease-back), box-shadow .3s;
}
.chip:hover { transform: translateY(-2px); }
.chip.active { background: var(--ink); color: #fff; box-shadow: 0 8px 16px -8px rgba(42, 26, 16, .6); }
.chip__ico { font-size: 16px; line-height: 1; }
@media (min-width: 1024px) { .cats__track { justify-content: center; } }

/* Offer */
.offer {
  margin-top: 16px;
  display: flex; align-items: stretch; overflow: hidden;
  background: var(--ink); color: #fff;
  border-radius: var(--radius); min-height: 120px;
  cursor: pointer; text-align: start; width: 100%;
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.offer:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.offer__text { flex: 1; padding: 18px 20px; align-self: center; }
.offer__label { color: var(--o); font-size: 13px; font-weight: 800; }
.offer__title { display: block; font-size: clamp(17px, 4.6vw, 22px); font-weight: 800; line-height: 1.35; margin: 2px 0; }
.offer__sub { font-size: 13px; opacity: .78; }
.offer__img { width: 42%; max-width: 260px; object-fit: cover; }

/* Sections */
.cat-sec { padding-top: 22px; scroll-margin-top: 72px; }
.cat-sec__title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.cat-sec__title h2 { font-size: clamp(21px, 5.4vw, 28px); font-weight: 800; display: flex; align-items: center; gap: 8px; }
.cat-sec__title small { font-size: 13px; font-weight: 700; color: var(--o); white-space: nowrap; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 339px) { .grid { grid-template-columns: 1fr; } }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }

/* Card */
.card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border-radius: var(--radius); padding: 8px;
  box-shadow: var(--shadow); cursor: pointer;
  text-align: start; outline: none;
  transition: transform .4s var(--ease), box-shadow .4s, opacity .7s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card:focus-visible { box-shadow: 0 0 0 3px var(--o), var(--shadow); }
.card:active { transform: scale(.97); }
.card__media {
  position: relative; aspect-ratio: 4 / 3;
  border-radius: 16px; overflow: hidden; background: var(--o);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .5s; }
.card__media img.loading { opacity: 0; }
.card:hover .card__media img { transform: scale(1.07); }
.card__tag {
  position: absolute; top: 8px; inset-inline-start: 8px;
  background: #fff; color: var(--o-d);
  font-size: 11px; font-weight: 800; line-height: 1;
  padding: 5px 9px; border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
}
.card__tag--spicy { background: #E8352B; color: #fff; }
.card__tag--veg { background: #2FA866; color: #fff; }
.card__tag--new { background: var(--ink); color: #fff; }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 10px 4px 2px; }
.card__name { font-size: 15px; font-weight: 800; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__desc { font-size: 12px; color: var(--mute); line-height: 1.55; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.card__price { font: 800 16.5px var(--font-num); color: var(--o); direction: ltr; }
.card__price small { font-size: .7em; font-weight: 700; }
.card__go {
  width: 34px; height: 34px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--o); color: #fff; font-size: 16px;
  transition: transform .35s var(--ease-back), background .3s;
}
.card:hover .card__go { transform: translateX(-3px); background: var(--o-d); }
[dir="ltr"] .card:hover .card__go { transform: translateX(3px); }
@media (min-width: 640px) {
  .card { padding: 10px; }
  .card__name { font-size: 16.5px; }
  .card__desc { font-size: 13px; }
  .card__price { font-size: 18px; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px) scale(.98); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease) var(--d, 0s), transform .7s var(--ease) var(--d, 0s), box-shadow .4s; }
.reveal.in:hover { transform: translateY(-6px); transition-delay: 0s; }
.reveal.in:active { transform: scale(.97); }

/* Empty search */
.empty { text-align: center; padding: 60px 0 30px; color: var(--mute); }
.empty__ico { font-size: 54px; animation: wobble 2s ease-in-out infinite; }
.empty h3 { color: var(--ink); font-size: 20px; margin-top: 8px; }
@keyframes wobble { 50% { transform: rotate(14deg) scale(1.06); } }
mark { background: var(--o-l); color: inherit; border-radius: 4px; padding: 0 2px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { margin-top: 56px; background: var(--o); color: #fff; border-radius: 34px 34px 0 0; padding: 40px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.footer__logo { width: 96px; height: auto; }
.footer__info { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.footer__info a, .footer__info span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.footer__social { margin-top: 2px; }
.footer__copy { font: 500 12px var(--font-num); opacity: .8; }

/* ==========================================================================
   Item details (Modal / Sheet)
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 100; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(30, 15, 5, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .45s var(--ease);
}
.modal.open .modal__backdrop { opacity: 1; }

.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 94vh; max-height: 94svh;
  background: var(--cream);
  border-radius: 30px 30px 0 0;
  overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column;
  transform: translateY(105%);
  transition: transform .5s var(--ease);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, .2);
  scrollbar-width: none;
}
.sheet::-webkit-scrollbar { display: none; }
.modal.open .sheet { transform: none; }
.sheet.dragging { transition: none; }

.sheet__media { position: relative; flex: none; aspect-ratio: 4 / 3; background: var(--o); overflow: hidden; touch-action: pan-y; }
.sheet__media img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.sheet__media img.flip-hide { opacity: 0; }
.sheet__grip { position: absolute; top: 8px; left: 50%; translate: -50% 0; width: 44px; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .85); z-index: 2; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.sheet__tools { position: absolute; top: 18px; left: 16px; right: 16px; display: flex; justify-content: space-between; z-index: 2; pointer-events: none; }
.tool {
  pointer-events: auto;
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 19px;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .35);
  transition: transform .3s var(--ease-back), background .2s;
}
.tool:hover { transform: scale(1.08); background: #fff; }
.tool:active { transform: scale(.9); }
.zoom-hint {
  position: absolute; bottom: 30px; inset-inline-end: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(42, 26, 16, .72); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 20px;
  transition: background .2s;
}
.zoom-hint:hover { background: rgba(42, 26, 16, .9); }

.sheet__body {
  position: relative; z-index: 1;
  margin-top: -22px; background: var(--cream);
  border-radius: 26px 26px 0 0;
  padding: 22px 22px 8px;
  flex: 1;
}
.sheet__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.sheet__tags:empty { display: none; }
.sheet__tags .card__tag { position: static; box-shadow: none; background: var(--o-l); }
.sheet__tags .card__tag--spicy { background: #E8352B; }
.sheet__tags .card__tag--veg { background: #2FA866; }
.sheet__tags .card__tag--new { background: var(--ink); }
.sheet__title { font-size: clamp(23px, 6.4vw, 30px); font-weight: 900; line-height: 1.25; }
.sheet__en { font: 600 13px var(--font-num); color: #B59D8D; letter-spacing: .3px; margin-top: 2px; }
.sheet__desc { font-size: 15px; line-height: 1.8; color: #7D6758; margin-top: 12px; }

.sizes { margin-top: 18px; }
.sizes h3 { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.sizes__list { display: flex; gap: 10px; }
.size {
  flex: 1; background: #fff; border-radius: 16px; padding: 10px 4px;
  text-align: center; font-size: 13px; font-weight: 700; color: #7D6758;
  border: 2px solid transparent;
  transition: border-color .25s, color .25s, transform .3s var(--ease-back), background .25s;
}
.size b { display: block; font: 800 15px var(--font-num); color: var(--ink); }
.size:hover { transform: translateY(-2px); }
.size.active { border-color: var(--o); color: var(--o); background: #FFF9F5; }

.sheet__cta {
  position: sticky; bottom: 0; z-index: 3;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--cream) 75%, rgba(255, 244, 236, 0));
}
.sheet__price { font: 800 27px var(--font-num); color: var(--ink); direction: ltr; white-space: nowrap; }
.sheet__price small { font-size: .55em; color: var(--o); }
.sheet__price.bump { animation: bump .4s var(--ease-back); }
@keyframes bump { 40% { transform: scale(1.18); color: var(--o); } }
.wa-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--wa); color: #fff;
  border-radius: 18px; padding: 14px 12px;
  font-size: 16px; font-weight: 800; white-space: nowrap;
  box-shadow: 0 12px 24px -10px rgba(37, 211, 102, .75);
  transition: transform .3s var(--ease-back), filter .2s;
}
.wa-btn .ico { font-size: 21px; }
.wa-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.wa-btn:active { transform: scale(.96); }

/* Sheet content entrance */
.modal.open .sheet__body > *, .modal.open .sheet__cta > * { animation: fadeUp .6s var(--ease) both; }
.modal.open .sheet__body > :nth-child(2) { animation-delay: .06s; }
.modal.open .sheet__body > :nth-child(3) { animation-delay: .1s; }
.modal.open .sheet__body > :nth-child(4) { animation-delay: .14s; }
.modal.open .sheet__body > :nth-child(5) { animation-delay: .18s; }
.modal.open .sheet__cta > * { animation-delay: .2s; }

@media (min-width: 900px) {
  .sheet {
    left: 50%; top: 50%; right: auto; bottom: auto;
    width: min(1040px, calc(100vw - 64px));
    max-height: min(640px, calc(100vh - 64px));
    border-radius: 30px;
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    grid-template-rows: 1fr auto;
    grid-template-areas: "media body" "media cta";
    overflow: hidden;
    transform: translate(-50%, -46%) scale(.94);
    opacity: 0;
    transition: transform .5s var(--ease), opacity .35s;
  }
  .modal.open .sheet { transform: translate(-50%, -50%); opacity: 1; }
  .sheet__media { grid-area: media; align-self: center; margin: 16px; margin-inline-end: 0; border-radius: 22px; }
  .sheet__grip { display: none; }
  .sheet__body { grid-area: body; margin: 0; overflow-y: auto; padding: 32px 28px 8px; border-radius: 0; }
  .sheet__cta { grid-area: cta; position: static; padding: 14px 28px 24px; background: var(--cream); }
  .zoom-hint { bottom: 14px; }
}

/* Flying image (FLIP) */
.flyer { position: fixed; z-index: 150; object-fit: cover; pointer-events: none; will-change: transform; transform-origin: 0 0; }

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 8, 3, .94);
  display: grid; place-items: center;
  opacity: 0; transition: opacity .35s;
}
.lightbox.open { opacity: 1; }
.lightbox img {
  max-width: 100vw; max-height: 100vh; max-height: 100svh;
  width: auto; height: auto; object-fit: contain;
  transform: scale(.9); transition: transform .45s var(--ease);
  cursor: zoom-out;
}
.lightbox.open img { transform: none; }
.lightbox__close { position: absolute; top: max(16px, env(safe-area-inset-top)); inset-inline-end: 16px; }

/* ==========================================================================
   Misc
   ========================================================================== */
.to-top {
  position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); inset-inline-start: 18px; z-index: 50;
  width: 48px; height: 48px; border-radius: 16px;
  background: var(--ink); color: #fff; font-size: 20px;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px -8px rgba(42, 26, 16, .6);
  opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none;
  transition: opacity .3s, transform .4s var(--ease-back);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

.toast {
  position: fixed; left: 50%; bottom: 90px; z-index: 300;
  translate: -50% 0;
  background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 30px;
  font-size: 14px; font-weight: 700;
  opacity: 0; transform: translateY(16px);
  transition: opacity .3s, transform .4s var(--ease-back);
  pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: none; }

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