/* Elm Centre Cafe & Catering. One page, phone first.
   Read DESIGN.md before changing anything. The short version: coffee black
   and plate white trade places down the page, the food is cut round like the
   plates it sits on, and yolk yellow means "order" and nothing else. */

:root {
  --ink: #17130F;
  --ink-2: #5B544C;
  --paper: #FFFFFF;
  --paper-2: #F4F2EE;
  --line: #E3DFD8;
  --on-ink-2: #B9B1A6;
  --ink-line: #3A332B;

  --yolk: #F7C325;
  --yolk-press: #E2AF12;
  --green: #2E6B4F;
  --green-lit: #7BD9A4;
  --red: #C8321F;
  --red-lit: #FF8A78;

  --check-paper: #E4EFE3;
  --check-rule: #A9C6AE;
  --check-ink: #1F3D2E;

  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --gut: 18px;
  --wrap: 1180px;
  --bar: calc(72px + env(safe-area-inset-bottom, 0px));
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ink); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.5;
  padding-bottom: var(--bar); overflow-x: hidden;
}
img, iframe { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yolk); outline-offset: 3px; }
p { margin: 0 0 12px; }
h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

/* Display type: heavy, narrow, like a painted menu board. */
.shout, .cta b, .order b, h1 {
  font-family: var(--display); font-weight: 800; font-stretch: 75%;
  text-transform: uppercase; letter-spacing: -0.015em;
}
.shout { font-size: clamp(3.4rem, 17vw, 8.5rem); line-height: .84; margin-bottom: 18px; text-wrap: balance; }
.big { font-size: clamp(1.25rem, 4.6vw, 1.75rem); line-height: 1.3; max-width: 30ch; margin-bottom: 20px; }
.fine { font-size: .875rem; opacity: .7; margin-top: 18px; }

/* ================================================================ first screen */
.hero { background: var(--ink); color: #fff; padding-bottom: 44px; }
.hero--short { min-height: 70svh; padding-bottom: 0; }
.hero--short .hero__body { padding-bottom: 48px; }
.hero--short a { color: var(--yolk); }

.hero__top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--gut) 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.125rem; line-height: 1.1; }
.brand img { height: 62px; width: auto; flex: none; }
/* First screen: the logo, the order button, the specials. In that order. */
.hero:not(.hero--short) .hero__top { justify-content: flex-end; }
.brand--big { justify-content: center; margin-bottom: 18px; }
.brand--big img { height: clamp(150px, 46vw, 200px); }
.brand small { display: block; font-weight: 400; font-size: .8125rem; color: var(--on-ink-2); }
.hero__tel { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--yolk); padding: 10px 0 2px; white-space: nowrap; }

.hero__body { padding: 4px var(--gut) 0; }
.hero--short .hero__body { padding-top: 22px; }
.hero--short h1 { font-size: clamp(3.4rem, 17vw, 8.5rem); line-height: .84; max-width: none; }

.status { font-weight: 700; color: var(--green-lit); margin: 0 0 4px; display: flex; align-items: center; gap: 9px; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; box-shadow: 0 0 0 0 currentColor; animation: pulse 2.4s ease-out infinite; }
[data-open="closed"] .status { color: var(--red-lit); }
[data-open="closed"] .status::before { animation: none; }
.status[hidden] { display: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(123, 217, 164, .55); } 70%, 100% { box-shadow: 0 0 0 12px rgba(123, 217, 164, 0); } }

/* The order button. The loudest thing on the first screen. */
.cta {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--yolk); color: var(--ink); text-decoration: none;
  padding: 16px 18px 16px; border-radius: 8px;
  box-shadow: 0 8px 0 #000;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.cta b { font-size: clamp(4.25rem, 23vw, 7.5rem); line-height: .82; display: block; }
.cta > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 1.125rem; font-weight: 700; }
.cta [data-bar-note] { display: flex; align-items: center; gap: 9px; }
.cta [data-bar-note]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; animation: pulse-ink 2.4s ease-out infinite; }
[data-open="closed"] .cta [data-bar-note]::before { background: var(--red); animation: none; }
[data-open="unknown"] .cta [data-bar-note]::before, html:not([data-open]) .cta [data-bar-note]::before { display: none; }
@keyframes pulse-ink { 0% { box-shadow: 0 0 0 0 rgba(46, 107, 79, .6); } 70%, 100% { box-shadow: 0 0 0 11px rgba(46, 107, 79, 0); } }
.cta i { font-style: normal; font-size: 1.9rem; line-height: 1; transition: transform .2s var(--ease); }
.cta:hover { transform: translateY(-3px); box-shadow: 0 11px 0 #000; }
.cta:hover i { transform: translateX(6px); }
.cta:active { transform: translateY(6px); box-shadow: 0 2px 0 #000; background: var(--yolk-press); }
.cta:focus-visible { outline-color: #fff; }

/* =================================================================== specials */
/* The chalkboard. Yolk names what you can order; white describes it. */
.specials { padding: 34px var(--gut) 0; scroll-margin-top: 12px; }
.specials .shout { color: var(--yolk); margin-bottom: 4px; font-size: clamp(3rem, 15vw, 5rem); }
.specials__when { font-size: .9375rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--on-ink-2); margin-bottom: 10px; }
.specials__dates { color: #fff; margin-left: 6px; }
.board { list-style: none; margin: 18px 0 0; padding: 0; }
.board li { padding: 22px 0 20px; border-top: 2px dashed rgba(255, 255, 255, .22); }
.board li:last-child { border-bottom: 2px dashed rgba(255, 255, 255, .22); }
.board__top { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; }
.board h3, .board__price {
  font-family: var(--display); font-weight: 800; font-stretch: 75%; text-transform: uppercase;
  font-size: clamp(1.9rem, 8.6vw, 3rem); line-height: .92; letter-spacing: -0.01em;
}
.board h3 { text-wrap: balance; }
.board__price { color: var(--yolk); flex: none; }
.board p { color: var(--on-ink-2); font-size: 1.125rem; line-height: 1.4; max-width: 46ch; margin: 10px 0 0; }
.board__sizes { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.board .board__sizes span { display: inline-flex; align-items: center; gap: 9px; color: var(--yolk); font-weight: 700; font-size: 1.375rem; font-variant-numeric: tabular-nums; }
.board__sizes b { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; color: #fff; font-size: .9375rem; }

/* ======================================================================= food */
main { background: var(--paper); }
.food { padding: 56px 0 40px; }
.reel {
  list-style: none; margin: 12px 0 0; padding: 14px var(--gut) 22px; display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.reel::-webkit-scrollbar { display: none; }
.reel li {
  flex: none; width: 72vw; max-width: 420px; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  scroll-snap-align: center; background: var(--paper-2);
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 8px var(--ink);
  transition: transform .5s var(--ease);
}
.reel li:nth-child(odd) { transform: rotate(-4deg); }
.reel li:nth-child(even) { transform: rotate(5deg) translateY(10px); }
.reel li:hover { transform: rotate(0) scale(1.03); }
.reel img { width: 100%; height: 100%; object-fit: cover; }


/* ======================================================================= menu */
.menu { background: var(--paper-2); padding: 56px 0 48px; scroll-margin-top: 0; }
.find { position: sticky; top: 0; z-index: 5; background: var(--paper-2); padding: 10px 0 8px; margin-bottom: 6px; }
.find[hidden] { display: none; }
.find input {
  width: 100%; font: inherit; font-size: 1.25rem; font-weight: 600; color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; padding: 14px 16px; min-height: 58px;
  box-shadow: 0 5px 0 var(--ink);
}
.find input:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 5px 0 var(--yolk); }
.find__count { font-size: .9375rem; color: var(--ink-2); margin: 12px 2px 0; min-height: 1.4em; }

.sect { border-bottom: 2px solid var(--ink); scroll-margin-top: 90px; }
.sect:first-child { border-top: 2px solid var(--ink); }
.sect > summary {
  list-style: none; cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 16px 2px 14px;
}
.sect > summary::-webkit-details-marker { display: none; }
.sect__name { font-family: var(--display); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: clamp(1.75rem, 8vw, 2.75rem); line-height: .92; }
.sect__n { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); display: flex; align-items: center; gap: 12px; flex: none; }
.sect__n::after { content: "+"; font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: .6; color: var(--ink); transition: transform .25s var(--ease); }
.sect[open] .sect__n::after { transform: rotate(45deg); }
.sect > summary:hover .sect__name { text-decoration: underline; text-decoration-color: var(--yolk); text-decoration-thickness: 5px; text-underline-offset: 5px; }
.sect[hidden] { display: none; }

.dishes { list-style: none; margin: 0; padding: 0 2px 14px; }
.dishes li { padding: 12px 0; border-top: 1px solid var(--line); }
.dishes li[hidden] { display: none; }
.dish__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.dishes h3 { font-size: 1.125rem; font-weight: 700; }
.dish__price { font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.dishes p { margin: 4px 0 0; color: var(--ink-2); font-size: 1rem; max-width: 62ch; }
mark { background: var(--yolk); color: inherit; padding: 0 2px; border-radius: 2px; }

/* =================================================================== catering */
.cater { background: var(--ink); color: #fff; padding: 60px 0 64px; overflow: hidden; }
.cater a { color: var(--yolk); }
.cater__grid { display: grid; gap: 28px; }

.check {
  background: var(--check-paper); color: var(--check-ink);
  border-top: 8px solid var(--green); padding: 18px 18px 20px; max-width: 540px;
  transform: rotate(-1.6deg); transform-origin: 50% 0;
  box-shadow: 10px 12px 0 #000;
  transition: transform .35s var(--ease);
}
.check:focus-within, .check:hover { transform: rotate(0); }
.check__top { display: flex; justify-content: space-between; align-items: baseline; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.check__no { color: var(--red); font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 1.375rem; letter-spacing: 0; }
.check__row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  min-height: 54px; padding: 8px 0 6px; border-bottom: 1px solid var(--check-rule);
}
.check__row span { flex: none; font-size: 1rem; padding-bottom: 3px; }
.check__row input, .check__row select, .check__row textarea {
  font: inherit; font-weight: 700; color: var(--check-ink); background: transparent;
  border: 0; border-radius: 0; padding: 4px 0; text-align: right; width: 100%; min-width: 0; min-height: 36px;
}
.check__row select { text-align-last: right; }
.check__row ::placeholder { color: var(--check-ink); opacity: .45; font-weight: 400; }
.check__row--tall { flex-direction: column; align-items: stretch; }
.check__row--tall textarea { text-align: left; resize: vertical; }
.check__row:focus-within { border-bottom: 2px solid var(--check-ink); padding-bottom: 5px; }
.check__row input:focus-visible, .check__row select:focus-visible, .check__row textarea:focus-visible { outline: none; }
.check__row:has(:user-invalid) { border-bottom: 2px solid var(--red); }
.check__go { width: 100%; margin-top: 18px; }
.check__msg { color: var(--red); font-weight: 700; margin: 14px 0 0; min-height: 0; }
.check__msg:empty { display: none; }
.check__row.is-bad, .check__days.is-bad { border-bottom: 2px solid var(--red); }
.check__done { font-family: var(--display); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: 2.25rem; line-height: .95; margin: 0; padding: 26px 0; }
.check__days { border: 0; border-bottom: 1px solid var(--check-rule); margin: 0; padding: 12px 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.check__days legend { padding: 0; margin-bottom: 8px; font-size: 1rem; float: left; width: 100%; }
.check__days label { position: relative; }
.check__days input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.check__days span { display: grid; place-items: center; min-width: 50px; min-height: 46px; padding: 0 8px; border: 2px solid var(--check-ink); border-radius: 8px; font-weight: 700; }
.check__days input:checked + span { background: var(--check-ink); color: #fff; }
.check__days input:focus-visible + span { outline: 3px solid var(--yolk); outline-offset: 2px; }
/* The application: the same check on white paper, tilted the other way. */
.check--plain { background: var(--paper); border-top-color: var(--ink); transform: rotate(1.4deg); box-shadow: 10px 12px 0 var(--ink); border-inline: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.js .check--plain[data-reveal].is-in { transform: rotate(1.4deg); }
.js .check--plain[data-reveal].is-in:focus-within, .js .check--plain[data-reveal].is-in:hover { transform: rotate(0); }

/* ======================================================================= jobs */
.jobs { background: var(--paper-2); padding: 60px 0 68px; overflow: hidden; border-top: 2px solid var(--ink); }
.hp { position: absolute; left: -9999px; }

.btn {
  display: inline-block; font: inherit; font-weight: 700; font-size: 1.0625rem; text-decoration: none; text-align: center;
  padding: 15px 22px; border-radius: 8px; border: 2px solid var(--ink); min-height: 54px; cursor: pointer;
  background: var(--ink); color: #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .35);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 rgba(0, 0, 0, .35); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.hero--short .btn { background: var(--yolk); color: var(--ink); border-color: var(--yolk); }

/* ==================================================================== find us */
.find-us { padding: 60px 0 56px; }
.find-us__grid { display: grid; gap: 28px; }
.addr { font-family: var(--display); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: clamp(1.9rem, 8.6vw, 3rem); line-height: .95; margin-bottom: 14px; }
.tel { font-size: 1.5rem; font-weight: 700; text-decoration: none; border-bottom: 3px solid var(--yolk); }
.hours { border-collapse: collapse; width: 100%; max-width: 460px; margin-top: 24px; font-variant-numeric: tabular-nums; font-size: 1.125rem; }
.hours th, .hours td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; font-weight: 700; }
.hours tr.is-today th, .hours tr.is-today td { background: var(--ink); color: #fff; font-weight: 700; border-bottom-color: var(--ink); }
.hours tr.is-today th::after { content: "today"; margin-left: 10px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--yolk); }
.map { border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; box-shadow: 8px 8px 0 var(--ink); }
.map iframe { width: 100%; height: 360px; border: 0; }

/* ===================================================================== footer */
.foot { background: var(--ink); color: var(--on-ink-2); padding: 48px var(--gut) 40px; display: grid; gap: 22px; justify-items: start; }
.foot__logo { height: 170px; width: auto; }
.foot p { margin: 0 0 6px; }
.foot__name { color: #fff; font-weight: 700; font-size: 1.25rem; }
.foot__links { margin-top: 10px !important; }
.foot a { color: #fff; }

/* =================================================================== order bar */
.order {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 72px; padding: 10px var(--gut) calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--yolk); color: var(--ink); text-decoration: none;
  border-top: 2px solid var(--ink);
  transition: transform .25s var(--ease);
}
.order b { font-size: clamp(1.6rem, 8vw, 2.25rem); line-height: 1; white-space: nowrap; }
.order span { font-size: .9375rem; font-weight: 700; text-align: right; line-height: 1.2; max-width: 11em; }
.order:active { background: var(--yolk-press); }
.order:focus-visible { outline-color: var(--ink); outline-offset: -6px; }
/* The big button up top is on screen: step aside. */
[data-cta="in"] .order { transform: translateY(110%); }

/* ===================================================================== motion */
/* Only when the script is running, so nothing is ever hidden without it. */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .35s var(--ease), transform .45s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .reel li[data-reveal] { transform: translateY(40px) rotate(0) scale(.9); }
.js .reel li[data-reveal].is-in:nth-child(odd) { transform: rotate(-4deg); }
.js .reel li[data-reveal].is-in:nth-child(even) { transform: rotate(5deg) translateY(10px); }
.js .check[data-reveal] { transform: translateY(60px) rotate(-6deg); }
.js .check[data-reveal].is-in { transform: rotate(-1.6deg); }
.js .check[data-reveal].is-in:focus-within, .js .check[data-reveal].is-in:hover { transform: rotate(0); }

/* First screen entrance. */
.js .hero__body > *, .js .hero .specials { animation: rise .7s var(--ease) both; }
.js .hero__body > .cta { animation-delay: .08s; }
.js .hero .specials { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ================================================================ wide screens */
@media (min-width: 900px) {
  :root { --gut: 40px; }
  body { padding-bottom: 0; }
  .hero { padding-bottom: 84px; }
  .hero__top { max-width: var(--wrap); width: 100%; margin-inline: auto; padding-top: 22px; }
  .hero__grid { max-width: var(--wrap); margin-inline: auto; padding: 8px var(--gut) 0; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr); column-gap: 72px; align-items: start; }
  .hero__body { padding: 0; position: sticky; top: 28px; }
  .brand--big { justify-content: flex-start; margin-bottom: 26px; }
  .brand--big img { height: 230px; }
  .cta { padding: 22px 26px 22px; box-shadow: 0 10px 0 #000; }
  .cta b { font-size: clamp(5rem, 8.6vw, 7.75rem); }
  .hero .specials { padding: 14px 0 0; }
  .hero .specials .shout { font-size: clamp(3.5rem, 5.6vw, 5rem); }
  .board h3, .board__price { font-size: clamp(1.6rem, 2.3vw, 2.1rem); }
  .board li { padding: 16px 0 14px; }
  .board p { font-size: 1.0625rem; margin-top: 6px; }

  .food { padding: 96px 0 72px; }
  .food > .wrap { display: grid; grid-template-columns: 1.2fr 1fr; align-items: end; column-gap: 64px; }
  .food .shout { margin-bottom: 0; }
  .food .big { margin-bottom: 10px; max-width: 26ch; justify-self: end; }
  .reel { max-width: var(--wrap); margin-inline: auto; justify-content: space-between; gap: 0; padding: 44px var(--gut) 36px; overflow: visible; }
  .reel li { width: 18.5%; max-width: none; }
  .menu { padding: 96px 0 80px; }
  .sections { columns: 2; column-gap: 56px; }
  .sect { break-inside: avoid; }
  .sect:first-child { border-top: 0; }
  .cater { padding: 104px 0 110px; }
  .cater__grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
  .find-us { padding: 100px 0 96px; }
  .jobs { padding: 104px 0 112px; }
  .find-us__grid { grid-template-columns: 1fr 1.1fr; align-items: start; gap: 64px; }
  .map iframe { height: 520px; }
  .foot { grid-template-columns: auto 1fr; align-items: center; gap: 40px; padding: 64px max(var(--gut), calc((100vw - var(--wrap)) / 2 + var(--gut))) 56px; }

  /* On a desk the bar becomes a button in the corner. */
  .order { left: auto; right: 24px; bottom: 24px; min-height: 0; padding: 14px 20px; border: 2px solid var(--ink); border-radius: 8px; gap: 18px; box-shadow: 0 6px 0 var(--ink); }
  .order b { font-size: 1.9rem; }
  [data-cta="in"] .order { transform: translateY(200%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
