/* ============================================================================
   thali.css — ThaliFacts-only layer on top of styles.css + data.css
   1) the per-site accent (data.css ships accents for the older ring members)
   2) the 3D thali hero — pure SVG/CSS, no images, no JS
   3) macro bars, serving cards and the meal-builder table
   ========================================================================== */

/* ---------------------------------------------------------------- accent */
body[data-site="thali"] { --accent: #db2777; --accent-2: #be185d; --accent-3: #f472b6; --accent-soft: #fdeef6; }
:root[data-theme="dark"] body[data-site="thali"] { --accent: #f472b6; --accent-2: #f9a8d4; --accent-3: #ec4899; --accent-soft: rgba(244, 114, 182, .14); }

body[data-site="thali"] {
  --spice-1: #e8a33d;   /* dal / besan  */
  --spice-2: #c2410c;   /* sabzi        */
  --spice-3: #7c9a3f;   /* saag         */
  --spice-4: #f1f5f9;   /* rice / curd  */
  --spice-5: #b91c1c;   /* achaar       */
  --plate:   #dbe3ee;
  --plate-2: #b9c4d6;
  --plate-3: #f4f7fc;
}
:root[data-theme="dark"] body[data-site="thali"] {
  --plate:   #253046;
  --plate-2: #171f31;
  --plate-3: #33405c;
}

/* ------------------------------------------------------------ 3D thali hero
   A layered SVG plate with six katoris. Depth comes from stacked ellipses and
   a soft contact shadow; life comes from a very slow float on three separate
   groups so the scene never reads as a flat sticker. Motion is opt-out.     */
.thali-scene {
  position: relative;
  width: min(430px, 78vw);
  margin: 26px auto 4px;
  filter: drop-shadow(0 32px 44px rgba(11, 16, 32, .22));
}
:root[data-theme="dark"] .thali-scene { filter: drop-shadow(0 32px 48px rgba(0, 0, 0, .7)); }
.thali-scene svg { width: 100%; height: auto; overflow: visible; }

.th-float-a { animation: thFloat 9s ease-in-out infinite; transform-origin: center; }
.th-float-b { animation: thFloat 11s ease-in-out infinite .8s; transform-origin: center; }
.th-float-c { animation: thFloat 13s ease-in-out infinite 1.6s; transform-origin: center; }
.th-steam   { animation: thSteam 4.2s ease-in-out infinite; transform-origin: center; }
.th-steam-2 { animation: thSteam 5.1s ease-in-out infinite 1.3s; transform-origin: center; }

@keyframes thFloat {
  0%, 100% { transform: translateY(0) }
  50%      { transform: translateY(-7px) }
}
@keyframes thSteam {
  0%       { opacity: 0; transform: translateY(4px) scaleX(.9) }
  35%      { opacity: .55 }
  100%     { opacity: 0; transform: translateY(-16px) scaleX(1.18) }
}
@media (prefers-reduced-motion: reduce) {
  .th-float-a, .th-float-b, .th-float-c, .th-steam, .th-steam-2 { animation: none; }
  .th-steam, .th-steam-2 { opacity: .3; }
}

.thali-cap {
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
  margin-top: 10px;
}

/* ------------------------------------------------------------- macro bar */
.macro {
  margin: 20px 0 0;
}
.macro-bar {
  display: flex;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.macro-bar span { display: block; height: 100%; }
.macro-bar .m-p { background: #2563eb; }
.macro-bar .m-c { background: var(--accent); }
.macro-bar .m-f { background: #e8a33d; }
.macro-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 12px;
  font-size: .84rem;
  color: var(--ink-2);
}
.macro-key i {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 3px;
  margin-right: 7px;
  vertical-align: baseline;
}
.macro-key b { font-variant-numeric: tabular-nums; }
.macro-key .k-p i { background: #2563eb; }
.macro-key .k-c i { background: var(--accent); }
.macro-key .k-f i { background: #e8a33d; }

/* ------------------------------------------------------- serving assumption */
.assume {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: .88rem;
  color: var(--ink-2);
  margin: 18px 0 0;
}
.assume svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--accent); margin-top: 2px; }
.assume b { color: var(--ink); }

/* ------------------------------------------------------------- burn-it-off */
.burn-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.burn-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  box-shadow: var(--shadow-xs);
}
.burn-card .b-v { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
.burn-card .b-k { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* ------------------------------------------------------------ veg/nonveg dot */
.vdot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 3px; border: 1.6px solid #16a34a;
  vertical-align: -2px; margin-right: 7px;
}
.vdot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #16a34a; }
.vdot.nv { border-color: #b91c1c; }
.vdot.nv::after { background: #b91c1c; }

/* --------------------------------------------------------- the meal builder */
.builder { margin-top: 8px; }
.builder table { width: 100%; border-collapse: collapse; }
.builder th, .builder td { padding: 9px 8px; border-bottom: 1px solid var(--line); font-size: .9rem; text-align: right; }
.builder th:first-child, .builder td:first-child { text-align: left; }
.builder thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.builder input[type="number"] {
  width: 68px; padding: 6px 8px; text-align: right;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: .88rem;
}
.builder tfoot td, .builder tfoot th { font-weight: 800; border-bottom: 0; border-top: 2px solid var(--line-2); font-size: 1rem; }
.b-pick {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.b-pick button {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  border-radius: 999px; padding: 6px 13px; font-size: .82rem; font-weight: 600;
}
.b-pick button:hover { border-color: var(--accent); color: var(--accent); }
.b-total {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px; margin-top: 18px;
}
.b-total div {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px; text-align: center;
}
.b-total b { display: block; font-size: 1.4rem; font-weight: 800; color: var(--accent); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.b-total span { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* --------------------------------------------------------------- misc bits */
.qty-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.qty-strip a {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 6px 14px; font-size: .84rem;
  font-weight: 600; color: var(--ink-2); text-decoration: none;
}
.qty-strip a:hover { border-color: var(--accent); color: var(--accent); }
.hindi { font-weight: 500; color: var(--muted); }
table.data td.pos { color: var(--ok); font-weight: 700; }
