/* Blue Horizon Business Capital.
 *
 * On the ADR-0011 skeleton -- `tools/sitegen/page.css` is the layout. What is
 * here is the palette, the two typefaces, and the one band this site has
 * that the skeleton does not: THE HORIZON CHART.
 *
 * FUNNEL DISPLAY OVER SPLINE SANS, deep ocean cyan on white with a warm sand
 * tint -- water and shore -- and a dawn amber used only for marks, never for
 * text. The cyan (#0b6a8a) is 6.1:1 on white and 5.6:1 on the sand, so it
 * carries the eyebrows and links; filled buttons use the deeper #0a4f68.
 */

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

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

:root {
  --ink: #0d2230;
  --ink-soft: #17384b;
  --text: #33495a;
  --muted: #5b6d79;

  --accent: #0b6a8a;
  --accent-deep: #0a4f68;
  --accent-wash: #e3f2f7;
  --accent-line: #b5dbe8;

  --good: #0a4f68;
  --good-wash: #e3f2f7;
  --warn: #8f4c12;

  --paper: #ffffff;
  --card: #ffffff;
  --tint: #f7f2ea;
  --rule: #e8e1d6;
  --rule-firm: #d5cbbb;

  --ask-ink: #bcd0db;
  --ask-accent: #7fd0ea;

  --shadow: 13, 34, 48;

  /* Dawn: the sun on the chart's "today" line and the axis ticks. Marks only. */
  --dawn: #d98a2b;

  --display: "Funnel Display", system-ui, sans-serif;
  --body: "Spline Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --display-weight: 650;
  --display-track: -0.025em;

  --radius: 18px;
  --radius-sm: 12px;
}

/* ------------------------------------------------------------------ *
 * THE HORIZON CHART -- the band this site has and the skeleton does not,
 * directly under the application on the front page.
 *
 * A wide strip of skyline across water, then one timeline from today to five
 * years out, then a row per programme: its name and term on the left, its
 * span drawn as a bar on the shared axis, and a line on what that distance is
 * for. The bars are positioned by custom properties (--from and --to, as
 * fractions of the axis) set in the markup from the copy file's years, so the
 * chart and the words cannot disagree.
 * ------------------------------------------------------------------ */
.skyline {
  margin: 44px 0 0;
}

.skyline img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}

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

.hz__axis,
.hz__row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.hz__axis {
  padding: 26px 0 10px;
  border-bottom: 2px solid var(--ink);
}

.hz__ticks {
  position: relative;
  height: 22px;
  grid-column: 2;
}

.hz__ticks span {
  position: absolute;
  left: calc(var(--at) * 100%);
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  white-space: nowrap;
}
.hz__ticks span:first-child {
  transform: none;
  color: var(--ink);
}
.hz__ticks span:last-child {
  transform: translateX(-100%);
}

.hz__row {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule-firm);
}

.hz__name h3 {
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0 0 4px;
}
.hz__name h3 a {
  color: inherit;
  text-decoration: none;
}
.hz__name h3 a:hover {
  color: var(--accent);
}
.hz__name p {
  margin: 0;
  font-weight: 600;
  color: var(--accent);
}

/* The track: faint year lines behind, the span as a bar on top. */
.hz__track {
  position: relative;
  height: 18px;
  border-radius: 9px;
  background:
    linear-gradient(90deg, var(--rule-firm) 1px, transparent 1px) 0 0 / 20% 100%,
    var(--paper);
  border: 1px solid var(--rule);
}

.hz__track::before {
  /* Today: the dawn line every bar is measured from. */
  content: "";
  position: absolute;
  left: -1px;
  top: -6px;
  bottom: -6px;
  width: 3px;
  border-radius: 2px;
  background: var(--dawn);
}

.hz__bar {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: calc(var(--from) * 100%);
  width: calc((var(--to) - var(--from)) * 100%);
  border-radius: 7px;
  background: linear-gradient(90deg, var(--accent-line), var(--accent) 40%);
}

/* No term on the sheet: words, not a bar. */
.hz__track--none {
  background: none;
  border: 1px dashed var(--rule-firm);
  height: auto;
  padding: 6px 14px;
  font-size: 0.88rem;
  color: var(--muted);
}

.hz__say {
  margin: 0;
  color: var(--text);
}

.hz__note {
  margin: 26px auto 0;
  max-width: 60ch;
  text-align: center;
  color: var(--muted);
}

/* On a programme page the chart is one row inside a row's words column. */
.row__say .hz__track {
  margin: 18px 0 8px;
}
.row__say .hz__scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 22px;
}

/* The three horizons, as a numbered list beside the road photograph. */
.three {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  counter-reset: three;
}
.three li {
  counter-increment: three;
  position: relative;
  padding: 0 0 18px 58px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.three li::before {
  content: counter(three);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-wash);
  color: var(--accent-deep);
  font-family: var(--display);
  font-weight: 700;
}
.three b {
  display: block;
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.three span {
  color: var(--text);
}

@media (max-width: 1000px) {
  .hz__axis,
  .hz__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 14px 24px;
  }
  .hz__say {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .hz__axis {
    grid-template-columns: 1fr;
  }
  .hz__ticks {
    grid-column: 1;
  }
  .hz__row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hz__ticks span:nth-child(4),
  .hz__ticks span:nth-child(5) {
    display: none;
  }
}

/* ---- the shared chrome, painted in this brand's colours ---- */
:root {
  --nav-bg: #ffffff;
  --nav-ink: #0d2230;
  --nav-ink-soft: #5b6d79;
  --nav-rule: #e8e1d6;
  --nav-hover: #0b6a8a;
  --nav-panel: #ffffff;
  --nav-cta-bg: #0a4f68;
  --nav-cta-ink: #ffffff;
  --nav-font: var(--body);
  --nav-size: 0.82rem;
  --nav-weight: 600;
  --nav-track: 0.08em;
  --nav-case: uppercase;

  --foot-bg: #0d2230;
  --foot-ink: #b3c4cd;
  --foot-head: #f4f9fb;
  --foot-rule: #24404f;
  --foot-link: #f7fbfc;
}

/* The front door and the apply page open with the form, and on a phone the
   form comes first, so the head's top padding is taken in. */
@media (max-width: 760px) {
  .head--form {
    padding-top: 18px;
  }
  .head--form .frame {
    padding: 6px;
  }
}

/* The legal pages: numbered heads inside the prose. */
.legal h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--ink);
  margin: 2em 0 0.5em;
}
.legal ul {
  padding-left: 1.2em;
}
.legal li {
  margin-bottom: 0.5em;
}
