/* Shared by every page (base.html loads it before any page stylesheet).
   - Poppins, self-hosted: the only @font-face rules on the site.
   - The "night" look the homepage and the login, sign-up and password reset
     pages share: its colour tokens, the logo mark colours, the page width,
     the buttons, the header and the footer (templates/partials/site_header.html
     and site_footer.html). Classes are prefixed hp-; on the auth pages they sit
     inside body.th-auth (templates/accounts/auth_base.html).
   The homepage's own sections and motion stay in static/css/home.css. */

/* Poppins, self-hosted for every page (SIL Open Font License, static/fonts/poppins/OFL.txt):
   no request to Google blocks the first paint. latin carries the text, latin-ext
   the naira sign (U+20A6); each file only downloads when a page uses it. */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/poppins/poppins-400-latin.9212f6f9860f.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: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/poppins/poppins-400-latin-ext.90926c36b712.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/poppins/poppins-500-latin.a09f2fccfee3.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: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/poppins/poppins-500-latin-ext.1f24684cbd72.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/poppins/poppins-600-latin.72993dddf88a.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: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/poppins/poppins-600-latin-ext.a575b6d9df98.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/poppins/poppins-700-latin.25b0e113ca7c.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: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/poppins/poppins-700-latin-ext.367d2aa05bf0.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/poppins/poppins-800-latin.af4d371a1027.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: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/poppins/poppins-800-latin-ext.6b2835047d68.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }


:root {
  --hp-ink: #0F1630; --hp-ink-2: #151E40; --hp-ink-3: #0B1126;
  --hp-panel: #161F42; --hp-panel-line: #29346A;
  --hp-on-dark: #FFFFFF; --hp-on-dark-2: #C9D1E3; --hp-on-dark-3: #AEB8D0;
  --hp-paper: #FFFFFF; --hp-paper-2: #F7F8FB;
  --hp-text: #141B2E; --hp-muted: #5B6478; --hp-line: #E3E7EE;
  --hp-blue: #3B82F6; --hp-blue-2: #2563EB; --hp-blue-soft: #93C5FD;
  --hp-teal: #2BC4B4; --hp-teal-2: #0D7D73; --hp-green: #4ADE80; --hp-amber: #F5B454;
  --hp-gutter: clamp(20px, 5vw, 80px);
  --hp-maxw: 1200px;
  --hp-focus: #93C5FD;
  --hp-nav: #111834;
  --hp-brand-teal: #0FB5A6; --hp-mark-teal: #14B8A6;
  /* Fills behind white labels: the main button, the How it works switch and its
     step numbers. White stays at least 4.5:1 everywhere on them (top 4.75:1,
     bottom 5.17:1; the last step's teal 4.76:1 to 5.00:1). Glows derive from the
     bottom colour. */
  --hp-btn-top: #2F6BEB; --hp-btn-bottom: #2563EB;
  --hp-step-teal-top: #0E8174;
}
/* Colours for the inline SVGs in home.html (logo mark, escrow lock, final mark). */
.hp-ink-blue { stroke: var(--hp-blue); }
.hp-ink-brand-teal { stroke: var(--hp-brand-teal); }
.hp-fill-brand-teal { fill: var(--hp-brand-teal); }
.hp-ink-mark-teal { stroke: var(--hp-mark-teal); }
.hp-fill-mark-teal { fill: var(--hp-mark-teal); }
.hp-fill-ink { fill: var(--hp-ink); }
.hp-wrap { width: 100%; max-width: calc(var(--hp-maxw) + var(--hp-gutter) * 2); margin: 0 auto; padding-inline: var(--hp-gutter); }

/* Buttons */
.hp-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px;
  text-decoration: none; color: #fff; white-space: nowrap;
}
/* Shape, label and fill shared with the auth pages' main button (.th-auth .btn). */
.hp-btn, .th-auth .btn:not(.btn--quiet) { border-radius: 12px; font-weight: 600; font-size: 16px; }
.hp-btn-p, .th-auth .btn:not(.btn--quiet) {
  background: linear-gradient(180deg, var(--hp-btn-top), var(--hp-btn-bottom));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--hp-btn-bottom) 40%, transparent), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hp-btn-p:hover, .th-auth .btn:not(.btn--quiet):not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 14px 34px color-mix(in srgb, var(--hp-btn-bottom) 50%, transparent); }
.hp-btn-s { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.2); transition: background .2s ease, border-color .2s ease; }
.hp-btn-s:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.32); }

/* Header */
.hp-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; transition: background .3s ease, box-shadow .3s ease; }
.hp-top.scrolled { background: var(--hp-nav); box-shadow: 0 1px 6px rgba(0,0,0,.12); }
.hp-top .hp-wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.hp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; min-height: 44px; }
.hp-brand b { color: var(--hp-teal); font-weight: 700; }
.hp-nav { display: flex; align-items: center; gap: 32px; font-size: 15px; font-weight: 500; }
.hp-nav a.hp-link { color: #E2E8F5; text-decoration: none; padding: 10px 0; }
.hp-nav a.hp-link:hover { color: #fff; }
.hp-nav .hp-btn { min-height: 44px; padding: 0 20px; font-size: 15px; }

/* Footer (overrides base.html's plain footer rule) */
.hp-foot {
  background: var(--hp-ink-3); border-top: 1px solid #1C2548; color: var(--hp-on-dark-3); font-size: 15px;
  margin: 0; padding: 0;
}
.hp-foot .hp-wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-block: 64px 40px; }
.hp-foot .hp-brand { color: #fff; margin-bottom: 12px; }
.hp-foot p { margin: 0; line-height: 1.6; max-width: 320px; }
/* Support email: footer grey and weight, with the FAQ links' soft underline. */
.hp-foot .hp-mail {
  display: inline-block; margin-top: 14px;
  color: var(--hp-on-dark-3); font-weight: 400;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  text-decoration-color: rgba(174,184,208,.35);  /* a softer --hp-on-dark-3 */
  transition: color .2s ease, text-decoration-color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .hp-foot .hp-mail:hover { color: var(--hp-teal); text-decoration-color: var(--hp-teal); }
}
.hp-foot h2 { margin: 0 0 14px; font-size: 15px; font-weight: 600; color: #fff; }
.hp-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hp-foot ul a { display: inline-block; padding: 6px 0; text-decoration: none; color: var(--hp-on-dark-3); }
.hp-foot ul a:hover { color: #fff; }
.hp-legal { border-top: 1px solid #1C2548; }
.hp-legal .hp-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 22px 28px; font-size: 13px; color: #8C97B3; }

@media (max-width: 860px) {
  .hp-top .hp-wrap { height: 68px; }
  .hp-nav .hp-link, .hp-nav .hp-btn { display: none; }
  /* Logged in, Dashboard is the only item and stays visible on phones. */
  .hp-nav .hp-btn.hp-dash { display: inline-flex; }
  .hp-nav a.hp-link.hp-login {
    display: inline-flex !important; align-items: center; min-height: 44px; padding: 0 18px;
    border: 1px solid rgba(255,255,255,.22); border-radius: 10px; font-weight: 600; text-decoration: none; color: #fff;
  }
  .hp-foot .hp-wrap { grid-template-columns: 1fr 1fr; gap: 28px; padding-block: 48px 28px; }
  .hp-foot .hp-wrap > div:first-child { grid-column: 1 / -1; }
  .hp-legal .hp-wrap { flex-direction: column; gap: 2px; }
}
@media (max-width: 640px) {
  .hp-legal .hp-wrap { gap: 7px; }  /* the two bottom lines, stacked on phones */
}

/* Log in, sign up and password reset (body.th-auth, templates/accounts/auth_base.html).
   Everything below is scoped to body.th-auth, so it can't reach the homepage. */
body.th-auth {
  display: flex; flex-direction: column; min-height: 100vh;
  background: var(--hp-ink) linear-gradient(180deg, var(--hp-ink-2) 0, var(--hp-ink) 640px) no-repeat;  /* the hero's */
}
body.th-auth main { flex: 1 0 auto; }

/* The homepage's header and footer also rely on page-wide rules that stay in
   home.css (body font and colour, a { color: inherit }, the focus ring, text
   wrapping). Scoped copies for the auth pages, at the same low specificity
   (:where adds none), so they match the homepage exactly. */
:where(body.th-auth) .hp-top, :where(body.th-auth) .hp-foot {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased;
}
:where(body.th-auth) .hp-top { color: var(--hp-on-dark); font-size: 16px; }
:where(body.th-auth .hp-top, body.th-auth .hp-foot) a { color: inherit; }
:where(body.th-auth .hp-top, body.th-auth .hp-foot) :focus-visible { outline: 3px solid var(--hp-focus); outline-offset: 3px; border-radius: 6px; }
:where(body.th-auth .hp-foot) h2 { text-wrap: balance; }
:where(body.th-auth .hp-foot) p { text-wrap: pretty; }

/* The form card: white, for field contrast, in the homepage's text colours. */
.th-auth .container { margin: 32px auto 72px; }
.th-auth .card { box-shadow: var(--shadow-float); }
.th-auth .card h2 { color: var(--hp-text); }
.th-auth .card p.subtitle, .th-auth .link-text, .th-auth .form-group label { color: var(--hp-muted); }
.th-auth .form-group input { padding: 14px; }
/* Links: the homepage FAQ links' soft underline (1px, 4px offset, 35%). */
.th-auth .link-text a {
  color: var(--hp-blue-2); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--hp-blue-2) 35%, transparent);
  transition: text-decoration-color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .th-auth .link-text a:hover { text-decoration-color: var(--hp-blue-2); }
}
/* The main button takes the homepage's shape and fill (shared rules under
   Buttons above). While a form is sending it's disabled: flat slate, no glow. */
.th-auth .btn:not(.btn--quiet):disabled { background: var(--color-pending-slate); box-shadow: none; transform: none; cursor: progress; }

/* Reduced motion: no lift, no fades on the header, buttons or links. */
@media (prefers-reduced-motion: reduce) {
  .th-auth .hp-top, .th-auth .hp-btn, .th-auth .btn:not(.btn--quiet), .th-auth .hp-foot .hp-mail, .th-auth .link-text a { transition: none; }
  .th-auth .hp-btn-p:hover, .th-auth .btn:not(.btn--quiet):not(:disabled):hover { transform: none; }
}
