/* =====================================================================
   Merhi Rifai — Public menu
   Green cover with the brand's geometric pattern · gold ornamental frames ·
   bilingual rows (English | price | Arabic)
   ===================================================================== */

:root {
  --green: #0b5a2e;
  --gold: #c29a52;

  --green-deep: color-mix(in srgb, var(--green) 72%, #01140c);
  --green-soft: color-mix(in srgb, var(--green) 8%, #fff);
  --gold-light: color-mix(in srgb, var(--gold) 42%, #fff7dc);
  --gold-deep: color-mix(in srgb, var(--gold) 82%, #5e400b);
  --gold-ink: color-mix(in srgb, var(--gold) 88%, #4a3108);
  --gold-grad: linear-gradient(100deg, var(--gold-deep) 0%, var(--gold-light) 24%, var(--gold) 46%, var(--gold-light) 72%, var(--gold-deep) 100%);
  --gold-text: linear-gradient(180deg, color-mix(in srgb, var(--gold) 70%, #fff3c9) 0%, var(--gold-ink) 100%);

  --paper: #ffffff;
  --ink-soft: #5f7a6d;

  --f-en: "Nunito Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-ar: "Almarai", "Geeza Pro", "Segoe UI", Tahoma, sans-serif;
  --f-ar-display: "Reem Kufi", "Almarai", sans-serif;
  --f-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --f-callig: "Aref Ruqaa", "Almarai", serif;

  --pattern-mask: url("../img/pattern-mask.png");   /* brand pattern, used as a mask so it can take any colour */
  --pattern-soft: url("../img/pattern-soft.png");   /* same pattern, faint white lines */
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--green-deep);
  color: var(--green);
  font-family: var(--f-en);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[lang="ar"] { font-family: var(--f-ar); }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* Fixed patterned backdrop around the sheet on larger screens */
.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background-color: var(--green-deep);
  background-image: var(--pattern-soft);
  background-size: 170px 170px;
  background-position: center top;
}

.sheet {
  max-width: 860px;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55);
  overflow: clip;
}
@media (min-width: 900px) {
  .sheet { margin: 40px auto 56px; border-radius: 6px; }
}

/* =====================================================================
   Cover
   ===================================================================== */
.cover { position: relative; background: var(--green); color: #fff; }
.cover-inner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(86vh, 820px);
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: clamp(44px, 9vh, 80px) 20px clamp(48px, 9vh, 84px);
}
.cover-inner::before,
.cover-inner::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cover-inner::before {
  background: color-mix(in srgb, var(--gold) 30%, transparent);
  -webkit-mask: var(--pattern-mask) center top / 210px 210px repeat;
          mask: var(--pattern-mask) center top / 210px 210px repeat;
}
.cover-inner::after {
  /* calm the pattern behind the logo and the greeting so they read clearly */
  background:
    radial-gradient(ellipse 62% 34% at 50% 24%, var(--green) 20%, color-mix(in srgb, var(--green) 0%, transparent) 100%),
    radial-gradient(ellipse 70% 22% at 50% 82%, color-mix(in srgb, var(--green) 85%, transparent) 10%, color-mix(in srgb, var(--green) 0%, transparent) 100%),
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .18));
}
@supports not ((mask-image: none) or (-webkit-mask-image: none)) {
  .cover-inner::before { display: none; }
}

.cover-logo { position: relative; }
.cover-logo .emblem { width: clamp(108px, 28vw, 146px); height: auto; }
.cover-logo .emblem.is-image {
  width: clamp(176px, 48vw, 244px); height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .35)) drop-shadow(0 0 1px rgba(255, 255, 255, .5));
}

.brand-en {
  margin: 22px 0 0;
  font-family: var(--f-en);
  font-weight: 300;
  font-size: clamp(21px, 5.6vw, 36px);
  letter-spacing: .3em;
  margin-right: -.3em;             /* keep the spaced word optically centred */
  line-height: 1.3;
  max-width: 16em;
  text-wrap: balance;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.brand-ar {
  margin-top: 6px;
  font-family: var(--f-callig);
  font-weight: 700;
  font-size: clamp(20px, 5vw, 27px);
  color: var(--gold-light);
  line-height: 1.5;
}
.brand-year {
  margin-top: 2px;
  font-size: clamp(22px, 5.4vw, 30px);
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--gold-light);
}

.greeting { margin-top: auto; padding-top: clamp(48px, 12vh, 120px); }
.greeting p { margin: 0; }
.greeting-ar {
  font-family: var(--f-ar-display) !important;
  font-weight: 400;
  font-size: clamp(58px, 16vw, 112px);
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .12);
}
.greeting-en {
  margin-top: 6px !important;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5em;
  margin-right: -.5em !important;
  text-transform: uppercase;
  color: var(--gold-light);
}

.menu-switch {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-top: 34px;
}
.menu-switch a {
  display: inline-flex; flex-direction: column; align-items: center;
  min-width: 96px; padding: 8px 16px 7px;
  border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent);
  border-radius: 999px;
  text-decoration: none; color: var(--gold-light);
  transition: background .2s, color .2s, border-color .2s;
}
.menu-switch a span:first-child { font-weight: 700; font-size: 15px; }
.menu-switch a span:last-child { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; opacity: .9; }
.menu-switch a:hover { border-color: var(--gold-light); }
.menu-switch a.is-active { background: var(--gold-grad); color: var(--green-deep); border-color: transparent; }

.gold-band { position: relative; height: 12px; background: var(--gold-grad); }
.cover-photo { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: #ece9e2; }
.cover-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 700px) { .cover-photo { aspect-ratio: 16 / 10; } }

/* entrance */
.reveal { opacity: 0; transform: translateY(14px); animation: rise .9s cubic-bezier(.2, .7, .2, 1) forwards; }
.reveal:nth-child(2) { animation-delay: .08s; }
.reveal:nth-child(3) { animation-delay: .16s; }
.reveal:nth-child(4) { animation-delay: .24s; }
.reveal:nth-child(5) { animation-delay: .38s; }
.reveal:nth-child(6) { animation-delay: .5s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: none; } }

/* =====================================================================
   Sticky category bar + search
   ===================================================================== */
.cat-nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 6px;
  padding: 10px 10px 10px 0;
  background: rgba(255, 255, 255, .93);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  transition: box-shadow .25s;
}
.cat-nav.is-stuck { box-shadow: 0 8px 24px -14px rgba(0, 40, 25, .35); }
.cat-scroll {
  flex: 1; min-width: 0;
  display: flex; gap: 8px;
  overflow-x: auto; scroll-behavior: smooth;
  padding: 2px 12px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%);
}
.cat-scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 14px 5px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--gold) 38%, transparent);
  text-decoration: none; color: var(--green);
  line-height: 1.25;
  transition: background .2s, color .2s, border-color .2s;
}
.chip-ar { font-weight: 700; font-size: 14px; }
.chip-en { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.chip:hover { border-color: var(--gold); }
.chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.chip.is-active .chip-en { color: var(--gold-light); }

.search-btn, .search-close {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  border-radius: 50%;
  background: #fff; color: var(--green);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.search-btn:hover, .search-close:hover { background: var(--green); color: #fff; }
.ic { width: 20px; height: 20px; display: block; }

.search-bar {
  position: absolute; inset: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px 0 16px;
  background: #fff;
}
.search-bar[hidden] { display: none; }
.search-bar .s-ic { color: var(--gold-ink); flex: 0 0 auto; }
.search-bar input {
  flex: 1; min-width: 0; height: 44px;
  border: 0; outline: 0; background: transparent;
  font: 500 16px var(--f-en); color: var(--green);
}
.search-bar input::placeholder { color: #9bb0a6; }
.search-bar input::-webkit-search-cancel-button { display: none; }

/* =====================================================================
   Pages & ornamental section frames
   ===================================================================== */
.pages { padding: clamp(40px, 7vw, 68px) clamp(18px, 6.5vw, 76px) 20px; }

.section { margin-bottom: clamp(48px, 8vw, 72px); scroll-margin-top: 84px; }
.section[hidden] { display: none; }

.frame {
  position: relative;
  margin: 0 auto clamp(22px, 4vw, 34px);
  padding: 6px;
  border: 3px solid transparent;
  border-image: var(--gold-grad) 1;
}
.frame--large { max-width: 620px; }
.frame--compact { width: fit-content; min-width: min(330px, calc(100% - 28px)); max-width: calc(100% - 28px); }

.frame-in {
  position: relative;
  margin: 0;
  border: 2px solid transparent;
  border-image: var(--gold-grad) 1;
  text-align: center;
  font-weight: inherit;
}
.frame--large .frame-in {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  padding: clamp(10px, 2.4vw, 16px) clamp(22px, 5vw, 44px) clamp(10px, 2vw, 14px);
}
.frame--compact .frame-in {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  column-gap: clamp(22px, 6vw, 46px);
  padding: clamp(6px, 1.6vw, 10px) clamp(26px, 6vw, 48px);
}

/* concave corner notches */
.fc {
  position: absolute; z-index: 1;
  width: 20px; height: 20px;
  background: var(--paper);
  border: 0 solid var(--gold-deep);
}
.fc.tl { top: -3px; left: -3px; border-right-width: 3px; border-bottom-width: 3px; border-bottom-right-radius: 100%; }
.fc.tr { top: -3px; right: -3px; border-left-width: 3px; border-bottom-width: 3px; border-bottom-left-radius: 100%; }
.fc.bl { bottom: -3px; left: -3px; border-right-width: 3px; border-top-width: 3px; border-top-right-radius: 100%; }
.fc.br { bottom: -3px; right: -3px; border-left-width: 3px; border-top-width: 3px; border-top-left-radius: 100%; }

/* side brackets */
.ft {
  position: absolute; top: 26%; bottom: 26%;
  width: 14px;
  border: 2.5px solid var(--gold-deep);
}
.ft.l { left: -17px; border-right: 0; }
.ft.r { right: -17px; border-left: 0; }

.t-ar, .t-en {
  display: block;
  background: var(--gold-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.t-ar { font-family: var(--f-ar-display) !important; font-weight: 400; line-height: 1.35; }
.t-en { font-family: var(--f-serif); font-weight: 800; text-transform: uppercase; letter-spacing: .015em; line-height: 1.2; }
.frame--large .t-ar { font-size: clamp(30px, 7.4vw, 46px); }
.frame--large .t-en { font-size: clamp(16px, 4.3vw, 29px); }
.frame--compact .t-ar { font-size: clamp(26px, 6.4vw, 38px); }
.frame--compact .t-en { font-size: clamp(17px, 4.4vw, 26px); }

/* =====================================================================
   Item rows
   ===================================================================== */
.items { max-width: 720px; margin: 0 auto; }
/* All rows of a section share one grid, so the price column fits the longest price (e.g. 450,000 ل.ل) */
@supports (grid-template-columns: subgrid) {
  .items { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: 14px; }
  .items > .item { grid-column: 1 / -1; grid-template-columns: subgrid; }
}
.cur-after .i-price { text-align: right; }

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px minmax(0, 1fr);
  column-gap: 14px;
  align-items: baseline;
  padding: 5px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  transition: background .2s;
}
@media (hover: hover) { .item:hover { background: var(--green-soft); } }
.item[hidden] { display: none; }

.i-en { font-family: var(--f-en); font-size: 17.5px; font-weight: 400; line-height: 1.35; }
.i-ar { font-family: var(--f-ar); font-size: 17px; font-weight: 700; line-height: 1.55; text-align: right; }
.i-price {
  font-family: var(--f-en);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: .01em;
  white-space: nowrap;
  padding-left: 12px;
  font-variant-numeric: tabular-nums;
}

.i-note, .i-addon { font-size: .74em; white-space: nowrap; }
.i-note { opacity: .85; }
.i-addon { font-weight: 800; }
.i-en .i-note, .i-en .i-addon { margin-left: 4px; }
.i-ar .i-note, .i-ar .i-addon { margin-right: 4px; }

.i-badge {
  display: inline-block;
  vertical-align: 2px;
  margin-inline-start: 6px;
  padding: 2px 8px 1px;
  border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .08em; line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--gold-ink);
  border: 1px solid color-mix(in srgb, var(--gold) 70%, transparent);
  background: color-mix(in srgb, var(--gold) 10%, #fff);
}
.i-ar .i-badge { letter-spacing: 0; font-size: 11px; }
.i-badge.b-spicy { color: #b23a26; border-color: #e7a597; background: #fdf1ee; }
.i-badge.b-veg { color: #2f7d32; border-color: #9fcfa1; background: #f1f9f1; }

.i-desc {
  margin: 2px 0 4px;
  font-size: 13px; font-weight: 400; line-height: 1.5;
  color: var(--ink-soft);
}
.i-ar .i-desc { font-size: 13px; }

.item.is-out .i-name { text-decoration: line-through; text-decoration-thickness: 1px; opacity: .5; }
.item.is-out .i-note, .item.is-out .i-addon, .item.is-out .i-desc { opacity: .5; }
.sold-out {
  display: inline-block;
  font-size: 11px; font-weight: 800; letter-spacing: .04em;
  color: #a5442f;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .item { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: 10px; padding: 6px 8px; margin: 0 -8px; }
  .i-en { font-size: 14.5px; }
  .i-ar { font-size: 14.5px; }
  .i-price { font-size: 14px; padding-left: 0; text-align: center; min-width: 52px; }
  .cur-after .i-price { text-align: right; font-size: 13px; }
  .items { column-gap: 10px; }
  .i-note, .i-addon { white-space: normal; }
  .i-badge { font-size: 9px; padding: 1px 6px 0; }
  .i-desc, .i-ar .i-desc { font-size: 12px; }
}

/* =====================================================================
   Empty / no results
   ===================================================================== */
.empty-state, .no-results { text-align: center; padding: 40px 10px 60px; color: var(--ink-soft); }
.empty-state p, .no-results p { margin: 4px 0; }
.empty-state p:first-child, .no-results p:first-child { font-size: 22px; font-weight: 700; color: var(--green); }

/* =====================================================================
   Footer
   ===================================================================== */
.menu-foot { padding: 10px clamp(18px, 6.5vw, 76px) 26px; background: var(--paper); }
.foot-rule { height: 4px; width: min(72%, 560px); margin: 0 auto 30px; background: var(--gold-grad); border-radius: 2px; }
.foot-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 18px;
}
.foot-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.foot-web { font-weight: 800; font-size: 15px; color: var(--gold-ink); text-decoration: none; }
.foot-web:hover { text-decoration: underline; }
.foot-social { display: flex; gap: 6px; }
.foot-social a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--gold-ink); transition: background .2s, color .2s; }
.foot-social a:hover { background: var(--gold-grad); color: #fff; }
.foot-social .ic { width: 18px; height: 18px; }
.foot-handle { font-size: 13px; color: var(--gold-ink); }
.foot-phone { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--green); }
.foot-phone .ic { width: 15px; height: 15px; color: var(--gold-ink); }

.foot-vat { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.foot-vat strong { font-size: 15px; font-weight: 800; }
.foot-vat span { font-size: 14px; font-weight: 800; }
.foot-code { text-align: right; font-size: 12.5px; color: #3a3a3a; letter-spacing: .02em; }
.foot-copy { margin: 26px 0 0; text-align: center; font-size: 11.5px; letter-spacing: .08em; color: #9aa9a2; }

@media (max-width: 640px) {
  .foot-grid { grid-template-columns: 1fr; text-align: center; gap: 16px; }
  .foot-contact { align-items: center; order: 2; }
  .foot-vat { order: 1; }
  .foot-code { text-align: center; order: 3; }
}

/* =====================================================================
   Back to top
   ===================================================================== */
.to-top {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 40;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--green); color: var(--gold-light);
  border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent);
  box-shadow: 0 10px 24px -8px rgba(0, 40, 25, .5);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top .ic { width: 22px; height: 22px; }

/* =====================================================================
   Print — produces a clean paper menu
   ===================================================================== */
@media print {
  @page { size: A4; margin: 10mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; }
  .backdrop, .cat-nav, .to-top, .menu-switch, .no-results { display: none !important; }
  .sheet { max-width: none; margin: 0; box-shadow: none; border-radius: 0; }
  .reveal { animation: none; opacity: 1; transform: none; }
  .cover { break-after: page; }
  .cover-inner { min-height: 220mm; }
  .section { break-inside: avoid; }
  .item:hover { background: none; }
}
