/* Home: the count board and the tile sections beneath it. Builds on site.css tokens. */

/* COUNT BOARD HEAD: h1 across eight columns, one spoken sentence in the last four. */
.cb { padding-bottom: clamp(1rem, 3vw, 2.5rem); }
.cb__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: .5rem var(--gutter);
  align-items: end;
  margin-bottom: var(--gutter);
}
.cb__head > * { grid-column: 1 / -1; min-width: 0; }
.cb__lead { margin: 0; line-height: 1.35; }

/* ROWS: each li is one count; the menu cell takes eight columns, its frame four.
   Rows overlap by one border width so the dividers are a single 3px line on both sides. */
.cb__rows { margin: 0; padding: 0; list-style: none; }
.cb__row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  min-height: clamp(5.75rem, 15vh, 8rem);
}
.cb__row + .cb__row { margin-top: calc(var(--line) * -1); }
.cb__link {
  grid-column: span 8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: .75rem;
  min-width: 0;
  padding: .5rem .75rem;
  border: var(--line) solid var(--ink);
  background: var(--ground);
  text-decoration: none;
}
.cb__link--main { background: var(--ink); color: var(--ground); }
.cb__num {
  font: 400 var(--fs-num)/1 var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}
.cb__text { min-width: 0; }
.cb__label { display: block; font-size: var(--fs-row); line-height: 1.1; }
.cb__beat { display: block; margin-top: .25rem; font-size: var(--fs-small); line-height: 1.25; }
.cb__link:hover .cb__label,
.cb__link:focus-visible .cb__label {
  text-decoration: underline;
  text-decoration-thickness: .06em;
  text-underline-offset: .14em;
}
.cb__link:focus-visible {
  position: relative;
  z-index: 2;
  outline-offset: calc(var(--line) * -2.4);
}
.cb__link--main:focus-visible { outline-color: var(--on-accent); }

/* FRAMES: the still fills whatever height its row has; the marked one lifts its blue edge over its neighbours. */
.cb__frame {
  grid-column: span 4;
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.cb__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}
.cb__frame.is-on { z-index: 1; }

/* SLOGAN CARD: wide and shallow, closing the list. */
.cb__slogan {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .375rem var(--pad);
  margin-top: var(--gutter);
  padding-block: clamp(.75rem, 1.6vw, 1.125rem);
}
.cb__tag { font-size: var(--fs-row); line-height: 1.1; }
.cb__slogan p + p { margin-top: 0; }
.cb__say { flex: 1 1 18rem; max-width: 30em; }

@media (min-width: 48rem) {
  .cb__head h1 { grid-column: span 8; }
  .cb__lead { grid-column: span 4; padding-bottom: .375rem; }
  .cb__row { min-height: clamp(7.5rem, 18vh, 12rem); }
  .cb__link { column-gap: var(--pad); padding: .75rem var(--pad); }
  .cb__say { text-align: right; }
}

/* SECTION LEAD: the sentence between a heading and its board. */
.sec-lead { margin-bottom: clamp(1rem, 2vw, 1.5rem); }

/* LINKED COUNT CARDS: a.tile is a block in site.css; here it keeps the count grid. */
a.tile.count { display: grid; }
.tile.count { align-content: start; }
.count__body h3 + * { margin-top: .5rem; }
.offer__line { display: block; }
a.tile.count:hover h3,
a.tile.count:focus-visible h3 {
  text-decoration: underline;
  text-decoration-thickness: .06em;
  text-underline-offset: .14em;
}

/* ASK CARD: the narrow ink link card for times and rates. */
.ask { display: grid; align-content: center; gap: .375rem; }
.ask__label { font-size: var(--fs-row); line-height: 1.12; }
.ask__note { font-size: var(--fs-small); line-height: 1.4; }
.ask:hover .ask__label,
.ask:focus-visible .ask__label {
  text-decoration: underline;
  text-decoration-thickness: .06em;
  text-underline-offset: .14em;
}
.ask:focus-visible { outline-color: var(--on-accent); outline-offset: calc(var(--line) * -2.4); }

/* PHRASE: the double-height photograph that breaks the row line. */
.phrase__photo img { min-height: 24rem; object-position: 50% 60%; }
.say { display: grid; align-content: space-between; gap: var(--pad); }
.say p:first-child { font-size: var(--fs-lead); line-height: 1.35; }
.say p + p { margin-top: 0; }
.say__more a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.say :focus-visible { outline-color: var(--on-accent); }

/* ACTIONS: one rectangle and one text link on a line. */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.5rem;
  margin-top: var(--gutter);
}
.actions > a:not(.btn) { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* ADDRESS CARD */
.where { display: grid; align-content: start; gap: .75rem; }
.where > * { margin-top: 0; }
.tile.where > h3 + * { margin-top: 0; }
.where__lines { font-size: var(--fs-lead); line-height: 1.3; }
.where__lines span { display: block; }

@media (min-width: 48rem) {
  .find__photo, .first__photo { grid-row: span 3; }
  .phrase > .tile { min-height: 17rem; }
  .phrase__photo img { min-height: 14rem; }
}
