/* Fonts, hosted with the site (no outside requests) */
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 500; font-display: swap; src: url(fonts/fraunces-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 500 600; font-display: swap; src: url(fonts/fraunces.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/hanken-grotesk-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/hanken-grotesk.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Oleo Script"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/oleo-script-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f6e9d8;
  --card: #fffaf2;
  --ink: #36200f;
  --muted: #80685a;
  --caramel: #a9561c;
  --caramel-soft: #d99a5b;
  --olive: #5a6b2a;
  --line: #e6d3bd;
  --r: 22px;
  --ease: cubic-bezier(.3, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font: 400 16px/1.45 "Hanken Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  /* faint vertical ribs, like the café's fluted wood panels */
  background-image: linear-gradient(90deg, rgba(150,88,36,.075), rgba(150,88,36,0) 45%, rgba(150,88,36,0) 55%, rgba(150,88,36,.075));
  background-size: 16px 100%;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ───────── Masthead: the café interior, tinted and dissolved into the page ───────── */
.mast {
  position: relative; text-align: center; color: #fbeedd;
  max-width: 540px; margin: 0 auto; padding: 40px 16px 150px;
}
.mast-bg, .foot-bg { position: absolute; inset: 0; z-index: 0; background: #2e1b0d; }
.mast-bg {
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}
.mast-bg img, .foot-bg img { width: 100%; height: 100%; object-fit: cover; }
.mast-bg img { object-position: 50% 0; }
.mast-bg::after, .foot-bg::after { content: ""; position: absolute; inset: 0; }
.mast-bg::after { /* caramel-brown wash */
  background:
    linear-gradient(180deg, rgba(46,27,13,.82) 0%, rgba(46,27,13,.62) 45%, rgba(74,36,8,.38) 100%),
    rgba(169,86,28,.22);
}
.mast > :not(.mast-bg) { position: relative; z-index: 1; }
.logo {
  margin: 0; color: #fbeedd;
  font: 700 clamp(60px, 19vw, 84px)/1.05 "Oleo Script", cursive;
  text-shadow: 0 2px 18px rgba(30,15,5,.55);
}
.cafe {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 2px 0 0; color: #e8b47c;
  font: 700 17px/1 "Hanken Grotesk", sans-serif; letter-spacing: .42em; text-transform: uppercase;
}
.cafe span { margin-right: -.42em; }
.cafe::before, .cafe::after { content: ""; width: 44px; height: 1.5px; background: currentColor; opacity: .7; }
.tagline {
  margin: 14px 0 0; color: rgba(251,238,221,.88);
  font-size: 11.5px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase;
}

/* ───────── Layout ───────── */
main { position: relative; z-index: 1; max-width: 540px; margin: -64px auto 0; padding: 0 14px 8px; } /* pulled up over the fading photo */

/* ───────── Search ───────── */
.search {
  display: flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 16px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--line);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--caramel); box-shadow: 0 0 0 4px rgba(169,86,28,.12); }
.search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none;
  font: inherit; font-size: 16px; color: var(--ink);
}
.search input::placeholder { color: #a8917f; }

/* ───────── Pinned Drinks / Food switch ───────── */
.switch {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 4px;
  margin: 12px -14px 0; padding: 8px 14px;
  background: rgba(246,233,216,.9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.switch::before { /* the track */
  content: ""; position: absolute; inset: 8px 14px; z-index: -1;
  border-radius: 999px; background: var(--card); border: 1.5px solid var(--line);
}
.switch button {
  all: unset; box-sizing: border-box; cursor: pointer; flex: 1; text-align: center;
  height: 44px; border-radius: 999px;
  font: 600 16px/44px "Fraunces", Georgia, serif; color: var(--muted);
  -webkit-tap-highlight-color: transparent;
  transition: background .25s, color .25s;
}
.switch button[aria-current="true"] { background: var(--ink); color: #fbeedd; }
.switch button:focus-visible { outline: 3px solid var(--caramel); outline-offset: 2px; }

/* ───────── Group label ───────── */
.group {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 6px 12px;
  font: italic 500 21px/1 "Fraunces", Georgia, serif; color: var(--caramel);
}
.group::after { content: ""; flex: 1; height: 1px; background: var(--caramel); opacity: .35; }

/* ───────── Category (collapsible) ───────── */
.cat {
  margin-bottom: 10px; border-radius: var(--r); background: var(--card);
  box-shadow: 0 1px 0 rgba(54,32,15,.04), 0 8px 22px -12px rgba(54,32,15,.25);
  animation: rise .55s var(--ease) both; animation-delay: calc(var(--i) * 45ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.cat h2 { margin: 0; position: sticky; top: 60px; z-index: 2; } /* 60px = height of the pinned switch */
.cat-head {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 9px 16px 9px 9px; border-radius: var(--r);
  background: var(--card); color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  transition: background .3s, color .3s, border-radius .3s;
}
.cat-head:focus-visible { outline: 3px solid var(--caramel); outline-offset: 2px; }
.cat-head:active { transform: scale(.985); }

.thumb {
  flex: none; width: 56px; height: 64px; border-radius: 28px 28px 12px 12px; object-fit: cover; /* arch, like the alcoves */
  background: #ecdcc8;
}
.cat-text { flex: 1; min-width: 0; }
.cat-name { display: block; font: 600 21px/1.15 "Fraunces", Georgia, serif; letter-spacing: -.01em; }
.cat-meta { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); transition: color .3s; }

/* plus → minus */
.pm { flex: none; position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); transition: border-color .3s, transform .4s var(--ease); }
.pm::before, .pm::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 2px; margin: -1px 0 0 -6.5px;
  background: currentColor; border-radius: 2px; transition: transform .4s var(--ease);
}
.pm::after { transform: rotate(90deg); }

.cat.open .cat-head { background: var(--ink); color: #fbeedd; border-radius: var(--r) var(--r) 0 0; }
.cat.open .cat-meta { color: #d7b99b; }
.cat.open .pm { border-color: rgba(251,238,221,.35); transform: rotate(180deg); }
.cat.open .pm::after { transform: rotate(0deg); }

/* animated height */
.panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); border-radius: 0 0 var(--r) var(--r); overflow: clip; }
.cat.open .panel { grid-template-rows: 1fr; }
.panel-in { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s .45s; }
.cat.open .panel-in { visibility: visible; transition-delay: 0s; }
.no-anim, .no-anim * { transition: none !important; }

.banner {
  width: calc(100% - 36px); height: auto; margin: 18px 18px 4px; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 92%;
  border-radius: 999px 999px 16px 16px; /* arch, like the alcoves */
  background: #ecdcc8;
}

/* close bar at the bottom of an open section */
.cat-close {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 52px; border-top: 1px solid var(--line);
  font-size: 14px; font-weight: 700; color: var(--muted);
  -webkit-tap-highlight-color: transparent;
}
.cat-close:active { background: #f7ecdc; }
.cat-close:focus-visible { outline: 3px solid var(--caramel); outline-offset: -3px; }
.chev { width: 9px; height: 9px; margin-top: 4px; border-left: 2px solid; border-top: 2px solid; transform: rotate(45deg); }

/* ───────── Items ───────── */
.items { list-style: none; margin: 0; padding: 6px 18px 14px; }
.items li { display: flex; align-items: baseline; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.items li:last-child { border-bottom: 0; }
.n { flex: 1; min-width: 0; font-weight: 500; }
.n small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }
.n .in { display: block; margin-bottom: 1px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--olive); }
.p { font-weight: 700; color: var(--caramel); font-variant-numeric: tabular-nums; white-space: nowrap; }
.p i { font-style: normal; font-size: .76em; font-weight: 500; opacity: .8; margin-right: 1px; }
.p em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted); margin-right: 4px; }

.sized .p { width: 62px; text-align: right; }
.items li.cols { padding: 8px 0 0; border-bottom: 0; }
.items li.cols .p { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

#results .items { background: var(--card); border-radius: var(--r); padding-top: 8px; }
#results .p + .p { margin-left: 8px; }
#results .items li { align-items: flex-end; }
.empty { margin: 8px 6px; color: var(--muted); }

/* ───────── Footer: the page fades back into the café ───────── */
footer {
  position: relative; text-align: center; color: rgba(251,238,221,.9); font-size: 13.5px;
  max-width: 540px; margin: -10px auto 0; padding: 170px 16px calc(40px + env(safe-area-inset-bottom));
}
.foot-bg {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 50%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 50%);
}
.foot-bg img { object-position: 50% 30%; }
.foot-bg::after {
  background:
    linear-gradient(180deg, rgba(74,36,8,.35) 0%, rgba(46,27,13,.6) 50%, rgba(46,27,13,.88) 100%),
    rgba(169,86,28,.22);
}
footer > :not(.foot-bg) { position: relative; z-index: 1; }
footer p { margin: 0 0 4px; }
footer .logo.small { font-size: 44px; margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) {
  .cat { animation: none; }
  * { transition-duration: 0s !important; }
}
