/* Coolvetica — the brand font from the printed menu.
   Drop licensed webfont files into assets/fonts/ with these names. Until then the
   Apple system font is used. */
@font-face { font-family: "Coolvetica"; font-weight: 300; font-display: swap;
  src: local("Coolvetica Lt"), local("CoolveticaLt-Regular"), url("assets/fonts/coolvetica-light.woff2") format("woff2"); }
@font-face { font-family: "Coolvetica"; font-weight: 400; font-display: swap;
  src: local("Coolvetica Bk"), local("CoolveticaBk-Regular"), url("assets/fonts/coolvetica-book.woff2") format("woff2"); }
@font-face { font-family: "Coolvetica"; font-weight: 500; font-display: swap;
  src: local("Coolvetica Rg"), local("CoolveticaRg-Regular"), url("assets/fonts/coolvetica-regular.woff2") format("woff2"); }
@font-face { font-family: "Coolvetica"; font-weight: 600 700; font-display: swap;
  src: local("Coolvetica Rg Bold"), local("CoolveticaRg-Bold"), url("assets/fonts/coolvetica-bold.woff2") format("woff2"); }

:root {
  --green: #405b24;
  --green-deep: #2f441a;
  --yellow: #ffe467;

  --bg: #f4f3ee;
  --bg-elev: #ffffff;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-strong: rgba(118, 118, 128, 0.2);
  --label: #1c1c1e;
  --label-2: rgba(60, 60, 67, 0.62);
  --label-3: rgba(60, 60, 67, 0.36);
  --sep: rgba(60, 60, 67, 0.16);
  --accent: var(--green);
  --on-accent: #ffffff;
  --material: rgba(244, 243, 238, 0.78);
  --hero-bg: var(--green);
  --hero-fg: var(--yellow);
  --seg-thumb: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);

  --radius: 14px;
  --pad: 16px;
  --font: "Coolvetica", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

/* Dark palette: follows the system unless the visitor picked a theme (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0f09;
    --bg-elev: #171b13;
    --fill: rgba(118, 118, 128, 0.24);
    --fill-strong: rgba(118, 118, 128, 0.36);
    --label: #f5f5f0;
    --label-2: rgba(235, 235, 245, 0.6);
    --label-3: rgba(235, 235, 245, 0.3);
    --sep: rgba(235, 235, 245, 0.12);
    --accent: var(--yellow);
    --on-accent: #1c1c1e;
    --material: rgba(12, 15, 9, 0.74);
    --hero-bg: #1e2a13;
    --seg-thumb: #3a4430;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0f09;
  --bg-elev: #171b13;
  --fill: rgba(118, 118, 128, 0.24);
  --fill-strong: rgba(118, 118, 128, 0.36);
  --label: #f5f5f0;
  --label-2: rgba(235, 235, 245, 0.6);
  --label-3: rgba(235, 235, 245, 0.3);
  --sep: rgba(235, 235, 245, 0.12);
  --accent: var(--yellow);
  --on-accent: #1c1c1e;
  --material: rgba(12, 15, 9, 0.74);
  --hero-bg: #1e2a13;
  --seg-thumb: #3a4430;
  --shadow: none;
}
:root[data-theme="light"] { color-scheme: light; }

/* Theme picker (in the hero, top-left) */
.theme-btn svg { width: 22px; height: 22px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 24px);
  z-index: 60;
  transform: translate(-50%, 12px);
  padding: 10px 18px;
  border-radius: 20px;
  background: var(--material);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  font-size: 15px;
  font-weight: 600;
  color: var(--label);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }

/* ---------- Logo (tinted via mask) ---------- */
.logo {
  display: block;
  margin: 0;
  width: min(58vw, 250px);
  aspect-ratio: 900 / 195;
  background: currentColor;
  -webkit-mask: url("assets/logo-mask.png") center / contain no-repeat;
  mask: url("assets/logo-mask.png") center / contain no-repeat;
}
.logo.small { width: 96px; color: var(--label-3); margin: 20px auto 0; }

/* ---------- Hero ---------- */
.hero {
  background: var(--hero-bg);
  color: var(--hero-fg);
  padding: calc(env(safe-area-inset-top) + 8px) var(--pad) 40px;
}
/* Own row for the theme + info buttons, so they never sit on top of the logo */
.hero-top {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hero-inner {
  position: relative;
  max-width: 680px;
  margin: 24px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tagline {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.85;
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--hero-fg);
}
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:active { opacity: 0.5; }

/* ---------- Sticky bar (material) ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--material);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  padding-top: env(safe-area-inset-top);
  border-bottom: 0.5px solid transparent;
  transition: border-color 0.2s;
}
.bar.scrolled { border-bottom-color: var(--sep); }
.bar-row, .search-row { max-width: 680px; margin: 0 auto; padding: 10px var(--pad) 0; }

/* Segmented control */
.segmented {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--fill);
  border-radius: 9px;
  padding: 2px;
}
.seg-thumb {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  border-radius: 7px;
  background: var(--seg-thumb);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
  transition: transform 0.28s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.segmented button {
  position: relative;
  z-index: 1;
  min-height: 32px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 7px;
}
.segmented button[aria-selected="true"] { font-weight: 600; }

/* Search */
.search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--fill);
  color: var(--label-2);
}
.search svg { width: 17px; height: 17px; flex: none; }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--label);
  font: inherit;
  font-size: 17px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.search input::placeholder { color: var(--label-2); }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear { color: var(--label-3); width: 28px; height: 28px; display: grid; place-items: center; }
.search .clear svg { width: 17px; height: 17px; }
.search .clear[hidden] { display: none; }

/* Chips */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 10px var(--pad) 10px;
  max-width: 680px;
  margin: 0 auto;
}
.chips::-webkit-scrollbar { display: none; }
.chips[hidden] { display: none; }
.chip {
  flex: none;
  scroll-snap-align: start;
  height: 38px;
  padding: 0 16px;
  border-radius: 19px;
  background: var(--fill);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.chip.active { background: var(--accent); color: var(--on-accent); }

/* ---------- Content ---------- */
.content {
  max-width: 680px;
  margin: 0 auto;
  padding: 8px var(--pad) 24px;
  min-height: 60vh;
}
.group-title {
  margin: 28px 4px 4px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section { scroll-margin-top: var(--bar-h, 160px); }
.section-title {
  margin: 26px 4px 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-note {
  margin: -2px 4px 10px;
  font-size: 15px;
  color: var(--label-2);
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--bg-elev);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.item {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 13px var(--pad);
}
.item + .item::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--pad);
  right: 0;
  border-top: 0.5px solid var(--sep);
}
.item-main { flex: 1; min-width: 0; }
.item-name {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.item-x { font-weight: 400; color: var(--label-2); font-size: 15px; }
.item-desc {
  margin: 3px 0 0;
  font-size: 15px;
  line-height: 1.35;
  color: var(--label-2);
}
.item-side {
  flex: none;
  max-width: 44%;
  text-align: right;
}
.price {
  display: block;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--accent);
}
.cur { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; opacity: 0.75; }
.weight {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
}
mark { background: color-mix(in srgb, var(--yellow) 70%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

.empty {
  text-align: center;
  color: var(--label-2);
  padding: 64px 24px;
}
.empty strong { display: block; color: var(--label); font-size: 20px; margin-bottom: 6px; }

/* ---------- Footer ---------- */
.foot {
  max-width: 680px;
  margin: 0 auto;
  padding: 8px var(--pad) calc(env(safe-area-inset-bottom) + 32px);
  text-align: center;
  font-size: 13px;
  color: var(--label-2);
}
.foot p { margin: 6px 0 0; }
.link-btn { color: var(--accent); font-size: 15px; font-weight: 500; padding: 8px; }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.3s;
}
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  max-width: 680px;
  margin: 0 auto;
  height: calc(100dvh - env(safe-area-inset-top) - 24px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
}
.sheet.open { transform: translateY(0); }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-strong); margin: 6px auto 0; flex: none; }
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px var(--pad) 8px 20px;
  flex: none;
}
.sheet-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.done-btn { color: var(--accent); font-weight: 600; padding: 8px 4px; min-height: 44px; }
.sheet-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--pad) calc(env(safe-area-inset-bottom) + 32px);
}
.sheet-body .section-title:first-child { margin-top: 8px; }
.prose { background: var(--bg-elev); border-radius: var(--radius); padding: 14px var(--pad); box-shadow: var(--shadow); }
.prose p { margin: 0; font-size: 16px; line-height: 1.45; }
.prose p + p { margin-top: 10px; }
.kind { display: block; font-size: 13px; color: var(--label-2); font-weight: 400; margin-top: 1px; }
.warn { margin: 10px 4px 0; font-size: 13px; color: var(--label-2); line-height: 1.4; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media (hover: hover) {
  .chip:hover:not(.active) { background: var(--fill-strong); }
}
