/*
 * Professional Funding — the whole site's styles.
 *
 * Rebuilt from the old site's Bootstrap 4.4 + main.css theme (Waterfall Way Designs),
 * without Bootstrap: every measurement here reproduces what that combination drew, so
 * the pages look the same, but the markup is plain semantic HTML.
 *
 * 1. Tokens      — brand palette, then the roles components use. Change colours and
 *                  type HERE; components never use a raw colour.
 * 2. Base        — elements on their own (body, headings, links, tables, forms).
 * 3. Layout      — the page width ("wrap") and the content columns.
 * 4. Components  — header, hero, banner, features, lenders, team, forms, say-hello, footer.
 */

/* ── 1. Tokens ─────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/lato-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/lato-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Only Lato Regular is loaded, as on the old site: headings ask for 500 and render
   Regular; the few bold ones (h3, names) are drawn bold by the browser. */

:root {
  /* Brand palette */
  --pf-navy: #082b41;
  --pf-blue: #1b3f94;
  --pf-silver: #adb1bc;
  --pf-charcoal: #131212;
  --pf-grey: #8c8c8c;
  --pf-white: #fff;
  --pf-black: #000;

  /* Roles */
  --color-text: var(--pf-navy);
  --color-heading: var(--pf-black);
  --color-link: var(--pf-black);
  --color-link-hover: var(--pf-blue);
  --color-surface: var(--pf-white);
  --color-brand: var(--pf-blue);
  --color-on-brand: var(--pf-white);
  --color-on-brand-hover: var(--pf-black);
  --color-emboss: var(--pf-silver);          /* the hero's text shadow */
  --color-rule: var(--pf-navy);              /* table borders */
  --color-nav-divider: var(--pf-grey);       /* phone menu */
  --color-footer: var(--pf-charcoal);
  --color-on-footer: var(--pf-white);
  --color-action: var(--pf-blue);
  --color-on-action: var(--pf-white);
  --color-action-hover: var(--pf-silver);
  --color-on-action-hover: var(--pf-black);
  --color-field-text: #495057;
  --color-field-border: #ced4da;
  --color-field-focus: #80bdff;
  --color-focus-ring: rgb(0 123 255 / 25%);
  --color-action-focus-ring: rgb(38 143 255 / 50%);
  --color-error: #f00;
  --color-success: #155724;

  /* Type */
  --font-body: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --text-body: 1.1rem;         /* 17.6px: the base for every em below */
  --text-control: 1rem;        /* buttons and form fields */
  --text-h1: 2em;
  --text-h2: 1.6em;
  --text-h3: 1.3em;
  --text-nav: 1.1em;
  --text-hero-title: 4em;
  --text-hero-tagline: 1.5em;
  --text-small: .85em;
  --text-credits: .8em;
  --leading-body: 1.5;
  --leading-heading: 1.2;
  --weight-heading: 500;
  --weight-strong: 700;
  --tracking-nav: 1px;

  /* Space and shape */
  --gutter: 15px;              /* half the gap between columns */
  --space-block: 1rem;         /* after a paragraph, list or table */
  --space-heading: .5rem;      /* after a heading */
  --space-page-y: 30px;        /* above and below a page's content */
  --space-page-x: 10px;
  --radius-control: .25rem;
  --radius-feature: 30px;
  --wrap-sm: 540px;
  --wrap-md: 720px;
  --wrap-lg: 960px;
  --wrap-xl: 1140px;
  --logo-width: 400px;
}

/* ── 2. Base ───────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--leading-body);
  color: var(--color-text);
  background: var(--color-surface);
}

h1, h2, h3, h4 {
  margin: 0 0 var(--space-heading);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
}
h1 { font-size: var(--text-h1); color: var(--color-heading); padding-bottom: 10px; }
h2 { font-size: var(--text-h2); color: var(--color-heading); padding-bottom: 5px; }
h3 { font-size: var(--text-h3); font-weight: var(--weight-strong); }
p, ul, ol, dl, table { margin-top: 0; margin-bottom: var(--space-block); }
@media (max-width: 768px) {
  h1 { margin-top: 5px; }
  h2, .eyebrow, .title-section { margin-top: 10px; }
}
strong, b { font-weight: bolder; }
img, svg { vertical-align: middle; }
img { border-style: none; max-width: 100%; height: auto; }

a { color: var(--color-link); text-decoration: underline; }
a:hover { color: var(--color-link-hover); }

table { border-collapse: collapse; }
th { text-align: inherit; }

button, input, select, textarea { margin: 0; font-family: inherit; font-size: inherit; line-height: inherit; }
button, select { text-transform: none; }
textarea { overflow: auto; resize: vertical; }
label { display: inline-block; margin-bottom: .5rem; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: .5rem 1rem; background: var(--color-surface); color: var(--color-link); }
.skip-link:focus { left: 0; }

/* ── 3. Layout ─────────────────────────────────────────────────────────────── */

/* The page width: full width on phones, then fixed steps (the old Bootstrap container). */
.wrap {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 576px) { .wrap { max-width: var(--wrap-sm); } }
@media (min-width: 768px) { .wrap { max-width: var(--wrap-md); } }
@media (min-width: 992px) { .wrap { max-width: var(--wrap-lg); } }
@media (min-width: 1200px) { .wrap { max-width: var(--wrap-xl); } }

/* A page's main content area, inside the wrap. */
.page-body { padding: var(--space-page-y) var(--space-page-x); background: var(--color-surface); }

/* Content beside a column of photos (two thirds / one third from 768px). */
.page-columns { display: flex; flex-wrap: wrap; }
.page-columns > * { position: relative; width: 100%; padding-inline: var(--gutter); }
@media (min-width: 768px) {
  .page-columns > .prose { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .page-columns > .page-photos { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .page-columns--full > .prose { flex: 0 0 100%; max-width: 100%; }
}
.page-photos { margin-top: 60px; }
.page-photos img { margin-bottom: 10px; }

/* Long-form text: lists breathe a little more. */
.prose li { margin: 1em 0; }
/* The Privacy Policy sits one step further in, as it always has. */
.prose--inset { padding: var(--space-page-y) calc(2 * var(--gutter) + var(--space-page-x)) calc(var(--space-page-y) + var(--space-block)); }
/* The home page's intro is set in by two column gutters. */
.intro { padding-inline: calc(2 * var(--gutter)); }
/* A page's main heading drawn at the size of a section heading. */
.title-section { font-size: var(--text-h2); padding-bottom: 5px; }

/* ── 4. Components ─────────────────────────────────────────────────────────── */

/* Buttons: links and submit buttons that look like the old .btn-primary. */
.button {
  display: inline-block;
  padding: 10px 30px;
  font-size: var(--text-control);
  font-weight: 400;
  line-height: var(--leading-body);
  text-align: center;
  vertical-align: middle;
  text-decoration: none;
  color: var(--color-on-action);
  background: var(--color-action);
  border: none;
  border-radius: var(--radius-control);
  cursor: pointer;
  user-select: none;
  transition: color .15s ease-in-out, background-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.button:link, .button:visited, .button:active { color: var(--color-on-action); text-decoration: none; }
.button:hover { color: var(--color-on-action-hover); background: var(--color-action-hover); }
.button:focus-visible { outline: 0; box-shadow: 0 0 0 .2rem var(--color-action-focus-ring); }
.button[disabled] { opacity: .65; cursor: default; }

/* Header: logo on the left, menu on the right; the menu folds into a button below 992px. */
.site-header { background: var(--color-brand); }
.site-header__inner { display: flex; flex-wrap: wrap; }
.site-header__brand { position: relative; width: 100%; padding-inline: var(--gutter); }
.site-header__logo { display: block; width: var(--logo-width); margin: 0 auto; }
.site-nav {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 45px;
  padding: .5rem calc(var(--gutter) + 1rem);
}
.site-nav__toggle {
  margin-left: auto;
  padding: .25rem .75rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--color-on-brand);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  cursor: pointer;
}
.site-nav__toggle:focus-visible { outline: 1px dotted var(--color-on-brand); outline-offset: 0; }
.site-nav__toggle-icon { display: inline-block; width: 1.5em; height: 1.5em; padding-top: 5px; vertical-align: middle; }
.site-nav__toggle-icon svg { display: block; width: 24px; height: 21.3px; margin: -.3px auto 0; fill: currentColor; }
.site-nav__menu {
  display: none;
  flex-basis: 100%;
  flex-grow: 1;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.site-nav__menu.is-open { display: flex; }
.site-nav__menu > li { flex: 1 1 auto; text-align: center; }
.site-nav__menu a {
  display: block;
  padding: 35px 0 10px;
  font-size: var(--text-nav);
  letter-spacing: var(--tracking-nav);
  color: var(--color-on-brand);
  text-align: center;
  text-decoration: none;
}
.site-nav__menu a:hover, .site-nav__menu a:focus, .site-nav__menu a[aria-current="page"] { color: var(--color-on-brand); text-decoration: underline; }
@media (max-width: 768px) {
  .site-header__logo { width: 90%; }
  .site-nav { margin-top: 10px; }
  .site-nav__menu a { border-bottom: 1px solid var(--color-nav-divider); }
  .site-nav__menu > li:first-child > a, .site-nav__menu > li:last-child > a { border-bottom: 0; }
}
@media (min-width: 768px) {
  .site-header__brand { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .site-nav { flex: 0 0 58.333333%; max-width: 58.333333%; margin-left: 8.333333%; }
}
@media (min-width: 992px) {
  .site-nav { flex-wrap: nowrap; justify-content: flex-start; }
  .site-nav__toggle { display: none; }
  .site-nav__menu, .site-nav__menu.is-open { display: flex; flex-direction: row; flex-basis: auto; }
  .site-nav__menu a { padding-inline: .5rem; }
}

/* Home page hero: a full-width photo with the slogan over it (from 768px). */
.hero { position: relative; width: 100%; }
.hero__image { display: block; width: 100%; }
.hero__caption {
  display: none;
  position: absolute;
  right: 15%;
  bottom: 12%;
  left: 15%;
  z-index: 10;
  padding-block: 20px;
  color: var(--color-on-brand);
  text-align: center;
}
.hero__title {
  margin: 0 0 var(--space-heading);
  font-size: var(--text-hero-title);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  color: var(--color-brand);
  text-shadow: 2px 2px var(--color-emboss);
}
/* Every paragraph in the caption (the tagline, and the one holding the button). */
.hero__caption p:not(.hero__title) {
  margin-top: 30px;
  font-size: var(--text-hero-tagline);
  color: var(--color-heading);
  text-shadow: 2px 2px var(--color-emboss);
}
.hero__caption .button { text-shadow: none; }
/* The old carousel's single slide marker. */
.hero::after {
  content: "";
  position: absolute;
  bottom: calc(1rem + 10px);
  left: 50%;
  width: 30px;
  height: 3px;
  margin-left: -15px;
  background: var(--color-on-brand);
  z-index: 15;
}
@media (min-width: 768px) { .hero__caption { display: block; } }

/* Inner pages' banner photo: the image at its natural shape, never wider than the screen. */
.banner { display: block; }
.banner img { display: inline; }

/* Home page: "We can help you with…" features, alternating photo and text. */
.features { padding-bottom: 0; }
.feature { display: flex; flex-wrap: wrap; margin: 40px 0 80px; }
.feature > * { position: relative; width: 100%; padding-inline: var(--gutter); }
.feature__photo { padding-inline: 0; }
.feature__photo img { border-radius: var(--radius-feature); }
.feature__body { padding: 30px 40px; }
@media (min-width: 768px) {
  .feature > * { flex: 0 0 50%; max-width: 50%; }
}
.service-list h3 { margin-bottom: var(--space-heading); }
.features__more { margin-top: calc(var(--text-body) * var(--leading-body) + 2 * var(--space-block)); }
.features__end { margin-bottom: calc(var(--text-body) * var(--leading-body) + var(--space-block) * 2); }

/* Home page: the lending panel — logos six to a row from 768px. */
.lenders__list { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.lenders__list > li { position: relative; width: 100%; min-height: 190px; padding: 30px var(--gutter) 10px; }
@media (min-width: 768px) {
  .lenders__list > li { flex: 0 0 16.666667%; max-width: 16.666667%; }
}

/* Meet the Team: a card per person, three to a row from 768px. */
.eyebrow { margin-bottom: var(--space-heading); padding-bottom: 5px; font-size: var(--text-h2); font-weight: var(--weight-heading); line-height: var(--leading-heading); color: var(--color-heading); }
.team { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.profile { position: relative; width: 100%; margin: 10px 0 20px; padding-inline: var(--gutter); }
@media (min-width: 768px) {
  .profile { flex: 0 0 33.333333%; max-width: 33.333333%; }
}
.profile__photo { min-height: 270px; }
.profile__photo img { width: 60%; }
.profile__name { margin: 0; padding-top: 10px; font-size: var(--text-nav); font-weight: var(--weight-strong); line-height: var(--leading-body); color: inherit; }
.profile__role { height: 50px; margin: 0; font-size: .9em; font-style: italic; }
.profile__bio { margin: 0; }
.profile__more {
  margin-block: -5px;   /* the padding widens the click area without growing the line, as the old inline link did */
  padding: 5px;
  font-size: 1em;
  color: var(--color-brand);
  text-decoration: underline;
  background: none;
  border: 0;
  cursor: pointer;
}
/* In memory of a team member: a short note in place of contact details. */
.profile__tribute-note { margin-top: var(--space-block); }
.profile__contacts { margin-top: 20px; }
/* Long email addresses wrap inside the card rather than spill into the next one or push a
   phone screen sideways (the old site did both); the label column keeps its own width. */
.profile__contacts td { overflow-wrap: anywhere; }
.profile__contacts th { width: 1%; white-space: nowrap; }

/* Tables: ruled boxes (contact details, complaints, the privacy notice). */
.data-table { width: 100%; margin-bottom: var(--space-block); color: var(--color-text); }
.data-table th, .data-table td {
  padding: .75rem;
  vertical-align: top;
  background: var(--color-surface);
  border: 1px solid var(--color-rule);
}
.data-table th { font-weight: bolder; }
.profile__contacts th { font-weight: inherit; }
.data-table a { color: var(--color-text); }
.data-table a:hover { color: var(--color-link-hover); }

/* Forms: one field per row, two thirds wide from 992px. */
.form { margin-top: var(--space-block); padding-bottom: calc(var(--text-body) * var(--leading-body)); }
.form__section > legend { float: left; width: 100%; }
.form__section > legend + * { clear: left; }
.form__section-title { display: inline-block; margin-bottom: .5rem; }
.field { position: relative; width: 100%; margin-bottom: var(--space-block); padding-inline: var(--gutter); }
@media (min-width: 992px) { .field { max-width: 66.666667%; } }
.field__control {
  display: block;
  width: 100%;
  height: calc(1.5em + .75rem + 2px);
  padding: .375rem .75rem;
  font-size: var(--text-control);
  font-weight: 400;
  line-height: var(--leading-body);
  color: var(--color-field-text);
  background: var(--color-surface);
  background-clip: padding-box;
  border: 1px solid var(--color-field-border);
  border-radius: var(--radius-control);
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
textarea.field__control { height: auto; }
.field__control:focus { color: var(--color-field-text); border-color: var(--color-field-focus); outline: 0; box-shadow: 0 0 0 .2rem var(--color-focus-ring); }
.field__error { display: block; margin: 2px 0 0; padding: 2px 8px; font-weight: var(--weight-strong); color: var(--color-error); }
.form__actions { padding-top: calc(var(--text-body) * var(--leading-body)); }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__message { margin: 0 0 var(--space-block); padding-inline: var(--gutter); font-weight: var(--weight-strong); }
.form__message.is-sent { color: var(--color-success); }
.form__message.is-error { color: var(--color-error); }

/* "Say hello": the blue band above the footer. */
.say-hello { color: var(--color-on-brand); background: var(--color-brand); }
.say-hello__inner { padding-inline: var(--gutter); }
.say-hello__title { margin: 0; padding: 40px 0 20px; font-size: var(--text-h2); font-weight: 400; line-height: var(--leading-body); color: inherit; }
.say-hello__text { margin: 0; padding-bottom: 60px; }
.say-hello__link { font-size: var(--text-h3); }
.say-hello__link a, .say-hello__link a:visited { color: var(--color-on-brand); font-weight: 400; }
.say-hello__link a:hover { color: var(--color-on-brand-hover); }

/* Footer: the licence lines, centred on charcoal. */
.site-footer {
  padding: 10px 0;
  font-size: var(--text-small);
  color: var(--color-on-footer);
  text-align: center;
  background: var(--color-footer);
  border-bottom: 10px solid var(--color-brand);
}
.site-footer__inner { padding-block: 5px; }
.site-footer__legal { margin: 0; padding-right: var(--gutter); }
.site-footer a, .site-footer a:visited { color: var(--color-on-footer); text-decoration: none; font-weight: 400; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__social svg { display: inline-block; width: 2em; height: 2em; vertical-align: -.25em; fill: currentColor; }
.site-footer__credits { margin: 100px 0 0; padding-inline: var(--gutter); font-size: var(--text-credits); }
