/* SFC Plus — QR dining menu
   Plain CSS, no build step. Layout uses logical properties (inline-start /
   inline-end) so the Arabic RTL view mirrors correctly without a second
   stylesheet. */

:root {
  --gold: #f7c31b;
  --gold-deep: #e0a800;
  --brand: #e1211b;
  --brand-dark: #b81712;

  --ink: #1d1d1f;
  --ink-2: #494950;
  --ink-3: #6e6e73;
  --line: #e6e6eb;
  --canvas: #faf9f6;

  --radius: 1.25rem;
  --shadow-card: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px -8px rgb(0 0 0 / .10);
  --shadow-lift: 0 2px 4px rgb(0 0 0 / .05), 0 16px 40px -12px rgb(0 0 0 / .16);

  --font-en: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
             Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "SF Arabic", "Noto Naskh Arabic", "Noto Sans Arabic", "Segoe UI",
             Tahoma, "Traditional Arabic", sans-serif;

  --bar-h: 7.5rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-en);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

/* Arabic gets its own stack, and a touch more line height — Naskh
   forms need the room or diacritics collide with the line above. */
html[dir="rtl"] body { font-family: var(--font-ar); line-height: 1.75; }

/* Content that may still be in English while the page is Arabic — an
   untranslated dish name, say. Without this the bidi algorithm reorders it
   against the RTL paragraph and "16 Pcs Ultimate Crunch Bucket" renders as
   "Pcs Ultimate 16 Crunch Bucket". `plaintext` resolves each element's
   direction from its own first strong character instead. */
.bidi,
.card-body h3,
.card-desc,
.sec-head h2,
.sec-blurb,
.hero-line,
.sheet-body h2,
.sheet-cat,
.sheet-desc,
.tab {
  unicode-bidi: plaintext;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3 { letter-spacing: 0; }

p { margin: 0; }

button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap { max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 60;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 0 0 .5rem 0;
}
.skip:focus { inset-inline-start: 0; }

/* ---------------- Header ---------------- */
.hero-art { background: #fff; }
.hero-art-inner { margin-inline: auto; }
.hero-art-inner img { width: 100%; height: auto; }

.hero-copy {
  max-width: 42rem;
  margin-inline: auto;
  padding: 1.25rem 1rem .25rem;
  text-align: center;
}

.hero-logo {
  width: 5.5rem; height: 5.5rem; border-radius: 50%;
  margin-inline: auto; box-shadow: var(--shadow-card);
}
.hero-name { font-size: 1.9rem; font-weight: 800; letter-spacing: -.04em; margin-top: .75rem; }

.hero-line {
  font-size: .92rem;
  line-height: 1.45;
  color: var(--ink-2);
}
.hero-line + .hero-line { margin-top: .375rem; }
html[dir="rtl"] .hero-line { line-height: 1.8; }

.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .75rem; padding: .25rem .75rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink-2);
  font-size: .7rem; font-weight: 600;
  box-shadow: 0 1px 2px rgb(0 0 0 / .04);
}
.chip svg { width: .75rem; height: .75rem; color: var(--gold-deep); flex: none; }

/* ---------------- Sticky bar ---------------- */
.bar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, white 93%, transparent);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgb(0 0 0 / .06), 0 8px 24px -16px rgb(0 0 0 / .18);
  margin-top: 1rem;
}
@supports not (backdrop-filter: blur(1px)) { .bar { background: #fff; } }

.bar-top { display: flex; gap: .6rem; align-items: center; padding-top: .75rem; }

.search { position: relative; flex: 1; }
.search input {
  width: 100%; font: inherit; font-size: .9rem;
  padding: .65rem 2.5rem; border: 1px solid var(--line); border-radius: .75rem;
  background: rgb(255 255 255 / .85); color: var(--ink); outline: none;
}
.search input:focus { border-color: rgb(29 29 31 / .25); }
.search input::placeholder { color: var(--ink-3); }
/* Our own clear button replaces WebKit's, which would otherwise double up. */
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

.search-icon {
  position: absolute; inset-inline-start: .85rem; top: 50%; transform: translateY(-50%);
  width: 1rem; height: 1rem; color: var(--ink-3); pointer-events: none;
}
#clear {
  position: absolute; inset-inline-end: .6rem; top: 50%; transform: translateY(-50%);
  width: 1.5rem; height: 1.5rem; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgb(0 0 0 / .08); color: var(--ink-2);
}
#clear:hover { background: rgb(0 0 0 / .15); }
#clear svg { width: .7rem; height: .7rem; }

.lang {
  flex: none; border: 1px solid var(--line); border-radius: 999px;
  padding: .5rem .9rem; font-size: .8rem; font-weight: 700; background: #fff;
  white-space: nowrap;
}
.lang:hover { border-color: var(--ink); text-decoration: none; }

.rail {
  display: flex; gap: .5rem; overflow-x: auto; padding: .75rem 0;
  scrollbar-width: none; -ms-overflow-style: none;
  scroll-snap-type: x proximity; overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: center; }

.tab {
  white-space: nowrap; border: 0; border-radius: 999px;
  padding: .5rem .95rem; font-size: .8125rem; font-weight: 600;
  color: var(--ink-2); background: #f1f1f5;
  transition: background-color .2s, color .2s;
}
.tab:hover { background: #e8e8ee; }
.tab[aria-selected="true"] {
  background: var(--brand); color: #fff;
  box-shadow: 0 4px 14px -4px rgb(225 33 27 / .55);
}

/* ---------------- Menu ---------------- */
.main { padding-block: 1.75rem 5rem; }
.sections { display: flex; flex-direction: column; gap: 2.75rem; }

section[id] { scroll-margin-top: calc(var(--bar-h) + .5rem); }

.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: .75rem; margin-bottom: 1rem;
}
.sec-rule { display: block; width: 2.75rem; height: .25rem; border-radius: 999px; background: var(--gold); margin-bottom: .5rem; }
.sec-head h2 { font-size: 1.55rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
html[dir="rtl"] .sec-head h2 { letter-spacing: 0; line-height: 1.3; }
.sec-blurb { margin-top: .375rem; font-size: .82rem; color: var(--ink-3); }
.sec-count { flex: none; font-size: .72rem; font-weight: 500; color: var(--ink-3); padding-bottom: .25rem; }

.grid {
  display: grid; gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.card {
  position: relative; display: flex; flex-direction: column;
  width: 100%; height: 100%; padding: 0; border: 0;
  text-align: start; background: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
  .card:hover .card-media img { transform: scale(1.045); }
}
.card:active { transform: scale(.985); }

.card-media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: linear-gradient(150deg, #fdf6e0, #f6f6f8);
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.card-media::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 34%;
  background: linear-gradient(to top, rgb(0 0 0 / .16), transparent);
  pointer-events: none;
}

.card-text {
  background: linear-gradient(165deg, #fffdf5 0%, #fff 55%);
  border-top: 3px solid var(--gold);
  justify-content: center; min-height: 8.5rem;
}

.card-body { display: flex; flex: 1; flex-direction: column; padding: .875rem; }
.card-body h3 { font-size: .92rem; font-weight: 700; line-height: 1.25; }
.card-desc {
  margin-top: .25rem; font-size: .78rem; line-height: 1.35; color: var(--ink-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.price {
  margin-top: auto; padding-top: .625rem;
  font-size: 1.2rem; font-weight: 800; letter-spacing: -.035em; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.cur {
  font-size: .58em; font-weight: 700; color: var(--brand);
  margin-inline-end: .25em; vertical-align: .12em;
}

.badge {
  position: absolute; top: .6rem; inset-inline-start: .6rem; z-index: 2;
  background: var(--gold); color: #1d1d1f;
  font-size: .625rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: .22rem .55rem; border-radius: 999px;
  box-shadow: 0 3px 10px rgb(0 0 0 / .28);
}
.badge-inline {
  align-self: flex-start; margin-bottom: .375rem;
  background: var(--gold); color: #1d1d1f;
  font-size: .625rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: .22rem .55rem; border-radius: 999px;
}

.notice {
  margin-top: 3rem; padding: .875rem 1rem; text-align: center;
  background: #fff; border-radius: 1rem; box-shadow: var(--shadow-card);
  font-size: .8rem; color: var(--ink-3);
}

.empty { padding: 6rem 1rem; text-align: center; }
.empty-title { font-size: 1.1rem; font-weight: 700; }
.empty-body { margin-top: .375rem; font-size: .875rem; color: var(--ink-3); }

.btn-dark {
  margin-top: 1.25rem; border: 0; border-radius: 999px;
  background: var(--ink); color: #fff;
  padding: .625rem 1.25rem; font-size: .875rem; font-weight: 700;
  transition: transform .15s;
}
.btn-dark:active { transform: scale(.95); }

/* ---------------- Footer ---------------- */
.foot { border-top: 1px solid var(--line); background: #fff; }
.foot-grid {
  display: grid; gap: 2rem; padding-block: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .foot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .foot-grid { grid-template-columns: repeat(4, 1fr); } }

.foot h3 {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-3); margin-bottom: .5rem;
}
.foot p { font-size: .875rem; }
.foot .muted { color: var(--ink-3); font-size: .8rem; }
.foot-logo { width: 3rem; height: 3rem; border-radius: 50%; }
.foot-note { margin-top: .75rem; font-size: .8rem; line-height: 1.6; color: var(--ink-3); }
.link-brand { color: var(--brand); font-weight: 600; }

.socials { display: flex; flex-wrap: wrap; gap: .5rem; }
.socials a {
  border: 1px solid var(--line); border-radius: 999px;
  padding: .375rem .875rem; font-size: .8rem; font-weight: 500; color: var(--ink-2);
}
.socials a:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }

.foot-legal {
  border-top: 1px solid var(--line); padding-block: 1.25rem;
  font-size: .72rem; color: var(--ink-3);
}

/* ---------------- Back to top ---------------- */
#totop {
  position: fixed; bottom: 1.25rem; inset-inline-end: 1rem; z-index: 40;
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgb(29 29 31 / .9); color: #fff;
  box-shadow: 0 8px 24px -8px rgb(0 0 0 / .5);
}
#totop svg { width: 1rem; height: 1rem; }
/* The arrow points up in both directions — do not mirror it. */
html[dir="rtl"] #totop svg { transform: none; }

/* ---------------- Detail sheet ---------------- */
.sheet {
  border: 0; padding: 0; background: transparent;
  width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0;
  overflow: hidden;
}
.sheet::backdrop { background: rgb(0 0 0 / .42); backdrop-filter: blur(4px); }

.sheet-panel {
  position: absolute; inset-inline: 0; bottom: 0;
  max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border-radius: 1.5rem 1.5rem 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  animation: sheet-up .36s cubic-bezier(.22,1,.36,1);
}
@keyframes sheet-up { from { transform: translateY(12%); opacity: .6; } to { transform: none; opacity: 1; } }

.sheet-grab { display: flex; justify-content: center; padding: .625rem 0; position: sticky; top: 0; background: rgb(255 255 255 / .8); backdrop-filter: blur(8px); z-index: 1; }
.sheet-grab span { width: 2.25rem; height: .25rem; border-radius: 999px; background: rgb(0 0 0 / .15); }

/* The detail view shows the whole photograph — no fixed aspect ratio and no
   cropping. A forced 4:3 box cut the top and bottom off the square photos.
   The card grid still crops, deliberately, so the tiles line up. */
.sheet-media {
  position: relative;
  overflow: hidden;
  background: #f4f4f7;
  display: flex;
  justify-content: center;
  align-items: center;
}
.sheet-media img {
  width: 100%;
  height: auto;
  /* Cap the height so a tall photo cannot push the name and price off
     screen; contain then letterboxes rather than crops. */
  max-height: 48dvh;
  object-fit: contain;
}
.sheet-media[hidden] { display: none; }

.sheet-body { padding: 1.25rem 1.25rem 1.75rem; }
.sheet-body h2 { font-size: 1.25rem; font-weight: 800; }
.sheet-cat { margin-top: .25rem; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.sheet-desc { margin-top: .75rem; font-size: .9rem; line-height: 1.6; color: var(--ink-2); }
.sheet-desc[hidden] { display: none; }
.sheet-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line);
}
.sheet-foot .price { margin: 0; padding: 0; font-size: 1.5rem; }
.sheet-foot .btn-dark { margin: 0; }
.sheet-note { margin-top: .75rem; font-size: .72rem; color: var(--ink-3); }

@media (min-width: 640px) {
  .sheet { display: grid; place-items: center; padding: 1.5rem; }
  .sheet:not([open]) { display: none; }
  .sheet-panel {
    position: relative; inset: auto; margin: auto;
    max-width: 30rem; border-radius: 1.5rem;
    animation: sheet-pop .3s cubic-bezier(.22,1,.36,1);
  }
  .sheet-grab { display: none; }
}
@keyframes sheet-pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- Reveal on scroll ----------------
   Gated on .js so a blocked script can never leave the menu invisible. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s cubic-bezier(.22,1,.36,1); }
.js .reveal.is-in { opacity: 1; transform: none; }

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