/* Kitchen 42 customer prototype: shared look.
   Brand cues from the printed brochure: charcoal logo plate, saffron paper,
   the cutlery-bar colours, and the card's tile colours (darkened where needed
   so white text passes 4.5:1). */

:root {
  --ink: #23211a;            /* logo plate */
  --ink-2: #3a372c;
  --paper: #fff8ea;          /* page */
  --paper-2: #fdefd2;
  --saffron: #f6b21b;        /* brochure paper */
  --yellow: #ffc629;         /* the "42" */
  --red: #c4261d;            /* primary action */
  --red-dark: #9e1d16;
  --green: #1d7a37;
  --text: #24211b;
  --muted: #615b4d;
  --line: #eadfc6;
  --card: #ffffff;
  --used-bg: #efe9dc;
  --used-text: #5f5949;
  --stamp: #b3261e;
  --focus: #1f6fd1;

  /* tile colours, from the printed card */
  --t-biryani: #c9352a;
  --t-korma: #1f68c7;
  --t-kofta: #b9560f;
  --t-kabab: #bd1f6b;
  --t-veg: #1b7a37;
  --t-friedrice: #23709f;
  --t-pulao: #24285e;
  --t-lobia: #2f6f2a;
  --t-daalmash: #3d6b23;
  --t-daalchana: #b23a20;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow: 0 1px 2px rgba(35, 33, 26, .06), 0 6px 18px rgba(35, 33, 26, .08);
  --fast: 150ms;
  --med: 240ms;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Karla", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: #2b2920;
}
button, input { font: inherit; color: inherit; }
fieldset { min-width: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* phone column: full width on a phone, a centred phone-sized column on a laptop */
.app {
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  position: relative;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
@media (min-width: 520px) {
  body { padding: 24px 0; }
  .app { min-height: calc(100vh - 48px); border-radius: 28px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
}

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

/* top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; padding-top: calc(14px + env(safe-area-inset-top));
  background: var(--ink); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-bars { display: flex; gap: 3px; }
.brand-bars i { display: block; width: 7px; height: 22px; border-radius: 2px; }
.brand-bars i:nth-child(1) { background: #2e9e4f; }
.brand-bars i:nth-child(2) { background: #d8342a; }
.brand-bars i:nth-child(3) { background: #f08a1d; }
.brand-word { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: .02em; line-height: 1; }
.brand-word b { color: var(--yellow); }
.chip-proto {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.35); color: #f3e7c8; padding: 3px 8px; border-radius: 999px;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: transparent; border: 0; cursor: pointer; color: inherit;
}
.icon-btn:active { background: rgba(255,255,255,.12); }

.page-head { padding: 18px 18px 6px; }
.page-head h1 { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1.05; margin: 0; letter-spacing: .01em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

.section { padding: 10px 18px 6px; }
.section-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 18px 0 10px;
}
.section-title h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 0; letter-spacing: .01em; }
.section-title span { color: var(--muted); font-size: 14px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 12px; border: 0; cursor: pointer;
  font-weight: 700; text-decoration: none; transition: background var(--fast), transform var(--fast), opacity var(--fast);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:disabled { background: #cfc6b3; color: #5d574a; cursor: not-allowed; transform: none; }
.btn-light { background: #fff; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-block { width: 100%; }

.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-md); background: var(--paper-2); color: #4a4436; font-size: 14px;
}
.note .icon { margin-top: 2px; color: #8a6a12; }

/* bottom navigation */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 440px; z-index: 20;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: #fff; border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
@media (min-width: 520px) { .tabbar { border-radius: 20px 20px 0 0; box-shadow: 0 -6px 20px rgba(0,0,0,.18); } }
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; border-radius: 12px; text-decoration: none; color: var(--muted);
  font-size: 13px; font-weight: 700;
}
.tab .icon { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--red); }
.tab[aria-current="page"] .icon { stroke-width: 2.4; }
.tab:active { background: var(--paper); }

/* dialogs as bottom sheets */
dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 440px;
  border-radius: 24px 24px 0 0; background: #fff; color: var(--text);
}
dialog.sheet::backdrop { background: rgba(20, 18, 12, .55); }
dialog.sheet[open] { animation: sheet-up var(--med) cubic-bezier(.2,.8,.2,1); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-body { padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: #d9d0bc; margin: 10px auto 6px; }
.sheet h2 { font-family: var(--font-display); font-size: 26px; margin: 6px 0 4px; }

/* prototype notes */
.proto-notes { margin: 26px 18px 8px; font-size: 14px; color: var(--muted); }
.proto-notes summary { cursor: pointer; font-weight: 700; color: var(--ink-2); min-height: 44px; display: flex; align-items: center; }
.proto-notes ul { margin: 4px 0 0; padding-left: 18px; }
.proto-notes li { margin: 4px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ---------- meal tiles (the printed card, made digital) ---------- */
.t-biryani { --c: var(--t-biryani); }
.t-korma { --c: var(--t-korma); }
.t-kofta { --c: var(--t-kofta); }
.t-kabab { --c: var(--t-kabab); }
.t-veg { --c: var(--t-veg); }
.t-friedrice { --c: var(--t-friedrice); }
.t-pulao { --c: var(--t-pulao); }
.t-lobia { --c: var(--t-lobia); }
.t-daalmash { --c: var(--t-daalmash); }
.t-daalchana { --c: var(--t-daalchana); }

.swatch {
  width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--c);
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: .02em;
}
