/* ============================================================
   Chilli Vanilla - Brand System v1
   Implements brand/brand-system.md. Imported by menus + website.
   ============================================================ */

/* Fonts loaded via <link> in each HTML file:
   Cormorant Garamond (display) + Inter (body). */

:root {
  /* Green surface */
  --cv-green:       #0E3B2E;
  --cv-green-deep:  #08271E;
  --cv-green-soft:  #16513E;
  /* Gold */
  --cv-gold:        #B38448;
  --cv-gold-bright: #E8B968;
  --cv-gold-deep:   #8D6130;
  /* Cream surface */
  --cv-cream:       #F7F1E4;
  --cv-cream-deep:  #EFE6D2;
  /* Ink */
  --cv-ink:         #0A0A09;
  --cv-ink-soft:    #3B3A34;
  /* Functional markers */
  --cv-leaf:        #4E9A51;
  --cv-chilli:      #C0392B;

  --cv-serif: 'Cormorant Garamond', Georgia, serif;
  --cv-sans:  'Inter', -apple-system, system-ui, sans-serif;
}

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

/* ---- Print page (A4 portrait working canvas) ---- */
@page { size: 794px 1123px; margin: 0; }

body {
  font-family: var(--cv-sans);
  color: var(--cv-ink);
  -webkit-font-smoothing: antialiased;
  background: #4b4b4b; /* screen backdrop around pages; never printed */
}

.page {
  width: 794px;
  min-height: 1123px;
  height: 1123px;
  padding: 52px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  page-break-after: always;
  margin: 0 auto 24px;   /* centered with gap on screen */
  background: var(--cv-cream);
}
.page:last-child { page-break-after: avoid; margin-bottom: 0; }

/* A5 portrait (half A4) - thali / drinks cards */
.page-a5 {
  width: 560px;
  min-height: 794px;
  height: 794px;
  padding: 36px 32px;
}

/* ---- Surfaces ---- */
.surface-cream { background: var(--cv-cream); color: var(--cv-ink); }
.surface-green {
  /* solid first so print keeps the green if gradients drop */
  background-color: var(--cv-green);
  background-image:
    radial-gradient(120% 90% at 50% -10%, var(--cv-green-soft) 0%, var(--cv-green) 42%, var(--cv-green-deep) 100%);
  color: var(--cv-cream);
}

/* ---- Type scale ---- */
.display {
  font-family: var(--cv-serif);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
}
.section-title {
  font-family: var(--cv-serif);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.0;
  color: var(--cv-green);
}
.surface-green .section-title { color: var(--cv-gold-bright); }

.kicker {
  font-family: var(--cv-sans);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cv-gold-deep);
}
.surface-green .kicker { color: var(--cv-gold); }

.subtitle {
  font-family: var(--cv-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--cv-ink-soft);
}
.surface-green .subtitle { color: var(--cv-cream); opacity: 0.82; }

/* ---- Wordmark lockup ---- */
.wordmark {
  font-family: var(--cv-serif);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cv-green);
}
.surface-green .wordmark { color: var(--cv-cream); }
.descriptor {
  font-family: var(--cv-sans);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cv-gold-deep);
}
.surface-green .descriptor { color: var(--cv-gold); }

/* Running head (top of listing pages) */
.runhead {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--cv-gold);
  margin-bottom: 6px;
}
.runhead img {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 50%; object-fit: cover; object-position: center;
  display: block;
}
.runhead .wordmark { font-size: 15px; }
.runhead .descriptor { font-size: 8px; margin-top: 2px; }

/* ---- Gold hairline rule ---- */
.rule-gold {
  height: 1px; border: 0;
  background: linear-gradient(90deg, transparent, var(--cv-gold) 15%, var(--cv-gold) 85%, transparent);
  margin: 10px 0;
}

/* ---- Menu list ---- */
.menu-list { list-style: none; margin-top: 8px; }
.menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
}
.menu-item + .menu-item { border-top: 1px dotted rgba(141,97,48,0.28); }
.mi-name {
  font-weight: 500; font-size: 13px; color: var(--cv-ink);
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.surface-green .mi-name { color: var(--cv-cream); }
.mi-desc {
  display: block; font-size: 10.5px; font-style: italic;
  color: var(--cv-ink-soft); margin-top: 1px; font-family: var(--cv-serif);
}
.surface-green .mi-desc { color: rgba(247,241,228,0.7); }
.mi-price {
  font-weight: 600; font-size: 13px; color: var(--cv-green);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.surface-green .mi-price { color: var(--cv-gold-bright); }
.mi-price .rupee { font-weight: 500; opacity: 0.7; }

/* dual price (pizza 7"/12", pasta Penne/Spaghetti) */
.mi-price.dual { display: inline-flex; gap: 18px; }
.mi-price.dual > span { min-width: 36px; text-align: right; }

/* Two-column listing */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; align-items: start; }

/* ---- Markers ---- */
.mk { font-size: 11px; line-height: 1; }
.mk-veg { color: var(--cv-leaf); }
.mk-star { color: var(--cv-chilli); }

/* Add-on / build-your-own grid (collapses permutations) */
.addons {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr));
  gap: 6px 16px; margin-top: 8px;
  padding: 12px 14px; border-radius: 8px;
  background: var(--cv-cream-deep);
  border: 1px solid rgba(141,97,48,0.3);
}
.surface-green .addons { background: rgba(255,255,255,0.05); border-color: rgba(179,132,72,0.4); }
.addon { display: flex; justify-content: space-between; font-size: 11.5px; }
.addon .a-name { color: var(--cv-ink-soft); }
.surface-green .addon .a-name { color: rgba(247,241,228,0.8); }
.addon .a-price { color: var(--cv-gold-deep); font-weight: 600; font-variant-numeric: tabular-nums; }
.surface-green .addon .a-price { color: var(--cv-gold-bright); }

/* ---- Footer ---- */
.cv-footer {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid rgba(141,97,48,0.4);
  font-size: 8.5px; letter-spacing: 0.04em;
  color: var(--cv-ink-soft);
}
.surface-green .cv-footer { color: rgba(247,241,228,0.6); border-color: rgba(179,132,72,0.35); }
.cv-footer .legend { display: flex; gap: 14px; }
.cv-footer .legend span { display: inline-flex; align-items: center; gap: 4px; }

/* ---- Section-opener panel (photo integration) ---- */
.opener { justify-content: center; align-items: center; text-align: center; }
.opener .plate {
  width: 300px; height: 300px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--cv-gold);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  margin-bottom: 24px;
}
.opener .section-title { font-size: 54px; }

/* Decorative corner flourish (subtle, gold) */
.flourish { position: absolute; width: 64px; height: 64px; opacity: 0.5; pointer-events: none; }
.flourish.tl { top: 20px; left: 20px; }
.flourish.tr { top: 20px; right: 20px; transform: scaleX(-1); }
.flourish.bl { bottom: 20px; left: 20px; transform: scaleY(-1); }
.flourish.br { bottom: 20px; right: 20px; transform: scale(-1,-1); }

/* ---- Print fidelity ---- */
@media print {
  body { background: none; }
  .page { margin: 0; box-shadow: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Circular monogram mark - keep artwork optically centered in the disc */
.cv-mark {
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
}
