/* The café's own colours and the name's length arrive in an inline :root block written by build.py. */
:root {
  --ground: #EFEEEA;
  --ink: #1B2A20;
  --ink-soft: #46524A;
  --accent: #E8B10F;
  --accent-ink: #1B2A20;
  --green: #1F7A45;
  --card-1: #FFFFFF; --card-2: #FFFFFF; --card-3: #FFFFFF; --card-4: #FFFFFF;
  --paper: #FFFFFF;
  --xl-vw: 9.4vw;
  --xl-phone: 76px;
  --white: #FFFFFF;

  --font-display: "Yeseva One", Georgia, serif;
  --font-text: "Jost", "Futura", system-ui, sans-serif;

  /* five sizes: display, heading, lead, body, small */
  --fs-xl: clamp(64px, var(--xl-vw), 150px);
  --fs-l: clamp(42px, 4vw, 58px);
  --fs-m: 22px;
  --fs-b: 18px;
  --fs-s: 15px;

  --margin: clamp(16px, 4vw, 56px);
  --radius: 28px;
  --pop: 5px 5px 0 var(--ink);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--fs-b);
  line-height: 1.5;
  font-weight: 400;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, h1, h2, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

h1, h2, .foot-name { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; line-height: .98; }
h1 em, h2 em, .foot-name em, .wordmark em {
  font-family: var(--font-text); font-style: italic; font-weight: 300; letter-spacing: -0.03em;
}

/* banner + bar */
.banner {
  position: relative; z-index: 5;
  background: var(--ink); color: var(--ground);
  font-size: var(--fs-s); line-height: 1.4; text-align: center;
  padding: 9px var(--margin);
}
.bar {
  position: absolute; z-index: 4; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--margin);
}
.wordmark { font-family: var(--font-display); font-size: var(--fs-m); text-decoration: none; letter-spacing: -0.01em; }
.links { display: flex; gap: 32px; }
.links a, .bar-call { text-decoration: none; }
.links a { position: relative; }
.links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.links a:hover::after { transform: scaleX(1); }
.bar-call {
  font-weight: 500; padding: 8px 18px; border-radius: 999px;
  background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.bar-call:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }

/* the 3D scene sits behind everything */
.scene {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0;
  display: block; pointer-events: none;
  opacity: 0; transition: opacity .8s ease;
}
.scene.is-ready { opacity: 1; }

/* a still render of the shopfront stands in until the scene is up, and for good without WebGL */
.poster { position: fixed; inset: 0; z-index: 0; pointer-events: none; transition: opacity .8s ease; }
.poster img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.has-scene .poster { opacity: 0; }
/* ?poster: only the scene, for capturing that render */
.poster-mode .banner, .poster-mode .bar, .poster-mode main, .poster-mode .foot, .poster-mode picture.poster { visibility: hidden; }

main, .foot { position: relative; z-index: 2; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  min-height: 54px; padding: 12px 26px; border-radius: 999px;
  font-size: var(--fs-b); font-weight: 500; text-decoration: none; white-space: nowrap;
  border: 2px solid var(--ink); box-shadow: var(--pop);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn-call { background: var(--accent); color: var(--accent-ink); }
.btn-soft { background: var(--paper); }

/* hero: the name and the call on top, the shopfront below them */
.stop { position: relative; }
.hero { min-height: 100svh; padding: 118px var(--margin) 0; }
.hero-copy {
  display: grid; grid-template-columns: 1fr minmax(420px, 520px); column-gap: 48px; align-items: end;
}
.hero h1 { font-size: var(--fs-xl); line-height: .9; margin-bottom: -.06em; }
.hero h1 em { font-size: .9em; }
.lede { font-size: var(--fs-m); line-height: 1.4; }
.actions { display: flex; gap: 12px; margin-top: 22px; }
.open-pill {
  margin-top: 16px; font-weight: 500; text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
}
.open-pill::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-soft); }
.open-pill.is-open::before { background: var(--green); box-shadow: 0 0 0 4px rgba(31, 122, 69, .2); }

.rating-sticker {
  position: absolute; left: calc(var(--margin) + 1vw); top: max(440px, 50vh);
  display: grid; justify-items: center; padding: 14px 18px 12px; width: 168px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; box-shadow: var(--pop);
  text-decoration: none; text-align: center; line-height: 1.1; transform: rotate(-7deg);
  transition: transform .3s var(--ease);
}
.rating-sticker:hover { transform: rotate(-3deg) scale(1.04); }
.rating-sticker .stars { width: 110px; height: 20px; }
.rating-sticker strong { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-l); line-height: 1.05; margin-top: 4px; }
.rating-sticker span { font-size: var(--fs-s); }

/* stop sections: a card on one side, the room on the other */
.stop:not(.hero) {
  min-height: 100svh; padding: 10vh var(--margin);
  display: flex; align-items: center;
}
.stop[data-side="right"] { justify-content: flex-end; }
.card {
  position: relative; width: min(580px, 42vw);
  padding: 40px 40px 36px; border-radius: var(--radius);
  background: var(--paper); border: 2px solid var(--ink); box-shadow: 7px 7px 0 var(--ink);
}
.card--1 { background: var(--card-1); }
.card--2 { background: var(--card-2); }
.card--3 { background: var(--card-3); }
.card--4 { background: var(--card-4); }
.card--wide { width: min(660px, 48vw); }
.card h2 { font-size: var(--fs-l); }
.card h2 + p, .card-head p { margin-top: 16px; }
.card-head { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; }

.sticker {
  width: 136px; padding: 8px 8px 10px; background: var(--white);
  border: 2px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(5deg); transition: transform .3s var(--ease);
}
.sticker--l { transform: rotate(-5deg); }
.sticker:hover { transform: rotate(0deg) scale(1.05); }
.sticker img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 9px; }
.sticker figcaption { margin-top: 6px; font-size: var(--fs-s); line-height: 1.2; text-align: center; }

/* menu rows: buttons when they open a sandwich in the room, plain rows otherwise */
.menu { margin-top: 24px; display: grid; gap: 6px; }
.m-row {
  width: 100%; display: grid; gap: 0; text-align: left;
  padding: 10px 16px; border-radius: 16px; border: 2px solid transparent; background: transparent;
  transition: background-color .25s, border-color .25s, transform .25s var(--ease);
}
button.m-row { cursor: pointer; }
button.m-row:hover { background: rgba(255, 255, 255, .55); }
.m-row[aria-pressed="true"] { background: var(--paper); border-color: var(--ink); transform: translateX(6px); }
.m-name { font-size: var(--fs-m); font-weight: 500; line-height: 1.3; }
.m-name b { font-weight: 500; white-space: nowrap; margin-left: .35em; }

/* drinks */
.drinks { margin-top: 24px; display: grid; gap: 12px; }
.drinks li { display: grid; padding: 14px 18px; border-radius: 18px; background: rgba(255, 255, 255, .7); }
.d-name { font-size: var(--fs-m); font-weight: 500; }

/* a short quote under a card's text */
.aside { margin-top: 22px; font-size: var(--fs-m); font-style: italic; font-weight: 300; }
.aside span { display: block; margin-top: 4px; font-size: var(--fs-s); font-style: normal; font-weight: 400; }

/* reviews */
.quotes { margin-top: 24px; display: grid; gap: 14px; }
.quote {
  padding: 16px 20px 14px; background: var(--paper); border: 2px solid var(--ink); border-radius: 18px;
  box-shadow: 4px 4px 0 var(--ink); transform: rotate(-1deg); transition: transform .3s var(--ease);
}
.quote:nth-child(2) { transform: rotate(1.2deg); }
.quote:nth-child(3) { transform: rotate(-.6deg); }
.quote:hover { transform: rotate(0) translateY(-2px); }
.quote p { line-height: 1.45; }
.quote footer { margin-top: 6px; font-weight: 500; }

/* visit */
.status { font-size: var(--fs-m); font-weight: 500; }
.visit { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.hours { display: grid; gap: 2px; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 10px; border-radius: 10px; }
.hours li span:last-child { white-space: nowrap; }
.hours li.is-today { background: var(--paper); font-weight: 500; }
.where { display: grid; gap: 14px; justify-items: start; }
.addr { font-size: var(--fs-m); font-weight: 500; line-height: 1.3; }
.maplink { font-weight: 500; text-underline-offset: 4px; }

/* footer */
.foot {
  padding: 64px var(--margin) 40px; background: var(--ink); color: var(--ground);
  border-radius: 40px 40px 0 0;
}
.foot-name { font-size: var(--fs-xl); line-height: .9; }
.foot-nav { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: var(--fs-m); }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.foot-row { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: var(--fs-s); }
.foot-row p { max-width: 64ch; }
.foot a { text-underline-offset: 3px; }

/* entrances (only with script and motion) */
@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .js .rise.in { opacity: 1; transform: none; }
  .js .sticker.rise.in { transform: rotate(5deg); }
  .js .sticker--l.rise.in { transform: rotate(-5deg); }
  .js .quote.rise.in { transform: rotate(-1deg); }
  .js .quote.rise.in:nth-child(2) { transform: rotate(1.2deg); }
  .js .quote.rise.in:nth-child(3) { transform: rotate(-.6deg); }
  .js .sticker.rise.in:hover, .js .quote.rise.in:hover { transform: rotate(0) scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene { transition: none; }
}

/* tablet */
@media (max-width: 1080px) {
  .links { display: none; }
  .hero-copy { grid-template-columns: 1fr; row-gap: 22px; }
  .card, .card--wide { width: min(600px, 64vw); }
  .visit { grid-template-columns: 1fr; gap: 22px; }
}

/* phone: the room owns the top of each stop, the card the bottom */
@media (max-width: 720px) {
  :root { --fs-xl: clamp(64px, 21vw, 92px); --fs-l: 42px; --fs-m: 19px; --fs-b: 17px; --fs-s: 14px; }
  .banner { padding: 8px 16px; }
  .bar { padding: 14px var(--margin); }
  .bar-call { padding: 6px 14px; }
  .hero { padding-top: 90px; text-align: center; }
  .hero h1, .foot-name { font-size: var(--xl-phone); }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero h1 span, .hero h1 em { display: block; }
  .hero h1 { margin-bottom: 0; }
  .lede { margin-top: 14px; max-width: 32ch; margin-inline: auto; }
  .actions { margin-top: 18px; justify-content: center; }
  .btn-soft { display: none; }
  .open-pill { margin-top: 12px; }
  .rating-sticker { top: auto; bottom: 7svh; left: auto; right: 14px; width: 112px; padding: 9px 10px 8px; transform: rotate(7deg); }
  .rating-sticker .stars { width: 80px; height: 15px; }

  .stop:not(.hero) { min-height: 0; padding: 58svh var(--margin) 22svh; display: block; }
  .card, .card--wide { width: 100%; padding: 26px 22px 24px; border-radius: 24px; box-shadow: 5px 5px 0 var(--ink); }
  .card-head { display: block; }
  .card-head .sticker { position: absolute; top: -158px; right: 14px; width: 136px; padding: 6px; border-radius: 13px; }
  .card-head .sticker figcaption { display: none; }
  .m-row { padding: 9px 12px; }
  .visit { grid-template-columns: 1fr; gap: 22px; }
  .foot { border-radius: 28px 28px 0 0; padding-bottom: 40px; text-align: center; }
  .foot-row { justify-content: center; }
  .foot-nav { justify-content: center; gap: 8px 20px; }
}

/* lead patch (better-specialty-coffee): at tablet widths the rating sticker covers the first letter of the awning name; move it to the right */
@media (min-width: 700px) and (max-width: 900px) {
  .rating-sticker { left: auto; right: calc(var(--margin) + 1vw); top: calc(max(440px, 50vh) + 120px); transform: rotate(7deg); }
}
