/* LendyLogic — site styles
   Values come from design_handoff_lendylogic_site/README.md (Design Tokens). */

:root {
  --navy: #032539;
  --navy-card: #0b3452;
  --navy-line: #0f3d5c;
  --navy-line-2: #1a4866;
  --navy-line-3: #2a5878;

  --blue: #0062d6;
  --blue-hover: #004fb0;
  --blue-tint: #e6f0fc;

  --teal: #06d6c7;
  --teal-hover: #40e5d9;
  --teal-text: #2fe3d4;
  --teal-dot: #06c4b7;

  --gold: #e8b23a;

  --bg: #fbfbfa;
  --bg-muted: #f2f4f6;
  --bg-muted-2: #f5f6f8;
  --white: #fff;

  --text: #032539;
  --text-2: #4a5466;
  --text-legal: #3a4352;
  --text-muted: #6b7383;
  --text-on-dark: #c9cfd9;

  --border: #e6e8ec;
  --border-input: #d3d7de;

  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(56px, 8vw, 96px);
  --header-offset: 70px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-offset); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Figtree, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); text-decoration: underline; }
input, select, textarea, button { font-family: inherit; font-size: 16px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: var(--teal-text); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; color: var(--white); }

.page { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

.container { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.bg-navy { background: var(--navy); color: var(--bg); }
.border-top { border-top: 1px solid var(--border); }

/* ---------- Type ---------- */
.eyebrow {
  font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 14px;
}
.bg-navy .eyebrow { color: var(--teal-text); }
.eyebrow--wide { font-size: 13px; letter-spacing: 0.14em; }

.h2 {
  font-size: clamp(30px, 4vw, 46px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 800;
  margin: 0 0 48px; max-width: 640px; text-wrap: balance;
}
.lead { font-size: 18px; line-height: 1.6; color: var(--text-2); margin: 0; text-wrap: pretty; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; padding: 16px 26px; border-radius: 999px; text-decoration: none;
  border: 0; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn--blue { background: var(--blue); color: var(--white); }
.btn--blue:hover { background: var(--blue-hover); color: var(--white); }
.btn--teal { background: var(--teal); color: var(--navy); }
.btn--teal:hover { background: var(--teal-hover); color: var(--navy); }
.btn--outline { color: var(--navy); padding: 16px 22px; border: 1.5px solid var(--border-input); background: transparent; }
.btn--outline:hover { border-color: var(--navy); color: var(--navy); }
.btn--sm { font-size: 15px; padding: 11px 18px; }
.btn--md { padding: 13px 22px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 251, 250, 0.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 12px; padding-bottom: 12px;
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { height: 44px; width: auto; display: block; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(48px, 8vw, 96px); }
.hero__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 5.6vw, 64px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800;
  margin: 0 0 20px; text-wrap: balance;
}
.hero__body {
  font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--text-2);
  margin: 0 0 32px; max-width: 520px; text-wrap: pretty;
}
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.trust { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; font-weight: 600; color: var(--text-2); margin: 0; padding: 0; list-style: none; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal-dot); flex: none; }

.hero__media { position: relative; aspect-ratio: 5 / 4; width: 100%; border-radius: 20px; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid--steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-bottom: 40px; }
.grid--loans { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

.step { padding: 28px; border-radius: 16px; background: var(--navy-card); }
.step__num { font-size: 15px; font-weight: 800; color: var(--teal-text); margin-bottom: 18px; }
.step h3 { font-size: 21px; font-weight: 700; margin: 0 0 10px; }
.step p { margin: 0; line-height: 1.6; color: var(--text-on-dark); }

.loan-card {
  padding: 32px; border-radius: 16px; border: 1px solid var(--border); background: var(--white);
  display: flex; flex-direction: column; gap: 12px;
}
.loan-card h3 { font-size: 22px; font-weight: 700; margin: 0; }
.loan-card p { margin: 0; line-height: 1.6; color: var(--text-2); flex: 1; }
.loan-card a { font-weight: 700; }

/* ---------- Why ---------- */
.split {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(32px, 5vw, 64px);
}
.split .h2 { margin-bottom: 20px; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 28px 32px; }
.why-item { border-top: 2px solid var(--navy); padding-top: 16px; }
.why-item h3 { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.why-item p { margin: 0; line-height: 1.6; color: var(--text-2); }

/* ---------- Testimonials ---------- */
.testimonials { max-width: 960px; text-align: center; }
.testimonials .h2 { font-size: clamp(30px, 4.4vw, 48px); margin: 0 auto 14px; max-width: none; }
.testimonials__sub { font-size: 18px; line-height: 1.6; color: var(--text-on-dark); margin: 0 auto 40px; max-width: 560px; text-wrap: pretty; }

.stats { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px 40px; margin-bottom: 48px; }
.stat { display: flex; align-items: center; gap: 12px; text-align: left; }
.stat__big { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.stat__stack { display: grid; gap: 2px; text-align: left; }
.stat__stars { color: var(--gold); font-size: 17px; letter-spacing: 2px; }
.stat__label { font-size: 14px; color: var(--text-on-dark); }
.stat__mid { font-size: 22px; font-weight: 800; line-height: 1.1; }
.stats__divider { width: 1px; height: 40px; background: var(--navy-line-2); }

.quote {
  margin: 0 auto; max-width: 760px; min-height: 300px;
  background: var(--bg); color: var(--navy); border-radius: 16px;
  padding: clamp(24px, 4vw, 40px); text-align: left; display: flex; flex-direction: column;
}
.quote__stars { color: var(--gold); font-size: 20px; letter-spacing: 3px; margin-bottom: 18px; }
.quote blockquote { margin: 0 0 28px; font-size: clamp(18px, 2.2vw, 22px); line-height: 1.55; flex: 1; text-wrap: pretty; }
.quote figcaption { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--border); padding-top: 22px; }
.quote__avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: var(--bg);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: none;
}
.quote__who { display: grid; gap: 2px; }
.quote__name { font-weight: 700; }
.quote__loan { font-size: 14px; color: var(--text-muted); }

.carousel-controls { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 28px 0 56px; }
.carousel-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--navy-line-3);
  background: transparent; color: var(--bg); font-size: 18px; cursor: pointer; transition: border-color .15s;
}
.carousel-btn:hover { border-color: var(--bg); }
.dots { display: flex; gap: 8px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 4px; border: 0; padding: 0; cursor: pointer; background: var(--navy-line-3); transition: width .2s, background-color .2s; }
.dot[aria-current="true"] { width: 28px; background: var(--teal); }
.testimonials__cta-label { margin: 0 0 18px; color: var(--text-on-dark); }

/* ---------- Apply ---------- */
.apply .split { align-items: start; }
.apply .h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 16px; }
.apply .lead { margin-bottom: 40px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 24px; }
.contact-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 6px; }
.contact-value { font-size: 17px; line-height: 1.5; }
a.contact-value { font-weight: 600; }

.form-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 20px;
  padding: clamp(22px, 4vw, 36px); box-shadow: 0 20px 50px -30px rgba(3, 37, 57, 0.35);
}
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; align-content: start; }
.field input, .field select {
  padding: 13px 14px; border: 1px solid var(--border-input); border-radius: 10px;
  background: var(--bg); color: var(--navy); width: 100%; min-width: 0;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23032539' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field input:focus-visible, .field select:focus-visible { outline-offset: 1px; border-color: var(--blue); }
.field.is-invalid input, .field.is-invalid select { border-color: #c4302b; }
.field__error { font-size: 13px; font-weight: 500; color: #b42318; min-height: 0; }
.field__error:empty { display: none; }

.consent {
  grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start;
  font-size: 13px; line-height: 1.55; color: var(--text-2); padding: 14px; background: var(--bg-muted-2); border-radius: 10px;
}
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--blue); }
.consent.is-invalid { box-shadow: inset 0 0 0 1px #c4302b; }
.form__submit { grid-column: 1 / -1; font-size: 17px; padding: 17px; }
.form__submit[disabled] { opacity: .7; cursor: progress; }
.form__note { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 13px; color: var(--text-muted); }

.form-success { text-align: center; padding: 40px 8px; }
.form-success__icon {
  width: 56px; height: 56px; border-radius: 50%; background: var(--blue-tint); color: var(--blue-hover);
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; margin: 0 auto 20px;
}
.form-success h3 { font-size: 26px; font-weight: 800; margin: 0 0 10px; }
.form-success p { margin: 0 0 24px; line-height: 1.6; color: var(--text-2); }
.form-success .btn { padding: 12px 20px; }
[hidden] { display: none !important; }

/* ---------- Disclaimer ---------- */
.disclaimer { padding-bottom: 56px; }
.disclaimer p { margin: 0; font-size: 12px; line-height: 1.7; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 28px; }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) var(--gutter); }
.legal__back { font-weight: 700; font-size: 15px; }
.legal .eyebrow { font-size: 13px; letter-spacing: 0.14em; margin: 32px 0 10px; }
.legal h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 10px; }
.legal__updated { margin: 0 0 40px; color: var(--text-muted); font-size: 15px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.legal__body { display: grid; gap: 32px; }
.legal__body h2 { font-size: 20px; font-weight: 700; margin: 0 0 10px; letter-spacing: -0.01em; }
.legal__body p { margin: 0; font-size: 16px; line-height: 1.75; color: var(--text-legal); text-wrap: pretty; }
.legal__cta {
  margin-top: 56px; padding: 28px; border-radius: 16px; background: var(--bg-muted);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.legal__cta span { font-size: 16px; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--text-on-dark); }
.site-footer a { color: var(--text-on-dark); }
.site-footer a:hover { color: var(--bg); }
.site-footer__top { padding-top: 48px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 32px 64px; justify-content: space-between; }
.site-footer__logo img { height: 52px; width: auto; display: block; }
.site-footer__cols { display: flex; flex-wrap: wrap; gap: 24px 56px; }
.site-footer__col { display: grid; gap: 8px; align-content: start; }
.site-footer__heading { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bg); }
.site-footer__bottom { padding-top: 20px; padding-bottom: 32px; border-top: 1px solid var(--navy-line); font-size: 13px; }
.notfound__lead { margin: 16px 0 32px; }
