/* LendCloud.
 *
 * Figures on ruled paper. Every number this brand publishes sits in a block of
 * ruled ledger paper — faint horizontal rules at a fixed 34px pitch, with the
 * lines of type sitting on them — and the prose around those blocks is plain
 * and unruled. The page alternates between written argument and ruled account.
 *
 * In greyscale that is the signature: bands of horizontal ruling carrying the
 * figures, and nothing else on the page ruled at all. It is not Keystone's
 * drawn grid — that is twelve VERTICAL rules behind the whole page, showing
 * the measure; this is HORIZONTAL rules under the figures only, showing what
 * they are written on.
 *
 * THE PITCH IS THE CONSTRAINT. Inside `.ruled` every line is 34px and every
 * margin is a multiple of 34, or the type stops sitting on the rules and the
 * effect reads as a mistake rather than a decision. That is why the ruled
 * zones are zones and not the page: the application iframe changes height at
 * runtime and would drag everything below it off the grid.
 *
 * Gantari over Vollkorn: a plain grotesque for figures and labels, and a
 * sturdy serif with a strong baseline for prose, because a serif is what sits
 * convincingly on a rule. The periwinkle off the logo draws the rules
 * themselves; the amber marks one thing per page and nothing else.
 *
 * NO PHOTOGRAPHY.
 */

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

:root {
  --ink: #1b2340;
  --ink-soft: #39405c;
  --peri: #a7b3d4;
  --peri-pale: #c6d0ef;
  --peri-deep: #5a6a9c;
  --amber: #b26b06;
  --paper: #fcfcfe;
  --paper-tint: #f1f4fb;
  --rule: #dde3f2;
  --rule-firm: #b6c0dc;
  --text: #3b4360;
  --muted: #6d7593;
  --shell: 860px;
  /* The pitch. Everything inside a ruled block is this or a multiple of it. */
  --pitch: 34px;
  --display: "Gantari", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --body: "Vollkorn", Georgia, "Times New Roman", serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--peri-deep);
}

p {
  margin: 0 0 15px;
  max-width: 66ch;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 40;
  background: var(--ink);
  color: #fff;
  padding: 9px 15px;
}

.shell {
  width: min(100% - 40px, var(--shell));
  margin-inline: auto;
}

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

.mast {
  border-bottom: 1px solid var(--rule-firm);
  background: var(--paper);
}

.mast__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.mast__logo img {
  height: var(--logo-h);
  width: auto;
}

.mast__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 500;
}

.mast__nav a {
  color: var(--ink);
  text-decoration: none;
}

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

.mast__tel {
  font-variant-numeric: tabular-nums;
}

.mast__cta {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 5px 15px;
}

.mast__cta:hover {
  background: var(--ink);
  color: var(--paper) !important;
}

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

.sec {
  padding: 44px 0;
  border-top: 1px solid var(--rule);
}

.sec--hero {
  padding-top: 52px;
  border-top: 0;
}

.kicker {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 12px;
}

.h1 {
  font-family: var(--body);
  font-size: clamp(31px, 4.6vw, 46px);
  font-weight: 600;
  line-height: 1.16;
  color: var(--ink);
  margin: 0 0 14px;
  max-width: 19ch;
}

.h2 {
  font-family: var(--body);
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 600;
  line-height: 1.22;
  color: var(--ink);
  margin: 0 0 12px;
  max-width: 24ch;
}

.h3 {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 30px 0 0;
}

.lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 62ch;
  margin-bottom: 18px;
}

.aside {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
  max-width: 72ch;
  margin-top: 22px;
}

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

/* ---------- the ruled blocks ---------- */

/* The one texture on this site. Rules are drawn as a repeating gradient at the
 * pitch, and every line of type inside is set to exactly that pitch so it
 * lands on one. */
.ruled {
  margin: 22px 0 0;
  padding: 0 18px;
  background-color: var(--paper-tint);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--rule) 0,
    var(--rule) 1px,
    transparent 1px,
    transparent var(--pitch)
  );
  background-position: 0 calc(var(--pitch) - 1px);
  border-top: 1px solid var(--rule-firm);
  border-bottom: 1px solid var(--rule-firm);
}

/* Four fields, each one line high, each sitting on a rule. */
.ledger {
  margin: 0;
  padding: 0;
}

.ledger > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  height: var(--pitch);
  line-height: var(--pitch);
}

.ledger dt {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.ledger dd {
  margin: 0;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.ledger__cost {
  color: var(--amber) !important;
}

.ruled--net .net,
.ruled--marks .marks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ruled--net .net li,
.ruled--marks .marks li {
  height: var(--pitch);
  line-height: var(--pitch);
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.ruled--net .net strong {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  min-width: 6.5em;
}

.ruled--net .net span {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
}

.ruled--marks .marks li {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-soft);
}

.ruled--marks .marks li::before {
  content: "·";
  color: var(--amber);
  font-weight: 700;
}

/* ---------- programs ---------- */

.prog {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}

.prog h3 {
  font-family: var(--body);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}

.prog h3 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-firm);
}

.prog h3 a:hover {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.prog p {
  margin: 0;
  font-size: 16px;
}

.prog--here h3 a {
  border-bottom-color: var(--amber);
}

/* ---------- buttons, strip ---------- */

.acts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 26px 0 0;
}

.btn {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 11px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
}

.btn:hover {
  background: var(--peri-deep);
  border-color: var(--peri-deep);
}

.or {
  font-family: var(--display);
  font-size: 14px;
  color: var(--muted);
}

.or a {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 22px 0 0;
  padding: 0;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

.strip li::before {
  content: "· ";
  color: var(--peri);
}

.strip li:first-child::before {
  content: none;
}

/* ---------- steps and rows ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 24px 0 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  border-top: 1px solid var(--rule);
  padding: 18px 0 8px 44px;
  position: relative;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 18px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  color: var(--amber);
}

.steps h3 {
  font-family: var(--body);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 5px;
}

.rows {
  margin: 24px 0 0;
}

.rows > div {
  border-top: 1px solid var(--rule);
  padding: 15px 0;
}

.rows > div:last-child {
  border-bottom: 1px solid var(--rule);
}

.rows dt {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}

.rows dd {
  margin: 0;
  max-width: 68ch;
}

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

.sec--apply {
  background: var(--paper-tint);
  border-top: 1px solid var(--rule-firm);
}

.frame {
  margin: 20px 0 0;
  background: #fff;
  border: 1px solid var(--rule-firm);
  border-radius: 10px;
  overflow: hidden;
}

.frame iframe {
  display: block;
  width: 100%;
  border: 0;
}

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

.foot {
  border-top: 1px solid var(--rule-firm);
  background: var(--ink);
  color: #b9c1dc;
  margin-top: 48px;
  padding: 40px 0 30px;
  font-size: 14px;
  font-family: var(--display);
  font-weight: 300;
}

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

.foot a:hover {
  color: #fff;
  text-decoration: underline;
}

.foot__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.foot__logo {
  height: var(--logo-h);
  width: auto;
  margin-bottom: 14px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.foot p {
  margin: 0 0 11px;
  max-width: 40ch;
}

.foot h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--peri);
  margin: 0 0 9px;
}

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

.foot li {
  padding: 3px 0;
}

/* `.foot .foot__note`, not `.foot__note`: `.foot p` is a class and an element
 * and would otherwise win the measure. */
.foot .foot__note {
  border-top: 1px solid #333c60;
  margin: 30px 0 0;
  padding-top: 16px;
  font-size: 12px;
  color: #8b93b3;
  max-width: none;
}

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

@media (max-width: 700px) {
  .foot__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }
  .sec {
    padding: 34px 0;
  }
  .mast__bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  /* A shrink-to-fit flex row in a column parent never reaches the width that
   * would make it wrap; it runs off the side of the phone instead. */
  .mast__nav {
    width: 100%;
  }
  /* The ledger's label and figure stack rather than squeezing, and each takes
   * a rule of its own so the block stays on the pitch. */
  .ledger > div {
    display: block;
    height: calc(var(--pitch) * 2);
  }
  .ledger dd {
    text-align: left;
  }
  .ruled--net .net li {
    height: calc(var(--pitch) * 2);
    display: block;
  }
  .ruled--net .net strong {
    display: block;
  }
}
