/* Roast Label — see /styleguide.md */
:root {
  --background: 43 32% 94%;        /* paper  #f4f1ea */
  --surface: 40 22% 88%;           /* paper-2 #e7e2d8 */
  --foreground: 30 8% 5%;          /* ink    #0e0d0c */
  --foreground-soft: 45 5% 16%;    /* ink-soft #2b2a27 */
  --muted: 41 6% 38%;
  --line: 30 8% 5%;
  --primary: 30 8% 5%;
  --primary-foreground: 43 32% 94%;
  --stamp: 10 63% 44%;             /* roast red #b8412a */

  --display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --condensed: "Barlow Semi Condensed", "Barlow", sans-serif;
  --wrap: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.05 0 0 0 0 0.05 0 0 0 0 0.04 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; overflow-x: hidden; }
body {
  margin: 0;
  font: 400 17px/1.55 var(--body);
  color: hsl(var(--foreground-soft));
  background: hsl(var(--background)) var(--grain);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 {
  font-family: var(--display); font-weight: 400; line-height: .9; letter-spacing: .005em;
  color: hsl(var(--foreground)); margin: 0; text-transform: uppercase;
}
h2 { font-size: 72px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.label {
  font: 600 12.5px/1.3 var(--condensed); letter-spacing: .14em; text-transform: uppercase;
  color: hsl(var(--muted)); margin: 0;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); padding: 8px 12px; }
:focus-visible { outline: 2px solid hsl(var(--stamp)); outline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 22px; border: 1px solid hsl(var(--line)); border-radius: 0;
  font: 600 14px/1 var(--condensed); letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  transition: background-color .12s, color .12s;
}
.btn--ink { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn--ink:hover { background: hsl(var(--background)); color: hsl(var(--foreground)); }
.btn--line { background: transparent; color: hsl(var(--foreground)); }
.btn--line:hover { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn--paper { background: hsl(var(--primary-foreground)); color: hsl(var(--foreground)); border-color: hsl(var(--primary-foreground)); }
.btn--paper:hover { background: transparent; color: hsl(var(--primary-foreground)); }
.btn--sm { height: 34px; padding: 0 12px; font-size: 12.5px; }
.btn[disabled] { opacity: .45; cursor: default; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: hsl(var(--background) / .94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid hsl(var(--line));
}
.nav__inner { display: flex; align-items: center; gap: 40px; height: 64px; }
.logo {
  font: 400 30px/1 var(--display); letter-spacing: .02em; text-transform: uppercase;
  color: hsl(var(--foreground)); text-decoration: none; white-space: nowrap;
}
.logo span { color: hsl(var(--stamp)); }
.logo--small { font-size: 22px; }
.nav__links { display: flex; gap: 28px; margin-right: auto; }
.nav__links a { font: 600 13px/1 var(--condensed); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.nav__links a:hover { text-decoration: underline; text-underline-offset: 5px; }
.nav__actions { display: flex; align-items: center; gap: 14px; }
.account { display: flex; align-items: center; gap: 12px; }
.account__who { display: flex; flex-direction: column; align-items: end; line-height: 1.2; }
.account__name { font-weight: 600; font-size: 14px; color: hsl(var(--foreground)); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account__out { font: 600 11px/1.4 var(--condensed); letter-spacing: .12em; text-transform: uppercase; color: hsl(var(--muted)); }
.cart-btn { height: 40px; }
.cart-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px;
  background: hsl(var(--stamp)); color: hsl(var(--primary-foreground)); font: 400 16px/1 var(--display); letter-spacing: 0;
}


/* Mobile navigation (shown below 900px) */
.nav-toggle {
  display: none; width: 40px; height: 40px; padding: 0; place-items: center;
  background: none; border: 1px solid hsl(var(--line)); color: hsl(var(--foreground));
}
.nav-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
.nav-toggle__close, .nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline; }
.nav-toggle[aria-expanded="true"] { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.mobile-nav { border-top: 1px solid hsl(var(--line)); background: hsl(var(--background)); }
.mobile-nav a {
  display: flex; align-items: baseline; gap: 14px; padding: 14px 0;
  font: 400 40px/1 var(--display); text-transform: uppercase; text-decoration: none; color: hsl(var(--foreground));
  border-bottom: 1px solid hsl(var(--line) / .2);
}
.mobile-nav a:last-child { border-bottom: 0; padding-bottom: 20px; }
.mobile-nav a span { font: 600 12px/1 var(--condensed); letter-spacing: .14em; color: hsl(var(--stamp)); }
.mobile-nav a:active { color: hsl(var(--stamp)); }

/* Hero */
.hero { border-bottom: 1px solid hsl(var(--line)); }
.hero__inner {
  display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: center;
  padding-top: 72px; padding-bottom: 72px; min-height: min(calc(78vh - 64px - 49px), 620px);
}
.hero__title { font-size: 120px; line-height: .88; margin: 22px 0 26px; }
.reveal { display: block; overflow: hidden; }
.reveal > span { display: block; animation: rise .7s var(--ease) both; }
.reveal:nth-child(2) > span { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
.hero__lede { font-size: 19px; max-width: 30em; margin: 0; }
.hero__cta { display: flex; gap: 12px; margin-top: 32px; }

.bag {
  position: relative; justify-self: end; width: 100%; max-width: 400px;
  background: hsl(var(--background)); border: 1px solid hsl(var(--line));
  padding: 22px 24px 18px; transform: rotate(1.5deg);
  animation: settle .9s .2s var(--ease) both;
}
@keyframes settle { from { opacity: 0; transform: rotate(5deg) translateY(24px); } to { opacity: 1; transform: rotate(1.5deg); } }
.bag__top, .bag__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bag__top { padding-bottom: 12px; border-bottom: 3px solid hsl(var(--line)); }
.bag__name { font: 400 104px/.84 var(--display); text-transform: uppercase; color: hsl(var(--foreground)); margin: 18px 0 16px; }
.bag__specs { margin: 0; border-top: 1px solid hsl(var(--line)); }
.bag__specs div { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid hsl(var(--line)); }
.bag__specs dt { font: 600 12px/1.5 var(--condensed); letter-spacing: .14em; text-transform: uppercase; color: hsl(var(--muted)); }
.bag__specs dd { margin: 0; font-size: 15px; font-weight: 500; color: hsl(var(--foreground)); }
.bag__foot { margin-top: 14px; }
.bag__barcode {
  width: 92px; height: 26px;
  background: repeating-linear-gradient(90deg, hsl(var(--foreground)) 0 2px, transparent 2px 4px, hsl(var(--foreground)) 4px 5px, transparent 5px 8px, hsl(var(--foreground)) 8px 11px, transparent 11px 12px);
}
.stamp {
  position: absolute; top: -26px; right: -10px; width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  font: 400 17px/1 var(--display); letter-spacing: .04em; text-transform: uppercase;
  color: hsl(var(--stamp)); border: 2px solid hsl(var(--stamp)); outline: 1px solid hsl(var(--stamp)); outline-offset: -7px;
  background: hsl(var(--background)); transform: rotate(-12deg);
}

.strip { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.strip__inner {
  display: flex; justify-content: space-between; gap: 16px; height: 48px; align-items: center;
  font: 600 13px/1 var(--condensed); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; overflow: hidden;
}
.strip__inner span:nth-child(even) { color: hsl(var(--stamp)); }

/* Menu */
.menu { padding: 96px 0 24px; }
.menu__head { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: end; margin-bottom: 56px; }
.menu__head h2 { font-size: 112px; }
.menu__head p { margin: 0; max-width: 26em; }

/* Zigzag rows */
.row {
  display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: stretch;
  padding: 40px 0 72px; border-top: 3px solid hsl(var(--line));
}
.row--flip { grid-template-columns: 7fr 5fr; }
.row--flip .row__panel { order: 2; }
.row__panel {
  position: relative; min-height: 360px; padding: 28px;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
}
.row__panel--paper { background: transparent; color: hsl(var(--foreground)); border: 1px solid hsl(var(--line)); min-height: 280px; }
.row__index { font: 400 168px/.8 var(--display); letter-spacing: -.01em; }
.row__panel .ill { position: absolute; right: 16px; bottom: 16px; width: 200px; height: 200px; }
.row__kicker { font: 600 13px/1.3 var(--condensed); letter-spacing: .16em; text-transform: uppercase; margin: 0; }
.row__body { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.row__body h3 { font-size: 64px; margin-bottom: 10px; }
.row__intro { margin: 0 0 22px; max-width: 34em; color: hsl(var(--muted)); }

.items { list-style: none; margin: 0; padding: 0; border-top: 1px solid hsl(var(--line)); }
.item { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; align-items: center; padding: 16px 0; border-bottom: 1px solid hsl(var(--line)); }
.item__line { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.item__name { font: 400 28px/1 var(--display); letter-spacing: .01em; text-transform: uppercase; color: hsl(var(--foreground)); }
.item__leader { flex: 1; border-bottom: 2px dotted hsl(var(--foreground) / .45); transform: translateY(-5px); min-width: 24px; }
.item__price { font: 400 28px/1 var(--display); color: hsl(var(--foreground)); transition: color .12s; }
.item:hover .item__price { color: hsl(var(--stamp)); }
.item__desc { grid-column: 1; margin: 0; font-size: 15px; color: hsl(var(--muted)); }
.item .btn { grid-column: 2; grid-row: 1 / span 2; }

/* scroll reveal */
.js .fade { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .fade.in { opacity: 1; transform: none; }

/* Story */
.row--story { padding-bottom: 96px; }
.quote { margin: 0 0 32px; }
.quote p { font: 400 44px/1 var(--display); text-transform: uppercase; color: hsl(var(--foreground)); margin: 0 0 16px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid hsl(var(--line)); }
.facts li { padding: 16px 16px 0 0; }
.facts li + li { padding-left: 16px; border-left: 1px solid hsl(var(--line)); }
.facts strong { display: block; font: 400 44px/1 var(--display); color: hsl(var(--foreground)); }
.facts span { font-size: 14px; color: hsl(var(--muted)); }

/* Visit */
.visit { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); padding: 96px 0; }
.visit h2 { color: inherit; font-size: 96px; margin: 14px 0 18px; }
.visit .label { color: hsl(var(--primary-foreground) / .6); }
.visit__sub { margin: 0 0 28px; color: hsl(var(--primary-foreground) / .75); }
.visit__inner { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: end; }
.hours { width: 100%; border-collapse: collapse; }
.hours caption { text-align: left; padding-bottom: 12px; }
.hours th, .hours td { padding: 14px 0; border-top: 1px solid hsl(var(--primary-foreground) / .25); font: 400 30px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 1px solid hsl(var(--primary-foreground) / .25); }
.hours th { text-align: left; }
.hours td { text-align: right; }

.footer { padding: 28px 0; border-top: 1px solid hsl(var(--line)); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Line illustrations */
.ill { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ill .solid { fill: currentColor; stroke: none; }

/* Drawer (receipt) */
.scrim { position: fixed; inset: 0; background: hsl(var(--foreground) / .45); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(440px, 100vw);
  background: hsl(var(--background)) var(--grain); border-left: 1px solid hsl(var(--line));
  display: flex; flex-direction: column; transform: translateX(100%); visibility: hidden;
  transition: transform .3s var(--ease), visibility 0s .3s;
}
.drawer.open { transform: none; visibility: visible; transition: transform .3s var(--ease); }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 22px 28px 18px; border-bottom: 3px solid hsl(var(--line)); }
.drawer__head h2 { font-size: 44px; }
.icon-btn { border: 1px solid transparent; background: none; padding: 8px; }
.icon-btn:hover { border-color: hsl(var(--line)); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }
.drawer__body { flex: 1; overflow: auto; padding: 4px 28px; }
.drawer__foot { padding: 18px 28px 26px; border-top: 2px dashed hsl(var(--line)); }
.drawer__foot:empty { display: none; }
.empty { padding: 56px 4px; }
.empty h3 { font-size: 40px; margin-bottom: 10px; }
.empty p { margin: 0 0 22px; color: hsl(var(--muted)); }
.line { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 16px 0; border-bottom: 1px dashed hsl(var(--line) / .5); }
.line__name { font: 400 24px/1 var(--display); text-transform: uppercase; color: hsl(var(--foreground)); }
.line__price { font-size: 14px; color: hsl(var(--muted)); }
.line__sum { font: 400 24px/1 var(--display); color: hsl(var(--foreground)); text-align: right; }
.line__controls { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.qty { display: inline-flex; align-items: center; border: 1px solid hsl(var(--line)); }
.qty button { width: 32px; height: 30px; border: 0; background: none; font-size: 16px; }
.qty button:hover { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.qty span { min-width: 30px; text-align: center; font-weight: 600; font-size: 14px; }
.remove { border: 0; background: none; padding: 0; font: 600 11.5px/1 var(--condensed); letter-spacing: .12em; text-transform: uppercase; color: hsl(var(--muted)); }
.remove:hover { color: hsl(var(--stamp)); }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.total strong { font: 400 40px/1 var(--display); color: hsl(var(--foreground)); }
.note { font-size: 14px; color: hsl(var(--muted)); margin: 0 0 16px; }
.drawer__foot .btn, .empty .btn { width: 100%; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); padding: 14px 20px;
  font: 600 13px/1 var(--condensed); letter-spacing: .12em; text-transform: uppercase;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .reveal > span, .bag { animation: none; }
  .js .fade { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Small laptop */
@media (max-width: 1320px) {
  .hero__title { font-size: 96px; }
  .bag__name { font-size: 88px; }
  .menu__head h2 { font-size: 96px; }
  .row__index { font-size: 140px; }
}

/* ---------- Tablet & narrow windows (≤900px) ---------- */
@media (max-width: 900px) {
  .hero__inner, .menu__head, .visit__inner, .row, .row--flip { grid-template-columns: 1fr; }
  .hero__inner { min-height: 0; gap: 40px; padding-top: 48px; padding-bottom: 56px; }
  .menu__head { gap: 16px; margin-bottom: 40px; }
  .visit__inner { gap: 48px; }
  .nav__links { display: none; }
  .nav__inner { justify-content: space-between; }
  .nav-toggle { display: inline-grid; }
  .strip__inner span:nth-child(n+5) { display: none; }

  /* The bag label sits flat and fully inside the column: no tilt, no stamp overhang. */
  .bag { justify-self: start; max-width: 440px; transform: none; animation: none; margin-top: 18px; }
  .stamp { top: -18px; right: 14px; }

  /* Category panel collapses into a slim header band above its list. */
  .row { gap: 28px; padding: 32px 0 56px; }
  .row--flip .row__panel { order: 0; }
  .row__panel {
    min-height: 0; padding: 18px 20px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 18px;
  }
  .row__panel .ill { position: static; width: 64px; height: 64px; margin-left: auto; flex: none; }
  .row__index { font-size: 76px; line-height: .8; }
  .row__panel--paper { min-height: 0; }
  .row__body h3 { font-size: 56px; }
}

/* ---------- Phone (≤560px) ---------- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .hide-sm { display: none; }
  h2, .menu__head h2 { font-size: 60px; }

  .nav__inner { height: 58px; gap: 10px; }
  .logo { font-size: 25px; }
  .account__name { display: none; }
  .nav__actions { gap: 8px; }
  .nav__actions .btn { height: 38px; padding: 0 12px; font-size: 12.5px; }
  .nav-toggle { width: 38px; height: 38px; }
  .mobile-nav a { font-size: 34px; }

  .hero__inner { padding-top: 32px; padding-bottom: 44px; gap: 32px; }
  .hero__title { font-size: 64px; margin: 14px 0 18px; }
  .hero__lede { font-size: 17px; }
  .hero__cta { margin-top: 24px; }
  .hero__cta .btn { flex: 1; padding: 0 12px; }

  /* Compact label: name + notes only. */
  .bag { padding: 16px 18px 14px; }
  .bag__name { font-size: 64px; margin: 12px 0 10px; }
  .bag__specs div:not(:nth-child(3)) { display: none; }
  .bag__specs div { grid-template-columns: 64px 1fr; }
  .bag__foot { margin-top: 10px; }
  .stamp { width: 78px; height: 78px; font-size: 13px; top: -22px; right: 10px; outline-offset: -5px; }

  .strip__inner { justify-content: center; }
  .strip__inner span:nth-child(n+3) { display: none; }

  .menu { padding-top: 56px; }
  .row { gap: 20px; padding: 24px 0 44px; border-top-width: 2px; }
  .row__panel { padding: 14px 16px; gap: 14px; }
  .row__index { font-size: 56px; }
  .row__kicker { font-size: 12px; }
  .row__panel .ill { width: 48px; height: 48px; }
  .row__body h3 { font-size: 44px; margin-bottom: 6px; }
  .row__intro { font-size: 15px; margin-bottom: 14px; }

  /* Item: name ····· price on one line, description below, square add button on the right. */
  .item { gap: 4px 14px; padding: 14px 0; }
  .item__name, .item__price { font-size: 23px; }
  .item__leader { min-width: 12px; }
  .item__desc { font-size: 14px; }
  .item .btn { width: 44px; height: 44px; padding: 0; font: 400 26px/1 var(--display); letter-spacing: 0; align-self: center; }

  .row--story { padding-bottom: 56px; }
  .quote p { font-size: 32px; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .facts li { padding: 12px 8px 0 0; }
  .facts li + li { padding-left: 10px; }
  .facts strong { font-size: 32px; }
  .facts span { font-size: 13px; line-height: 1.35; display: block; }

  .visit { padding: 64px 0; }
  .visit h2 { font-size: 60px; }
  .visit .btn { width: 100%; }
  .hours th, .hours td { font-size: 24px; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Receipt drawer: full width, larger tap targets. */
  .drawer { width: 100vw; border-left: 0; }
  .drawer__head, .drawer__body, .drawer__foot { padding-left: 20px; padding-right: 20px; }
  .qty button { width: 44px; height: 40px; }
  .remove { padding: 12px 0; }
}

/* Very narrow phones */
@media (max-width: 370px) {
  .hero__title { font-size: 56px; }
  .logo { font-size: 22px; }
  .nav__actions .btn { padding: 0 10px; }
}

/* Wide screens have room for the stamp to hang off the label. */
@media (min-width: 1400px) { .stamp { right: -26px; } }

/* Desktop never shows the mobile panel, even if it was left open. */
@media (min-width: 901px) { .mobile-nav { display: none !important; } }
