/* =========================================================================
   Era Grill — design system + site styles
   Every value the site uses lives in :root. Change a token, the site follows.
   Brand colors were sampled from the Era Grill logo (assets/logo.jpg).
   ========================================================================= */

:root {
  /* ---- Brand palette (sampled from the logo) ---------------------------- */
  --grill-red: #b70303;   /* "ERA GRILL" wordmark: actions, prices        */
  --flame-red: #e20303;   /* the two flames: small highlights only        */
  --ring-blue: #032b9d;   /* outer ring: links on white, focus ring       */
  --navy: #061549;        /* "UZBEK KITCHEN" lettering: all text ink      */
  --spit-brown: #340d04;  /* doner outline: reserved, not used in UI yet  */
  --meat-cream: #fbe3cf;  /* doner fill: hover tint on dark surfaces      */

  /* ---- Ornament palette (sampled from the restaurant banner) ------------ */
  --tile-blue: #062d82;   /* Uzbek tile ground (assets/uzbek-tile.svg)    */
  --tile-sky: #6796c0;    /* tile rosettes                                */
  --gold: #eab439;        /* arch trim and rules. Decoration only: 1.9:1  */
  --halal-green: #0b7a3e; /* halal badge only. White on it = 5.4:1        */

  /* ---- UI roles ---------------------------------------------------------- */
  --ink: var(--navy);
  --ink-muted: #565e7c;        /* 6.4:1 on white, 5.8:1 on surface        */
  --paper: #ffffff;
  --surface: #f3f4f8;          /* chips, secondary buttons                */
  --surface-hover: #e7e9f1;
  --line: #e3e5ee;             /* hairlines between menu items            */
  --action: var(--grill-red);  /* white text on it = 6.9:1                */
  --action-hover: #940202;
  --price: var(--grill-red);
  --focus: var(--ring-blue);
  --on-dark: #ffffff;
  --on-dark-muted: #b9c0dc;
  --line-on-dark: rgba(255, 255, 255, 0.16);
  --underline-on-dark: rgba(255, 255, 255, 0.35);
  --chips-bg: rgba(255, 255, 255, 0.94);
  --map-placeholder: #0d1f5c;

  /* ---- Typography -------------------------------------------------------- */
  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --stretch-display: 100%;     /* normal width: solid, plain and easy to read */
  --stretch-text: 100%;

  --text-xs: 0.8125rem;   /* 13px  legal, badges                          */
  --text-sm: 0.9375rem;   /* 15px  descriptions, chips, small buttons     */
  --text-base: 1rem;      /* 16px  body                                   */
  --text-lg: 1.125rem;    /* 18px  dish names, prices, lede on mobile     */
  --text-xl: 1.375rem;    /* 22px  lede                                   */
  --text-2xl: 1.75rem;    /* 28px  category titles                        */
  --text-3xl: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);     /* 32→44 sections */
  --text-display: clamp(2.25rem, 1.5rem + 2.2vw, 3.5rem); /* 36→56 hero    */

  --leading-tight: 1.08;
  --leading-snug: 1.2;
  --leading-body: 1.55;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 620;
  --weight-bold: 760;
  --weight-black: 860;

  --tracking-tight: -0.02em;
  --tracking-snug: -0.01em;

  /* ---- Spacing (4px base) ----------------------------------------------- */
  --space-1: 0.25rem;  /*   4 */
  --space-2: 0.5rem;   /*   8 */
  --space-3: 0.75rem;  /*  12 */
  --space-4: 1rem;     /*  16 */
  --space-5: 1.5rem;   /*  24 */
  --space-6: 2rem;     /*  32 */
  --space-7: 3rem;     /*  48 */
  --space-8: 4rem;     /*  64 */
  --space-9: 6rem;     /*  96 */
  --space-10: 8rem;    /* 128 */

  /* ---- Layout ------------------------------------------------------------ */
  --container: 1200px;
  --gutter: var(--space-5);       /* 24 desktop, 16 on phones */
  --section-y: var(--space-9);    /* 96 desktop, 64 on phones */
  --header-h: 72px;
  --chips-h: 64px;
  --measure: 34rem;               /* max line length for prose */
  --logo-mark: 44px;              /* round logo in header/footer */
  --halal-badge: 44px;            /* halal roundel in the header */
  --halal-badge-sm: 32px;         /* halal roundel next to text */
  --hero-art: 420px;              /* tile-and-arch panel in the hero (4:5) */
  --tile-size: 56px;              /* one repeat of the tile pattern */
  --fade-w: 56px;                 /* chip bar edge fade */
  --action-bar-h: 76px;           /* phone Call / Order bar */

  /* ---- Shape ------------------------------------------------------------- */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* ---- Controls ---------------------------------------------------------- */
  --control-h: 52px;
  --control-h-sm: 42px;
  --chip-h: 42px;

  /* ---- Motion ------------------------------------------------------------ */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 180ms;
}

@media (max-width: 640px) {
  :root {
    --gutter: var(--space-4);
    --section-y: var(--space-8);
    --header-h: 64px;
    --chips-h: 60px;
    --logo-mark: 40px;
    --halal-badge: 40px;
  }
}

/* =========================================================================
   Base
   ========================================================================= */

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

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

/* Anchor targets clear the sticky header (menu categories also clear the chip bar) */
[id] { scroll-margin-top: var(--header-h); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-stretch: var(--stretch-text);
  line-height: var(--leading-body);
  font-weight: var(--weight-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.nobr { white-space: nowrap; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--ink);
  color: var(--on-dark);
  border-radius: var(--radius-sm);
  font-weight: var(--weight-semibold);
}
.skip-link:focus { top: var(--space-3); }

/* =========================================================================
   Type roles
   ========================================================================= */

.display {
  font-size: var(--text-display);
  font-weight: var(--weight-bold);
  font-stretch: var(--stretch-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  font-stretch: var(--stretch-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.lede {
  font-size: var(--text-xl);
  line-height: 1.45;
  color: var(--ink-muted);
  max-width: var(--measure);
  text-wrap: pretty;
}

/* =========================================================================
   Components
   ========================================================================= */

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-h);
  padding: 0 var(--space-6);
  border: 0;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.btn-sm {
  min-height: var(--control-h-sm);
  padding: 0 var(--space-5);
  font-size: var(--text-sm);
}

.btn-primary { background: var(--action); color: var(--on-dark); }
.btn-primary:hover { background: var(--action-hover); }

.btn-secondary { background: var(--surface); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-hover); }

.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--meat-cream); }

/* ---- Halal badge (assets/halal-badge.svg) -------------------------------- */
.halal-badge {
  flex: none;
  width: var(--halal-badge);
  height: var(--halal-badge);
}
.halal-badge--sm { width: var(--halal-badge-sm); height: var(--halal-badge-sm); }

/* badge + short text, e.g. "Everything on the menu is 100% halal." */
.halal-line {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

/* ---- Chips (menu category nav) ------------------------------------------ */
.chip {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: var(--chip-h);
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.chip:hover { background: var(--surface-hover); }
.chip.is-active { background: var(--ink); color: var(--on-dark); }

/* ---- Menu item ------------------------------------------------------------ */
.menu-item {
  padding: var(--space-5) 0 var(--space-5);
  border-top: 1px solid var(--line);
}
.menu-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
}
.menu-item-name {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
}
.menu-item-qty {
  color: var(--ink-muted);
  font-weight: var(--weight-medium);
}
.menu-item-price {
  flex: none;
  color: var(--price);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.menu-item-desc {
  margin-top: var(--space-2);
  max-width: var(--measure);
  color: var(--ink-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-body);
}

/* =========================================================================
   Header
   ========================================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  border-radius: var(--radius-pill);
}
.brand img {
  width: var(--logo-mark);
  height: var(--logo-mark);
  border-radius: 50%;
}
.brand-name {
  font-size: var(--text-xl);
  font-weight: var(--weight-black);
  font-stretch: var(--stretch-display);
  letter-spacing: var(--tracking-snug);
  line-height: 1;
  color: var(--grill-red);
}

.header-nav {
  display: flex;
  gap: var(--space-5);
  margin-left: var(--space-4);
}
.header-nav a {
  font-weight: var(--weight-medium);
  color: var(--ink-muted);
  transition: color var(--dur) var(--ease);
}
.header-nav a:hover { color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-left: auto;
}
.header-phone {
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}
.header-phone:hover { color: var(--ring-blue); }

@media (max-width: 900px) {
  .header-nav { display: none; }
}
@media (max-width: 640px) {
  /* phones get the Call / Order bar at the bottom instead */
  .header-phone,
  .header-order { display: none; }
  .brand-name { font-size: var(--text-lg); }
}

/* =========================================================================
   Hero
   ========================================================================= */

.hero {
  padding-block: var(--space-8);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: var(--space-8);
}
.hero-copy > * + * { margin-top: var(--space-5); }
.hero-copy .lede { margin-top: var(--space-5); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-top: var(--space-3);
}

.promise-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding-top: var(--space-5);
  color: var(--ink-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}
.promise-list li { display: inline-flex; align-items: center; gap: var(--space-4); }
.promise-list li + li::before {
  content: "";
  width: 2px;
  height: 1em;
  background: var(--grill-red);
  border-radius: 1px;
}

/* ---- Hero art: arched window over Uzbek tile (from the banner) ---------- */
.tile-pattern {
  background-color: var(--tile-blue);
  background-image: url("../assets/uzbek-tile.svg");
  background-size: var(--tile-size) var(--tile-size);
  background-position: center top;
}

.hero-art {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: var(--hero-art);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.hero-arch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.arch-window { fill: var(--paper); }
.arch-trim {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linejoin: round;
}
.arch-floor { fill: var(--navy); }
.arch-floor-line { fill: var(--gold); }

/* logo centered in the doorway: 62% wide, center at 60% height */
.hero-art-logo {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 62%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

@media (max-width: 900px) {
  .hero { padding-block: var(--space-6) var(--space-8); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .hero-art { order: -1; justify-self: start; max-width: 240px; }
}
@media (max-width: 640px) {
  .lede { font-size: var(--text-lg); }
  .hero-art { max-width: 200px; --tile-size: 40px; border-radius: var(--radius-md); }
  .hero-actions .btn { flex: 1 1 auto; }
  /* stack the three promises; the red bar becomes each line's marker */
  .promise-list { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
  .promise-list li::before {
    content: "";
    width: 2px;
    height: 1em;
    background: var(--grill-red);
    border-radius: 1px;
  }
  .promise-list li { gap: var(--space-3); }
}
@media (max-width: 360px) {
  /* very small phones: let "Downtown LA." wrap */
  .nobr { white-space: normal; }
}

/* =========================================================================
   Menu
   ========================================================================= */

.menu {
  padding-bottom: var(--section-y);
  border-top: 1px solid var(--line);
}

.menu-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  padding-top: var(--section-y);
  padding-bottom: var(--space-6);
}
.menu-note {
  color: var(--ink-muted);
  font-weight: var(--weight-medium);
}

/* Sticky category bar (pattern from tarnov.uz) */
.chips {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: var(--chips-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.chips-track {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--chips-h);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  /* keep focus rings from being clipped */
  padding-block: var(--space-1);
}
.chips-track::-webkit-scrollbar { display: none; }

/* Fade the edge that has more chips behind it (classes set by main.js) */
.chips::before,
.chips::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 1px;
  z-index: 1;
  width: var(--fade-w);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.chips::before { left: 0; background: linear-gradient(to right, var(--paper), transparent); }
.chips::after { right: 0; background: linear-gradient(to left, var(--paper), transparent); }
.chips.fade-left::before,
.chips.fade-right::after { opacity: 1; }

.menu-category {
  padding-top: var(--space-8);
  scroll-margin-top: calc(var(--header-h) + var(--chips-h));
}
.category-title {
  margin-bottom: var(--space-5);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  font-stretch: var(--stretch-display);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
}

.menu-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-7);
}

/* Drinks: compact three-column price list, no descriptions */
.menu-list--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.menu-list--compact .menu-item { padding-block: var(--space-4); }
.menu-list--compact .menu-item-name { font-weight: var(--weight-medium); }

@media (max-width: 900px) {
  .menu-list--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .menu-list { grid-template-columns: 1fr; }
  .menu-list--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-5); }
  .menu-category { padding-top: var(--space-7); }
}

/* =========================================================================
   Visit / order (navy band)
   ========================================================================= */

.visit {
  padding-block: var(--section-y);
  background: var(--navy);
  color: var(--on-dark);
  border-top: 4px solid var(--gold);   /* the banner's gold-on-navy edge */
}
.visit-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: var(--space-8);
}

.visit-details {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-7);
}
.visit-details dt {
  margin-bottom: var(--space-1);
  color: var(--on-dark-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}
.visit-details dd {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.visit-details a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  text-decoration-color: var(--underline-on-dark);
  transition: text-decoration-color var(--dur) var(--ease);
}
.visit-details a:hover { text-decoration-color: var(--on-dark); }

.order-block {
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line-on-dark);
  scroll-margin-top: calc(var(--header-h) + var(--space-5));
}
.order-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  font-stretch: var(--stretch-display);
}
.order-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.visit :focus-visible { outline-color: var(--on-dark); }

.visit-map {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--map-placeholder);
  aspect-ratio: 4 / 3;
}
.visit-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.6) contrast(1.02);
}

@media (max-width: 900px) {
  .visit-grid { grid-template-columns: 1fr; gap: var(--space-7); }
  .visit-map { aspect-ratio: 1 / 1; }
}
@media (max-width: 640px) {
  .order-buttons .btn { flex: 1 1 100%; }
}

/* =========================================================================
   Footer
   ========================================================================= */

.site-footer {
  padding-block: var(--space-8) var(--space-6);
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: var(--text-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: var(--space-7);
}
.footer-brand .brand { margin-bottom: var(--space-4); }
.footer-brand p { max-width: 22rem; }
.footer-col h2 {
  margin-bottom: var(--space-3);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}
.footer-col li + li { margin-top: var(--space-2); }
.footer-col a:hover { color: var(--ink); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* =========================================================================
   Phone action bar (bottom of screen on phones)
   ========================================================================= */

.action-bar { display: none; }

@media (max-width: 640px) {
  .action-bar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-2);
    padding: var(--space-3) var(--gutter) calc(var(--space-3) + env(safe-area-inset-bottom));
    background: var(--paper);
    border-top: 1px solid var(--line);
  }
  .site-footer { padding-bottom: calc(var(--space-6) + var(--action-bar-h) + env(safe-area-inset-bottom)); }
}

/* ---- Visit band: pickup group and hours ----------------------------------- */
.order-text { margin-top: var(--space-2); color: var(--on-dark-muted); }
.order-group + .order-title { margin-top: var(--space-6); }
.hours-list { display: grid; gap: var(--space-1); font-size: var(--text-lg); }
.hours-days { display: inline-block; min-width: 5.5rem; color: var(--on-dark-muted); font-weight: var(--weight-medium); }

/* ---- 404 page ---------------------------------------------------------------- */
.not-found {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: var(--space-5);
  min-height: 100vh;
  min-height: 100dvh;
  padding-block: var(--space-8);
}
