/* ==========================================================================
   Ember & Olive design tokens
   Palette is built from the restaurant's own materials: za'atar olive,
   limestone, brass fittings, charcoal and the brand ember (settings.accent).
   ========================================================================== */

:root {
  /* Core palette */
  --zaatar-950: #161B13;
  --zaatar-900: #1D2419;
  --zaatar-800: #232B1F;
  --zaatar-700: #2F3929;
  --zaatar-600: #3E4A36;
  --olive-400: #7F8A62;
  --olive-300: #A6AD8A;
  --paper: #F3EDE2;     /* warm cream */
  --paper-2: #E9E0CF;
  --paper-3: #FBF8F2;
  --ink: #221E19;       /* warm charcoal */
  --ink-2: #4A443B;
  --ink-3: #685F53;     /* >= 5:1 on --paper */
  --charcoal: #1C1916;
  --charcoal-2: #2A251F;
  --clay: #E8D9C3;
  --brass: #A8844A;
  --brass-light: #D8BD85;
  --brass-dark: #7E6232;
  --linen: #F4EFE2;

  /* Brand accent: overridden at runtime from settings.accent */
  --accent: #C8553D;
  --accent-ink: #FFFFFF;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-strong: color-mix(in srgb, var(--accent) 82%, #000);

  /* Semantic */
  --ok: #4F7A3A;
  --warn: #B7832F;
  --danger: #B3362B;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Cairo", "Tajawal", "Segoe UI", "Geeza Pro", Tahoma, "Noto Naskh Arabic", sans-serif;

  /* Type scale (1.25 minor-third-ish, rem based) */
  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.4375rem;
  --step-3: 1.8125rem;
  --step-4: 2.375rem;
  --step-5: 3.125rem;

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  /* Shape: radius encodes hierarchy, not decoration */
  --r-pill: 999px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --arch: 999px 999px var(--r-md) var(--r-md); /* the Levantine arch */

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent);
}

/* Arabic contexts switch the whole text stack */
:lang(ar), [dir="rtl"] {
  --font-display: "Cairo", "Tajawal", "Segoe UI", "Geeza Pro", Tahoma, serif;
  --font-ui: "Cairo", "Tajawal", "Segoe UI", "Geeza Pro", Tahoma, sans-serif;
}
.ar, [dir="rtl"] .ar { font-family: var(--font-ar); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Generated placeholder art for dishes without photos */
.ph {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 30% 15%, color-mix(in srgb, var(--ph-a) 85%, #fff) 0%, transparent 55%),
    radial-gradient(90% 80% at 85% 100%, color-mix(in srgb, var(--ph-b) 80%, #000) 0%, transparent 70%),
    linear-gradient(150deg, var(--ph-a), var(--ph-b));
  isolation: isolate;
}
.ph::before {
  /* faint eight-point-star lattice, a nod to Levantine tilework */
  content: "";
  position: absolute; inset: 0;
  background-image:
    conic-gradient(from 45deg at 50% 50%, rgba(255,255,255,.10) 0 25%, transparent 0 50%, rgba(255,255,255,.10) 0 75%, transparent 0);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(closest-side at 70% 30%, #000, transparent);
  mask-image: radial-gradient(closest-side at 70% 30%, #000, transparent);
  opacity: .55;
  z-index: -1;
}
.ph-emoji {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: var(--ph-size, 2.4em);
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.28));
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}
.ph-glyph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(255, 248, 235, .85);
}
.ph-glyph .ic { width: var(--ph-size, 2.4em); height: var(--ph-size, 2.4em); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); }
.ph.has-img::before { display: none; }
.ph > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
