/* Master Class Qabab — Home page (approved template layout).
   Mobile first; tablet ≥ 768, desktop ≥ 1200 (hero switches to the wide composition at ≥ 1000). */

/* base .dish-img sets aspect-ratio but not height:auto, so the HTML height attribute would stretch it */
main .dish-img { height: auto; }

/* =========================================================
   01 · HERO
   The stage keeps the Figma frame's proportions (aspect-ratio + cqw units),
   so dishes, word and overlaps scale together; it is capped and centred on wide screens.
   ========================================================= */
.hero { padding: 8px 0 0; }
.hero__panel {
  position: relative; overflow: hidden; isolation: isolate;
  margin-inline: var(--margin); border-radius: 20px;
  background: radial-gradient(70% 80% at 50% 45%, var(--red-glow) 0%, var(--red-mid) 50%, var(--red-deep) 100%);
  color: var(--cream);
}
.hero__panel > .ticker { position: absolute; top: 14px; left: 0; right: 0; z-index: 3; }
.hero__panel > .paper { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; }

/* stage — mobile composition 342 × 560 */
.hero__stage { position: relative; margin-inline: auto; width: 100%; max-width: 440px; aspect-ratio: 342 / 560; container-type: inline-size; }
.hero__dish { position: absolute; z-index: 1; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.hero__dish--centre { z-index: 3; }
.hero__float { width: 100%; height: 100%; }
.hero__dish img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 20px 18px rgba(51, 5, 5, .4)); will-change: transform; }

.hero__dish--left   { left: -7.544%; top: 45.08%;  width: 61.40%; height: 33.93%; --rot: -8deg; }
.hero__dish--right  { left: 53.80%;  top: 47.86%;  width: 57.31%; height: 32.14%; }
.hero__dish--centre { left: 7.60%;   top: 35%;     width: 84.80%; height: 44.64%; }
.hero__word { position: absolute; z-index: 2; left: 0; right: 0; top: 21.07%; text-align: center; white-space: nowrap;
  font-size: calc(33.92cqw * var(--fit, 1)); line-height: .95; letter-spacing: .02em;
  color: var(--cream); text-shadow: 0 10px 24px rgba(30, 26, 24, .35);
  transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.hero__word span { display: inline-block; }

/* parallax (desktop pointer) — set by home.js as --mx / --my in −1…1 */
.hero__dish--left   { transform: translate(calc(var(--mx, 0) * -16px), calc(var(--my, 0) * -10px)) rotate(var(--rot, 0deg)); }
.hero__dish--right  { transform: translate(calc(var(--mx, 0) * -12px), calc(var(--my, 0) * -8px)); }
.hero__dish--centre { transform: translate(calc(var(--mx, 0) * 22px), calc(var(--my, 0) * 14px)); }
.hero__word         { transform: translate(calc(var(--mx, 0) * -6px), calc(var(--my, 0) * -4px)); }

/* idle float */
@media (prefers-reduced-motion: no-preference) {
  .hero__float { animation: hero-float 6.5s ease-in-out infinite; }
  .hero__dish--left .hero__float { animation-duration: 7.2s; animation-delay: -2.4s; }
  .hero__dish--right .hero__float { animation-duration: 6.1s; animation-delay: -4.1s; }
  /* hidden until home.js plays the entrance; failsafe shows it anyway */
  .js .hero:not(.is-ready) .hero__dish img, .js .hero:not(.is-ready) .hero__word span { opacity: 0; animation: hero-failsafe 0s 2.5s forwards; }
}
@keyframes hero-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-9px) rotate(.8deg); } }
@keyframes hero-failsafe { to { opacity: 1; } }

/* location label — mobile: centred, two lines */
.hero__loc { position: absolute; z-index: 4; left: 20px; right: 20px; bottom: 42px; text-align: center; color: var(--cream); }
.hero__loc span { display: block; }
.hero__sep { display: none !important; }

/* in-panel switcher (tablet/desktop) */
.hero__switch { display: none; }
.hero__switch button { position: relative; padding: 14px 0; min-height: 44px; background: none; border: 0; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: var(--cream); opacity: .6; transition: opacity .25s; }
.hero__switch button:hover, .hero__switch button.is-active { opacity: 1; }
.hero__switch button::before, .hero__switch button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; border-radius: 1px; transform-origin: 0 50%; }
.hero__switch button::before { background: var(--cream); transform: scaleX(0); transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.hero__switch button.is-active::before { transform: scaleX(1); }
.hero__switch button::after { background: var(--flame); transform: scaleX(0); }
.hero__switch button.is-active::after { transform: scaleX(var(--p, 0)); }
.hero__switch button:focus-visible { outline-offset: 2px; }

/* below the panel (mobile): chips + order button */
.hero__below { padding-top: 24px; }
.hero__chips { gap: 8px; }
.hero__chips .chip { min-height: 40px; }
.hero__below .btn { margin-top: 20px; }

/* ---- tablet composition 736 × 640 ---- */
@media (min-width: 768px) {
  .hero { padding-bottom: 8px; }
  .hero__panel { margin-inline: 16px; border-radius: var(--r-hero); }
  .hero__stage { max-width: 800px; aspect-ratio: 736 / 640; }
  .hero__dish img { filter: drop-shadow(0 18px 15px rgba(51, 5, 5, .4)); }
  .hero__dish--left   { left: -.984%; top: 46.33%; width: 38.315%; height: 35.625%; --rot: 8deg; }
  .hero__dish--right  { left: 63.86%; top: 40.94%; width: 34.78%;  height: 36.25%; }
  .hero__dish--centre { left: 24.46%; top: 39.375%; width: 52.17%; height: 39.375%; }
  .hero__word { top: 20.625%; font-size: calc(25.815cqw * var(--fit, 1)); line-height: .947; }

  .hero__loc { left: 32px; right: auto; bottom: 64px; text-align: left; }
  .hero__addr { margin-top: 8px; opacity: .7; }
  .hero__switch { display: flex; gap: 28px; position: absolute; z-index: 4; right: 32px; bottom: 50px; }
  .hero__switch button { opacity: .55; }
  .hero__below { display: none; }
}

/* ---- wide composition 1392 × 760 (≥ 1000; Figma desktop) ---- */
@media (min-width: 1000px) {
  .hero__stage { max-width: 1480px; aspect-ratio: 1392 / 760; }
  .hero__dish img { filter: drop-shadow(0 30px 25px rgba(51, 5, 5, .4)); }
  .hero__dish--left   { left: 4.609%;  top: 38.875%; width: 33.765%; height: 50%;     --rot: -8deg; }
  .hero__dish--right  { left: 66.81%;  top: 39.47%;  width: 31.61%;  height: 52.63%; }
  .hero__dish--centre { left: 27.01%;  top: 38.95%;  width: 45.98%;  height: 55.26%; }
  .hero__word { top: 23.68%; font-size: calc(22.99cqw * var(--fit, 1)); line-height: .9375; text-shadow: 0 16px 40px rgba(30, 26, 24, .35); }

  .hero__loc { left: calc(var(--margin) - 16px); bottom: 54px; white-space: nowrap; }
  .hero__loc span { display: inline; }
  .hero__sep { display: inline !important; margin: 0 .55em; }
  .hero__addr { margin: 0; opacity: 1; }
  .hero__switch { gap: 32px; right: calc(var(--margin) - 16px); bottom: 40px; }
  .hero__switch button { opacity: .6; }
}
@media (min-width: 1200px) {
  .hero { padding-bottom: 24px; }
  .hero__panel { margin-inline: 24px; }
  .hero__loc { left: calc(var(--margin) - 24px); }
  .hero__switch { right: calc(var(--margin) - 24px); }
}
/* between 1000 and 1100 the label and switcher would meet — stack the label */
@media (min-width: 1000px) and (max-width: 1099px) {
  .hero__loc span { display: block; } .hero__sep { display: none !important; }
  .hero__addr { margin-top: 8px; opacity: .7; }
  .hero__loc { bottom: 54px; }
  .hero__dish--left { top: 36%; height: 44%; } /* keep the potato clear of the stacked label */
}

/* =========================================================
   02 · OUR GRILL (category grid)
   ========================================================= */
.grill__grid { margin-top: var(--head-gap); row-gap: 24px; }
.grill__grid > li { grid-column: span 2; }
.grill .cat { gap: 8px; }
.grill .cat .dish-img { width: 92%; }
.grill .cat .t-caption { margin-top: 0; }
.grill .cat .t-item { font-size: 20px; line-height: 24px; } /* Figma keeps Item caps at 20px on mobile */
.grill__cta { margin-top: 40px; text-align: center; }
@media (min-width: 768px) {
  .grill__grid { row-gap: 40px; }
  .grill .cat .dish-img { width: 96%; }
  .grill__cta { margin-top: 48px; }
}
@media (min-width: 1200px) {
  .grill__grid { row-gap: 48px; }
  .grill__grid > li { grid-column: span 3; }
  .grill .cat { gap: 12px; }
  .grill .cat .dish-img { width: 250px; max-width: 100%; }
}

/* =========================================================
   03 · CRAFT (dark)
   ========================================================= */
.craft { padding-top: calc(var(--section-pad) + 18px); }
.craft__stripe { position: absolute; top: 0; left: 0; right: 0; }
.craft__in { display: flex; flex-direction: column; }
.craft__copy { display: contents; }
.craft__title { margin-top: 12px; }
.craft__text { margin-top: 20px; }
.craft__stats { margin-top: 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gutter); }
.craft__stats li { display: flex; flex-direction: column; gap: 6px; }
.craft__stats .t-stat { white-space: nowrap; }
.craft__stats .t-label { color: var(--on-dark); opacity: .8; }
@media (max-width: 374px) { .craft__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 12px; } }
.craft__photos { order: 1; margin-top: 40px; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.craft__photos .photo { height: auto; aspect-ratio: 163 / 230; }
.craft__photos .craft__wide { grid-column: 1 / -1; aspect-ratio: 342 / 228; }
.craft__sticker img { width: 100%; height: auto; }
.craft__sticker { position: absolute; z-index: 2; width: 120px; height: auto; top: -18px; right: 9px; transform: rotate(8deg); filter: drop-shadow(0 8px 8px rgba(30, 26, 24, .2)); }
.craft__cta { order: 2; margin-top: 40px; }

@media (min-width: 768px) {
  .craft__title { max-width: calc((100% - 7 * var(--gutter)) / 8 * 7 + 6 * var(--gutter)); }
  .craft__text { margin-top: 24px; max-width: calc((100% - 7 * var(--gutter)) / 8 * 7 + 6 * var(--gutter)); }
  .craft__title { margin-top: 12px; }
  .craft__stats { margin-top: 40px; grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .craft__stats li { grid-column: span 2; }
  .craft__cta { order: 0; margin-top: 40px; }
  .craft__photos { margin-top: 48px; }
  .craft__photos .photo { aspect-ratio: 328 / 400; }
  .craft__photos .craft__wide { aspect-ratio: 672 / 360; }
  .craft__sticker { width: 132px; top: -18px; right: -27px; filter: drop-shadow(0 20px 20px rgba(30, 26, 24, .3)); }
}
@media (min-width: 1200px) {
  .craft { padding-top: var(--section-pad); }
  .craft__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; }
  .craft__copy { display: flex; flex-direction: column; align-items: flex-start; grid-column: 1 / 7; }
  .craft__title { margin-top: 16px; max-width: 460px; }
  .craft__text { max-width: none; }
  .craft__stats { margin-top: 48px; display: flex; gap: 56px; }
  .craft__stats li { gap: 8px; }
  .craft__stats .t-label { opacity: .7; }
  .craft__cta { margin-top: 48px; }
  .craft__photos { grid-column: 8 / 13; margin-top: 0; gap: 24px; }
  .craft__photos .photo { aspect-ratio: 206 / 336; }
  .craft__photos .craft__wide { aspect-ratio: 436 / 300; }
  .craft__sticker { width: 160px; top: -19px; right: -38px; filter: drop-shadow(0 30px 30px rgba(30, 26, 24, .3)); }
}

/* =========================================================
   04 · FAVOURITES
   ========================================================= */
.fav__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.fav__order { display: none; }
.fav__cards { margin-top: var(--head-gap); display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: calc(var(--margin) * -1); padding: 0 var(--margin) 40px; scroll-padding-inline: var(--margin); margin-bottom: -40px; }
.fav__cards::-webkit-scrollbar { display: none; }
.fav__cards .card { flex: 0 0 240px; min-height: 360px; scroll-snap-align: start; }
.fav .card .dish-img { width: 99%; }
.fav .card__meta { margin-top: 6px; }

.fav__feature { margin-top: 32px; border-radius: var(--r-card); padding: 20px 20px 24px; display: flex; flex-direction: column; }
.fav__tile { background: var(--masa); border-radius: var(--r-photo); height: 210px; display: grid; place-items: center; overflow: hidden; }
.fav__tile img { width: 230px; max-width: 100%; height: 210px; object-fit: cover; }
.fav__copy { margin-top: 24px; display: flex; flex-direction: column; align-items: flex-start; }
.fav__name { margin-top: 8px; }
.fav__desc { margin-top: 12px; }
.fav__price { margin-top: 16px; white-space: normal; color: var(--flame); }
.fav__cta { margin-top: 32px; }

@media (min-width: 768px) {
  .fav__order { display: inline-flex; }
  .fav__cta { display: none; }
  .fav__feature { flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 32px; padding: 32px; }
  .fav__tile { flex: none; width: 200px; height: 200px; }
  .fav__tile img { width: 100%; height: 100%; }
  .fav__copy { margin-top: 0; max-width: 376px; }
  .fav__name { margin-top: 10px; }
}
@media (min-width: 1200px) {
  .fav__cards { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); overflow: visible; margin: var(--head-gap) 0 0; padding: 0; }
  .fav__cards .card { grid-column: span 3; min-height: 380px; }
  .fav__feature { margin-top: 48px; padding: 32px 92px; min-height: 296px; }
  .fav__tile { width: 232px; height: 232px; }
  .fav__copy { max-width: 528px; }
  .fav__name { margin-top: 12px; }
  .fav__desc { margin-top: 16px; font-size: 17px; line-height: 28px; }
  .fav__price { margin-top: 20px; }
}

/* =========================================================
   05 · BEER & SAUCES
   ========================================================= */
.bar { position: relative; }
.bar__photo { height: 440px; overflow: hidden; }
.bar__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.bar__stripe { position: relative; }
.bar__br { display: none; }
.bar__in { padding-block: calc(var(--section-pad) - 8px) var(--section-pad); }
.bar__title { margin-top: 12px; }
.bar__text { margin-top: 20px; }
.bar__drinks { position: relative; margin-top: 32px; }
.bar__list { width: 252px; max-width: 70%; border-top: 1px solid var(--line-cream); }
.bar__list li { padding: 11px 0 12px; border-bottom: 1px solid var(--line-cream); }
.bar__pic { position: absolute; width: 72px; height: 100px; object-fit: cover; border-radius: 14px; right: 5px; top: 55px; transform: rotate(-6deg);
  box-shadow: var(--shadow-photo); transition: transform .4s ease; }
.bar__drinks:hover .bar__pic { transform: rotate(-2deg) scale(1.04); }

@media (min-width: 768px) {
  .bar__photo { height: 520px; }
  .bar__in { padding-block: var(--section-pad); }
  .bar__title { margin-top: 12px; }
  .bar__text { margin-top: 24px; max-width: calc((100% - 7 * var(--gutter)) / 8 * 5 + 4 * var(--gutter)); }
  .bar__drinks { margin-top: 40px; }
  .bar__list { width: calc((100% - 7 * var(--gutter)) / 8 * 5 + 4 * var(--gutter)); max-width: none; }
  .bar__list li { padding: 13px 0 14px; }
  .bar__pic { width: 200px; height: 260px; border-radius: var(--r-photo); right: -13px; top: -14px; transform: rotate(6deg); }
  .bar__drinks:hover .bar__pic { transform: rotate(2deg) scale(1.03); }
}
@media (min-width: 1200px) {
  .bar { min-height: 900px; display: flex; align-items: center; }
  .bar__photo { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; height: auto; }
  .bar__stripe { position: absolute; top: 0; bottom: 0; left: 50%; height: auto; width: 4px; }
  .bar__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-block: var(--section-pad); }
  .bar__copy { grid-column: 8 / 13; }
  .bar__br { display: inline; }
  .bar__title { margin-top: 16px; }
  .bar__text { max-width: none; font-size: 17px; line-height: 28px; }
  .bar__list { width: 252px; border-top: 0; }
  .bar__list li { padding: 14px 0; font: 800 20px/24px var(--sans); letter-spacing: .03em; }
  .bar__pic { width: 160px; height: 200px; right: -10px; top: 5px; transform: rotate(-6deg); }
  .bar__drinks:hover .bar__pic { transform: rotate(-2deg) scale(1.04); }
}

/* =========================================================
   06 · VISIT
   ========================================================= */
.visit { position: relative; padding-bottom: var(--section-pad); }
@media (max-width: 767px) { .visit.bg-masa2 { background: var(--masa); } }
.visit__map { display: block; height: 360px; overflow: hidden; }
.visit__map img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.visit__map:hover img { transform: scale(1.02); }
.visit__in { position: relative; }
.visit__card { position: relative; z-index: 2; margin-top: 24px; border-radius: var(--r-card); padding: 28px 20px 24px; box-shadow: var(--shadow-float); display: flex; flex-direction: column; }
.visit__kicker { color: var(--cream); opacity: .85; }
.visit__title { margin-top: 10px; }
.visit__rows { margin-top: 20px; }
.visit__rows a:hover { text-decoration: underline; text-underline-offset: 4px; }
.visit__btns { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.visit__pin { position: absolute; left: 50%; top: -204px; width: 0; height: 0; pointer-events: none; } /* map centre: 360/2 + 24 */

@media (min-width: 768px) {
  .visit { padding: 0; }
  .visit__map { position: absolute; inset: 0; height: auto; }
  .visit__in { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gutter); align-items: center;
    padding-block: var(--section-pad); pointer-events: none; }
  .visit__card { pointer-events: auto; margin-top: 0; grid-column: 1 / 6; padding: 36px 32px; }
  .visit__rows { margin-top: 24px; }
  .visit__btns { margin-top: 32px; flex-direction: row; }
  .visit__pin { position: relative; left: auto; top: auto; grid-column: 6 / -1; height: 90px; }
  .visit__pin .pin { left: 45px; top: 45px; }
}
@media (min-width: 1200px) {
  .visit__card { grid-column: 1 / 7; padding: 48px; }
  .visit__kicker { color: var(--on-dark); opacity: .8; }
  .visit__title { margin-top: 12px; }
  .visit__pin { grid-column: 8 / -1; }
}
/* narrow phones: move the pin left so its tag fits (mappin.js keeps the map under it) */
@media (max-width: 419px) { .visit__pin { left: 38%; } }
