/* ============================================================
   ASAI CAFE — mobile menu design system
   Derived 1:1 from "asai cafe menu mobile version.pdf"
   Fonts (Nexa + Blacker Pro Display) extracted from the PDF itself.
   ============================================================ */

/* Nexa — full Fontfabric webfonts (Light 300 + Bold 700) */
@font-face {
  font-family: "Nexa";
  src: url("../fonts/Nexa-Light.woff") format("woff");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nexa";
  src: url("../fonts/Nexa-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
/* Cover slogan serif (Blacker Pro in the PDF) — Playfair Display is the closest free match */
@font-face {
  font-family: "Blacker Pro Display";
  src: url("../fonts/PlayfairDisplay-Italic.ttf") format("truetype");
  font-weight: 500; font-style: italic; font-display: swap;
}

:root {
  --accent: #9C5A41;          /* terracotta — price badges & section pills */
  --accent-dark: #834A34;
  --bg: #F3F1ED;              /* page background (menu pages) */
  --bg-cream: #E7DECE;       /* cover / soft banners */
  --card: #FFFFFF;
  --ink: #0B0A09;            /* dish names — near-pure black */
  --muted: #8A857D;          /* descriptions */
  --note: #B07A4E;           /* option/note text */

  --radius-card: 16px;
  --radius-photo: 12px;
  --radius-pill: 999px;
  --shadow: 0 6px 18px rgba(40, 30, 20, 0.06);
  --maxw: 480px;             /* mobile column max width */

  --font-sans: "Nexa", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Blacker Pro Display", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

.menu {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 14px 80px;
  background: var(--bg);
  min-height: 100vh;
}

.loading { padding: 40vh 0; text-align: center; color: var(--muted); }

/* ---------- Cover ---------- */
.cover {
  position: relative;
  margin: 0 -14px 18px;
  padding: 34px 22px 40px;
  background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-cream) 52%, #B98A6E 52%, #9C5A41 100%);
  min-height: 62vh;
  overflow: hidden;
}
.cover__logo {
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.cover__logo .mark {
  width: 34px; height: 34px;
  border: 2px solid currentColor;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.cover__logo small { display:block; font-size: 12px; letter-spacing: 5px; font-weight: 500; }
.cover__tagline {
  margin-top: 22vh;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1.35;
  color: #fff;
  white-space: pre-line;
  max-width: 60%;
}
.cover__photos {
  position: absolute; inset: 0;
  pointer-events: none;
}
.cover__photos img {
  position: absolute;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.cover__photos img:nth-child(1) { width: 130px; height: 130px; top: 28px; right: 16px; }
.cover__photos img:nth-child(2) { width: 78px;  height: 78px;  top: 168px; right: 40px; }
.cover__photos img:nth-child(3) { width: 96px;  height: 96px;  top: 250px; right: 16px; }
.cover__photos img:nth-child(4) { width: 120px; height: 120px; bottom: 24px; right: 96px; }

/* ---------- Section header (pill) ---------- */
.header {
  text-align: center;
  margin: 26px 0 16px;
  scroll-margin-top: 64px;       /* for catnav anchor jumps */
}
.header span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  line-height: 1;
  height: 30px;                 /* shorter */
  padding: 4px 44px 0;          /* wider; top-heavy padding nudges text down to optical centre */
  border-radius: var(--radius-pill);
}

/* ---------- Grid of dish cards ---------- */
.grid { display: grid; gap: 12px; align-items: stretch; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; }  /* minmax(0,1fr) -> columns stay EQUAL width regardless of word length (1fr alone won't shrink below the longest word) */

.card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 8px 8px 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1.8;            /* wide & short, matches PDF dish photos */
  border-radius: var(--radius-photo);
  overflow: hidden;
  background: linear-gradient(135deg, #ece6da, #ded3c0);
}
.card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__photo .ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #b9ad97; font-weight: 700; font-size: 22px; letter-spacing: 1px;
}
.card__head {
  display: flex; align-items: center; gap: 6px;
  margin: 9px 2px 4px;
}
.card__name {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.2;
  flex: 1;
}
.grid--3 .card__head { align-items: flex-end; }                /* short names (e.g. POWER BOWL) sit at the BOTTOM of the reserved area, right above the description */
.grid--3 .card__name {
  font-size: 11px;
  min-height: 3.7em;                                           /* reserve 3 lines (longest name wraps to 3) so every description starts at the same level */
  display: flex; flex-direction: column; justify-content: flex-end;  /* bottom-align the name text within that reserved area */
}
.card__note { font-style: italic; font-size: 10px; color: var(--note); margin: 0 2px 4px; }
.card__desc { font-size: 10.5px; color: var(--muted); line-height: 1.35; margin: 0 2px; }
.grid--3 .card__desc { font-size: 10px; min-height: 4.05em; }   /* reserve up to 3 lines -> all kids cards equal height */

/* price badge — DISH cards: slanted-left parallelogram (sharp corners), thin digits */
.price {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  background: var(--accent);
  color: #fff;
  font-weight: 300;            /* thin, like the PDF */
  font-size: 12px;
  letter-spacing: .3px;
  line-height: 1;
  padding: 8px 13px 4px 21px;  /* extra left clears the slant; top-heavy padding nudges digits down to optical centre */
  white-space: nowrap;
  border-radius: 0;
  clip-path: polygon(15px 0, 100% 0, 100% 100%, 0 100%);
}
/* price badge — DRINK cards: fully rounded rectangle (all 4 corners) */
.drink .price {
  min-width: 0;
  padding: 6px 12px 2px;       /* top-heavy padding nudges digits down to optical centre */
  border-radius: 11px;
  clip-path: none;
}

/* ---------- Drinks (compact card, price bottom-right) ---------- */
.drinks { display: grid; gap: 12px; }
.drinks--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* equal columns regardless of word length */
.drink {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 8px;
  box-shadow: var(--shadow);
}
.drink__photo {
  width: 100%; aspect-ratio: 1/1;
  border-radius: var(--radius-photo); overflow: hidden;
  background: linear-gradient(135deg, #ece6da, #ded3c0);
}
.drink__photo img { width:100%; height:100%; object-fit: cover; }
.drink__row { display:flex; align-items:flex-start; gap:6px; margin: 8px 2px 2px; }
.drink__name {
  flex:1; font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.3px;
  line-height: 1.25; min-height: 2.5em;   /* reserve 2 lines so price + description sit at the SAME level on every drink, no matter the name length */
}
.drink__name em { font-style: normal; color: var(--muted); text-transform: none; font-size: 9px; }
.drink__desc { font-style: italic; font-size: 10px; color: var(--muted); margin: 2px 2px 0; }

/* ---------- Banner ---------- */
.banner {
  margin: 18px 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  min-height: 130px;
}
.banner--promo { background: var(--accent); color: #fff; }
.banner--soft  { background: var(--bg-cream); color: var(--ink); }
.banner__text {
  flex: 1;
  padding: 18px;
  display: flex; flex-direction: column; justify-content: center;
}
.banner__title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}
.banner--soft .banner__title { font-style: italic; }
.banner__sub { margin-top: 8px; font-size: 12px; white-space: pre-line; opacity: .92; }
.banner__img { flex: 0 0 42%; background-size: cover; background-position: center; }

/* ---------- Full-bleed image banner (extracted from PDF 1:1) ---------- */
.imgbanner {
  margin: 18px -14px;            /* bleed to screen edges */
  line-height: 0;
}
.imgbanner img { width: 100%; height: auto; display: block; }

/* ---------- List card (Healthy Juices) ---------- */
.listcard {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 14px;
  margin: 18px 0;
  display: grid;
  grid-template-columns: 1fr 38%;
  gap: 12px;
}
.listcard__pill {
  display:inline-block; background: var(--accent); color:#fff;
  font-weight:600; letter-spacing:1px; font-size:13px;
  padding:8px 22px; border-radius: var(--radius-pill); margin-bottom: 10px;
}
.listcard__item { margin-bottom: 7px; font-size: 11px; line-height: 1.3; }
.listcard__item b { font-size: 13px; font-weight: 700; }
.listcard__item span { color: var(--muted); }
.listcard__media { border-radius: var(--radius-photo); overflow:hidden; background: #dbd9d5; position: relative; }  /* matches the juice photo backdrop */
.listcard__media img { width:100%; height:100%; object-fit: contain; }  /* show the whole glass — never crop */
.listcard__price {
  position:absolute; right:14px; bottom:14px;
  background: var(--accent); color:#fff; font-weight:700; font-size:13px;
  padding:6px 12px; border-radius: 8px;
}

/* ---------- Sticky category nav ---------- */
.catnav {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid #e7e1d6;
  display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 12px; z-index: 50;
  -webkit-overflow-scrolling: touch;
}
.catnav::-webkit-scrollbar { display: none; }
.catnav a {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
  font-size: 12px; font-weight: 600; color: var(--accent);
  text-decoration: none;
  padding: 9px 14px 6px; border-radius: var(--radius-pill);  /* top-heavy padding nudges text down to optical centre */
  border: 1px solid var(--accent);
  white-space: nowrap;
}
.catnav a.active { background: var(--accent); color: #fff; }

@media (max-width: 360px) {
  .card__name { font-size: 11px; }
  .card__desc { font-size: 10px; }
}
