/* =============================================================
   Kitchen Master Food — styles
   Colours come from the logo: black + yellow ring.
   ============================================================= */
:root {
  --bg: #0b0b0b;
  --card: rgba(24, 22, 18, .55);      /* see-through glass cards */
  --card-2: rgba(255, 255, 255, .05);
  --glass-blur: blur(14px) saturate(140%);
  --line: rgba(255, 255, 255, 0.08);
  --gold: #ffd21f;          /* logo yellow */
  --gold-soft: rgba(255, 210, 31, 0.14);
  --text: #f6f3ea;
  --muted: #a7a29a;
  --green: #3ddc84;
  --red: #ff6b5a;
  --radius: 18px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sinhala: "Noto Sans Sinhala", "Iskoola Pota", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.45;
  max-width: 560px;            /* phone-width column, centred on big screens */
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }

/* small Sinhala line under English text */
.si { font-family: var(--sinhala); color: var(--muted); font-size: .8em; font-weight: 400; }

/* ---------------- HERO / TOP CARD ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 34px 18px 22px;
  background: radial-gradient(120% 70% at 50% 0%, rgba(60,50,10,.45) 0%, rgba(11,11,11,0) 70%);
  border-bottom: 1px solid var(--line);
}
.hero-glow {
  position: absolute; inset: -40% 20% auto; height: 260px;
  background: radial-gradient(closest-side, rgba(255,210,31,.18), transparent);
  pointer-events: none;
}
.hero-logo {
  position: relative;
  width: 88px; height: 88px; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 7px rgba(255,210,31,.12), 0 14px 40px rgba(0,0,0,.6);
}
.eyebrow {
  margin-top: 16px;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
.hero-title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(30px, 8.5vw, 40px); line-height: 1.1; margin-top: 6px;
}
.hero-title span { color: var(--gold); }
.hero-tag { color: var(--muted); margin-top: 6px; font-size: 14px; letter-spacing: .04em; }

.quick {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 22px;
}
.quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 13px 6px 11px;
  background: linear-gradient(180deg, #1b1b1b, #121212);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform .15s, border-color .15s;
}
.quick-btn:active { transform: scale(.96); border-color: var(--gold); }
.quick-btn svg { color: var(--gold); width: 24px; height: 24px; margin-bottom: 3px; }
.quick-btn span { font-size: 13px; font-weight: 600; }
.quick-btn small { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---------------- STATUS ---------------- */
.status { padding: 18px 16px 4px; display: grid; gap: 10px; }
.pill {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
}
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pill.open .dot { background: var(--green); box-shadow: 0 0 0 5px rgba(61,220,132,.15); }
.pill.closed { border-color: rgba(255,107,90,.35); background: linear-gradient(180deg, #221412, #161010); }
.pill.closed .dot { background: var(--red); box-shadow: 0 0 0 5px rgba(255,107,90,.15); }
.pill strong { display: block; font-size: 15px; }
.pill .sub { font-size: 13px; color: var(--muted); }
/* ---------------- PHOTO SLIDER ---------------- */
.slider { padding: 12px 16px 4px; }
.slides {
  position: relative; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden;
  background: #151515; border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.slide {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0;
  opacity: 0; transition: opacity .9s ease; text-align: left;
}
.slide.on { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.06); transition: transform 5s ease-out; }
.slide.on img { transform: scale(1); }
.slide-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 18px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.82));
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.slide-cap b { font-family: var(--serif); font-size: 22px; font-weight: 700; color: #fff; }
.slide-cap small { font-size: 13px; color: var(--gold); font-weight: 600; white-space: nowrap; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots i { width: 6px; height: 6px; border-radius: 9px; background: #3a3a3a; cursor: pointer; transition: width .3s, background .3s; }
.dots i.on { width: 20px; background: var(--gold); }

/* ---------------- TABS ---------------- */
.tabs {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: 8px; padding: 12px 16px;
  overflow-x: auto; scrollbar-width: none;
  background: rgba(11,11,11,.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tab {
  flex: 1 0 auto; white-space: nowrap; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  text-align: center; font-weight: 600; font-size: 14px; line-height: 1.2;
  transition: background .2s, color .2s;
}
.tab.active { background: var(--gold); color: #111; border-color: var(--gold); }

/* ---------------- MENU ---------------- */
.cat { padding: 24px 16px 4px; scroll-margin-top: 70px; }
.cat-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.cat-head h2 { font-family: var(--serif); font-size: 26px; }
.cat-head .rule { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255,210,31,.5), transparent); }

.dish {
  display: grid; grid-template-columns: 108px 1fr; gap: 14px;
  width: 100%; text-align: left;
  padding: 10px; margin-bottom: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .15s, border-color .15s;
}
.dish:active { transform: scale(.985); border-color: rgba(255,210,31,.5); }
.dish-img { width: 108px; height: 108px; border-radius: 13px; overflow: hidden; }
.dish-img .photo { transform: scale(1.35); }   /* zoom in so the food fills the small square */
.dish-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding-right: 4px; }
.dish-info h3 { font-size: 16.5px; font-weight: 600; }
.dish-info .si { font-size: 13px; margin-top: 1px; }
.dish.off { opacity: .7; }
.dish.off .dish-img { filter: grayscale(1); }
/* Available / Not available label */
.avail { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 12px; font-weight: 600; font-family: var(--sans); }
.avail i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.avail.on { color: var(--green); }
.avail.on i { background: var(--green); box-shadow: 0 0 0 3px rgba(61,220,132,.18); }
.avail.off { color: var(--red); }
.avail.off i { background: var(--red); box-shadow: 0 0 0 3px rgba(255,107,90,.18); }
.sheet-si .avail { margin-top: 0; font-size: 13px; vertical-align: middle; }

/* while the Google Sheet is loading */
.loading #status::before {
  content: "Loading menu…"; display: block; text-align: center; color: var(--muted);
  padding: 30px 0; font-size: 14px; letter-spacing: .04em;
}

/* photo, or an elegant placeholder when the photo file is missing */
.photo { width: 100%; height: 100%; object-fit: cover; display: block; background: #222; }
.ph {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,210,31,.16), transparent 60%),
    linear-gradient(145deg, #23211a, #121212);
  color: rgba(255,210,31,.75);
}
.ph svg { width: 42%; height: 42%; stroke-width: 1.2; }

/* prices */
.prices { display: flex; gap: 8px; margin-top: 9px; }
.price {
  flex: 1; min-width: 0; padding: 6px 8px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--line);
}
.price small { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price b { font-size: 15px; color: var(--gold); font-weight: 700; }
.price.none b { color: var(--muted); font-weight: 500; }

/* ---------------- DISH SHEET ---------------- */
.sheet-backdrop, .modal-backdrop {
  position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.65);
  animation: fade .2s ease;
}
.sheet {
  position: fixed; z-index: 50; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 560px; max-height: 94vh; overflow-y: auto;
  background: #121212; border-top: 1px solid var(--line);
  border-radius: 26px 26px 0 0;
  padding: 10px 16px calc(22px + env(safe-area-inset-bottom));
  animation: up .28s cubic-bezier(.2,.8,.2,1);
}
.sheet-handle { width: 44px; height: 5px; border-radius: 9px; background: #333; margin: 2px auto 12px; }
.sheet-close {
  position: absolute; right: 26px; top: 34px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6px); font-size: 15px;
}
.sheet-img { aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; }
.sheet-body { padding: 18px 4px 0; }
.sheet-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-body h2 { font-family: var(--serif); font-size: 28px; line-height: 1.15; }
.share-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  margin-top: 4px; padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card-2);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.share-btn svg { width: 16px; height: 16px; color: var(--gold); }
.share-btn:active { border-color: var(--gold); }
.sheet-si { font-size: 16px; margin-top: 3px; }
.prices.big { margin-top: 18px; gap: 10px; }
.prices.big .price { padding: 12px 14px; border-radius: 14px; }
.prices.big .price small { font-size: 12px; }
.prices.big .price b { font-size: 22px; }

.order-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 20px; padding: 17px;
  border-radius: 16px; background: var(--gold); color: #111;
  font-weight: 700; font-size: 17px;
  box-shadow: 0 10px 30px rgba(255,210,31,.25);
  transition: transform .15s;
}
.order-btn:active { transform: scale(.97); }
.order-btn svg { width: 22px; height: 22px; stroke-width: 2.2; }
.order-btn.disabled { background: #2a2a2a; color: var(--muted); box-shadow: none; pointer-events: none; }
.order-note { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 10px; }

/* ---------------- GROUP POPUP + BAR ---------------- */
.modal-backdrop { display: grid; place-items: center; padding: 24px; z-index: 60; }
.modal {
  width: 100%; max-width: 360px; text-align: center;
  background: #151515; border: 1px solid rgba(255,210,31,.3); border-radius: 24px;
  padding: 26px 22px 16px; animation: up .25s ease;
}
.modal-icon { font-size: 34px; }
.modal h3 { font-family: var(--serif); font-size: 22px; margin: 6px 0 8px; }
.modal p { color: var(--muted); font-size: 14px; }
.order-btn.wa { background: #25d366; color: #062b14; box-shadow: 0 10px 30px rgba(37,211,102,.25); font-size: 16px; }
.link-btn { margin-top: 10px; padding: 8px; color: var(--muted); font-size: 14px; }

.group-bar {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: calc(100% - 24px); max-width: 536px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 16px; border-radius: 16px;
  background: rgba(24,24,24,.96); border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
  font-size: 13.5px; animation: up .3s ease;
}
.group-bar span { flex: 1; }
.group-bar a { background: #25d366; color: #062b14; font-weight: 700; padding: 8px 14px; border-radius: 10px; }
.group-bar button { color: var(--muted); padding: 6px; }

/* ---------------- FOOTER ---------------- */
.footer { text-align: center; padding: 30px 20px 90px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); margin-top: 18px; }
.footer img { border-radius: 50%; opacity: .9; margin-bottom: 8px; }
.footer .privacy { margin-top: 14px; font-size: 11.5px; opacity: .8; }

[hidden] { display: none !important; }
@keyframes up { from { transform: translate(-50%, 30px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.modal { animation-name: pop; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }


/* ================= BACKGROUND + GLASS ================= */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px) 0 0 / 22px 22px,
    radial-gradient(90% 60% at 50% 110%, rgba(255,210,31,.06), transparent 70%),
    var(--bg);
}
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; will-change: transform; }
.o1 { width: 340px; height: 340px; left: -120px; top: 8%;  background: radial-gradient(circle, rgba(255,190,20,.35), transparent 70%); animation: drift1 22s ease-in-out infinite alternate; }
.o2 { width: 300px; height: 300px; right: -110px; top: 45%; background: radial-gradient(circle, rgba(255,140,0,.25), transparent 70%); animation: drift2 26s ease-in-out infinite alternate; }
.o3 { width: 260px; height: 260px; left: 20%; bottom: -120px; background: radial-gradient(circle, rgba(255,210,31,.22), transparent 70%); animation: drift1 30s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(90px, 120px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-80px, -140px) scale(1.1); } }

.dish, .pill, .quick-btn, .tab, .price, .sheet, .modal, .group-bar {
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.dish { border-color: rgba(255,255,255,.09); box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05); }
.quick-btn { background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); }
.sheet { background: rgba(18,17,14,.88); }
.tabs { background: rgba(11,11,11,.7); }

/* cards glide up as they come into view */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.dish.reveal.in:active { transform: scale(.985); }

/* ================= CREDIT ================= */
.credit { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.credit span { font-size: 13px; color: var(--muted); }
.credit-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px;
  background: linear-gradient(135deg, #ffd21f, #ffb300); color: #111;
  font-size: 15px; box-shadow: 0 10px 28px rgba(255,190,20,.3);
  transition: transform .15s, box-shadow .15s;
}
.credit-btn b { font-weight: 700; }
.credit-btn svg { width: 16px; height: 16px; stroke-width: 2.4; }
.credit-btn:not([href]) svg { display: none; }
.credit-btn[href]:active { transform: scale(.96); }
@media (hover: hover) { .credit-btn[href]:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(255,190,20,.4); } }
.footer { padding-bottom: 60px; }

/* weekly hours in the footer */
.week { margin: 14px auto 0; border-collapse: collapse; font-size: 13px; min-width: 240px; }
.week td { padding: 5px 10px; text-align: left; color: var(--muted); border-bottom: 1px solid var(--line); }
.week td:last-child { text-align: right; }
.week tr.today td { color: var(--gold); font-weight: 600; }
