/* Chilli Vanilla — mobile web chrome (imports brand tokens via parent) */
:root {
  --wa: #25D366;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.site {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--cv-sans);
  color: var(--cv-ink);
  background: var(--cv-cream);
  -webkit-font-smoothing: antialiased;
}

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

.site-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 18px 32px;
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  background: var(--cv-green);
  color: var(--cv-cream);
  border-bottom: 1px solid rgba(179,132,72,0.35);
}
.topbar img { width: 36px; height: 36px; border-radius: 50%; }
.topbar .wm {
  font-family: var(--cv-serif);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
}
.topbar .sub {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cv-gold);
  margin-top: 2px;
}

/* Segment nav */
.seg {
  display: flex; gap: 6px;
  padding: 12px 0 4px;
  position: sticky; top: 61px; z-index: 15;
  background: var(--cv-cream);
}
.seg a {
  flex: 1; text-align: center;
  padding: 10px 6px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid rgba(141,97,48,0.35);
  border-radius: 999px;
  color: var(--cv-green);
  background: transparent;
}
.seg a.active {
  background: var(--cv-green);
  color: var(--cv-cream);
  border-color: var(--cv-green);
}

/* Landing */
.hero {
  text-align: center;
  padding: 48px 12px 28px;
}
.hero img { width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 20px; display: block; }
.hero h1 {
  font-family: var(--cv-serif);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 26px;
  color: var(--cv-cream);
  margin: 0;
}
.hero .tag {
  font-family: var(--cv-serif);
  font-style: italic;
  font-size: 16px;
  color: rgba(247,241,228,0.85);
  margin-top: 10px;
}
.hero .desc {
  margin-top: 18px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cv-gold);
}
.coming-soon {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 8vh;
}
.coming-line {
  margin-top: 28px;
  font-family: var(--cv-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--cv-gold-bright);
}
.landing-bg {
  min-height: 100dvh;
  background-color: var(--cv-green) !important;
  background-image: radial-gradient(120% 90% at 50% -10%, var(--cv-green-soft) 0%, var(--cv-green) 42%, var(--cv-green-deep) 100%) !important;
  color: var(--cv-cream);
  display: flex; flex-direction: column;
}
.landing-actions {
  padding: 8px 22px 28px;
  display: flex; flex-direction: column; gap: 12px;
  max-width: 400px; margin: 0 auto; width: 100%;
}
.btn {
  display: block; text-align: center;
  padding: 16px 18px;
  border-radius: 12px;
  font-weight: 600; font-size: 15px;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--cv-gold);
  color: var(--cv-green-deep);
}
.btn-secondary {
  background: rgba(247,241,228,0.12);
  color: var(--cv-cream);
  border: 1.5px solid var(--cv-gold);
}
.landing-foot {
  margin-top: auto;
  text-align: center;
  padding: 20px 16px calc(24px + var(--safe-bottom));
  font-size: 11px;
  color: rgba(247,241,228,0.55);
  letter-spacing: 0.04em;
}
.landing-foot .gst { font-size: 9px; opacity: 0.7; margin-top: 6px; }

/* Menu page */
.page-head { padding: 18px 0 8px; }
.page-head .kicker {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cv-gold-deep);
}
.page-head h1 {
  font-family: var(--cv-serif);
  font-weight: 700;
  font-size: 32px;
  color: var(--cv-green);
  margin: 4px 0 0;
  line-height: 1.05;
}
.page-head .note {
  font-family: var(--cv-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--cv-ink-soft);
  margin-top: 6px;
}

/* Menu search */
.menu-search {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 10px; padding: 10px 14px;
  border: 1px solid rgba(141,97,48,0.3); border-radius: 999px;
  background: var(--cv-cream-deep);
}
.menu-search .q-ico { width: 16px; height: 16px; fill: var(--cv-gold-deep); flex: 0 0 auto; }
.menu-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-family: var(--cv-sans); font-size: 14px; color: var(--cv-ink);
}
.menu-search input::placeholder { color: var(--cv-ink-soft); opacity: .7; }
.menu-search input::-webkit-search-cancel-button { display: none; }
.menu-search button {
  border: 0; background: transparent; color: var(--cv-ink-soft);
  font-size: 15px; line-height: 1; cursor: pointer; padding: 2px 4px;
}
.search-count {
  font-family: var(--cv-serif); font-style: italic; font-size: 13px;
  color: var(--cv-ink-soft); margin: 0 0 8px;
}

/* Anchor at the strip's flow position — scroll target when switching pages */
#strip-anchor { display: block; height: 0; scroll-margin-top: 108px; }

/* Category strip (id="toc") — 2-row photo grid that collapses to one row */
.catstrip {
  position: sticky; top: 108px; z-index: 14;
  display: grid; grid-auto-flow: column; grid-template-rows: auto auto;
  justify-content: start; align-items: start; gap: 14px 12px;
  padding: 12px 18px 10px; margin: 0 -18px 8px;
  overflow-x: auto; scroll-snap-type: x proximity;
  background: var(--cv-cream);
  border-bottom: 1px solid rgba(141,97,48,0.18);
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  transition: gap .2s ease, padding .2s ease;
}
.catstrip::-webkit-scrollbar { display: none; }
.cat {
  scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 72px; text-align: center;
}
.cat-img {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--cv-cream-deep) center/cover no-repeat;
  border: 2px solid transparent;
  display: grid; place-items: center; overflow: hidden;
  transition: width .2s ease, height .2s ease, border-color .18s ease;
}
.cat-img img { width: 58%; height: 58%; object-fit: contain; opacity: .45; }
.cat-label {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; max-height: 2.5em; width: 72px;
  font-size: 10px; font-weight: 600; line-height: 1.2;
  letter-spacing: 0.01em; color: var(--cv-green);
}
.cat-count {
  font-size: 9px; color: var(--cv-gold-deep); font-variant-numeric: tabular-nums;
}
.cat.active .cat-img { border-color: var(--cv-gold); }
.cat.active .cat-label { color: var(--cv-gold-deep); }

/* Compact: single row of smaller image chips (images stay visible) */
.catstrip.compact { grid-template-rows: auto; gap: 10px; padding: 8px 18px; }
.catstrip.compact .cat { flex-direction: row; width: auto; gap: 8px; }
.catstrip.compact .cat-img { width: 34px; height: 34px; border-width: 1.5px; }
.catstrip.compact .cat-count { display: none; }
.catstrip.compact .cat-label {
  -webkit-line-clamp: initial; max-height: none; width: auto;
  white-space: nowrap; font-size: 11px; font-weight: 500;
}

/* During an active search, mute the category strip */
body.searching .catstrip { opacity: .3; pointer-events: none; }

/* Branded loading splash */
#splash {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; text-align: center;
  background-color: var(--cv-green);
  background-image: radial-gradient(120% 90% at 50% -10%,
    var(--cv-green-soft) 0%, var(--cv-green) 45%, var(--cv-green-deep) 100%);
  transition: opacity .5s ease, visibility .5s ease;
}
#splash.hide { opacity: 0; visibility: hidden; }
#splash .splash-mark {
  width: 122px; height: 122px; border-radius: 50%; display: block; margin: 0 auto;
  animation: splash-in .9s cubic-bezier(.2,.7,.2,1) both;
}
#splash .splash-word {
  margin-top: 18px; font-family: var(--cv-serif); color: var(--cv-cream);
  letter-spacing: .16em; text-transform: uppercase; font-size: 18px; font-weight: 600;
  animation: splash-fade 1s ease .25s both;
}
#splash .splash-tag {
  margin-top: 8px; font-family: var(--cv-serif); font-style: italic;
  color: var(--cv-gold-bright); font-size: 13px;
  animation: splash-fade 1s ease .45s both;
}
@keyframes splash-in { from { opacity: 0; transform: scale(.78); } to { opacity: 1; transform: scale(1); } }
@keyframes splash-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Scroll-reveal */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  #splash .splash-mark, #splash .splash-word, #splash .splash-tag { animation: none; }
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
}

/* Pager: exactly one section ("page") visible; the strip is the navigation */
.section { display: none; }
.section.on { display: block; }
body.searching .section { display: block; }   /* search spans all pages */
.section h2 .count {
  font-family: var(--cv-sans); font-size: 12px; font-weight: 600;
  color: var(--cv-gold-deep); vertical-align: middle;
}

.section { margin: 18px 0 8px; scroll-margin-top: 150px; }
.section h2 {
  font-family: var(--cv-serif);
  font-weight: 700;
  font-size: 22px;
  color: var(--cv-green);
  margin: 0 0 2px;
}
.section .sk {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cv-gold-deep);
}
.section .sec-note {
  font-family: var(--cv-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--cv-ink-soft);
  margin: 4px 0 2px;
}

.group { margin-top: 14px; }
.group h3 {
  font-family: var(--cv-serif);
  font-weight: 700;
  font-size: 16px;
  color: var(--cv-green);
  margin: 0 0 4px;
}

.item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px dotted rgba(141,97,48,0.28);
}
.item .it-text { flex: 1 1 auto; min-width: 0; }
.item .name {
  font-weight: 500; font-size: 14px;
  color: var(--cv-ink);
}
.item .desc {
  display: block;
  font-family: var(--cv-serif);
  font-style: italic;
  font-size: 12px;
  color: var(--cv-ink-soft);
  margin-top: 2px;
}
.item .price {
  font-weight: 600; font-size: 14px;
  color: var(--cv-green);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-top: 4px;   /* price sits directly under the name */
}
.item .price .r { opacity: 0.65; font-weight: 500; }
.item .thumb {
  flex: 0 0 auto;
  width: 104px; height: 104px; border-radius: 12px; object-fit: cover;
  background: var(--cv-cream-deep); border: 1px solid rgba(141,97,48,0.2);
}
/* Signature / dietary glyphs (inline SVG, gold + leaf) */
.mk {
  display: inline-block; vertical-align: baseline;
  width: 0.72em; height: 0.72em; margin-left: 3px;
}
.mk-sig { fill: var(--cv-gold-deep); transform: translateY(0.02em); }
.mk-jain { fill: none; }
.mk-jain path { fill: var(--cv-leaf); }
.mk-jain .rib { stroke: var(--cv-cream); stroke-width: 0.8; }

/* "A Chilli Vanilla Signature" chef's-note microcopy (hero dishes) */
.item .sig-note {
  display: block;
  font-family: var(--cv-serif);
  font-style: italic;
  font-size: 12px;
  color: var(--cv-gold-deep);
  margin-top: 3px;
}

/* Skeleton loading placeholder */
.skeleton { padding: 8px 0; }
.sk-block { margin: 22px 0; }
.sk-row { display: grid; grid-template-columns: 1fr 46px; gap: 12px; padding: 12px 0; }
.sk-line {
  height: 12px; border-radius: 6px;
  background: linear-gradient(90deg,
    var(--cv-cream-deep) 25%, #e4d8bf 37%, var(--cv-cream-deep) 63%);
  background-size: 400% 100%;
  animation: sk-shimmer 1.4s ease infinite;
}
.sk-h2 { height: 22px; width: 44%; margin-bottom: 14px; }
.sk-name { width: 70%; }
.sk-price { width: 100%; justify-self: end; }
.sk-row:nth-child(3n) .sk-name { width: 55%; }
.sk-row:nth-child(3n+2) .sk-name { width: 80%; }
@keyframes sk-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sk-line { animation: none; } }

.addons {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--cv-cream-deep);
  border: 1px solid rgba(141,97,48,0.3);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
.addons .row {
  display: flex; justify-content: space-between;
  font-size: 13px;
}
.addons .row .p { color: var(--cv-gold-deep); font-weight: 600; }

.legend {
  margin-top: 24px;
  padding: 12px 0;
  border-top: 1px solid rgba(141,97,48,0.35);
  font-size: 12px;
  color: var(--cv-ink-soft);
  display: flex; gap: 16px; flex-wrap: wrap;
}
