/* Direct Business Financing.
 *
 * The site is a statement. Every fact is a row: label left, dotted leader
 * across, figure right, the way a bill sets things out. That leader is the
 * whole signature and it is what the page is recognisable by in greyscale --
 * dotted rules running the full measure, over and over, with nothing boxed.
 *
 * Clear Path is the other theme here that refuses boxes; it runs its figures
 * inside sentences at a long measure in one typeface. This is the opposite
 * treatment of the same instinct: nothing but rows, no prose carrying figures
 * at all.
 *
 * Near-black on warm white, one green. Not teal: Apex Business Loan is the
 * teal site in this repository and this brand's stylesheet happened to carry
 * the same hue, which would have made two of them.
 *
 * No logo file exists for this brand and never has, so the name is set in
 * type -- see .word below.
 *
 * Familjen Grotesk over Overpass.
 */

@font-face {
  font-family: "Familjen";
  src: url("display.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Overpass";
  src: url("text.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --ink: #171a17;
  --ink-soft: #2c322c;
  --green: #0f7c00;
  --green-deep: #0a5c00;
  --paper: #fdfdfb;
  --tint: #f4f5f1;
  --rule: #ddded7;
  --dot: #b9bcb2;
  --text: #3a403a;
  --muted: #5c625b;
  --faint: #878d85;
  --shell: 1060px;
  --display: "Familjen", "Segoe UI", system-ui, sans-serif;
  --body: "Overpass", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 17px/1.66 var(--body);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 8px;
  top: 8px;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
}

:where(a, button, iframe):focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

/* The wordmark, set in type because no logo file has ever existed. */
.word {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.24rem;
  letter-spacing: -0.028em;
  color: var(--ink);
  white-space: nowrap;
}

.word__thin {
  font-weight: 400;
  color: var(--muted);
}

.word--foot,
.word--foot .word__thin {
  color: #fff;
}

.word--foot {
  display: inline-block;
  margin-bottom: 14px;
}

/* ---------- masthead ---------- */

.mast {
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.mast__bar {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 74px;
  flex-wrap: wrap;
  padding: 10px 24px;
}

.mast__logo {
  text-decoration: none;
}

.mast__nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  flex-wrap: wrap;
}

.mast__nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--text);
}

.mast__nav a:hover {
  color: var(--green);
}

.mast__tel {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink) !important;
  white-space: nowrap;
}

.mast__cta {
  background: var(--green);
  color: #fff !important;
  font-weight: 600 !important;
  padding: 10px 20px;
  white-space: nowrap;
}

.mast__cta:hover {
  background: var(--green-deep);
}

/* ---------- opening ---------- */

.open {
  padding: 74px 0 62px;
}

.open h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.032em;
  margin: 0;
  color: var(--ink);
  max-width: 16ch;
}

.open__sub {
  margin: 22px 0 36px;
  max-width: 56ch;
  font-size: 1.1rem;
  color: var(--muted);
}

.open__act {
  margin: 34px 0 0;
}

.btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.99rem;
  padding: 15px 32px;
}

.btn:hover {
  background: var(--green-deep);
}

/* ---------- the device: label, leader, figure ---------- */

.rows {
  margin: 0;
  max-width: 44rem;
}

.rows > div {
  /* The leader is a repeating radial gradient on the row, masked by the two
     opaque ends. Cheaper and more reliable than a border-bottom-dotted, which
     would run under the text rather than between it. */
  display: flex;
  align-items: baseline;
  gap: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}

.rows dt {
  color: var(--muted);
  padding-right: 10px;
  background: var(--paper);
}

.rows > div::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  margin: 0 8px;
  align-self: center;
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.2px);
  background-size: 6px 2px;
  background-repeat: repeat-x;
  background-position: 0 center;
  /* The row order is dt, ::after, dd -- so the leader sits between them. */
  order: 2;
}

.rows dd {
  margin: 0;
  order: 3;
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  text-align: right;
  padding-left: 10px;
  background: var(--paper);
}

.rows--lead {
  border-top: 2px solid var(--ink);
}

.rows--lead dd {
  font-size: 1.1rem;
}

.rows--tight > div {
  padding: 8px 0;
}

.rows--tight dt,
.rows--tight dd {
  font-size: 0.92rem;
}

/* On tinted grounds the label/figure ends have to match the ground. */
.ask .rows dt,
.ask .rows dd,
.section--tint .rows dt,
.section--tint .rows dd {
  background: var(--tint);
}

/* ---------- sections ---------- */

.section {
  padding: 66px 0;
}

.section--tint {
  background: var(--tint);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  color: var(--ink);
  max-width: 24ch;
}

.h2--gap {
  margin-top: 52px;
}

.h2--sm {
  font-size: 1.2rem;
  margin-top: 34px;
}

.sub {
  margin: 0 0 34px;
  max-width: 62ch;
  color: var(--muted);
}

.head {
  padding: 58px 0 40px;
  border-bottom: 2px solid var(--ink);
}

.head h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.032em;
  margin: 0;
  color: var(--ink);
  max-width: 20ch;
}

.head .lede {
  margin: 16px 0 0;
  max-width: 60ch;
  font-size: 1.06rem;
  color: var(--muted);
}

/* ---------- the six ---------- */

.items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px 48px;
}

.item h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: -0.024em;
  margin: 0 0 7px;
}

.item h3 a {
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--green);
}

.item h3 a:hover {
  color: var(--green-deep);
}

.item p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.96rem;
}

/* ---------- steps ---------- */

.steps {
  list-style: none;
  counter-reset: s;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.steps li {
  counter-increment: s;
  border-top: 2px solid var(--ink);
  padding-top: 16px;
}

.steps li::before {
  content: counter(s, decimal-leading-zero);
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--green);
  margin-bottom: 12px;
}

.steps h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ink);
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

/* ---------- the application ---------- */

.ask {
  background: var(--tint);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 62px 0;
}

.ask__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 46px;
  align-items: start;
}

.ask h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.3vw, 2.2rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  color: var(--ink);
}

.ask__lead {
  margin: 0 0 24px;
  color: var(--muted);
  max-width: 44ch;
}

.ask__tel {
  margin-top: 22px;
  font-size: 0.95rem;
}

.ask__tel a {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--green);
}

.ask__frame {
  background: #fff;
  border: 1px solid var(--rule);
}

.ask__frame iframe {
  display: block;
  width: 100%;
  border: 0;
  /* No min-height: it outranks the height the form posts. See tools/forms. */
}

/* ---------- prose, plates, split ---------- */

.split {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 46px;
  align-items: start;
}

.split figure {
  margin: 0;
}

.split img {
  width: 100%;
}

.prose {
  max-width: 62ch;
  color: var(--muted);
  margin: 28px 0 0;
}

.prose p {
  margin: 0 0 18px;
}

.prose--terms {
  font-size: 0.94rem;
  border-left: 4px solid var(--green);
  padding-left: 22px;
  max-width: 70ch;
  margin-top: 0;
}

.prose a {
  color: var(--green-deep);
}

.plate {
  margin: 0;
}

.plate img {
  width: 100%;
}

/* ---------- footer ---------- */

.foot {
  background: var(--ink);
  color: #a9b0a7;
  padding: 54px 0 24px;
  font-size: 0.93rem;
}

.foot__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 34px;
}

.foot p {
  margin: 0 0 9px;
  max-width: 34ch;
}

.foot h4 {
  font-family: var(--display);
  font-weight: 700;
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 13px;
}

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

.foot li {
  padding: 4px 0;
}

.foot a {
  color: #a9b0a7;
  text-decoration: none;
}

.foot a:hover {
  color: #fff;
}

.foot__rule {
  border-top: 1px solid #2c322c;
  margin-top: 38px;
  padding-top: 20px;
  font-size: 0.81rem;
  color: #767d74;
}

/* ---------- narrow ---------- */

@media (max-width: 900px) {
  .ask__grid,
  .split {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .items {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .foot__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .open {
    padding: 50px 0 44px;
  }

  /* A leader needs room either side of it to read as one. Under 600px the
     row stacks instead and the dots are dropped rather than squeezed. */
  .rows > div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: baseline;
  }

  .rows > div::after {
    display: none;
  }

  .word {
    font-size: 1.08rem;
  }

  .word__thin {
    display: none;
  }

  .foot__grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .mast__nav {
    gap: 14px;
    width: 100%;
    margin-left: 0;
  }

  .mast__cta {
    margin-left: auto;
  }
}
