/* Users: a deli counter in black and white. A light grey counter, white ticket stock with perforations, a flat black
   NOW SERVING sign, a matte black dispenser. Big Shoulders Display for every called number, Overpass (road-sign lettering) for the words,
   Overpass Mono for receipts. No hue: the dispenser's usual red is black here on purpose. */
:root {
  --counter: #f1f1ef;
  --stock: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #474b4f;
  --ink-3: #5f6367;
  --rule: #deded9;
  --rule-2: #c8c8c2;
  --num: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --sans: "Overpass", "Helvetica Neue", Arial, sans-serif;
  --mono: "Overpass Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --pad: clamp(16px, 4vw, 56px);
  --max: 1320px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--counter); scrollbar-color: var(--rule-2) var(--counter); scroll-behavior: smooth; }
body { margin: 0; background: var(--counter); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: var(--ink); color: var(--stock); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 2px solid var(--ink); border-radius: 4px; background: var(--ink); color: var(--stock); font: 650 15px/1 var(--sans); text-decoration: none; cursor: pointer; transition: background-color 160ms ease-out, color 160ms ease-out, transform 160ms ease-out; }
.btn:hover { background: #2b2e31; border-color: #2b2e31; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--stock); color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--stock); }
button.link { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.tokenbar { padding: 0 12px; background: var(--ink); color: var(--stock); font-size: 14px; }
.tokenbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.tokenbar code { font: 400 12.5px var(--mono); opacity: 0.85; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 21px/1 var(--sans); letter-spacing: -0.02em; }
.mark svg { width: 36px; height: 36px; }
.m-disc { fill: var(--stock); stroke: var(--rule-2); stroke-width: 1; }
.m-fig { fill: var(--ink); }
.top nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.top nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--ink); }
.top nav .navbuy { padding: 9px 16px; border: 2px solid var(--ink); border-radius: 4px; color: var(--ink); font-weight: 650; background: var(--stock); }
.top nav .navbuy:hover { background: var(--ink); color: var(--stock); }

/* ---- the NOW SERVING sign ---- */
.serving { padding-top: 6px; }
.sign { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 32px; padding: 18px 28px; border-radius: 10px; background: var(--ink); color: var(--stock); box-shadow: 0 24px 40px -28px rgb(10 10 10 / 0.6); }
.sign-label { font: 700 13px/1.2 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: rgb(255 255 255 / 0.7); }
.sign-num { font: 900 clamp(56px, 9vw, 132px)/0.9 var(--num); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sign-num #serving { display: inline-block; }
.sign-num.roll #serving { animation: roll 700ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes roll { from { transform: translateY(-40%); opacity: 0; filter: blur(8px); } }
.sign-next { display: grid; justify-items: end; gap: 2px; text-align: right; }
.sign-next > span { font: 700 12px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: rgb(255 255 255 / 0.7); }
.sign-next b { font: 800 clamp(34px, 3.6vw, 52px)/1 var(--num); }
.sign-next em { font: 400 13px/1.3 var(--sans); font-style: normal; color: rgb(255 255 255 / 0.75); }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-top: clamp(20px, 3vw, 40px); padding-bottom: clamp(48px, 6vw, 80px); }
h1 { margin: 0; font: 900 clamp(48px, 6.4vw, 96px)/1 var(--num); letter-spacing: 0.005em; text-transform: uppercase; }
.sub { margin: 20px 0 0; max-width: 44ch; font-size: 18px; color: var(--ink-2); }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; }
.tally { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 30px 0 0; padding-top: 18px; border-top: 2px solid var(--ink); }
.tally dt { font-size: 13.5px; color: var(--ink-2); }
.tally dd { margin: 4px 0 0; font: 800 34px/1 var(--num); font-variant-numeric: tabular-nums; }
.machine { position: relative; margin: 0; aspect-ratio: 1 / 1; max-height: 640px; width: 100%; }
.machine canvas, .machine .flat { position: absolute; inset: 0; width: 100%; height: 100%; }
.machine canvas { -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); }
.machine .flat { display: none; place-items: center; }
.machine.noGL canvas { display: none; }
.machine.noGL .flat { display: grid; }
.machine figcaption { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font: 400 12.5px/1.3 var(--mono); color: var(--ink-3); }

/* ---- the queue: one ticket per user ---- */
.queue, .how, .token, .foot { position: relative; }
.queue::before, .how::before, .token::before, .foot::before { content: ""; position: absolute; top: 0; left: var(--pad); right: var(--pad); height: 1px; background: var(--rule-2); }
.queue { padding-top: clamp(40px, 5vw, 72px); padding-bottom: clamp(48px, 6vw, 88px); }
.q-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; }
h2 { margin: 0; font: 900 clamp(38px, 4.4vw, 64px)/0.95 var(--num); text-transform: uppercase; letter-spacing: 0.005em; }
.q-live { display: flex; align-items: center; gap: 8px; margin: 0; font: 400 13px/1 var(--mono); color: var(--ink-2); }
.q-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--rule-2); }
.q-live.on i { background: var(--ink); animation: beat 2s ease-in-out infinite; }
@keyframes beat { 50% { opacity: 0.25; } }
.q-note { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; margin: 26px 0 0; padding: 0; list-style: none; }
.tickets .empty { grid-column: 1 / -1; padding: 30px; border: 2px dashed var(--rule-2); border-radius: 8px; color: var(--ink-2); text-align: center; }
.ticket { --stub: 112px; position: relative; height: 204px; perspective: 1200px; }
.ticket.fresh { animation: drop 900ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes drop { from { opacity: 0; transform: translateY(-24px) rotate(-3deg); filter: blur(6px); } }
.t-card { position: absolute; inset: 0; transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1); transform-style: preserve-3d; }
.ticket.flipped .t-card { transform: rotateY(180deg); }
.t-face, .t-back { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 8px; background: var(--stock); box-shadow: 0 1px 0 rgb(10 10 10 / 0.06), 0 14px 26px -18px rgb(10 10 10 / 0.35);
  /* the two notches at the perforation */
  -webkit-mask: radial-gradient(circle 9px at var(--stub) 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 9px at var(--stub) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 9px at var(--stub) 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 9px at var(--stub) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat; }
.t-face { display: grid; grid-template-columns: var(--stub) minmax(0, 1fr); }
.t-back { transform: rotateY(180deg); padding: 16px 18px; display: grid; align-content: start; gap: 6px; }
.t-stub { display: grid; align-content: center; justify-items: center; gap: 2px; border-right: 2px dashed var(--rule-2); padding: 10px 6px; }
.t-stub span { font: 700 11px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.t-stub b { font: 900 clamp(34px, 3vw, 44px)/0.95 var(--num); font-variant-numeric: tabular-nums; }
.t-body { position: relative; display: grid; align-content: start; gap: 6px; padding: 14px 16px 12px 18px; min-width: 0; }
.t-name { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.t-name b { font: 600 15px/1.2 var(--mono); }
.t-name time { font: 400 12px/1 var(--mono); color: var(--ink-3); white-space: nowrap; }
.t-say { margin: 0; font-size: 15px; line-height: 1.35; }
.t-say q { font-weight: 600; }
.t-bot { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.t-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.t-state { font: 600 12.5px/1 var(--mono); white-space: nowrap; letter-spacing: -0.02em; }
.t-turn { padding: 6px 10px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--stock); font: 600 12px/1 var(--sans); cursor: pointer; }
.t-turn:hover { background: var(--ink); color: var(--stock); }
.stamp { position: absolute; left: calc(var(--stub) / 2); bottom: 22px; translate: -50% 0; padding: 3px 9px; border: 3px solid var(--ink); border-radius: 4px; background: rgb(255 255 255 / 0.6); font: 900 22px/1 var(--num); letter-spacing: 0.06em; text-transform: uppercase; rotate: -9deg; opacity: 0.9; }
.t-back h3 { margin: 0 0 4px; font: 900 22px/1 var(--num); text-transform: uppercase; letter-spacing: 0.02em; }
.t-back dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; font: 400 12.5px/1.3 var(--mono); }
.t-back dt { color: var(--ink-3); }
.t-back dd { margin: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-back .t-turn { justify-self: start; margin-top: 6px; }

/* ---- how, on ruled ticket stock ---- */
.how { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px clamp(28px, 5vw, 72px); padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(48px, 6vw, 96px); }
.how h2 { grid-column: 1 / -1; }
.steps { margin: 0; padding: 22px 26px 6px; list-style: none; counter-reset: s; border-radius: 8px; background: var(--stock) repeating-linear-gradient(to bottom, transparent 0 27px, var(--rule) 27px 28px); box-shadow: 0 14px 26px -20px rgb(10 10 10 / 0.35); }
.steps li { position: relative; max-width: 62ch; margin: 0 0 18px; padding-left: 58px; color: var(--ink-2); counter-increment: s; line-height: 28px; }
.steps li::before { content: "#" counter(s); position: absolute; left: 0; top: -2px; font: 900 32px/1 var(--num); color: var(--ink); }
.steps b { color: var(--ink); }
.faq { margin: 0; }
.faq dt { margin-top: 18px; font-weight: 700; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 6px 0 0; max-width: 60ch; color: var(--ink-2); font-size: 15.5px; }

.token { display: flow-root; padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(56px, 7vw, 96px); }
.token h2 { font-size: clamp(64px, 10vw, 150px); }
.token .mascot { float: right; width: clamp(160px, 26vw, 340px); height: auto; margin: -10px 0 10px 24px; border-radius: 50%; background: var(--stock); box-shadow: 0 18px 34px -24px rgb(10 10 10 / 0.4); }
.token > p { margin: 12px 0 0; color: var(--ink-2); }
.ca { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.ca code { display: block; padding: 12px 16px; border: 2px solid var(--ink); border-radius: 6px; background: var(--stock); font: 400 13.5px/1.4 var(--mono); word-break: break-all; }

.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; padding-bottom: 40px; font-size: 14px; color: var(--ink-3); }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
  .machine { max-height: 520px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top { height: 60px; }
  .top nav a[href="#how"] { display: none; }
  .sign { grid-template-columns: 1fr auto; padding: 14px 16px; gap: 6px 14px; }
  .sign-label { grid-column: 1 / -1; }
  .sign-num { font-size: clamp(48px, 15vw, 72px); }
  .sign-next em { display: none; }
  h1 { font-size: clamp(46px, 13vw, 64px); }
  .sub { font-size: 16.5px; }
  .tally dd { font-size: 28px; }
  .tickets { grid-template-columns: 1fr; }
  .ticket { --stub: 86px; height: 192px; }
  .t-stub b { font-size: 34px; }
  .t-body { padding: 12px 12px 10px 14px; }
  .t-turn { padding: 6px 8px; }
  .foot { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticket.fresh, .q-live.on i, .sign-num.roll #serving { animation: none; }
  .t-card { transition: none; }
}
