/* Pizza Crawls: the hub (/pizza-crawls/) and each crawl page.
   Built by tools/build-crawl-pages.js. Header and footer styles live in
   style.css and are not touched here. */

.cw-wrap {
  --cw-green: #1F4B33;
  --cw-green-dark: #173a27;
  --cw-red: #DC2225;
  --cw-cream: #FDF4E7;
  --cw-ink: #241A10;
  --cw-muted: rgba(36, 26, 16, 0.68);
  --cw-line: rgba(36, 26, 16, 0.12);
  --pz-accent: #DC2225;

  max-width: var(--page-max);
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 18px) 24px 64px;
  color: var(--cw-ink);
}

.cw-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- heading */
.cw-head { margin: 0 0 28px; }
.cw-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--cw-red);
  margin: 0 0 8px;
}
.cw-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--cw-green);
  margin: 0 0 14px;
}
.cw-intro {
  font-size: 1.06rem; line-height: 1.6;
  max-width: 62ch;
  margin: 0;
}

/* ---------------------------------------------------------------- stats */
.cw-stats {
  display: flex; flex-wrap: wrap; gap: 4px 20px;
  margin: 0;
  font-size: 0.9rem; font-weight: 600;
  color: var(--cw-muted);
}
.cw-stats b { color: var(--cw-red); font-weight: 700; font-size: 1.12rem; margin-right: 3px; }

/* --------------------------------------------------------------- button */
.cw-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 10px 18px;
  border-radius: 8px;
  background: var(--cw-green); color: #fff;
  font-weight: 700; font-size: 0.95rem;
  text-decoration: none; text-align: center;
  transition: background-color 0.15s;
}
.cw-btn:hover { background: var(--cw-green-dark); }
.cw-btn:focus-visible { outline: 3px solid var(--cw-red); outline-offset: 2px; }

/* ================================================================== HUB */
.cw-cards {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.cw-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--cw-line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(36, 26, 16, 0.04), 0 8px 24px rgba(36, 26, 16, 0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}
.cw-card:hover { box-shadow: 0 1px 2px rgba(36, 26, 16, 0.05), 0 12px 32px rgba(36, 26, 16, 0.1); }
.cw-card-map { display: block; border-bottom: 1px solid var(--cw-line); }
.cw-preview { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.cw-preview--img { aspect-ratio: 554 / 316; object-fit: cover; }
.cw-preview-bg { fill: #F4EAD9; }
.cw-preview-grid path { stroke: rgba(36, 26, 16, 0.06); stroke-width: 1; }
.cw-preview-halo { fill: none; stroke: #fff; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }
.cw-preview-line { fill: none; stroke: #DC2225; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.cw-preview-stops circle { fill: #DC2225; stroke: #fff; stroke-width: 2.5; }
.cw-preview-stops text {
  fill: #fff; font-family: Inter, sans-serif; font-size: 11px; font-weight: 700;
  text-anchor: middle; dominant-baseline: middle;
}

.cw-card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.cw-borough {
  font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--cw-red);
  margin: 0 0 6px;
}
.cw-card-title {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.45rem; line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--cw-green);
  margin: 0 0 10px;
}
.cw-card-desc {
  flex: 1;
  font-size: 0.95rem; line-height: 1.55;
  color: var(--cw-muted);
  margin: 0 0 18px;
}
.cw-card .cw-stats {
  padding: 12px 0;
  border-top: 1px solid var(--cw-line);
  border-bottom: 1px solid var(--cw-line);
  margin: 0 0 18px;
}

.cw-soon {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 6px 24px;
  margin: 28px 0 0;
  padding: 18px 24px;
  background: var(--cw-cream);
  border-radius: 12px;
}
.cw-soon-title {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.15rem;
  color: var(--cw-green);
  margin: 0;
}
.cw-soon-list { margin: 0; font-size: 0.92rem; color: var(--cw-muted); }

@media (max-width: 900px) {
  .cw-cards { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; gap: 20px; }
  .cw-soon { max-width: 560px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 480px) {
  .cw-wrap { padding-left: 16px; padding-right: 16px; }
  .cw-card-body { padding: 18px 18px 20px; }
  .cw-soon { flex-direction: column; align-items: flex-start; padding: 16px 18px; }
}

/* ============================================================ ONE CRAWL */
.cw-crawl-head .cw-intro { font-size: 1rem; }
.cw-crawl-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px;
  margin: 20px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--cw-line);
}
.cw-crawl-bar .cw-btn { padding-left: 22px; padding-right: 22px; }

.cw-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.cw-map-col { position: sticky; top: calc(var(--topbar-h) + 16px); }

.cw-map {
  width: 100%;
  /* Tall on purpose: the Brooklyn routes run north-south, so height is what
     buys zoom when fitBounds sizes it. Short maps pile stops a block apart
     on top of each other. */
  height: 600px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--cw-line);
  background: #F4EAD9;
}
.cw-map .maplibregl-map { width: 100%; height: 100%; }
.cw-map .maplibregl-ctrl-attrib { font-size: 9px; }
.cw-pin { position: relative; width: 0; height: 0; }
.cw-marker {
  position: absolute; top: 0; left: 0;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: #DC2225; color: #fff;
  border: 2px solid #fff;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
}
.cw-label {
  position: absolute; top: 0; left: 0;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 4px; padding: 2px 6px;
  font-family: var(--font-display-2); font-weight: 700; font-size: 0.7rem;
  color: var(--color-char);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.cw-label.side-e { transform: translate(17px, -50%); }
.cw-label.side-w { transform: translate(calc(-100% - 17px), -50%); }

.cw-bullet {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: #FCCC0A; color: #000;
  font-size: 0.64rem; font-weight: 800;
  margin-right: 3px; vertical-align: -3px;
}
/* MTA line colours; N, Q, R, W keep the yellow default. */
.cw-bullet[data-line="1"], .cw-bullet[data-line="2"], .cw-bullet[data-line="3"] { background: #EE352E; color: #fff; }
.cw-bullet[data-line="B"], .cw-bullet[data-line="D"], .cw-bullet[data-line="F"], .cw-bullet[data-line="M"] { background: #FF6319; color: #fff; }

.cw-h2 {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.25rem;
  color: var(--cw-green);
  margin: 0 0 6px;
}

/* Stop list: numbered dots joined by a line, the walk to the next stop on it. */
.cw-stops { list-style: none; padding: 0; margin: 0; }
.cw-stop { position: relative; display: flex; gap: 14px; padding: 14px 0 0; }
.cw-stop:not(:last-child)::before {
  content: ''; position: absolute;
  left: 13px; top: 42px; bottom: -14px;
  border-left: 2px dotted rgba(220, 34, 37, 0.45);
}
.cw-num {
  position: relative; z-index: 1;
  flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: #DC2225; color: #fff;
  font-size: 0.8rem; font-weight: 700;
}
.cw-stop-body { flex: 1; min-width: 0; padding-bottom: 14px; border-bottom: 1px solid var(--cw-line); }
.cw-stop:last-child .cw-stop-body { border-bottom: 0; }
.cw-stop-name {
  font-family: var(--font-display-2);
  font-weight: 700; font-size: 1.06rem; line-height: 1.3;
  margin: 2px 0 2px;
}
.cw-stop-name a { color: var(--cw-ink); text-decoration: none; }
.cw-stop-name a:hover { color: var(--cw-red); text-decoration: underline; }
.cw-stop-addr { margin: 0; font-size: 0.85rem; color: var(--cw-muted); }
.cw-stop-addr a { color: var(--cw-green); font-weight: 600; }
.cw-stop-get { margin: 8px 0 0; font-size: 0.9rem; line-height: 1.45; }
.cw-stop-get span {
  display: inline-block;
  font-size: 0.64rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--cw-green);
  background: var(--cw-cream);
  border-radius: 4px;
  padding: 2px 6px; margin-right: 6px;
  vertical-align: 1px;
}
.cw-stop-next {
  margin: 8px 0 0;
  font-size: 0.8rem; font-weight: 600;
  color: var(--cw-red);
}
.cw-stop-end { color: var(--cw-muted); }
.cw-stop-train { margin: 6px 0 0; font-size: 0.8rem; font-weight: 600; color: var(--cw-muted); }

.cw-route-foot { margin: 22px 0 0; }
.cw-more {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px;
  margin: 16px 0 0; font-size: 0.9rem; font-weight: 600;
}
.cw-more a { color: var(--cw-red); text-decoration: none; }
.cw-more a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .cw-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cw-map-col { position: static; }
  .cw-map { height: 480px; }
}
@media (max-width: 480px) {
  .cw-crawl-bar { gap: 12px; }
  .cw-crawl-bar .cw-btn { width: 100%; }
  .cw-map { height: 440px; }
  .cw-label { font-size: 0.64rem; }
}
