/* /first-friday -- the monthly First Friday guide for downtown Sarnia.

   Built from data/first-friday.json (scripts/build-first-friday.mjs), set in
   the homepage dashboard's system: Inter, the #f2f5f3 ground, white cards at
   12px on hairlines, charcoal-green ink, the pale sage / cool blue /
   grey-green tints of the homepage's action cards, and one action colour.
   Mobile first: one column at 390px, thumb-sized controls, nothing that
   depends on hover; two and three columns of cards and the route beside the
   newsletter on a wide screen.

   The shared header, footer and phone bar belong to nav-footer.css and are
   not touched here (see CLAUDE.md). The page's own <header> and <nav> carry
   classes of their own. */

.ff-page {
  --ff-ground: #f2f5f3;
  --ff-near-white: #fbfcfb;
  --ff-surface: #ffffff;
  --ff-ink: #22312b;
  --ff-muted: #55635c;
  --ff-line: #e3e8e4;
  --ff-line-strong: #d5dcd7;
  --ff-sage: #e4eee7;
  --ff-cool: #e6eef3;
  --ff-cool-line: #cfdbe3;
  --ff-grey: #ebf0ec;
  --ff-slate: #35576b;
  /* The site's action colour (soft blue), and its lighter hover step:
     iOS keeps :hover after a tap, so the hover is never darker. */
  --ff-action: #356382;
  --ff-action-hover: #3c7194;
  --ff-radius: 12px;
  --ff-control: 44px;
  background: var(--ff-ground);
  color: var(--ff-ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.ff-main { display: block; padding-bottom: 8px; }
.ff-main:focus { outline: none; }
.ff-wrap { box-sizing: border-box; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.ff-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ff-page a { color: var(--ff-action); }
.ff-page :focus-visible { outline: 3px solid var(--ff-action); outline-offset: 2px; }

/* ---------- hero ---------- */
.ff-hero { background: var(--ff-near-white); border-bottom: 1px solid var(--ff-line); padding: 24px 0 22px; }
.ff-kicker { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ff-slate); }
.ff-title { margin: 0; font-size: 32px; font-weight: 700; line-height: 1.12; letter-spacing: -.025em; color: var(--ff-ink); text-wrap: balance; }
.ff-sub { margin: 12px 0 0; max-width: 62ch; font-size: 17px; line-height: 1.5; color: var(--ff-muted); }

/* ---------- intro and parking ---------- */
.ff-intro-row { display: grid; gap: 14px; margin: 22px 0 0; }
.ff-intro { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ff-ink); max-width: 62ch; }
.ff-park { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--ff-cool-line); border-radius: var(--ff-radius); background: var(--ff-cool); }
.ff-park-mark { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--ff-action); color: #fff; font-size: 19px; font-weight: 800; line-height: 1; }
.ff-park-label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ff-slate); }
.ff-park-text { margin: 3px 0 0; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ff-ink); }

/* ---------- jump tiles: the homepage's action cards, two by two ---------- */
.ff-jump { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; }
.ff-page .ff-jump-tile { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; border: 1px solid var(--ff-line); border-radius: var(--ff-radius); color: var(--ff-ink); text-decoration: none; }
.ff-jump-icon { flex: none; width: 20px; height: 20px; color: var(--ff-slate); }
.ff-jump-text { min-width: 0; font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.ff-jump-text small { display: block; margin-top: 1px; font-size: 12.5px; font-weight: 500; color: var(--ff-muted); }
/* An odd tile out (three between months) takes the whole row on a phone. */
.ff-page .ff-jump-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ff-tint-sage { background: var(--ff-sage); }
.ff-tint-cool { background: var(--ff-cool); }
.ff-tint-grey { background: var(--ff-grey); }

/* ---------- section heads ---------- */
.ff-head { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.ff-head-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--ff-slate); }
.ff-head-svg { width: 22px; height: 22px; }
.ff-h2 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; color: var(--ff-ink); }
.ff-head-note { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--ff-muted); }
.ff-route, .ff-group { scroll-margin-top: 92px; }
.ff-card { scroll-margin-top: 92px; }

/* ---------- the route ---------- */
.ff-route-row { display: grid; gap: 18px; margin: 30px 0 0; }
.ff-route { padding: 18px 16px 8px; background: var(--ff-surface); border: 1px solid var(--ff-line); border-radius: var(--ff-radius); }
.ff-steps { list-style: none; margin: 0; padding: 0; counter-reset: ff-step; }
/* Phones: the time on its own line over the step, so a long time never runs
   into the text. From 700px it becomes a column of its own. */
.ff-step { position: relative; display: block; padding: 0 0 18px 26px; }
/* A thin line joins the stops, stopping at the last one. */
.ff-step::before { content: ""; position: absolute; left: 7px; top: 22px; bottom: 0; width: 2px; background: var(--ff-cool-line); }
.ff-step:last-child::before { display: none; }
.ff-step-time { position: relative; display: block; margin-bottom: 3px; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--ff-slate); white-space: nowrap; }
.ff-step-time::before { content: ""; position: absolute; left: -25px; top: 3px; width: 10px; height: 10px; border: 2px solid var(--ff-action); border-radius: 50%; background: var(--ff-surface); }
.ff-step-text { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ff-ink); }
.ff-step-refs { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--ff-muted); }
.ff-step-refs a { font-weight: 600; text-underline-offset: 3px; }

/* ---------- newsletter: the homepage's nl-band, on a sage tile ---------- */
.ff-page .ff-nl { scroll-margin-top: 92px; background: var(--ff-sage); border: 1px solid var(--ff-line-strong); border-radius: var(--ff-radius); }
.ff-page .ff-nl .nl-band-inner { padding: 20px 16px; }
.ff-page .ff-nl .nl-band-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ff-slate); }
.ff-page .ff-nl .nl-band-title { margin: 6px 0 0; font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; color: var(--ff-ink); }
.ff-page .ff-nl .nl-band-sub { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--ff-muted); }
.ff-page .ff-nl .nl-band-form { margin: 14px 0 0; padding: 12px; background: var(--ff-surface); border: 1px solid var(--ff-line); border-radius: 10px; }
.ff-page .ff-nl .beehiiv-native-wrap:empty { display: none; }
.ff-page .ff-nl .beehiiv-native-wrap iframe { display: block; width: 100%; max-width: 100%; border: 0; }
.ff-page .ff-nl-fallback { display: flex; align-items: center; justify-content: center; min-height: var(--ff-control); padding: 0 16px; border-radius: 10px; background: var(--ff-action); color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; }
.ff-page .ff-nl-fallback[hidden] { display: none; }
#newsletter-bottom { margin: 28px 0 32px; }

/* Between months the route goes, and the newsletter takes the whole row. */
.ff-route-row:not(:has(.ff-route)) { grid-template-columns: minmax(0, 1fr); }

/* ---------- between months: last month's line-up ---------- */
.ff-past { margin: 34px 0 0; padding: 14px 16px; border: 1px solid var(--ff-cool-line); border-left: 4px solid var(--ff-action); border-radius: 8px; background: var(--ff-cool); }
.ff-past-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--ff-ink); }
.ff-past-text { margin: 4px 0 0; font-size: 15px; line-height: 1.5; color: var(--ff-muted); }
.ff-past + .ff-group { margin-top: 22px; }
/* A past card is the same card, quieter: its time is last month's. */
.ff-card.is-past { background: var(--ff-near-white); }
.ff-card.is-past .ff-time { background: var(--ff-ground); border-color: var(--ff-line-strong); color: var(--ff-muted); }

/* ---------- stop groups ---------- */
.ff-group { margin: 34px 0 0; }
.ff-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.ff-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--ff-surface); border: 1px solid var(--ff-line); border-radius: var(--ff-radius); }
.ff-time { align-self: flex-start; margin: 0; padding: 4px 9px; border: 1px solid var(--ff-cool-line); border-radius: 6px; background: var(--ff-cool); font-size: 13.5px; font-weight: 700; line-height: 1.3; color: var(--ff-slate); }
.ff-card-title { margin: 2px 0 0; font-size: 19px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; color: var(--ff-ink); }
.ff-venue { margin: -4px 0 0; font-size: 15px; font-weight: 600; color: var(--ff-muted); }
.ff-what { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ff-ink); }
.ff-addr { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 15px; line-height: 1.45; color: var(--ff-muted); }
.ff-pin { flex: none; width: 17px; height: 17px; margin-top: 2px; color: var(--ff-slate); }
.ff-note { margin: 0; padding: 9px 11px; border-radius: 8px; background: var(--ff-ground); font-size: 14.5px; font-weight: 600; line-height: 1.45; color: var(--ff-ink); }
.ff-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.ff-page .ff-btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--ff-control); padding: 0 18px; border: 1px solid var(--ff-action); border-radius: 10px; background: var(--ff-action); color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; }
.ff-page .ff-btn-quiet { background: var(--ff-surface); border-color: var(--ff-cool-line); color: var(--ff-action); }
.ff-source { margin: 30px 0 0; padding: 14px 16px; border: 1px solid var(--ff-line); border-radius: var(--ff-radius); background: var(--ff-near-white); font-size: 15px; line-height: 1.55; color: var(--ff-muted); }
.ff-source a { font-weight: 600; }

@media (hover: hover) {
  .ff-page .ff-btn:hover, .ff-page .ff-nl-fallback:hover { background: var(--ff-action-hover); border-color: var(--ff-action-hover); }
  .ff-page .ff-btn-quiet:hover { background: var(--ff-cool); border-color: var(--ff-cool-line); color: var(--ff-action); }
  .ff-page .ff-jump-tile:hover { border-color: var(--ff-cool-line); }
}

/* ---------- wider screens ---------- */
@media (min-width: 700px) {
  .ff-wrap { padding: 0 28px; }
  .ff-hero { padding: 36px 0 32px; }
  .ff-title { font-size: 42px; }
  .ff-jump { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ff-page .ff-jump-tile:last-child:nth-child(odd) { grid-column: auto; }
  .ff-jump:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ff-route { padding: 22px 22px 10px; }
  .ff-step { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; }
  .ff-step-time { margin: 0; }
  .ff-page .ff-nl .nl-band-inner { padding: 24px; }
}

@media (min-width: 960px) {
  .ff-hero { padding: 48px 0 40px; }
  .ff-title { font-size: 50px; }
  .ff-sub { font-size: 19px; }
  .ff-intro-row { grid-template-columns: minmax(0, 1fr) 360px; align-items: center; gap: 32px; margin-top: 30px; }
  .ff-h2 { font-size: 30px; }
  .ff-route-row { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; gap: 24px; margin-top: 36px; }
  .ff-route-row:has(.ff-route) .ff-nl { position: sticky; top: 96px; }
  .ff-route-row:not(:has(.ff-route)) .ff-nl .nl-band-inner,
  #newsletter-bottom .nl-band-inner { display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: center; gap: 36px; padding: 32px 36px; }
  .ff-route-row:not(:has(.ff-route)) .ff-nl .nl-band-form,
  #newsletter-bottom .nl-band-form { margin: 0; }
  #newsletter-bottom .nl-band-title { font-size: 26px; }
  .ff-group { margin-top: 44px; }
  .ff-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .ff-card { padding: 18px; }
}
