/* -------------------------------------------------
   The Indian Plate — custom styles
   Layered on top of Tailwind utility classes.
------------------------------------------------- */

:root {
  /* Theme colors are defined as space-separated RGB channels so both plain
     CSS (var(--color-red)) and Tailwind's alpha-modifier classes
     (bg-red/95, text-cream/85, etc.) stay in sync. The theme switcher in
     app.js only ever touches the *-rgb variables — everything else derives
     from them automatically. */
  --color-red-rgb: 74 30 30;
  --color-orange-rgb: 201 162 39;
  --color-cream-rgb: 247 241 227;
  --color-charcoal-rgb: 26 22 20;

  --color-red: rgb(var(--color-red-rgb));
  --color-orange: rgb(var(--color-orange-rgb));
  --color-cream: rgb(var(--color-cream-rgb));
  --color-charcoal: rgb(var(--color-charcoal-rgb));
  --color-white: #FFFFFF;

  /* "ink" is the readable-text tone: charcoal on a light page, cream on a
     dark page. Unlike --color-charcoal (a literal theme color used for
     deliberately-always-dark chrome like the footer), --text-primary-rgb
     flips automatically when .dark is toggled on <html>. */
  --text-primary-rgb: var(--color-charcoal-rgb);
}

html.dark {
  --text-primary-rgb: var(--color-cream-rgb);
}

/* Elevated surfaces for dark mode — cards/panels need to read as slightly
   lighter than the page background so they still look like distinct
   surfaces once the page itself turns dark. Two tiers: -panel for
   sections/simple cards, -soft for cards that sit inside a -panel section
   and need to pop a bit further. */
html.dark .surface-panel,
html.dark .type-chip,
html.dark .chip,
html.dark .menu-table-wrap {
  background-color: color-mix(in srgb, rgb(var(--color-charcoal-rgb)) 100%, white 10%);
}
html.dark .trust-card,
html.dark .tiffin-step,
html.dark .tiffin-day-card {
  background: color-mix(in srgb, rgb(var(--color-charcoal-rgb)) 100%, white 16%);
}
.surface-panel {
  background-color: #fff;
}

html {
  /* Belt-and-braces alongside the color-scheme meta tag: this site has one
     deliberate brand palette (light background), so we opt out of the
     browser auto-darkening native controls when the device is in dark mode. */
  color-scheme: light;
}

* {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: rgb(var(--text-primary-rgb));
  background-color: var(--color-cream);
}

h1, h2, h3, .font-display {
  font-family: 'Playfair Display', Georgia, serif;
}

/* -------------------- Reveal-on-scroll -------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="fade"] {
  transform: none;
}

/* -------------------- Header -------------------- */
#site-header {
  transition: box-shadow 0.3s ease, background-color 0.3s ease, padding 0.3s ease;
}
#site-header.scrolled {
  box-shadow: 0 4px 24px rgb(var(--color-charcoal-rgb) / 0.08);
}

#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
#mobile-menu.open {
  max-height: 28rem;
}

/* -------------------- Hero -------------------- */
.hero-bg {
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-overlay {
  background: linear-gradient(180deg, rgb(var(--color-charcoal-rgb) / 0.55) 0%, rgb(var(--color-charcoal-rgb) / 0.72) 55%, rgb(var(--color-charcoal-rgb) / 0.88) 100%);
}
.spice-pattern {
  background-image: radial-gradient(rgb(var(--color-orange-rgb) / 0.35) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}

.highlight-pill {
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.85rem 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background-color: #25D366;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}
.btn-primary:hover {
  background-color: #1fb857;
  transform: translateY(-2px);
}
.btn-outline {
  background-color: transparent;
  border: 1.5px solid currentColor;
}
.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}
.btn-solid-cream {
  background-color: var(--color-cream);
  color: var(--color-charcoal);
}
.btn-solid-cream:hover {
  background-color: #fff;
  transform: translateY(-2px);
}

/* -------------------- Section labels -------------------- */
.section-eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-orange);
}

/* -------------------- Filters -------------------- */
.type-chip {
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  font-weight: 600;
  border: 1.5px solid rgb(var(--text-primary-rgb) / 0.12);
  background: #fff;
  transition: all 0.2s ease;
}
.type-chip[aria-pressed="true"] {
  background: var(--color-red);
  border-color: var(--color-red);
  color: #fff;
  box-shadow: 0 6px 16px rgb(var(--color-red-rgb) / 0.3);
}

.chip {
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1.5px solid rgb(var(--text-primary-rgb) / 0.12);
  background: #fff;
  color: rgb(var(--text-primary-rgb));
  transition: all 0.2s ease;
  white-space: nowrap;
}
.chip[aria-pressed="true"] {
  background: var(--color-orange);
  border-color: var(--color-orange);
  color: #fff;
}

/* -------------------- Why Choose Us -------------------- */
.trust-card {
  background: var(--color-cream);
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.trust-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(26, 140, 63, 0.12);
  color: #1a8c3f;
  font-weight: 700;
  margin-bottom: 0.85rem;
}
.trust-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.trust-card p {
  font-size: 0.87rem;
  color: rgb(var(--text-primary-rgb) / 0.7);
  line-height: 1.55;
}
.hygiene-rating {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  background: rgb(var(--color-charcoal-rgb) / 0.04);
  border: 1px dashed rgb(var(--color-charcoal-rgb) / 0.2);
  border-radius: 0.75rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgb(var(--text-primary-rgb) / 0.65);
  text-align: center;
}
.hygiene-badge {
  display: block;
  font-weight: 700;
  color: rgb(var(--text-primary-rgb));
  margin-bottom: 0.3rem;
}

/* -------------------- Menu table -------------------- */
.menu-listing {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.menu-category-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-red);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgb(var(--color-red-rgb) / 0.15);
}
.menu-table-wrap {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 6px 20px rgb(var(--color-charcoal-rgb) / 0.06);
}
.menu-table {
  width: 100%;
  border-collapse: collapse;
}
.menu-table tbody tr {
  border-bottom: 1px solid rgb(var(--text-primary-rgb) / 0.08);
  transition: background-color 0.2s ease;
  animation: rowIn 0.35s ease both;
}
.menu-table tbody tr:last-child {
  border-bottom: none;
}
.menu-table tbody tr:hover {
  background-color: rgb(var(--color-orange-rgb) / 0.06);
}
@keyframes rowIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.menu-table td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  font-size: 0.95rem;
}
.menu-table .col-type {
  width: 2.5rem;
  padding-right: 0;
}
.menu-table .col-name {
  font-weight: 600;
  color: rgb(var(--text-primary-rgb));
}
.menu-table .col-price {
  text-align: right;
  font-weight: 700;
  color: var(--color-red);
  white-space: nowrap;
}
.popular-tag {
  display: inline-block;
  margin-left: 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-orange);
  white-space: nowrap;
}
.ask-price {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1fb857;
  white-space: nowrap;
}
.veg-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid;
  border-radius: 3px;
}
.veg-indicator.veg { border-color: #1a8c3f; }
.veg-indicator.non-veg { border-color: var(--color-red); }
.veg-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}
.veg-indicator.veg .veg-dot { background: #1a8c3f; }
.veg-indicator.non-veg .veg-dot { background: var(--color-red); }

@media (max-width: 480px) {
  .menu-table td {
    padding: 0.75rem 0.6rem;
    font-size: 0.88rem;
  }
  .menu-category-title {
    font-size: 1.2rem;
  }
}

.menu-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 3rem 1.5rem;
  text-align: center;
}
.menu-error p {
  font-size: 1rem;
  color: rgb(var(--text-primary-rgb) / 0.75);
  font-weight: 600;
}

.allergen-notice {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  background: rgb(var(--color-orange-rgb) / 0.08);
  border: 1px solid rgb(var(--color-orange-rgb) / 0.25);
  border-radius: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgb(var(--text-primary-rgb) / 0.8);
  text-align: center;
}
.allergen-notice strong {
  color: var(--color-red);
}

/* -------------------- Tiffin -------------------- */
.tiffin-step {
  text-align: center;
  padding: 1.75rem 1.25rem;
  background: var(--color-cream);
  border-radius: 1.25rem;
}
.tiffin-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-red);
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.85rem;
}
.tiffin-step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.tiffin-step p {
  font-size: 0.88rem;
  color: rgb(var(--text-primary-rgb) / 0.7);
  line-height: 1.55;
}

.tiffin-day-card {
  background: var(--color-cream);
  border-radius: 1.25rem;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 6px 20px rgb(var(--color-charcoal-rgb) / 0.06);
}
.tiffin-day-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-red);
  margin-bottom: 0.75rem;
}
.tiffin-day-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tiffin-day-card li {
  font-size: 0.9rem;
  color: rgb(var(--text-primary-rgb) / 0.8);
  padding-left: 1.1rem;
  position: relative;
}
.tiffin-day-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--color-orange);
}

/* -------------------- Gallery -------------------- */
.gallery-item {
  overflow: hidden;
  border-radius: 1rem;
  cursor: pointer;
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img {
  transform: scale(1.1);
}
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(var(--color-charcoal-rgb) / 0.35), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover::after {
  opacity: 1;
}

#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(17, 13, 12, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 100;
}
#lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
#lightbox img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* -------------------- Contact -------------------- */
.area-pill {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  margin: 0.2rem;
}

.hero-cta {
  font-size: 1.05rem;
  padding: 1rem 2.1rem;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.5);
  animation: pulse 2.4s infinite;
}

/* -------------------- Misc -------------------- */
.wa-fab {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 50;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.45); }
  70% { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

.hidden { display: none !important; }

::selection {
  background: var(--color-orange);
  color: #fff;
}
