/* Pure Lending — site shared styles (nav, footer, primitives). 
   Each page imports this + colors_and_type.css. */

@import url("colors_and_type.css");

:root {
  --ink-bg: #0B161C;
  --ink-line: #1F2D34;
  --ink-fg-1: #FFFFFF;
  --ink-fg-2: #BCC9CF;
  --ink-fg-3: #7F8F96;
}

html, body { background: var(--pl-bg); }
body { font-family: var(--pl-font-body); color: var(--pl-text-1); }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- Accessibility (ADA / WCAG 2.1 AA) ---------- */

/* Visually hidden but available to screen readers */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* Skip-to-content link — visible only on keyboard focus */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--pl-ink); color: #fff;
  font-family: var(--pl-font-body); font-size: 14px; font-weight: 600;
  padding: 12px 18px; border-radius: 0 0 12px 12px; text-decoration: none;
  transition: top 160ms cubic-bezier(0.2,0.8,0.2,1);
}
.skip-link:focus { top: 0; outline: 3px solid var(--pl-aqua); outline-offset: 2px; }

/* The main landmark is a skip-link target; never show a focus ring on it */
main:focus { outline: none; }

/* Honor reduced-motion preferences for the whole site */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; box-sizing: border-box; }

/* ---------- Type helpers ---------- */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pl-aqua-deep); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 18px; height: 1.5px; background: var(--pl-aqua); }
.eyebrow.on-dark { color: var(--pl-aqua); }
.eyebrow.on-aqua { color: #04373A; opacity: 0.75; }
.eyebrow.on-aqua::before { background: #04373A; opacity: 0.5; }
.display { font-family: var(--pl-font-display); font-weight: 800; letter-spacing: -0.026em; line-height: 1.04; color: var(--pl-ink); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn { font-family: var(--pl-font-body); font-size: 15px; font-weight: 600; padding: 13px 22px; border-radius: 999px; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; transition: all 180ms cubic-bezier(0.2,0.8,0.2,1); line-height: 1; text-decoration: none; white-space: nowrap; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--pl-aqua); color: #04373A; }
.btn-primary:hover { background: #3FD4DB; }
.btn-dark { background: var(--pl-ink); color: #fff; }
.btn-dark:hover { background: #1F2D34; }
.btn-outline { background: #fff; color: var(--pl-ink); border: 1px solid var(--pl-border-strong); }
.btn-outline:hover { border-color: var(--pl-ink); background: var(--pl-surface-2); }
.btn-ghost-dark { background: transparent; color: #fff; border: 1px solid #2A3D45; }
.btn-ghost-dark:hover { border-color: var(--pl-aqua); color: var(--pl-aqua); }
.btn-ghost { background: transparent; color: var(--pl-aqua-deep); padding: 13px 6px; }
.btn-ghost:hover { color: var(--pl-aqua-dark); }
.btn-large { font-size: 17px; padding: 17px 28px; }
.btn svg { width: 18px; height: 18px; stroke-width: 2; }
.btn-large svg { width: 20px; height: 20px; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--pl-focus-ring);
  outline-offset: 3px;
}

.form-status { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.45; }
.form-status.error { background: #FFF0EE; color: #8B2C20; border: 1px solid #F1B8AF; }
.form-status.success { background: var(--pl-aqua-mist); color: #075D62; border: 1px solid #A9DFE2; }
.site-field { display: flex; flex-direction: column; gap: 6px; }
.site-field label { font-size: 13px; font-weight: 700; color: var(--pl-text-2); }
.site-field input, .site-field select, .site-field textarea {
  width: 100%; box-sizing: border-box; font: inherit; color: var(--pl-ink); background: #fff;
  border: 1.5px solid var(--pl-border-strong); border-radius: 12px; padding: 12px 14px;
}
.site-field input:focus, .site-field select:focus, .site-field textarea:focus { border-color: var(--pl-aqua-deep); outline: 3px solid var(--pl-focus-ring); }

/* ---------- NAV ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / 0.84); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--pl-border); }
.nav.on-dark { background: rgb(11 22 28 / 0.78); border-bottom-color: var(--ink-line); }
.nav-inner { display: flex; align-items: center; height: 76px; gap: 28px; }
.nav-logo { display: inline-flex; align-items: center; }
.nav-logo img { height: 42px; }
.nav.on-dark .nav-logo img { }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a { color: var(--pl-text-1); font-size: 14px; font-weight: 500; padding: 10px 14px; border-radius: 8px; text-decoration: none; transition: all 180ms cubic-bezier(0.2,0.8,0.2,1); }
.nav-links a:hover { color: var(--pl-aqua-deep); background: var(--pl-aqua-mist); }
.nav-links a.active { color: var(--pl-aqua-deep); background: var(--pl-aqua-mist); }
.nav.on-dark .nav-links a { color: #BCC9CF; }
.nav.on-dark .nav-links a:hover, .nav.on-dark .nav-links a.active { color: #fff; background: rgb(255 255 255 / 0.08); }
.nav-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.nav-right a.signin { color: var(--pl-ink); font-size: 14px; font-weight: 600; padding: 8px 14px; text-decoration: none; }
.nav.on-dark .nav-right a.signin { color: #fff; }

/* ---------- FOOTER ---------- */
footer { background: var(--ink-bg); color: #BCC9CF; padding: 72px 0 32px; }
footer .top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
footer img.logo { height: 46px; margin-bottom: 16px; }
footer .col h3, footer .col h4 { font-family: var(--pl-font-display); font-weight: 700; font-size: 14px; color: #fff; margin: 0 0 16px; }
footer .col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
/* 24px minimum tap target (WCAG 2.2); the reduced ul gap keeps the row pitch
   at ~30px so the footer does not visibly grow. */
footer .col a { color: #BCC9CF; text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; min-height: 24px; transition: color 180ms cubic-bezier(0.2,0.8,0.2,1); }
footer .col a:hover { color: var(--pl-aqua); }
footer .meta-line { display: flex; gap: 10px; color: #9FB0B8; font-size: 13px; align-items: center; margin-bottom: 8px; }
footer .meta-line svg { width: 14px; height: 14px; color: var(--pl-aqua); }
footer .blurb { max-width: 320px; line-height: 1.6; color: #9FB0B8; font-size: 14px; margin: 0 0 20px; }
footer .bot { border-top: 1px solid var(--ink-line); padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 12px; color: #7F8F96; }
footer .bot a { color: #A9B7BD; text-decoration: none; margin-left: 20px; min-height: 44px; display: inline-flex; align-items: center; }
footer .reg { display: flex; gap: 12px; align-items: center; }
footer .reg a { margin-left: 0; }
footer .compliance-note { border-top: 1px solid var(--ink-line); margin: 24px 0 0; padding-top: 18px; color: #A9B7BD; font-size: 12px; line-height: 1.5; }
footer .compliance-note a { color: inherit; text-decoration: underline; }
footer [data-payment-link] { margin-top: 12px; }

/* ---------- Educational chat ---------- */
.pl-chat-launcher {
  position: fixed; right: 24px; bottom: 24px; z-index: 80; border: 0; border-radius: 999px;
  padding: 14px 19px; background: var(--pl-aqua); color: #04373A; box-shadow: var(--pl-shadow-3);
  font: 700 14px/1 var(--pl-font-body); display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
}
.pl-chat-launcher svg { width: 19px; height: 19px; }
.pl-chat-panel {
  position: fixed; right: 24px; bottom: 82px; z-index: 90; width: min(390px, calc(100vw - 32px));
  max-height: min(640px, calc(100vh - 110px)); background: #fff; border: 1px solid var(--pl-border);
  border-radius: 22px; box-shadow: var(--pl-shadow-3); overflow: hidden; flex-direction: column;
}
.pl-chat-panel:not([hidden]) { display: flex; }
.pl-chat-head { background: var(--pl-ink); color: #fff; padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; }
.pl-chat-head h2 { font: 800 17px/1.2 var(--pl-font-display); margin: 0; color: #fff; }
.pl-chat-head p { margin: 3px 0 0; color: var(--ink-fg-2); font-size: 11px; }
.pl-chat-close { border: 0; border-radius: 999px; width: 36px; height: 36px; display: grid; place-items: center; background: #1F2D34; color: #fff; cursor: pointer; }
.pl-chat-close svg { width: 18px; height: 18px; }
.pl-chat-messages { padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 220px; }
.pl-chat-message { max-width: 88%; padding: 11px 13px; border-radius: 14px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.pl-chat-message.user { align-self: flex-end; background: var(--pl-aqua); color: #04373A; border-bottom-right-radius: 4px; }
.pl-chat-message.assistant { align-self: flex-start; background: var(--pl-surface-2); color: var(--pl-text-1); border-bottom-left-radius: 4px; }
.pl-chat-message a { color: var(--pl-aqua-dark); font-weight: 700; }
.pl-chat-form { border-top: 1px solid var(--pl-border); padding: 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.pl-chat-form label { grid-column: 1 / -1; font-size: 11px; font-weight: 700; color: var(--pl-text-2); }
.pl-chat-form textarea { resize: none; min-height: 44px; max-height: 100px; box-sizing: border-box; border: 1.5px solid var(--pl-border-strong); border-radius: 12px; padding: 10px 12px; font: 13px/1.4 var(--pl-font-body); }
.pl-chat-send { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--pl-aqua); color: #04373A; display: grid; place-items: center; cursor: pointer; }
.pl-chat-send svg { width: 18px; height: 18px; }
.pl-chat-send[disabled] { opacity: 0.5; cursor: wait; }

/* ---------- Compliance placeholder pages ---------- */
.legal-page { padding: 72px 0 104px; background: var(--pl-surface-1); }
.legal-card { max-width: 820px; background: #fff; border: 1px solid var(--pl-border); border-radius: 24px; padding: 44px; box-shadow: var(--pl-shadow-1); }
.legal-card h2 { font: 800 26px/1.2 var(--pl-font-display); color: var(--pl-ink); margin: 38px 0 10px; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card p, .legal-card li { color: var(--pl-text-2); line-height: 1.7; }
.placeholder-copy { background: #FFF8E8; border: 1px solid #EAD39D; border-radius: 10px; color: #73520C; padding: 12px 14px; font-family: ui-monospace, monospace; font-size: 13px; overflow-wrap: anywhere; }

/* ---------- Page-level helpers ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-dark { background: var(--ink-bg); color: #fff; }
.section-aqua { background: var(--pl-aqua-mist); }
.section-surface { background: var(--pl-surface-1); }

.page-head-dark { background: var(--ink-bg); color: #fff; padding: 80px 0; position: relative; overflow: hidden; }
.page-head-dark::before {
  content: ""; position: absolute; right: -200px; top: -200px;
  width: 700px; height: 700px; border-radius: 999px;
  background: radial-gradient(circle at center, rgba(44,204,211,0.20), rgba(44,204,211,0) 65%);
  pointer-events: none;
}
.page-head-dark .eyebrow { color: var(--pl-aqua); }
.page-head-dark .eyebrow::before { background: var(--pl-aqua); }
.page-head-dark h1 { font-family: var(--pl-font-display); font-weight: 800; font-size: clamp(48px, 6vw, 80px); letter-spacing: -0.028em; line-height: 1.02; margin: 24px 0 20px; color: #fff; max-width: 920px; text-wrap: balance; position: relative; }
.page-head-dark h1 .accent { color: var(--pl-aqua); font-style: italic; }
.page-head-dark p.lede { font-size: 19px; line-height: 1.55; color: var(--ink-fg-2); max-width: 640px; margin: 0; position: relative; }

/* Card */
.card { background: #fff; border: 1px solid var(--pl-border); border-radius: 20px; padding: 28px; box-shadow: var(--pl-shadow-2); }
.card-flat { background: var(--pl-surface-2); border-radius: 20px; padding: 28px; border: 1px solid transparent; }

/* Floating CTA helpers */
.cta-card { border-radius: 32px; padding: 56px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.cta-card.aqua { background: var(--pl-aqua); }
.cta-card.aqua h2 { color: #04373A; }
.cta-card.aqua p { color: rgb(4 55 58 / 0.75); }
.cta-card h2 { font-family: var(--pl-font-display); font-weight: 800; font-size: clamp(32px, 4vw, 52px); letter-spacing: -0.024em; line-height: 1.05; margin: 0 0 12px; text-wrap: balance; }
.cta-card p { font-size: 17px; margin: 0; line-height: 1.5; max-width: 480px; }
.cta-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.cta-actions .phone { font-family: var(--pl-font-display); font-weight: 700; font-size: 24px; letter-spacing: -0.01em; }
.cta-actions .phone-sub { font-size: 12px; text-align: right; opacity: 0.7; }

/* ---------- Example/illustrative labels ---------- */
.example-note {
  display: block; color: var(--pl-text-2);
  font-size: 13px; font-weight: 600; line-height: 1.5;
}

/* ---------- Sample-data flags ----------
   Retired from public pages at launch (2026-08-12); kept only for the
   hidden reviews.html template, which stays server-redirected until
   real reviews replace its sample content. */
.sample-flag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--pl-danger); color: #fff;
  font: 700 12px/1.3 var(--pl-font-body); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; vertical-align: middle; max-width: 100%; box-sizing: border-box;
}
.sample-note {
  display: block; background: var(--pl-danger-wash); border: 1px solid #E7B8B3;
  color: var(--pl-danger); border-radius: 12px; padding: 10px 14px;
  font-size: 13px; font-weight: 600; line-height: 1.5;
}

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
  display: none; width: 44px; height: 44px; flex-shrink: 0;
  border: 1px solid var(--pl-border-strong); border-radius: 12px;
  background: #fff; color: var(--pl-ink); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav.on-dark .nav-toggle { background: transparent; border-color: #2A3D45; color: #fff; }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav.nav-open .nav-toggle .icon-open { display: none; }
.nav.nav-open .nav-toggle .icon-close { display: block; }
.nav-links .mobile-only { display: none; }

/* Responsive */
@media (max-width: 900px) {
  .nav-inner { gap: 12px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 2px; margin-left: 0;
    padding: 10px 16px 16px; background: #fff;
    border-bottom: 1px solid var(--pl-border); box-shadow: var(--pl-shadow-3);
  }
  .nav.nav-open .nav-links { display: flex; }
  .nav-links a { padding: 14px 16px; font-size: 16px; border-radius: 10px; min-height: 44px; box-sizing: border-box; display: flex; align-items: center; }
  .nav-links .mobile-only { display: flex; border-top: 1px solid var(--pl-border); margin-top: 6px; padding-top: 14px; border-radius: 0; }
  .nav.on-dark .nav-links { background: var(--ink-bg); border-bottom-color: var(--ink-line); }
  .nav.on-dark .nav-links .mobile-only { border-top-color: var(--ink-line); }
  footer .top { grid-template-columns: 1fr 1fr; }
  .cta-card { grid-template-columns: 1fr; }
  .cta-actions { align-items: flex-start; }
  footer .bot a { margin: 0 16px 0 0; }
  .legal-card { padding: 28px 22px; }
  .pl-chat-launcher { right: 16px; bottom: 16px; }
  .pl-chat-panel { right: 16px; bottom: 72px; }
}

@media (max-width: 640px) {
  .nav-right .signin { display: none; }
  .nav-right .btn { font-size: 14px; padding: 11px 16px; }
  .nav-logo img { height: 36px; }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  footer .top { grid-template-columns: 1fr; gap: 32px; }
  footer .bot { flex-direction: column; align-items: flex-start; }
  .cta-card { padding: 36px 26px; border-radius: 24px; }
  .cta-actions .phone { font-size: 21px; }
  .section { padding: 64px 0; }
  .section-tight { padding: 48px 0; }
  .page-head-dark { padding: 56px 0; }
  .page-head-dark h1 { font-size: clamp(38px, 11vw, 52px); }
  .btn-large { font-size: 16px; padding: 15px 22px; }
  .legal-card { padding: 24px 18px; }
}
