/* Knaaniya – minimal desert delicatessen */
:root {
  --bone: #f3eee5;        /* page */
  --paper: #faf7f1;       /* drawer, inputs */
  --sand: #e6dccb;        /* quiet fills */
  --dune: #cdbb9f;        /* hairlines on sand */
  --ink: #2a231e;         /* umber text */
  --muted: #6b5f55;       /* darkened from #7b6f64 for 4.5:1 text contrast (IS 5568 / WCAG AA) */
  --line: #dcd2c2;
  --clay: #8f4f30;        /* terracotta accent, darkened from #a45d3c for text contrast */
  --clay-dark: #85482c;
  --sage: #7c7d61;
  --ochre: #b8915a;
  --serif: 'Frank Ruhl Libre', 'David', serif;
  --sans: 'Assistant', 'Segoe UI', Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 80px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 140px; }
body { margin: 0; font-family: var(--sans); font-weight: 400; font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--bone); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
.eyebrow { margin: 0 0 14px; font-size: 13px; letter-spacing: .12em; color: var(--clay); font-weight: 600; }

/* photos share one warm, slightly muted grade so phone shots sit together */
.hero-img img, .extra-img img { filter: saturate(.82) sepia(.08) contrast(1.02); }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  /* logo centered, menu on the start side, cart on the end side */
  display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: "nav brand cart"; align-items: center; gap: 24px;
  padding: 10px var(--gutter);
  background: rgba(243, 238, 229, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { grid-area: brand; display: block; line-height: 0; }
.brand img { width: 108px; height: 108px; }
@media (max-width: 640px) { .brand img { width: 80px; height: 80px; } }
.topbar > :last-child { grid-area: cart; justify-self: end; }
.topnav { grid-area: nav; display: flex; gap: 28px; justify-self: start; }
.topnav a { text-decoration: none; font-size: 15px; color: var(--muted); }
.topnav a:hover { color: var(--ink); }
.cart-btn {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  border: 0; border-bottom: 1px solid var(--ink); background: none; padding: 2px 0; font-size: 15px;
}
.cart-count { font-weight: 600; font-variant-numeric: tabular-nums; }
.cart-btn.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: translateY(-2px); color: var(--clay); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 2px; padding: 10px 22px; font-weight: 600; font-size: 15px; letter-spacing: .02em;
  text-decoration: none; border: 1px solid var(--ink); cursor: pointer; transition: background .15s, color .15s;
}
.btn-primary { background: var(--ink); color: var(--bone); }
.btn-primary:hover { background: var(--clay-dark); border-color: var(--clay-dark); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-line { background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--bone); }
.text-link { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; font-weight: 600; }
.text-link:hover { color: var(--clay); }
.icon-btn { border: 0; background: transparent; font-size: 18px; cursor: pointer; padding: 6px 10px; }
.icon-btn:hover { color: var(--clay); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 6vw, 96px); align-items: center;
  padding: clamp(32px, 5vw, 64px) var(--gutter) clamp(32px, 5vw, 56px);
}
.hero h1 { font-size: clamp(48px, 7.4vw, 104px); }
.lead { font-size: clamp(18px, 1.5vw, 20px); font-weight: 300; color: #4b3f37; max-width: 30em; margin: 26px 0 30px; }
.hero-deadline { margin: 26px 0 0; font-size: 16px; font-weight: 600; }
.hero-hours { margin: 6px 0 0; color: var(--muted); font-size: 14px; letter-spacing: .02em; }
.hero-img { margin: 0; }
.hero-img img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }

.horizon { display: block; width: 100%; height: 40px; color: var(--dune); }

/* ---------- steps ---------- */
.steps {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr);
  margin: 0; padding: 28px var(--gutter) 40px; gap: 0;
}
.steps li { padding: 0 24px; border-inline-start: 1px solid var(--line); }
.steps li:first-child { padding-inline-start: 0; border: 0; }
.steps span { display: block; font-family: var(--serif); color: var(--clay); font-size: 15px; margin-bottom: 6px; }
.steps b { font-weight: 600; }
.steps p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- price list ---------- */
.menu { padding: clamp(40px, 6vw, 80px) var(--gutter); border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(40px, 5vw, 64px); }
.section-head p { margin: 0; color: var(--muted); font-size: 15px; }
.loading { color: var(--muted); }

.order-sum, .menu-send { max-width: 560px; margin-inline: auto; }
.order-sum { margin-top: 40px; }
.order-sum h3 { font-size: 28px; margin-bottom: 12px; }
.order-sum ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.order-sum li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-sum li b { font-weight: 600; }
.order-sum .w, .order-sum .est { color: var(--muted); font-size: 15px; }
.order-sum .est { white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-sum-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0 6px; font-family: var(--serif); font-size: 22px; }
.order-sum-total .est { font-size: 22px; color: var(--ink); }
.order-sum-note, .order-sum-empty { margin: 0; font-size: 15px; color: var(--muted); }
.menu-send { margin-top: 20px; }
.menu-send .btn { width: 100%; min-height: 50px; }

/* category tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 32px; }
.tile {
  display: grid; grid-template-rows: auto 1fr; text-align: start; cursor: pointer; padding: 0;
  background: transparent; border: 0; border-bottom: 1px solid var(--ink); position: relative;
}
.tile img, .tile-ph { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: saturate(.82) sepia(.08) contrast(1.02); transition: filter .2s; }
.tile[data-cat="coffee"] img { object-position: 50% 85%; }   /* keep the cup (bottom of the photo) in frame */
.tile-ph { display: block; background: linear-gradient(to bottom, var(--sand) 0 62%, var(--dune) 62% 64%, var(--sand) 64%); }
.tile-text { display: grid; gap: 2px; padding: 14px 0 14px 32px; }
.tile-text b { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15; }
.tile-text small { color: var(--muted); font-size: 14px; }
.tile-go { position: absolute; left: 0; bottom: 16px; font-size: 18px; transition: transform .15s; }
.tile:hover img { filter: saturate(.95) sepia(.04); }
.tile:hover .tile-go { transform: translateX(-4px); color: var(--clay); }

/* product sheet: centered dialog on desktop, bottom sheet on phones */
.sheet {
  width: min(480px, calc(100vw - 32px)); max-height: min(84vh, 720px); padding: 0;
  border: 1px solid var(--line); border-radius: 2px; background: var(--paper); color: var(--ink);
  overflow: hidden; flex-direction: column;
}
.sheet[open] { display: flex; animation: sheet-in .2s ease; }
.sheet::backdrop { background: rgba(42, 35, 30, .38); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px); } }
.sheet-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h3 { font-size: 24px; text-align: center; grid-column: 2; }
#sheetBack { grid-column: 1; grid-row: 1; }
#sheetClose { grid-column: 3; grid-row: 1; }
.sheet-body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; overscroll-behavior: contain; }
.sheet-foot { padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
[hidden] { display: none !important; }
.sheet-lead { color: var(--muted); font-size: 15px; margin: 12px 0; }
.sheet-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 16px 0 4px; filter: saturate(.82) sepia(.08); }
.sheet-price { font-family: var(--serif); font-size: 28px; margin: 18px 0 4px; font-variant-numeric: tabular-nums; }

.picks { list-style: none; margin: 0; padding: 0; }
.pick {
  width: 100%; min-height: 56px; display: grid; grid-template-columns: 1fr auto 18px; align-items: center; gap: 12px;
  padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; text-align: start;
}
.pick:hover .pick-name { color: var(--clay); }
.pick-name { font-size: 17px; font-weight: 600; }
.pick-price { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pick-go { color: var(--muted); font-size: 20px; }

.field { display: grid; gap: 4px; font-size: 14px; color: var(--muted); margin: 16px 0; }
.field select { padding: 10px 12px; border: 1px solid var(--dune); border-radius: 2px; background: var(--bone); font-size: 16px; color: var(--ink); }
.field-label { font-size: 14px; color: var(--muted); margin: 20px 0 8px; }
.qchips { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 6px; margin-bottom: 14px; }
.qchips button {
  min-height: 44px; padding: 0 4px; white-space: nowrap; border: 1px solid var(--dune); border-radius: 2px; background: transparent;
  cursor: pointer; font-size: 15px; font-variant-numeric: tabular-nums;
}
.qchips button.on { background: var(--ink); border-color: var(--ink); color: var(--bone); }
.big-stepper { display: grid; grid-template-columns: 56px 1fr 56px; border: 1px solid var(--ink); border-radius: 2px; margin-bottom: 12px; }
.big-stepper button { height: 56px; border: 0; background: none; font-size: 22px; cursor: pointer; }
.big-stepper button:hover { background: var(--sand); }
.big-stepper output { display: grid; place-items: center; font-size: 20px; font-variant-numeric: tabular-nums; border-inline: 1px solid var(--line); }

@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--ink); }
  .tile { grid-template-columns: 84px 1fr; grid-template-rows: none; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .tile img, .tile-ph { aspect-ratio: 1; }
  .tile-text { padding: 0 0 0 28px; }
  .tile-text b { font-size: 22px; }
  .tile-go { bottom: auto; top: 50%; transform: translateY(-50%); }
  .tile:hover .tile-go { transform: translate(-4px, -50%); }
  .sheet {
    width: 100vw; max-width: 100vw; max-height: 88vh; margin: auto 0 0; border: 0; border-radius: 14px 14px 0 0;
  }
  .sheet[open] { animation: sheet-up .25s ease; }
  @keyframes sheet-up { from { transform: translateY(100%); } }
  .sheet-head::before { content: ''; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--dune); }
  .sheet-head { position: relative; padding-top: 18px; }
  .sheet-body { padding: 8px 16px 20px; }
  .sheet-foot { padding-inline: 16px; }
}

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); }
.stepper button { border: 0; background: transparent; width: 32px; height: 32px; font-size: 17px; cursor: pointer; }
.stepper button:hover { background: var(--sand); }
.stepper output { min-width: 76px; text-align: center; font-size: 15px; font-variant-numeric: tabular-nums; }

/* ---------- café food & drinks (view only, ordered on WhatsApp) ---------- */
.btn-wa { background: #1d6f4f; border-color: #1d6f4f; color: #fff; }
.btn-wa:hover { background: #155a3f; border-color: #155a3f; }
.food {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 6vw, 96px); align-items: start;
  margin: 0 var(--gutter) clamp(48px, 7vw, 96px); padding: clamp(28px, 4vw, 48px) 0 0; border-top: 1px solid var(--line);
}
.food h2 { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 14px; }
.food-text p:not(.eyebrow) { color: #4b3f37; font-weight: 300; max-width: 30em; margin: 0 0 12px; }
.food-text .food-soon { color: var(--clay-dark); font-weight: 400; }
.food-actions { display: grid; gap: 12px; }
.menu-link {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; text-decoration: none;
  padding: 14px 16px; border: 1px solid var(--ink); border-radius: 2px; background: var(--paper);
}
.menu-link b { font-weight: 600; }
.menu-link small { grid-row: 2; color: var(--muted); font-size: 14px; }
.menu-link span { grid-row: 1 / 3; grid-column: 2; font-size: 18px; }
.menu-link:hover { border-color: var(--clay); }
.hero-links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.app-box { margin-top: 18px; }
.app-box .btn { margin-top: 6px; }
.app-box .hint { margin-top: 8px; }
.wa-send { margin: 20px 0; padding: 16px; background: var(--paper); border: 1px solid var(--line); }
.wa-send p { margin: 0 0 12px; }
.wa-confirm { margin: 0; padding: 10px 12px; border-inline-start: 3px solid #1d6f4f; background: var(--paper); font-size: 15px; }

/* ---------- institutions / platters ---------- */
.extra { padding: 0 var(--gutter) clamp(48px, 7vw, 96px); }
.extra-img { margin: 0 0 clamp(32px, 5vw, 56px); }
.extra-img img { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; }
.extra-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); }
.extra h2 { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 14px; }
.extra-cols > div > p:not(.eyebrow) { color: #4b3f37; font-weight: 300; max-width: 30em; margin: 0 0 22px; }
.apply summary { list-style: none; width: fit-content; }
.apply summary::-webkit-details-marker { display: none; }
.apply[open] summary { margin-bottom: 20px; background: var(--ink); color: var(--bone); }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--dune); border-radius: 2px; background: var(--paper); color: var(--ink); font-size: 16px;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--ink); }
.form textarea { resize: vertical; }
.form fieldset { border: 0; border-top: 1px solid var(--line); padding: 12px 0 0; margin: 0; display: grid; gap: 8px; }
.form legend { font-size: 14px; color: var(--muted); padding: 0 0 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
.checks { display: flex; gap: 20px; flex-wrap: wrap; }
.checks.col { flex-direction: column; gap: 6px; }
.checks label { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 15px; }
.checks input { accent-color: var(--clay); }
.hint { margin: 0; font-size: 14px; color: var(--muted); }
.legal-note { margin: 0; font-size: 13px; color: var(--muted); }
.legal-note a, .foot-legal a { text-decoration: underline; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0 var(--gutter) 28px; margin: 0; font-size: 14px; }
.legal { max-width: 720px; margin: 0 auto; padding: 40px 16px 72px; }
.legal h1 { font-size: 40px; margin-bottom: 20px; }
.legal h2 { font-size: 24px; margin: 34px 0 10px; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-inline-start: 20px; }
.legal li { margin-bottom: 6px; }
.legal a { text-decoration: underline; }
.draft-note { padding: 10px 14px; border: 1px solid var(--clay); color: var(--clay-dark); font-weight: 600; }
.needs-review, .needs-review-inline { background: #f4e3b5; }
.needs-review { padding: 6px 10px; }
.muted-date { margin-top: 32px !important; font-size: 14px; color: var(--muted); }
.form label.consent { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.consent input { width: auto; margin-top: 4px; flex: none; accent-color: var(--clay); }
.form-msg { margin: 0; font-weight: 600; min-height: 1em; font-size: 15px; }
.form-msg.err { color: #9c2f24; }
.form-msg.ok { color: var(--sage); }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); border-radius: 2px; }
.seg label { display: block; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 8px; color: var(--ink); font-size: 15px; }
.seg input:checked + span { background: var(--ink); color: var(--bone); }
.seg input:focus-visible + span { outline: 2px solid var(--clay); outline-offset: -4px; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(42, 35, 30, .35); z-index: 40; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: min(440px, 100vw);
  background: var(--paper); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column;
  transform: translateX(-105%); transition: transform .25s ease;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 28px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; }
.drawer-actions { display: flex; gap: 10px; justify-content: space-between; position: sticky; bottom: -24px; background: var(--paper); padding: 12px 0; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line b { font-weight: 600; }
.line .meta { color: var(--muted); font-size: 14px; }
.line-ctrl { display: flex; gap: 12px; align-items: center; }
.line-total { text-align: left; font-variant-numeric: tabular-nums; }
.remove { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 14px; padding: 0; }
.totals { margin: 18px 0; display: grid; gap: 6px; }
.totals .big { display: flex; justify-content: space-between; font-family: var(--serif); font-size: 22px; }
.empty { text-align: center; color: var(--muted); padding: 56px 0; }
.empty p { margin: 0 0 18px; }
.summary { border-top: 1px solid var(--ink); padding-top: 12px; font-size: 15px; }
.btn.wide { width: 100%; min-height: 50px; }

/* ---------- footer ---------- */
.footer { background: var(--sand); color: var(--ink); }
.footer .horizon { color: var(--bone); background: var(--bone); height: 32px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr 1fr 1.3fr; gap: 32px; padding: 36px var(--gutter) 48px; font-size: 15px; }
.footer b { display: block; font-weight: 600; margin-bottom: 6px; }
.foot-brand { font-family: var(--serif); font-weight: 400 !important; font-size: 26px; }
.footer p { margin: 4px 0; color: #4b3f37; }
.footer a { text-decoration: none; border-bottom: 1px solid var(--dune); }
.footer a:hover { border-color: var(--ink); }
.hours { list-style: none; padding: 0; margin: 0; color: #4b3f37; }
.hours li { display: flex; justify-content: space-between; max-width: 220px; font-variant-numeric: tabular-nums; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 30px); opacity: 0; z-index: 60;
  background: var(--ink); color: var(--bone); padding: 10px 22px; border-radius: 2px; font-size: 15px;
  transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- order page ---------- */
.order-page { max-width: 680px; margin: 48px auto; padding: 0 16px; }
.order-card { border-top: 1px solid var(--ink); padding-top: 24px; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 24px 0; }
.timeline div { text-align: center; font-size: 14px; color: var(--muted); padding-top: 10px; border-top: 2px solid var(--line); }
.timeline div.on { border-color: var(--clay); color: var(--ink); }
.cancelled-note { background: #f1ddd5; color: #7d2a20; padding: 10px 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 20px; margin: 16px 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero, .extra-cols, .food { grid-template-columns: 1fr; }
  .hero-img img { height: auto; aspect-ratio: 4 / 3; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topnav { display: none; }
  .cart-btn { margin-inline-start: auto; }
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .steps li { padding: 0; border: 0; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .extra-img img { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
