/* ===========================================================================
   AHLA HAJA — every style. Warm, bright, photography-led. No WebGL, no film.

   The old hero rebuilt each photo as GPU particles on a near-black stage, so
   the food read as dust rather than food. This one just shows the photograph
   and spends its effort on type, spacing and contrast instead.
=========================================================================== */

:root{
  /* Warm Maghrebi palette: cream walls, terracotta, saffron, olive. */
  --cream:  #FDF9F3;
  --sand:   #F4EADA;
  --shell:  #FFFFFF;
  --ink:    #1D1712;
  --muted:  #6E6052;
  --hair:   #E6D9C6;
  --clay:   #BE5129;
  --clay-d: #9C3F1E;
  --olive:  #48593B;

  --r-m: 18px;
  --r-l: 28px;
  --shadow:   0 1px 2px rgba(45,28,14,.05), 0 12px 32px -10px rgba(45,28,14,.16);
  --shadow-l: 0 2px 6px rgba(45,28,14,.06), 0 34px 70px -22px rgba(45,28,14,.28);

  --ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --arabic: 'Cairo', 'Noto Kufi Arabic', var(--ui);

  --gutter: clamp(18px, 5vw, 72px);
  --logo: 150px;
  --barh: 176px;
}

*{ box-sizing:border-box }
html{ scroll-behavior:smooth }
body{
  margin:0; background:var(--cream); color:var(--ink);
  font-family:var(--ui); font-size:16px; line-height:1.55;
  -webkit-font-smoothing:antialiased; overflow-x:hidden;
}
img{ max-width:100% }
h1,h2,h3{ margin:0; font-family:var(--display); font-weight:600; line-height:1.05 }
p{ margin:0 }
.num{ font-variant-numeric:tabular-nums }

.skiplink{ position:absolute; left:-9999px; top:0; z-index:100;
  background:var(--ink); color:var(--cream); padding:12px 18px }
.skiplink:focus{ left:0 }
:focus-visible{ outline:2px solid var(--clay); outline-offset:3px; border-radius:4px }

/* ---------------------------------------------------------------- top bar */
.bar{
  position:sticky; top:0; z-index:40; height:var(--barh);
  display:flex; align-items:center; gap:clamp(12px,3vw,40px);
  padding:0 var(--gutter);
  background:rgba(253,249,243,.88);
  backdrop-filter:saturate(1.4) blur(12px);
}
.brand{ display:flex; align-items:center; gap:11px; text-decoration:none; color:inherit; margin-right:auto }
.brand__mark{ height:var(--logo); width:auto; display:block; flex:0 0 auto }
.brand__name{ display:flex; flex-direction:column; line-height:1.08 }
.brand__name b{ font-size:17px; font-weight:700; letter-spacing:.15em }
.brand__name i{ font-family:var(--arabic); font-style:normal; font-size:14.5px; color:var(--clay) }

.bar__nav{ display:flex; gap:clamp(14px,2vw,26px) }
.bar__nav a{ font-size:13.5px; font-weight:500; color:var(--muted); text-decoration:none;
  padding:6px 2px; border-bottom:1.5px solid transparent; transition:color .2s, border-color .2s }
.bar__nav a:hover{ color:var(--ink); border-color:var(--clay) }

.bar__order{
  display:inline-flex; align-items:center; gap:9px;
  font:inherit; font-size:13.5px; font-weight:600; color:var(--shell);
  background:var(--clay); border:0; border-radius:999px;
  padding:10px 18px; cursor:pointer; white-space:nowrap;
  transition:background .2s, transform .15s;
}
.bar__order:hover{ background:var(--clay-d); transform:translateY(-1px) }
.bar__order b{ background:rgba(255,255,255,.24); border-radius:999px; padding:1px 8px; font-weight:700 }

/* ------------------------------------------------------------------- hero */
.hero{
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);
  gap:clamp(28px,5vw,72px); align-items:center;
  padding:clamp(34px,6vw,84px) var(--gutter) clamp(30px,5vw,64px);
  max-width:1420px; margin:0 auto;
}
.eyebrow{ font-size:11.5px; font-weight:600; letter-spacing:.17em; text-transform:uppercase;
  color:var(--clay); margin-bottom:18px }
.hero__h1{ font-size:clamp(40px,6.4vw,82px); letter-spacing:-.022em; margin-bottom:20px }
.hero__h1 em{ font-style:italic; color:var(--clay); font-weight:400 }
.hero__lede{ font-size:clamp(15px,1.15vw,17.5px); color:var(--muted); max-width:46ch; margin-bottom:28px }

.hero__cta{ display:flex; flex-wrap:wrap; gap:12px; margin-bottom:38px }
.btn{ display:inline-flex; align-items:center; justify-content:center;
  font-size:14.5px; font-weight:600; text-decoration:none;
  padding:13px 26px; border-radius:999px; white-space:nowrap;
  transition:background .2s, color .2s, transform .15s, border-color .2s }
.btn--fill{ background:var(--ink); color:var(--cream) }
.btn--fill:hover{ background:var(--clay); transform:translateY(-2px) }
.btn--line{ border:1.5px solid var(--hair); color:var(--ink) }
.btn--line:hover{ border-color:var(--ink); transform:translateY(-2px) }

.facts{ display:flex; flex-wrap:wrap; gap:clamp(18px,3vw,44px);
  margin:0; padding-top:24px; border-top:1px solid var(--hair) }
.facts dt{ font-size:10.5px; font-weight:600; letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted); margin-bottom:3px }
.facts dd{ margin:0; font-size:15px; font-weight:600 }

/* ------------------------------------------------------ the featured dish */
.show{ margin:0 }
.show__frame{
  position:relative; aspect-ratio:4/3; border-radius:var(--r-l);
  overflow:hidden; background:var(--sand); box-shadow:var(--shadow-l);
}
/* two stacked frames cross-fade, so the photo never blinks or reflows */
.show__img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  opacity:0; transition:opacity .62s ease }
.show__img.is-on{ opacity:1 }

.show__flag{ position:absolute; left:16px; top:16px; z-index:2;
  font-size:11px; font-weight:600; letter-spacing:.12em; text-transform:uppercase;
  color:var(--ink); background:rgba(253,249,243,.92); padding:7px 13px; border-radius:999px }
.show__flag:empty{ display:none }

.show__cap{ display:flex; align-items:center; justify-content:space-between; gap:18px; padding:18px 4px 0 }
.show__id h2{ font-size:clamp(21px,2vw,27px); letter-spacing:-.01em }
.show__id p{ font-size:13.5px; color:var(--muted); margin-top:3px }

.add{
  display:inline-flex; align-items:center; gap:10px;
  font:inherit; font-size:14px; font-weight:600; color:var(--shell);
  background:var(--clay); border:0; border-radius:999px;
  padding:13px 22px; cursor:pointer; white-space:nowrap; flex:0 0 auto;
  transition:background .2s, transform .15s;
}
.add:hover{ background:var(--clay-d); transform:translateY(-2px) }
.add em{ font-style:normal; font-weight:700; opacity:.85 }

/* ----------------------------------------------------------- the menu grid */
.menu{ padding:clamp(34px,6vw,76px) var(--gutter) clamp(44px,6vw,90px); max-width:1460px; margin:0 auto }
.menu__head{ margin-bottom:clamp(20px,2.6vw,34px); max-width:62ch }
.menu__head h2{ font-size:clamp(30px,4.4vw,56px); letter-spacing:-.02em }
.menu__note{ font-size:15px; color:var(--muted); margin-top:8px }

.chips{ display:flex; flex-wrap:wrap; gap:8px; margin-top:22px }
.chip{
  font:inherit; font-size:12.5px; font-weight:600; color:var(--muted);
  background:var(--shell); border:1.5px solid var(--hair); border-radius:999px;
  padding:9px 17px; cursor:pointer; white-space:nowrap;
  transition:color .2s, border-color .2s, background .2s, transform .15s;
}
.chip:hover{ color:var(--ink); border-color:var(--ink); transform:translateY(-1px) }
.chip.is-on{ background:var(--ink); border-color:var(--ink); color:var(--cream) }

.grid{
  list-style:none; margin:0; padding:0;
  display:grid; grid-auto-flow:dense;
  grid-template-columns:repeat(auto-fill, minmax(232px, 1fr));
  gap:clamp(10px,1.3vw,18px);
}

.tile{
  position:relative; overflow:hidden; cursor:pointer;
  aspect-ratio:4/5; border-radius:var(--r-m); background:var(--sand);
  box-shadow:var(--shadow);
  transition:transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s;
}
/* every third tile runs wide, so the grid reads editorial, not like a catalogue */
.tile.is-wide{ grid-column:span 2; aspect-ratio:8/5 }
.tile:hover{ transform:translateY(-4px); box-shadow:var(--shadow-l) }
.tile.is-live{ outline:2.5px solid var(--clay); outline-offset:-2.5px }

.tile__img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  transition:transform .7s cubic-bezier(.22,1,.36,1), filter .4s;
}
.tile:hover .tile__img{ transform:scale(1.07) }

/* the scrim is what makes white type legible on any photograph */
.tile__shade{
  position:absolute; inset:0;
  background:linear-gradient(to top,
    rgba(12,8,5,.92) 0%, rgba(12,8,5,.72) 22%, rgba(12,8,5,.22) 48%, rgba(12,8,5,0) 72%);
}

.tile__tag{
  position:absolute; top:12px; left:12px;
  font-size:10px; font-weight:700; letter-spacing:.13em; text-transform:uppercase;
  color:var(--ink); background:rgba(253,249,243,.94);
  padding:6px 11px; border-radius:999px;
}
.tile__price{
  position:absolute; top:12px; right:12px;
  font-size:12.5px; font-weight:700; color:var(--ink);
  background:rgba(253,249,243,.94); padding:6px 11px; border-radius:999px;
}

.tile__body{ position:absolute; left:16px; right:16px; bottom:15px; display:block; color:#fff }
.tile__n{
  display:block; font-family:var(--display); font-weight:600;
  font-size:clamp(17px,1.5vw,23px); line-height:1.1; letter-spacing:-.01em;
}
.tile.is-wide .tile__n{ font-size:clamp(20px,2vw,30px) }
.tile__s{
  display:block; font-size:12.5px; margin-top:5px;
  color:rgba(255,255,255,.82);
  transition:opacity .3s, transform .3s;
}

.tile__add{
  position:absolute; right:16px; bottom:15px;
  font:inherit; font-size:12.5px; font-weight:700; color:var(--shell);
  background:var(--clay); border:0; border-radius:999px;
  padding:10px 18px; cursor:pointer;
  opacity:0; transform:translateY(8px);
  transition:opacity .25s, transform .25s, background .2s;
}
.tile:hover .tile__add,
.tile__add:focus-visible{ opacity:1; transform:none }
.tile:hover .tile__body{ padding-right:86px }
.tile__add:hover{ background:var(--clay-d) }

/* filtered out */
.tile.is-out{ display:none }

/* reveal on scroll — armed from JS, so no-JS keeps every tile visible */
.grid.is-armed .tile{ opacity:0; transform:translateY(18px) }
.grid.is-armed .tile.is-in{
  opacity:1; transform:none;
  transition:opacity .55s ease var(--d,0ms), transform .55s cubic-bezier(.22,1,.36,1) var(--d,0ms);
}

/* ----------------------------------------------------------------- footer */
.foot{ border-top:1px solid var(--hair); padding:26px var(--gutter) 40px;
  font-size:13.5px; color:var(--muted);
  display:flex; flex-wrap:wrap; gap:6px 26px; justify-content:space-between }
.foot b{ color:var(--ink) }
.foot span{ font-family:var(--arabic) }

/* ----------------------------------------------------------------- ledger */
.scrim{ position:fixed; inset:0; z-index:50; background:rgba(29,23,18,.42);
  opacity:0; pointer-events:none; transition:opacity .3s ease }
body.oo .scrim{ opacity:1; pointer-events:auto }

.ledger{
  position:fixed; top:0; right:0; bottom:0; z-index:60;
  width:min(420px, 100%); display:flex; flex-direction:column;
  background:var(--cream); border-left:1px solid var(--hair); box-shadow:var(--shadow-l);
  transform:translateX(101%); transition:transform .38s cubic-bezier(.22,1,.36,1);
}
body.oo .ledger{ transform:none }

.ledger__top{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px;
  padding:22px 22px 16px; border-bottom:1px solid var(--hair) }
.ledger__top h2{ font-size:22px }
.ledger__top p{ font-size:13px; color:var(--muted); margin-top:3px }
.x{ font:inherit; font-size:13px; font-weight:600; color:var(--muted);
  background:none; border:1.5px solid var(--hair); border-radius:999px;
  padding:7px 14px; cursor:pointer; transition:color .2s, border-color .2s }
.x:hover{ color:var(--ink); border-color:var(--ink) }

.lines{ list-style:none; margin:0; padding:8px 22px; overflow-y:auto; flex:1 1 auto }
.line{ display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:14px;
  padding:14px 0; border-bottom:1px solid var(--hair) }
.line__n{ font-size:14.5px; font-weight:600 }
.line__n em{ display:block; font-style:normal; font-size:12.5px; font-weight:400;
  color:var(--muted); margin-top:2px }
.step{ display:flex; align-items:center; gap:4px }
.step button{ width:29px; height:29px; font:inherit; font-size:15px; line-height:1;
  background:var(--shell); color:var(--ink); border:1.5px solid var(--hair);
  border-radius:50%; cursor:pointer; transition:border-color .15s, color .15s }
.step button:hover{ border-color:var(--clay); color:var(--clay) }
.step b{ min-width:22px; text-align:center; font-size:14px }
.line__t{ font-size:14px; font-weight:600; min-width:74px; text-align:right }

.empty{ flex:1 1 auto; display:grid; place-content:center; text-align:center;
  font-size:15px; font-weight:600; color:var(--ink); padding:40px 22px }
.empty span{ display:block; margin-top:6px; font-size:13px; font-weight:400; color:var(--muted) }

.ledger__foot{ padding:18px 22px 22px; border-top:1px solid var(--hair); background:var(--sand) }
.sum{ display:flex; justify-content:space-between; font-size:14px; color:var(--muted); margin-bottom:8px }
.sum.total{ font-size:17px; color:var(--ink); font-weight:600; padding-top:10px; border-top:1px solid var(--hair) }
.free{ color:var(--olive); font-weight:600 }

.send{ width:100%; margin-top:14px; font:inherit; font-size:15px; font-weight:600;
  color:var(--shell); background:var(--clay); border:0; border-radius:999px;
  padding:15px; cursor:pointer; transition:background .2s }
.send:hover:not(:disabled){ background:var(--clay-d) }
.send:disabled{ background:#D9CDBC; color:#7A6D5D; cursor:not-allowed }

.minor{ display:flex; gap:8px; margin-top:10px }
.minor button{ flex:1; font:inherit; font-size:13px; font-weight:600; color:var(--muted);
  background:none; border:1.5px solid var(--hair); border-radius:999px;
  padding:9px; cursor:pointer; transition:color .2s, border-color .2s }
.minor button:hover:not(:disabled){ color:var(--ink); border-color:var(--ink) }
.minor button:disabled{ opacity:.45; cursor:not-allowed }

/* ------------------------------------------------------------------ toast */
.toast{ position:fixed; left:50%; bottom:26px; z-index:70; transform:translate(-50%, 14px);
  background:var(--ink); color:var(--cream); font-size:13.5px; font-weight:500;
  padding:12px 22px; border-radius:999px;
  opacity:0; pointer-events:none; transition:opacity .25s ease, transform .25s ease }
.toast.on{ opacity:1; transform:translate(-50%, 0) }

/* ------------------------------------------------------------- responsive */
@media (max-width: 940px){
  .hero{ grid-template-columns:1fr; padding-top:clamp(26px,5vw,40px) }
  /* photo first on a phone: the food is the argument */
  .hero__copy{ order:2 }
  .show{ order:1 }
  .hero__h1{ font-size:clamp(34px,8.4vw,52px) }
  .hero__cta{ margin-bottom:28px }
}
@media (max-width: 620px){
  :root{ --logo:115px; --barh:140px }
  .bar__nav{ display:none }

  .brand__name b{ font-size:14px; letter-spacing:.1em }
  .brand__name i{ font-size:12.5px }
  .bar__order{ padding:9px 14px; font-size:12.5px; gap:7px }
  .show__frame{ aspect-ratio:1/1 }
  .show__cap{ flex-direction:column; align-items:stretch; gap:12px }
  .add{ justify-content:center }
  /* auto-fill cannot satisfy minmax(232px) twice on a phone, but the wide
     tiles still demand two columns — which left every other tile crushed to
     109px. Pin two even columns instead and let the wide ones run full width. */
  .grid{ grid-template-columns:repeat(2, minmax(0,1fr)) }
  .tile__n{ font-size:15px }
  .tile__s{ display:none }
  .tile__add{ padding:8px 14px; font-size:11.5px }
  .tile:hover .tile__body,
  .tile__body{ padding-right:0 }
  .tile__body{ left:11px; right:11px; bottom:11px }
  .tile__tag,.tile__price{ font-size:9.5px; padding:5px 9px; top:9px }
  .tile__tag{ left:9px } .tile__price{ right:9px }
  /* Mobile QA: every control to a 44px minimum touch target, and no text
     below 11px — 9.5px price chips were unreadable at arm's length. */
  .bar__order{ padding:13px 16px; font-size:13px }
  .chip{ padding:13px 18px; font-size:13px }
  .tile__add{ padding:11px 16px; font-size:12px; min-height:44px }
  .x{ padding:12px 16px; font-size:13.5px }
  .minor button{ padding:13px; font-size:13.5px }
  .step button{ width:40px; height:40px; font-size:17px }
  .btn{ padding:15px 26px; min-height:48px }
  .bar__nav a{ padding:12px 2px }
  .eyebrow{ font-size:12px }
  .facts dt{ font-size:11.5px }
  .show__flag{ font-size:11.5px; padding:8px 13px }
  .tile__tag,.tile__price{ font-size:11px; padding:6px 10px }
  .facts{ gap:16px 28px }
  .foot{ flex-direction:column }
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto }
  *{ animation-duration:.01ms !important; transition-duration:.01ms !important }
}

/* order.js pulses the cart on every add, and disables the button for any dish
   without a price — both need somewhere to land. */
.bar__order.pulse{ animation:pulse .32s ease }
@keyframes pulse{ 50%{ transform:scale(1.07) } }
.add:disabled{ background:#D9CDBC; color:#7A6D5D; cursor:not-allowed; transform:none }

@media (hover:none){
  .tile__add{ opacity:1; transform:none }
  .tile__body{ padding-right:86px }
}
@media (hover:none) and (max-width:620px){
  /* no room for the pill beside the name at this width: sit it above instead */
  .tile__add{ right:11px; bottom:auto; top:38px; padding:7px 13px; font-size:11px }
  .tile__body{ padding-right:0 }
}
