/* Bridgeway Business Funds.
 *
 * On the ADR-0011 skeleton -- `tools/sitegen/page.css` is the layout. What is
 * here is the palette, the two typefaces, the front door's full-width band,
 * and the one drawing this site has that the skeleton does not: THE SIX
 * CROSSINGS, drawn to scale by time.
 *
 * BIG SHOULDERS OVER REDDIT SANS: a tall, condensed display face from the
 * signage of a city of bridges, set big and heavy, over a rounded grotesque
 * for reading. Plum on white with a warm mauve-grey tint, charcoal type.
 * The plum (#7b2d6e) is 8.2:1 on white and 7.6:1 on the tint, so it carries
 * links, eyebrows and fills; the deck of every bridge is drawn in it. On the
 * charcoal application band the eyebrow is a pale orchid.
 */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("display.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Reddit Sans";
  src: url("text.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --ink: #231a22;
  --ink-soft: #3a2d38;
  --text: #4a3f48;
  --muted: #6f6470;

  --accent: #7b2d6e;
  --accent-deep: #4a1a42;
  --accent-wash: #f6ebf3;
  --accent-line: #e1c2d9;

  --good: #4a1a42;
  --good-wash: #f6ebf3;
  --warn: #8a3b12;

  --paper: #ffffff;
  --card: #ffffff;
  --tint: #f6f2f4;
  --rule: #e8dfe5;
  --rule-firm: #d3c4ce;

  --ask-ink: #d6c8d3;
  --ask-accent: #e8a9da;

  --shadow: 35, 26, 34;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Reddit Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --display-weight: 800;
  --display-track: 0;

  --radius: 2px;
  --radius-sm: 2px;
}

/* The condensed face reads small at the skeleton's sizes, so the heads are
   set larger and a touch tighter in line. */
.h1 {
  font-size: clamp(3rem, 2rem + 4.2vw, 5.4rem);
  line-height: 0.95;
}
.h2 {
  font-size: clamp(2.3rem, 1.6rem + 2.6vw, 3.5rem);
  line-height: 1;
}
.h3,
.card h3 {
  font-size: 1.6rem;
}

/* ------------------------------------------------------------------ *
 * THE FRONT DOOR: words in two columns, then the bridge as a band the full
 * width of the page. The words are kept short enough that the band starts
 * inside the first screen on a laptop.
 * ------------------------------------------------------------------ */
.hero--band {
  padding: 64px 0 0;
  background: var(--paper);
}
.hero__words {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px var(--gap);
  align-items: end;
  padding-bottom: 48px;
}
.hero__words .h1 {
  margin: 0;
}
.hero__words .ticks,
.hero__words .acts {
  margin-bottom: 0;
}
.hero__words .ticks {
  margin-bottom: 26px;
}
.hero__band {
  margin: 0;
  border-top: 6px solid var(--accent);
}
.hero__band img {
  display: block;
  width: 100%;
  height: clamp(220px, 34vw, 520px);
  object-fit: cover;
  object-position: 50% 62%;
}

@media (max-width: 900px) {
  .hero--band {
    padding-top: 40px;
  }
  .hero__words {
    grid-template-columns: 1fr;
    padding-bottom: 32px;
  }
}

/* ------------------------------------------------------------------ *
 * THE SIX CROSSINGS. One axis, today to five years, across the top; each
 * programme a row under it. The track is the river (a pale band); the deck
 * is the plum bar from the shortest published term to the longest, with a
 * pier at each end. Under the deck, both banks: what it is for, and what
 * repays it. The cash advance publishes no term, so it has no deck: its
 * track is drawn dashed, and its label says why.
 * ------------------------------------------------------------------ */
.crossings {
  margin-top: 56px;
}

.crossings__axis-row,
.crossing {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 0 32px;
}

.span-axis {
  position: relative;
  height: 28px;
  border-bottom: 2px solid var(--ink);
}
.span-axis span {
  position: absolute;
  bottom: 6px;
  transform: translateX(-50%);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.span-axis span:first-child {
  transform: none;
}
.span-axis span:last-child {
  transform: translateX(-100%);
}

.crossings__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.crossing {
  padding: 26px 0 22px;
  border-bottom: 1px solid var(--rule);
  grid-template-areas:
    "name track"
    ". banks";
}
.crossing[aria-current] {
  background: var(--accent-wash);
  box-shadow: -16px 0 0 var(--accent-wash), 16px 0 0 var(--accent-wash);
}

.crossing__name {
  grid-area: name;
}
.crossing__name a {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.55rem;
  line-height: 1.05;
  color: var(--ink);
  text-decoration: none;
}
.crossing__name a:hover {
  color: var(--accent);
}
.crossing__term {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

.crossing__track {
  grid-area: track;
  position: relative;
  height: 34px;
  margin-top: 6px;
  background: var(--accent-wash);
  border-radius: 1px;
}
.band--tint .crossing__track,
.crossing[aria-current] .crossing__track {
  background: var(--card);
}

.span-deck {
  position: absolute;
  top: 9px;
  height: 16px;
  background: var(--accent);
}
/* The piers, one at each end of the deck, down into the river. */
.span-deck::before,
.span-deck::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 6px;
  height: 34px;
  background: var(--accent-deep);
}
.span-deck::before {
  left: 0;
}
.span-deck::after {
  right: 0;
}
.span-deck--open {
  left: 0;
  right: 0;
  top: 16px;
  height: 0;
  background: none;
  border-top: 2px dashed var(--accent);
}
.span-deck--open::before,
.span-deck--open::after {
  display: none;
}

.crossing__banks {
  grid-area: banks;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 14px;
}
.crossing__banks p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--text);
}
.crossing__banks p:last-child {
  text-align: right;
}
.crossing__banks b {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
}

.crossings__note {
  max-width: 64ch;
  margin: 30px auto 0;
  text-align: center;
  color: var(--muted);
}

.crossings--one {
  margin-top: 32px;
}

@media (max-width: 900px) {
  .crossings__axis-row,
  .crossing {
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "track"
      "banks";
  }
  .crossings__axis-row > span:first-child {
    display: none;
  }
  .crossing__track {
    margin-top: 14px;
  }
}

@media (max-width: 560px) {
  .span-axis span:nth-child(even) {
    display: none;
  }
  .crossing__banks {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .crossing__banks p:last-child {
    text-align: left;
  }
  .crossing[aria-current] {
    box-shadow: -12px 0 0 var(--accent-wash), 12px 0 0 var(--accent-wash);
  }
}

/* ---- the shared chrome, painted in this brand's colours ---- */
:root {
  --nav-bg: #ffffff;
  --nav-ink: #231a22;
  --nav-ink-soft: #6f6470;
  --nav-rule: #e8dfe5;
  --nav-hover: #7b2d6e;
  --nav-panel: #ffffff;
  --nav-cta-bg: #7b2d6e;
  --nav-cta-ink: #ffffff;
  --nav-font: var(--body);
  --nav-size: 0.95rem;
  --nav-weight: 600;
  --nav-track: 0;
  --nav-case: none;

  --foot-bg: #231a22;
  --foot-ink: #c9bcc6;
  --foot-head: #faf5f8;
  --foot-rule: #3d303b;
  --foot-link: #fdf9fc;
}

@media (max-width: 760px) {
  .head--form {
    padding-top: 18px;
  }
  .head--form .frame {
    padding: 6px;
  }
}

.legal h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--ink);
  margin: 2em 0 0.5em;
}
.legal ul {
  padding-left: 1.2em;
}
.legal li {
  margin-bottom: 0.5em;
}
