/* Design A: Storefront. Every new business is a shopfront under an awning in its category's colour. */
:root {
  --ink: #14213d;
  --muted: #56607a;
  --paper: #f6f8fb;
  --card: #ffffff;
  --line: #dfe4ec;
  --focus: #2747d8;
  --c: #4a5565;
  --font: "Bricolage Grotesque", system-ui, sans-serif;
}
.g-restaurants-food { --c: #e0442c; }
.g-shops-retail { --c: #2747d8; }
.g-personal-care-wellness { --c: #d6336c; }
.g-contractors-trades { --c: #f2a000; }
.g-professional-services { --c: #0e8c95; }
.g-auto-repair { --c: #4a5565; }
.g-recreation-schools-events { --c: #6c3fb5; }
.g-industrial-wholesale-delivery { --c: #2e7d4f; }
.g-other { --c: #8a6d3b; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 var(--font);
  font-optical-sizing: auto;
}
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--focus); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header: a shop sign with an awning of every category colour under it */
.top { background: var(--card); position: relative; }
.top::after {
  content: "";
  display: block;
  height: 14px;
  background: linear-gradient(90deg, #e0442c 0 11.1%, #2747d8 0 22.2%, #d6336c 0 33.3%, #f2a000 0 44.4%,
    #0e8c95 0 55.5%, #4a5565 0 66.6%, #6c3fb5 0 77.7%, #2e7d4f 0 88.8%, #8a6d3b 0);
  -webkit-mask: radial-gradient(circle at 50% 0, #000 7px, transparent 7.5px) 0 0 / 14px 14px repeat-x,
    linear-gradient(#000 0 0) 0 0 / 100% 7px no-repeat;
          mask: radial-gradient(circle at 50% 0, #000 7px, transparent 7.5px) 0 0 / 14px 14px repeat-x,
    linear-gradient(#000 0 0) 0 0 / 100% 7px no-repeat;
}
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; text-decoration: none; }
.brand img { display: block; width: 38px; height: 38px; }
.brand span { color: #e0442c; margin-left: -0.25em; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { padding: 6px 12px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.nav a:hover { background: var(--paper); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }

/* Hero */
.hero { padding: 48px 0 20px; max-width: 46rem; }
.range { margin: 0 0 8px; font-weight: 600; color: var(--muted); }
.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 96;
}
.hero h1 .count { display: block; font-size: 1.9em; line-height: 0.95; }
.lead { margin: 16px 0 0; font-size: 1.15rem; color: var(--muted); max-width: 38rem; }
.lead .count { font-weight: 800; color: var(--ink); }

/* Category chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 14px;
  background: var(--card);
  border: 2px solid var(--c);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}
.chip .n { background: var(--c); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 0.85rem; }
.chip:hover, .chip[aria-current="true"] { background: var(--c); color: #fff; }
.chip:hover .n, .chip[aria-current="true"] .n { background: #fff; color: var(--c); }

/* The bar sticks to the top once scrolled past (site.js adds .is-stuck), with a full-width backdrop */
.chips {
  position: sticky; top: 0; z-index: 10;
  padding: 10px 0;
  background: var(--paper);
  box-shadow: 0 0 0 100vmax var(--paper);
  clip-path: inset(0 -100vmax -12px);
}
.chips.is-stuck {
  background: var(--card);
  box-shadow: 0 0 0 100vmax var(--card), 0 8px 12px -10px rgba(20, 33, 61, 0.45);
  animation: bar-drop 320ms cubic-bezier(.2, .8, .2, 1) both;
}
.group h2 { scroll-margin-top: calc(var(--chips-h, 110px) + 16px); }
/* Chips drop in like awnings unrolling: on page load, and again each time the bar comes back */
.chips.enter .chip {
  transform-origin: 50% 0;
  animation: chip-drop 520ms cubic-bezier(.2, .9, .3, 1.25) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes chip-drop {
  from { opacity: 0; transform: perspective(300px) rotateX(-80deg) translateY(-8px); }
  to { opacity: 1; transform: none; }
}
@keyframes bar-drop {
  from { transform: translateY(-100%); }
  to { transform: none; }
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chips.is-stuck, .chips.enter .chip { animation: none; }
}

/* Category sections */
.group { margin-top: 44px; }
.group h2, .more h2 {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 16px;
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em;
}
.group h2 .n { font-size: 1rem; font-weight: 600; color: var(--muted); }
.list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

/* A listing: shopfront card with a scalloped, striped awning */
.biz {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 44px 16px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px 6px 10px 10px;
}
.biz::before {
  content: "";
  position: absolute; left: -1px; right: -1px; top: -1px;
  height: 30px;
  background: repeating-linear-gradient(90deg, var(--c) 0 20px, color-mix(in srgb, var(--c) 18%, #fff) 20px 40px);
  border-radius: 6px 6px 0 0;
  -webkit-mask: radial-gradient(circle at 50% 0, #000 10px, transparent 10.5px) 0 19px / 20px 11px repeat-x,
    linear-gradient(#000 0 0) 0 0 / 100% 19px no-repeat;
          mask: radial-gradient(circle at 50% 0, #000 10px, transparent 10.5px) 0 19px / 20px 11px repeat-x,
    linear-gradient(#000 0 0) 0 0 / 100% 19px no-repeat;
}
.name { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.tags { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 0.8rem; padding: 2px 8px; border-radius: 4px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--ink); }
.where { margin: 0; font-size: 0.92rem; color: var(--muted); display: flex; flex-direction: column; }
.where .addr { color: var(--ink); font-weight: 600; }
.date {
  align-self: start;
  display: flex; flex-direction: column; align-items: center;
  min-width: 52px; padding: 4px 6px;
  border: 2px solid var(--ink); border-radius: 6px;
  line-height: 1.1;
}
.date .mon { font-size: 0.75rem; font-weight: 600; }
.date .day { font-size: 1.5rem; font-weight: 800; }

/* Index pages and footer */
.index, .weeks { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.index li, .weeks li { background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--c, var(--ink)); border-radius: 6px; padding: 12px 14px; display: flex; justify-content: space-between; gap: 8px; }
.index a, .weeks a { font-weight: 700; }
.index small, .weeks .n { color: var(--muted); }
.more { margin-top: 56px; }
.empty { font-size: 1.1rem; }
main > h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.03em; margin: 40px 0 12px; }
main > h2 { margin-top: 32px; }
main > p, .plain { max-width: 42rem; }
.foot { margin-top: 72px; padding: 28px 0 40px; background: var(--ink); color: #c9d1e3; font-size: 0.92rem; }
.foot a { color: #fff; }
.foot p { max-width: 48rem; }
.foot-links { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-browse { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); padding-bottom: 24px; margin-bottom: 20px; border-bottom: 1px solid #2c3a5c; }
.foot-browse h2 { margin: 0 0 10px; font-size: 1rem; font-weight: 800; color: #fff; }
.foot-browse ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }

@media (max-width: 640px) {
  /* one swipeable row of chips instead of four wrapped rows */
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}
@media (max-width: 560px) {
  .top .wrap { justify-content: flex-start; }
  .hero { padding-top: 32px; }
}
