/* =========================================================================
   AL-LIWAN  الليوان  : Damascene restaurant demo
   A Wojoodi portfolio demonstration. Fictional business.
   Design system: limestone + basalt + brass + a single pomegranate accent.
   Signature motif: the iwan aperture (pointed Damascene arch) framing imagery,
   the ablaq stone divider, and museum wall-label menu captions.
   ========================================================================= */

:root {
  /* palette */
  --limestone:   #EAE2D3;   /* sahn, the sunlit courtyard floor (page) */
  --limestone-2: #E2D7C2;
  --paper:       #F3ECDD;   /* raised cards */
  --basalt:      #1E1A17;   /* candlelit shade (dark sections) */
  --basalt-2:    #15110D;
  --taupe:       #CBBCA0;   /* aged stone */
  --olive:       #565E45;   /* courtyard shade green */
  --brass:       #B08C49;   /* aged brass, fine lines and fittings */
  --brass-lit:   #CCA262;   /* brass on dark ground */
  --pom:         #8F2F2B;   /* the one sharp note */
  --pom-lit:     #B6443B;
  --ink:         #2A2017;   /* body text on light */
  --ink-soft:    #6A5C49;   /* muted text on light */
  --cream:       #F1E7D5;   /* text on dark */
  --cream-soft:  #C9BCA4;   /* muted text on dark */

  /* type */
  --f-display: "Marcellus", "Times New Roman", serif;
  --f-edit:    "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-body:    "Spectral", Georgia, serif;
  --f-label:   "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --f-ar:         "Amiri", serif;                                 /* legacy: only the EN page's small wordmark uses this */
  --f-ar-body:    "IBM Plex Sans Arabic", "Segoe UI", sans-serif; /* Arabic UI, body, menu, labels, forms */
  --f-ar-display: "Reem Kufi", "IBM Plex Sans Arabic", sans-serif;/* Arabic large display only */

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--limestone);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.72;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint film grain for atmosphere */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }

/* ---- type scale ---- */
h1, h2, h3, h4 { margin: 0; font-weight: 400; }

/* editorial label in the house serif, no templated dash, used sparingly */
.eyebrow {
  font-family: var(--f-edit);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  text-transform: none;
  font-weight: 500;
  color: var(--brass);
  display: inline-block;
}

.display {
  font-family: var(--f-display);
  letter-spacing: 0.02em;
  line-height: 1.04;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  color: var(--ink);
}
.lead {
  font-family: var(--f-edit);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.7vw, 1.95rem);
  line-height: 1.42;
  color: var(--ink-soft);
}

/* ---- layout helpers ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 11vw, 150px); position: relative; }
.section--dark { background: var(--basalt); color: var(--cream); }
.section--dark .display { color: var(--cream); }
.section--dark .eyebrow { color: var(--brass-lit); }

/* ablaq divider: wide alternating stone courses with fine brass joints,
   coursing like the real masonry rather than a tight generated stripe */
.ablaq {
  height: 12px;
  background:
    linear-gradient(var(--brass), var(--brass)) top/100% 1px no-repeat,
    linear-gradient(var(--brass), var(--brass)) bottom/100% 1px no-repeat,
    repeating-linear-gradient(90deg,
      var(--taupe) 0 76px, var(--brass) 76px 77px,
      var(--limestone-2) 77px 153px, var(--brass) 153px 154px);
  opacity: 0.9;
}
.section--dark + .ablaq, .ablaq.on-dark {
  background:
    linear-gradient(var(--brass-lit), var(--brass-lit)) top/100% 1px no-repeat,
    linear-gradient(var(--brass-lit), var(--brass-lit)) bottom/100% 1px no-repeat,
    repeating-linear-gradient(90deg,
      #2c2620 0 76px, rgba(201,162,98,0.55) 76px 77px,
      #211c18 77px 153px, rgba(201,162,98,0.55) 153px 154px);
}

/* =========================================================================
   The iwan aperture: pointed-arch framed media
   ========================================================================= */
.arch {
  position: relative;
  background: var(--brass);
  clip-path: url(#liwan-arch);
  overflow: hidden;
}
.arch::after { /* inner shadow for depth inside the alcove */
  content: "";
  position: absolute; inset: 0;
  clip-path: url(#liwan-arch);
  box-shadow: inset 0 0 60px rgba(20,12,6,0.45);
  pointer-events: none;
  z-index: 2;
}
.arch img {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  object-fit: cover;
  clip-path: url(#liwan-arch);
  transition: transform 1.1s var(--ease);
}

/* =========================================================================
   Marks: eight-point Damascene star, jasmine end-glyph
   ========================================================================= */
.star { display: inline-block; color: var(--brass); }
.star svg, .jasmine svg { display: block; width: 100%; height: 100%; }
.jasmine { display: inline-block; width: 1em; height: 1em; color: var(--brass); vertical-align: -0.12em; }

/* =========================================================================
   Buttons / links
   ========================================================================= */
.btn {
  font-family: var(--f-label);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 1.02em 1.9em;
  display: inline-flex;
  align-items: center;
  gap: 0.8em;
  border: 1px solid var(--pom);
  background: var(--pom);
  color: #F7EAD9;
  cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease);
}
.btn:hover { background: #7c2622; transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--brass);
}
.section--dark .btn--ghost { color: var(--cream); }
.btn--ghost:hover { background: var(--brass); color: var(--basalt); transform: translateY(-2px); }

.ulink {
  font-family: var(--f-label);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: inherit;
  position: relative;
  padding-bottom: 4px;
}
.ulink::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--pom);
  transform: scaleX(0.34); transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.ulink:hover::after { transform: scaleX(1); }

/* =========================================================================
   Header / nav
   ========================================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.nav.scrolled {
  background: rgba(234,226,211,0.92);
  backdrop-filter: blur(10px);
  padding-block: 12px;
  box-shadow: 0 1px 0 rgba(176,140,73,0.4), 0 12px 30px -22px rgba(30,26,23,0.5);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); transition: color 0.5s var(--ease); }
.nav.scrolled .brand { color: var(--ink); }
.brand .star { width: 30px; height: 30px; flex: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1; }
.brand-ar { font-family: var(--f-ar); font-size: 1.18rem; color: var(--brass-lit); margin-bottom: 2px; }
.nav.scrolled .brand-ar { color: var(--brass); }
.brand-en { font-family: var(--f-display); font-size: 0.86rem; letter-spacing: 0.36em; }

.nav-links { display: flex; align-items: center; gap: 38px; }
.nav-links a:not(.btn) {
  font-family: var(--f-label);
  font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500;
  color: var(--cream); position: relative; padding: 4px 0;
  transition: color 0.4s var(--ease);
}
.nav.scrolled .nav-links a:not(.btn) { color: var(--ink); }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: -2px; width: 100%; height: 1px;
  background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.nav-links .btn { padding: 0.7em 1.4em; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; width: 34px; height: 24px;
  position: relative; z-index: 1200;
}
.nav-toggle span { position: absolute; inset-inline-start: 0; width: 100%; height: 1.5px; background: var(--cream); transition: 0.4s var(--ease); }
.nav.scrolled .nav-toggle span { background: var(--ink); }
.nav-toggle span:nth-child(1) { top: 3px; }
.nav-toggle span:nth-child(2) { top: 11px; }
.nav-toggle span:nth-child(3) { top: 19px; }
body.menu-open .nav-toggle span { background: var(--cream); }
body.menu-open .nav-toggle span:nth-child(1) { top: 11px; transform: rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  min-height: 100svh;
  background: var(--basalt);
  color: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 132px var(--gutter) 64px;
  position: relative;
  overflow: hidden;
}
/* one warm light pooling from above */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% -10%, rgba(204,162,98,0.22), transparent 55%);
  pointer-events: none;
}
.hero-mark { width: 54px; height: 54px; color: var(--brass-lit); margin-bottom: 26px; }
.hero-ar { font-family: var(--f-ar); font-size: clamp(1.6rem, 4vw, 2.5rem); color: var(--brass-lit); line-height: 1; }
.hero-name {
  font-family: var(--f-display);
  font-size: clamp(2.9rem, 9vw, 6.4rem);
  letter-spacing: 0.12em;
  line-height: 0.98;
  margin: 14px 0 0;
  text-indent: 0.12em;
}
.hero-rule { width: 64px; height: 1px; background: var(--brass-lit); margin: 30px 0 26px; }
.hero-tag {
  font-family: var(--f-edit);
  font-style: italic;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  color: var(--cream-soft);
  max-width: 30ch;
  line-height: 1.4;
}
.hero-cta { margin-top: 40px; display: flex; gap: 26px; align-items: center; flex-wrap: wrap; justify-content: center; }

.hero-photo {
  width: min(560px, 82vw);
  aspect-ratio: 3 / 3.6;
  margin-top: 56px;
}
.hero-scroll {
  margin-top: 30px;
  font-family: var(--f-label); font-size: 0.64rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--cream-soft); display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-scroll::after { content: ""; width: 1px; height: 38px; background: linear-gradient(var(--brass-lit), transparent); }

/* hero load orchestration */
.reveal-load { opacity: 1; transform: none; }                     /* default: visible (fail-open) */
html.js .reveal-load { opacity: 0; transform: translateY(18px); animation: rise 1.1s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1 { animation-delay: 0.15s; } .d2 { animation-delay: 0.32s; } .d3 { animation-delay: 0.49s; }
.d4 { animation-delay: 0.66s; } .d5 { animation-delay: 0.83s; } .d6 { animation-delay: 1.0s; }
html.js .hero-photo.reveal-load { animation: archrise 1.3s var(--ease) 0.9s both; transform-origin: bottom center; }
@keyframes archrise { from { opacity: 0; transform: scaleY(0.04); } to { opacity: 1; transform: scaleY(1); } }

/* =========================================================================
   Story
   ========================================================================= */
.story-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(36px, 6vw, 86px); align-items: center; }
.story-copy p { margin: 1.1em 0; color: var(--ink-soft); }
.story-copy p:first-of-type { font-family: var(--f-edit); font-size: 1.3rem; line-height: 1.5; color: var(--ink); }
.story-head { margin: 18px 0 8px; }
.story-photo { aspect-ratio: 4 / 4.7; }
.signoff { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.signoff .line { width: 40px; height: 1px; background: var(--brass); }
.signoff .name { font-family: var(--f-edit); font-style: italic; font-size: 1.3rem; color: var(--ink); }
.signoff .role { font-family: var(--f-label); font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft); }

/* =========================================================================
   Quote band
   ========================================================================= */
.quote-band { position: relative; overflow: hidden; }
.quote-band .bg { position: absolute; inset: 0; }
.quote-band .bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.32; }
.quote-band .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--basalt) 8%, rgba(30,26,23,0.55) 60%, var(--basalt) 100%); }
.quote-inner { position: relative; text-align: center; margin-inline: auto; }
/* the measure rides the quote's own type size, so the measure stays 4-6 lines at desktop */
.quote-text { font-family: var(--f-edit); font-style: italic; font-size: clamp(1.8rem, 4.4vw, 3.2rem); line-height: 1.28; color: var(--cream); max-width: 22ch; margin-inline: auto; }
.quote-text .pom { color: var(--pom-lit); font-style: italic; }
.quote-mark { width: 30px; height: 30px; color: var(--brass-lit); margin: 0 auto 26px; }

/* =========================================================================
   Menu
   ========================================================================= */
.menu-head { text-align: center; max-width: 640px; margin: 0 auto clamp(40px, 6vw, 72px); }
.menu-head .display { margin: 16px 0 18px; }
.menu-note { font-family: var(--f-label); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }

.menu-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); }
.course + .course { margin-top: 54px; }
.course-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.course-head h3 { font-family: var(--f-display); font-size: 1.16rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
.course-head .ar { font-family: var(--f-ar); font-size: 1.2rem; color: var(--brass); }
.course-rule { height: 1px; background: linear-gradient(90deg, var(--brass), transparent); margin-bottom: 22px; }

.dish { display: grid; grid-template-columns: 1fr auto; gap: 4px 18px; padding: 15px 0; border-bottom: 1px solid rgba(176,140,73,0.22); }
.dish:last-child { border-bottom: 0; }
.dish-name { font-family: var(--f-body); font-weight: 600; font-size: 1.06rem; color: var(--ink); letter-spacing: 0.01em; }
.dish-price { font-family: var(--f-label); font-weight: 500; font-size: 0.92rem; color: var(--brass); font-variant-numeric: tabular-nums; white-space: nowrap; align-self: center; }
.dish-desc { grid-column: 1 / -1; font-family: var(--f-body); font-style: italic; font-size: 0.95rem; line-height: 1.5; color: var(--ink-soft); max-width: 46ch; }
.dish .tag {
  font-family: var(--f-label); font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700;
  color: var(--pom); border: 1px solid rgba(143,47,43,0.4); padding: 2px 7px; margin-inline-start: 10px; vertical-align: 2px;
}

/* =========================================================================
   Gallery
   ========================================================================= */
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.gallery-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; grid-auto-flow: dense; }
.gtile { overflow: hidden; position: relative; background: var(--basalt); }
.gtile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gtile:hover img { transform: scale(1.06); }
.gtile .cap {
  position: absolute; inset-inline-start: 18px; bottom: 16px; z-index: 2;
  font-family: var(--f-label); font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600;
  color: var(--cream); opacity: 0; transform: translateY(8px); transition: 0.5s var(--ease);
  text-shadow: 0 1px 12px rgba(0,0,0,0.85);
}
.gtile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,14,9,0.62), transparent 46%); opacity: 0; transition: opacity 0.5s var(--ease); }
.gtile:hover .cap { opacity: 1; transform: none; }
.gtile:hover::after { opacity: 1; }
/* editorial composition */
.gtile--a { grid-column: span 2; aspect-ratio: 4 / 5; }
.gtile--b { grid-column: span 4; aspect-ratio: 16 / 9; }
.gtile--c, .gtile--d, .gtile--e { grid-column: span 2; aspect-ratio: 1 / 1; }
.gtile--f { grid-column: span 6; aspect-ratio: 24 / 9; }

/* =========================================================================
   Visit (hours + map)
   ========================================================================= */
.visit-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(34px, 5vw, 70px); align-items: stretch; }
.visit-info .display { margin: 16px 0 26px; }
.info-block { margin-bottom: 26px; }
.info-block h4 { font-family: var(--f-label); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass-lit); margin-bottom: 8px; }
.info-block p { margin: 0; color: var(--cream-soft); }
.info-block .hours-row { display: flex; justify-content: space-between; max-width: 320px; padding: 3px 0; }
.info-block .hours-row span:last-child { color: var(--cream); font-variant-numeric: tabular-nums; }
.visit-map { min-height: 360px; border: 1px solid var(--brass); }
.visit-map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; filter: grayscale(0.3) sepia(0.15) contrast(0.95); display: block; }

/* =========================================================================
   Reservation
   ========================================================================= */
.res-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.res-intro .display { margin: 16px 0 20px; }
.res-intro p { color: var(--ink-soft); max-width: 38ch; }
.res-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; }
/* Grid children default to min-width:auto and refuse to shrink below their
   content, which blows the track wider than the container and overflows
   (visible off the inline-start edge in RTL). Letting them shrink fixes it
   in both directions. */
.story-grid > *, .menu-cols > *, .visit-grid > *, .res-grid > *, .res-form > *, .dish { min-width: 0; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--f-label); font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font-family: var(--f-body); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid rgba(176,140,73,0.45); border-radius: 0;
  padding: 13px 14px; transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(176,140,73,0.16);
}
.field textarea { resize: vertical; min-height: 88px; }
.res-form .btn { grid-column: 1 / -1; justify-content: center; }

/* =========================================================================
   Footer
   ========================================================================= */
.footer { background: var(--basalt-2); color: var(--cream-soft); padding: clamp(56px, 8vw, 88px) 0 30px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer .brand { color: var(--cream); margin-bottom: 18px; }
.footer-blurb { max-width: 34ch; font-size: 0.98rem; }
.footer h5 { font-family: var(--f-label); font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass-lit); margin: 0 0 16px; }
.footer-col a { display: block; padding: 5px 0; font-size: 0.96rem; transition: color 0.3s var(--ease); }
.footer-col a:hover { color: var(--cream); }
.socials { display: flex; gap: 14px; margin-top: 6px; }
.socials a { width: 38px; height: 38px; border: 1px solid rgba(176,140,73,0.4); display: grid; place-items: center; color: var(--brass-lit); transition: 0.4s var(--ease); }
.socials a:hover { background: var(--brass); color: var(--basalt); }
.socials svg { width: 17px; height: 17px; }
.footer-base {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(176,140,73,0.22);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--f-label); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--cream-soft);
}
.credit { display: inline-flex; align-items: center; gap: 11px; }
.credit-label { font-family: var(--f-label); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream-soft); }
.wlogo { display: inline-flex; align-items: center; gap: 11px; opacity: 0.9; transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.wlogo-mark { height: 38px; width: auto; display: block; }
.wlogo-word { height: 26px; width: auto; display: block; }
.wlogo:hover { opacity: 1; transform: translateY(-1px); }   /* restrained, no glow */
[dir="rtl"] .credit-label { font-family: var(--f-ar-body); letter-spacing: 0; text-transform: none; font-size: 1.0rem; }
/* the Arabic wordmark carries a two-line lockup (وجودي + tagline) so it needs more height to read */
[dir="rtl"] .wlogo-word { height: 34px; }

/* =========================================================================
   Reservation modal (demo notice)
   ========================================================================= */
.modal { position: fixed; inset: 0; z-index: 5000; display: none; place-items: center; padding: 24px; }
.modal.open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,12,9,0.74); backdrop-filter: blur(4px); animation: fade 0.4s var(--ease); }
.modal-card {
  position: relative; background: var(--limestone); max-width: 460px; width: 100%;
  padding: 48px 40px 40px; text-align: center; border: 1px solid var(--brass);
  animation: pop 0.5s var(--ease);   /* the brass frame is the one treatment, no diffuse shadow */
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
.modal-card .star { width: 40px; height: 40px; margin: 0 auto 20px; }
.modal-card h3 { font-family: var(--f-display); font-size: 1.5rem; letter-spacing: 0.05em; color: var(--ink); margin-bottom: 14px; }
.modal-card p { color: var(--ink-soft); font-size: 1.02rem; margin: 0 auto 24px; max-width: 36ch; }
.modal-close { font-family: var(--f-label); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; color: var(--pom); background: none; border: 0; cursor: pointer; padding: 8px; }

/* =========================================================================
   Scroll reveal
   ========================================================================= */
.reveal { opacity: 1; transform: none; }                          /* default: visible (fail-open if JS/observer never fires) */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal.d2 { transition-delay: 0.12s; }
html.js .reveal.d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) { html.js .reveal, html.js .reveal-load { opacity: 1 !important; transform: none !important; animation: none !important; } }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 920px) {
  /* Off-canvas menu hidden WITHOUT pushing the page wide: it stays inside the
     viewport (inset:0) and is hidden via visibility/opacity, so it never adds
     horizontal scroll in either direction. A short fade + lift gives motion. */
  .nav-links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 30px;
    background: var(--basalt);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity 0.4s var(--ease), transform 0.5s var(--ease), visibility 0.4s var(--ease);
  }
  body.menu-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a:not(.btn) { color: var(--cream); font-size: 0.9rem; }
  .nav.scrolled .nav-links a:not(.btn) { color: var(--cream); }
  .nav-toggle { display: block; }
  .story-grid, .visit-grid, .res-grid { grid-template-columns: 1fr; }
  .story-photo { order: -1; aspect-ratio: 4 / 3.4; max-width: 460px; margin-inline: auto; }
  .menu-cols { grid-template-columns: 1fr; gap: 0; }
  .course + .course { margin-top: 44px; }
  .menu-cols .course:nth-child(1) { margin-top: 0; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gtile--a, .gtile--b, .gtile--c, .gtile--d, .gtile--e { grid-column: span 1; aspect-ratio: 1 / 1; }
  .gtile--f { grid-column: span 2; aspect-ratio: 16 / 9; }
  .visit-map { min-height: 300px; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .res-form { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
  .footer-base { justify-content: center; text-align: center; }
  .hero { padding-top: 116px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gtile--a, .gtile--b, .gtile--c, .gtile--d, .gtile--e, .gtile--f { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
}

/* =========================================================================
   Language toggle (works in both directions; brass, understated)
   ========================================================================= */
/* A refined brass switch: soft rounded keyline, globe glyph, brass text.
   Higher specificity (.nav-links a.lang) so it wins over the generic nav-link
   color rules. The generic nav-link underline is suppressed; hover softly fills. */
.nav-links a.lang {
  font-family: var(--f-label);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brass-lit);
  background: rgba(201,162,98,0.06);
  border: 1px solid rgba(201,162,98,0.4);
  border-radius: 999px;
  padding: 0.5em 0.9em;
  display: inline-flex; align-items: center; gap: 0.5em; line-height: 1;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.nav.scrolled .nav-links a.lang { color: var(--brass); border-color: rgba(176,140,73,0.5); }
.nav-links a.lang:hover { color: var(--basalt); background: var(--brass); border-color: var(--brass); }
.lang .globe { width: 13px; height: 13px; flex: none; }
.lang .globe svg { width: 100%; height: 100%; display: block; }
.lang .ar { font-family: var(--f-ar); font-size: 1.12em; letter-spacing: 0; line-height: 1; }
.lang::after { display: none !important; }  /* suppress the generic nav-link underline */
@media (max-width: 920px) {
  .nav-links a.lang { color: var(--brass-lit); border-color: rgba(201,162,98,0.5); margin-top: 8px; font-size: 0.8rem; }
  .nav.scrolled .nav-links a.lang { color: var(--brass-lit); }
}

/* =========================================================================
   Latin islands inside RTL text: numerals, phone, email, Latin words, map.
   Keeps them left to right and free of Arabic shaping.
   ========================================================================= */
.lat { direction: ltr; unicode-bidi: isolate; font-family: var(--f-label); letter-spacing: 0; }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

/* =========================================================================
   RTL + Arabic typography.
   One stylesheet drives both directions. Logical properties handle the
   mirroring above; these rules set Arabic faces, restore natural spacing
   (Arabic does not letterspace or uppercase), and add vertical breathing.
   ========================================================================= */
/* Base: modern Arabic sans, larger base size, generous line-height. */
[dir="rtl"] { font-family: var(--f-ar-body); }
[dir="rtl"] body { font-family: var(--f-ar-body); font-size: 18.5px; line-height: 1.95; }
[dir="rtl"] p { line-height: 1.95; }
[dir="rtl"] .field input,
[dir="rtl"] .field select,
[dir="rtl"] .field textarea { font-family: var(--f-ar-body); font-size: 1.02rem; }
/* keep Latin islands (numerals, phone, email, Latin words, the AL-LIWAN line) in their own faces */
[dir="rtl"] .lat, [dir="rtl"] .num, [dir="rtl"] .brand-en { font-family: var(--f-label); }
[dir="rtl"] .hero-lat { font-family: var(--f-display); }
[dir="rtl"] .credit, [dir="rtl"] .credit a { font-family: var(--f-label); }

/* Large display moments: Reem Kufi for Damascene-geometric character. */
[dir="rtl"] .display,
[dir="rtl"] .hero-name-ar,
[dir="rtl"] .quote-text,
[dir="rtl"] .course-head h3 {
  font-family: var(--f-ar-display);
  letter-spacing: 0;
  font-style: normal;
}
[dir="rtl"] .display { line-height: 1.4; font-weight: 500; }
[dir="rtl"] .quote-text { line-height: 1.55; font-style: normal; font-weight: 500; }

/* Editorial / running text: IBM Plex Sans Arabic, no Latin italic/letterspacing. */
[dir="rtl"] .lead,
[dir="rtl"] .hero-tag,
[dir="rtl"] .dish-name,
[dir="rtl"] .dish-desc,
[dir="rtl"] .story-copy p,
[dir="rtl"] .res-intro p,
[dir="rtl"] .res-intro .lead,
[dir="rtl"] .footer-blurb,
[dir="rtl"] .signoff .name,
[dir="rtl"] .modal-card p {
  font-family: var(--f-ar-body);
  letter-spacing: 0;
  font-style: normal;
}
[dir="rtl"] .modal-card h3 { font-family: var(--f-ar-display); letter-spacing: 0; }
[dir="rtl"] .hero-tag { font-size: clamp(1.25rem, 2.6vw, 1.7rem); }
[dir="rtl"] .dish-name { font-size: 1.12rem; font-weight: 600; }
[dir="rtl"] .dish-desc { font-size: 1rem; }

/* Small labels: NOT shrunken Latin caps. Readable Arabic labels, no uppercase,
   no letter-spacing, modest weight, sized up from the tiny Latin values. */
[dir="rtl"] .eyebrow,
[dir="rtl"] .menu-note,
[dir="rtl"] .field label,
[dir="rtl"] .footer h5,
[dir="rtl"] .info-block h4,
[dir="rtl"] .gtile .cap,
[dir="rtl"] .nav-links a:not(.btn),
[dir="rtl"] .btn,
[dir="rtl"] .ulink,
[dir="rtl"] .modal-close,
[dir="rtl"] .signoff .role,
[dir="rtl"] .hero-scroll {
  font-family: var(--f-ar-body);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}
[dir="rtl"] .eyebrow { font-size: 1.02rem; }
[dir="rtl"] .menu-note { font-size: 1rem; }
[dir="rtl"] .course-head h3 { font-size: 1.5rem; font-weight: 700; }
[dir="rtl"] .field label { font-size: 0.98rem; }
[dir="rtl"] .footer h5 { font-size: 1.0rem; }
[dir="rtl"] .footer-col a { font-size: 1.04rem; }
[dir="rtl"] .info-block h4 { font-size: 1.02rem; }
[dir="rtl"] .nav-links a:not(.btn) { font-size: 1.04rem; }
[dir="rtl"] .btn { font-size: 1.0rem; letter-spacing: 0; }
[dir="rtl"] .ulink { font-size: 1.0rem; }
[dir="rtl"] .hero-scroll { font-size: 0.92rem; }
[dir="rtl"] .gtile .cap { font-size: 0.95rem; }
[dir="rtl"] .nav-links a.lang { font-size: 0.66rem; }

/* hero: Arabic name is the large display (Reem Kufi), Latin transliteration small */
[dir="rtl"] .hero-name-ar { font-size: clamp(3.2rem, 12vw, 7.5rem); line-height: 1.06; letter-spacing: 0; font-weight: 700; }
[dir="rtl"] .hero-lat { letter-spacing: 0.34em; font-size: 0.92rem; color: var(--brass-lit); }

/* brand wordmark in nav: Arabic primary (Reem Kufi), Latin secondary */
[dir="rtl"] .brand-ar { font-family: var(--f-ar-display); font-size: 1.32rem; }
[dir="rtl"] .brand-en { letter-spacing: 0.18em; font-size: 0.7rem; }

/* directional gradient on course rules flips to start from the inline-start */
[dir="rtl"] .course-rule { background: linear-gradient(to left, var(--brass), transparent); }
[dir="rtl"] .hero-rule { } /* centered, no change */

/* underline reveals grow from the inline-start edge */
[dir="rtl"] .ulink::after,
[dir="rtl"] .nav-links a:not(.btn)::after { transform-origin: right; }

[dir="rtl"] .eyebrow { font-style: normal; }

/* quote highlight stays Arabic */
[dir="rtl"] .quote-text .pom { font-style: normal; }

/* =========================================================================
   Heading balance (template standard): distribute heading lines evenly and
   keep a lone trailing word or period from orphaning onto its own line.
   Matters most for Arabic, where a final "." can otherwise widow. Modern
   browsers honour text-wrap: balance; older ones simply wrap as before.
   ========================================================================= */
.display, .hero-name, .hero-ar, .hero-name-ar, .hero-tag, .lead, .quote-text { text-wrap: balance; }

/* =========================================================================
   REWORK ADDITIONS : cart, booking, two craft fixes, CLS guards.
   Same tokens, brass keylines, flat panels, restrained shadow. New work
   reads as part of the original system, not a second style.
   ========================================================================= */

/* ---- craft fix 1: hero moved off centre-float onto a left grid ---- */
.hero {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: center;
  gap: clamp(30px, 6vw, 78px);
  text-align: start;
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; max-width: 33rem; }
.hero-mark { margin-bottom: 22px; }
.hero-rule { margin-inline: 0; }
.hero-tag { max-width: 34ch; }
.hero-cta { justify-content: flex-start; }
.hero-photo {
  margin-top: 0;
  width: 100%;
  max-width: 510px;
  aspect-ratio: 3 / 3.8;
  justify-self: end;
}
.hero-scroll {
  position: absolute; bottom: 26px; inset-inline-start: var(--gutter);
  margin-top: 0; align-items: flex-start;
}
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; justify-items: start; gap: 42px; min-height: auto; padding-block: 128px 78px; }
  .hero-copy { max-width: 100%; }
  .hero-photo { justify-self: stretch; max-width: 470px; aspect-ratio: 3 / 3.4; }
  .hero-scroll { display: none; }
}

/* ---- craft fix 2: fewer uppercase micro-labels on the Latin side.
   AR already restrains these in its own type block, so scope to [dir="ltr"]
   and leave the Arabic page untouched. Caps stay only where they act as a
   control (.btn, .ulink) or a menu course title (.course-head h3). ---- */
[dir="ltr"] .field label,
[dir="ltr"] .info-block h4,
[dir="ltr"] .footer h5,
[dir="ltr"] .signoff .role,
[dir="ltr"] .hero-scroll,
[dir="ltr"] .gtile .cap,
[dir="ltr"] .nav-links a:not(.btn) {
  text-transform: none;
  letter-spacing: 0.01em;
}
[dir="ltr"] .field label,
[dir="ltr"] .info-block h4,
[dir="ltr"] .footer h5 { font-size: 0.82rem; font-weight: 600; }
[dir="ltr"] .menu-note { text-transform: none; letter-spacing: 0; font-family: var(--f-edit); font-style: italic; font-size: 1.02rem; }
[dir="ltr"] .nav-links a:not(.btn) { font-size: 0.94rem; }
[dir="ltr"] .signoff .role { font-size: 0.84rem; }
[dir="ltr"] .gtile .cap { font-size: 0.76rem; letter-spacing: 0.02em; }
[dir="ltr"] .hero-scroll { font-size: 0.72rem; letter-spacing: 0.06em; }

/* =========================================================================
   Nav additions: trailing control group + cart button
   ========================================================================= */
.nav-end { display: flex; align-items: center; gap: 14px; }
.cart-toggle {
  display: none; position: relative;
  width: 42px; height: 42px; flex: none;
  border: 1px solid rgba(201,162,98,0.4); border-radius: 999px;
  background: rgba(201,162,98,0.06); color: var(--cream);
  cursor: pointer; place-items: center;
  transition: color .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
}
html.js .cart-toggle { display: grid; }
.nav.scrolled .cart-toggle { color: var(--ink); border-color: rgba(176,140,73,0.5); }
.cart-toggle:hover { color: var(--basalt); background: var(--brass); border-color: var(--brass); }
.cart-toggle:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.cart-toggle svg { width: 19px; height: 19px; }
.cart-count {
  position: absolute; top: -5px; inset-inline-end: -5px;
  min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--pom); color: #F7EAD9; border-radius: 999px;
  font-family: var(--f-label); font-size: 0.62rem; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
.cart-count[hidden] { display: none; }

/* =========================================================================
   Add-to-order control on each dish
   ========================================================================= */
.dish { grid-template-columns: 1fr auto auto; }
.dish-add {
  display: none;
  grid-row: 1; align-self: center;
  width: 30px; height: 30px; flex: none; margin-inline-start: 14px;
  border: 1px solid var(--brass); background: transparent; color: var(--brass);
  border-radius: 999px; cursor: pointer; place-items: center;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
html.js .dish-add { display: grid; }
.dish-add svg { width: 15px; height: 15px; }
.dish-add:hover { background: var(--pom); border-color: var(--pom); color: #F7EAD9; transform: translateY(-1px); }
.dish-add:focus-visible { outline: 2px solid var(--pom); outline-offset: 2px; }
.dish-add.added { background: var(--brass); border-color: var(--brass); color: var(--basalt); }

/* =========================================================================
   Cart drawer
   ========================================================================= */
.cart-backdrop {
  position: fixed; inset: 0; z-index: 5900; background: rgba(15,12,9,0.5);
  backdrop-filter: blur(3px); opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s var(--ease);
}
.cart-backdrop.open { opacity: 1; visibility: visible; }
.cart-drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 6000;
  width: min(420px, 92vw); background: var(--limestone);
  border-inline-start: 1px solid var(--brass);
  display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden;
  transition: transform .5s var(--ease), visibility .5s var(--ease);
}
[dir="rtl"] .cart-drawer { transform: translateX(-100%); }
.cart-drawer.open { transform: none; visibility: visible; }
body.cart-open { overflow: hidden; }
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter); border-bottom: 1px solid rgba(176,140,73,0.3);
}
.cart-head h3 { font-family: var(--f-display); font-size: 1.34rem; letter-spacing: .04em; color: var(--ink); }
[dir="rtl"] .cart-head h3 { font-family: var(--f-ar-display); letter-spacing: 0; }
.cart-close { background: none; border: 0; cursor: pointer; color: var(--ink-soft); padding: 6px; line-height: 0; }
.cart-close svg { width: 22px; height: 22px; }
.cart-close:focus-visible, .qty-btn:focus-visible, .cart-remove:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.cart-items { flex: 1; overflow-y: auto; padding: 8px var(--gutter); }
.cart-empty { color: var(--ink-soft); font-family: var(--f-edit); font-style: italic; font-size: 1.16rem; padding: 44px 4px; }
[dir="rtl"] .cart-empty { font-family: var(--f-ar-body); font-style: normal; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 18px 0; border-bottom: 1px solid rgba(176,140,73,0.2); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .l-name { font-family: var(--f-body); font-weight: 600; color: var(--ink); }
[dir="rtl"] .cart-line .l-name { font-family: var(--f-ar-body); }
.cart-line .l-total { font-family: var(--f-label); color: var(--brass); font-variant-numeric: tabular-nums; white-space: nowrap; align-self: start; }
.cart-line .l-controls { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid rgba(176,140,73,0.5); }
.qty-btn { width: 30px; height: 30px; background: var(--paper); border: 0; color: var(--ink); cursor: pointer; font-size: 1.05rem; line-height: 1; display: grid; place-items: center; }
.qty-btn:hover { background: var(--brass); color: var(--basalt); }
.qty-val { min-width: 36px; text-align: center; font-variant-numeric: tabular-nums; font-family: var(--f-label); }
.cart-remove { background: none; border: 0; color: var(--ink-soft); cursor: pointer; font-family: var(--f-label); font-size: 0.74rem; letter-spacing: .03em; padding: 4px 2px; }
[dir="rtl"] .cart-remove { font-family: var(--f-ar-body); }
.cart-remove:hover { color: var(--pom); }
.cart-foot { padding: 20px var(--gutter) 26px; border-top: 1px solid rgba(176,140,73,0.3); }
.cart-total-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.cart-total-row .t-label { font-family: var(--f-label); font-size: 0.82rem; letter-spacing: .04em; color: var(--ink-soft); }
[dir="rtl"] .cart-total-row .t-label { font-family: var(--f-ar-body); letter-spacing: 0; font-size: 1rem; }
.cart-total-row .t-val { font-family: var(--f-display); font-size: 1.42rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.cart-place { width: 100%; justify-content: center; }
.cart-place[disabled] { opacity: .45; cursor: not-allowed; }

/* =========================================================================
   Confirmation extras inside the existing modal (order + booking summaries)
   ========================================================================= */
.modal-extra:empty { display: none; }
.modal-extra { margin: 0 auto 22px; text-align: start; max-width: 330px; }
.modal-summary { width: 100%; border-top: 1px solid rgba(176,140,73,0.3); }
.modal-summary .row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid rgba(176,140,73,0.18); font-size: 0.95rem; }
.modal-summary .row .k { color: var(--ink-soft); }
.modal-summary .row .v { color: var(--ink); font-variant-numeric: tabular-nums; text-align: end; }
.modal-ref { font-family: var(--f-label); letter-spacing: .1em; color: var(--ink-soft); margin-top: 16px; font-size: 0.82rem; }
[dir="rtl"] .modal-ref { font-family: var(--f-ar-body); letter-spacing: 0; }
.modal-ref .code { color: var(--pom); font-weight: 700; letter-spacing: .08em; }

/* =========================================================================
   Booking validation + availability messages
   ========================================================================= */
.field .err { display: none; color: var(--pom); font-family: var(--f-label); font-size: 0.72rem; letter-spacing: .01em; margin-top: 2px; }
[dir="rtl"] .field .err { font-family: var(--f-ar-body); font-size: 0.86rem; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select { border-color: var(--pom); box-shadow: 0 0 0 3px rgba(143,47,43,0.12); }
.form-note { grid-column: 1 / -1; font-family: var(--f-edit); font-style: italic; color: var(--ink-soft); margin: 0; }
[dir="rtl"] .form-note { font-family: var(--f-ar-body); font-style: normal; }
.form-note:empty { display: none; }
.form-note.alert { color: var(--pom); font-style: normal; font-family: var(--f-label); font-size: 0.86rem; }
[dir="rtl"] .form-note.alert { font-family: var(--f-ar-body); }
