/* ===================================================================
   Evoque Lending — Broker Loan Submission Portal
   =================================================================== */
:root {
  --navy: #0e1c3d;
  --navy-2: #16294d;
  --gold: #c19a4e;
  --gold-dark: #a87f37;
  --cream: #faf6ec;
  --ink: #1b2a4a;
  --text: #2b3550;
  --muted: #6b7488;
  --line: #e3ddcd;
  --white: #ffffff;
  --error: #c0392b;
  --success: #1e8a4c;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(14, 28, 61, 0.08);
  --shadow-lg: 0 18px 50px rgba(14, 28, 61, 0.14);
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 124px; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, legend {
  font-family: "Montserrat", "Inter", system-ui, sans-serif;
  color: var(--navy);
  letter-spacing: -0.01em;
}

a { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.accent { color: var(--gold); }
.muted { color: var(--muted); font-weight: 600; }
.req { color: var(--gold-dark); font-weight: 700; }

/* ----------------------------- Header ----------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 78px; gap: 18px;
}
.brand-logo { height: 46px; width: auto; display: block; }
.footer-logo { height: 52px; width: auto; }

.primary-nav { display: flex; align-items: center; gap: 22px; }
.primary-nav a {
  color: var(--navy); font-weight: 600; font-size: 0.93rem;
  text-decoration: none; white-space: nowrap;
}
.primary-nav a:hover { color: var(--gold-dark); text-decoration: none; }
.nav-cta {
  background: var(--navy); color: #fff !important; padding: 10px 16px;
  border-radius: 8px; font-weight: 700 !important;
}
.nav-cta:hover { background: var(--navy-2); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none;
  border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 26px; height: 3px; background: var(--navy); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.tagline-strip {
  background: var(--navy); color: #d9cfb4;
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; text-align: center; padding: 7px 0;
}

/* ------------------------------ Hero ------------------------------ */
.hero { background: var(--cream); padding: 48px 0 26px; }
.hero-grid {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: start;
}
.hero-copy h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.06; margin: 0 0 16px; font-weight: 800; }
.lede { font-size: 1.08rem; color: var(--text); max-width: 38ch; margin: 0 0 22px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.badge {
  display: inline-block; border: 2px solid var(--gold); color: var(--gold-dark);
  background: #fff; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 8px 16px; border-radius: 30px;
}
.badge.ghost { border-color: var(--line); color: var(--muted); }
.hero-btn { margin-top: 4px; }

/* Guidelines card */
.guidelines-card {
  background: var(--navy); color: #ede6d3; border-radius: var(--radius);
  padding: 26px 26px 30px; box-shadow: var(--shadow-lg);
}
.guidelines-card h2 { color: #fff; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 14px; }
.guidelines-block.alt { margin-top: 24px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.14); }
.guidelines-card .muted { color: var(--gold); }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.check-list li { position: relative; padding-left: 26px; font-size: 0.95rem; color: #e7e0cd; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 11px; height: 11px;
  background: var(--gold); border-radius: 2px;
}
.check-list strong { color: #fff; }

/* ------------------------------ Form ------------------------------ */
.form-wrap { padding: 18px 0 60px; }
.form-intro { max-width: 760px; margin: 14px auto 26px; text-align: center; }
.section-title { font-size: 1.9rem; margin: 0 0 8px; }
.form-intro p { color: var(--muted); margin: 0; }
.draft-indicator {
  display: inline-block; margin-top: 12px !important; color: var(--success);
  font-weight: 600; font-size: 0.85rem;
}
.draft-indicator::before { content: "✓ "; }

#loanForm { max-width: 880px; margin: 0 auto; }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px 30px; margin: 0 0 22px; box-shadow: var(--shadow);
}
legend {
  font-size: 1.18rem; font-weight: 700; padding: 0; margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px; width: 100%;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; background: var(--navy); color: #fff;
  border-radius: 50%; font-size: 0.92rem; font-weight: 700; flex: none;
  font-family: "Inter", sans-serif;
}

.grid { display: grid; gap: 18px 20px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; min-width: 0; }
.field.span-2 { grid-column: 1 / -1; }

label { font-weight: 600; color: var(--ink); font-size: 0.92rem; margin-bottom: 7px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
select, textarea {
  font: inherit; color: var(--text); background: #fff;
  border: 1.5px solid var(--line); border-radius: 9px; padding: 12px 14px;
  width: 100%; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(193, 154, 78, 0.18);
}
input:disabled, select:disabled { background: #f4f1ea; }
select { appearance: none; 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 fill='%236b7488' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }

.hint { color: var(--muted); font-size: 0.78rem; margin-top: 5px; }
.field-help { color: var(--muted); margin: -6px 0 16px; font-size: 0.92rem; }

.error { color: var(--error); font-size: 0.8rem; margin-top: 6px; min-height: 0; display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.field.invalid .error, .error.show { display: block; }

/* Dropzone */
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius);
  background: #fcfbf6; padding: 30px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus, .dropzone.dragover {
  border-color: var(--gold); background: #fbf6ea; outline: none;
}
.upload-icon { color: var(--gold-dark); margin-bottom: 6px; }
.dropzone p { margin: 4px 0; }
.link-like { color: var(--gold-dark); font-weight: 700; text-decoration: underline; }
.dz-meta { color: var(--muted); font-size: 0.82rem; }

.file-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.file-list li {
  display: flex; align-items: center; gap: 12px; background: #fbf9f3;
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px;
}
.file-list .fi-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .fi-size { color: var(--muted); font-size: 0.82rem; margin-left: auto; white-space: nowrap; }
.file-list .fi-remove {
  background: none; border: 0; color: var(--error); cursor: pointer; font-size: 1.2rem;
  line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.file-list .fi-remove:hover { background: #fde9e6; }
.file-list li.too-big { border-color: var(--error); background: #fdeeec; }
.file-list li.too-big .fi-size { color: var(--error); font-weight: 600; }

/* Consent + submit */
.consent-card { background: #fcfbf6; }
.checkbox-field { flex-direction: row; align-items: flex-start; gap: 12px; }
.checkbox-field input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--gold-dark); }
.checkbox-field label { font-weight: 500; color: var(--text); margin: 0; font-size: 0.93rem; }

.submit-row { display: flex; align-items: center; gap: 18px; margin-top: 22px; flex-wrap: wrap; }
.fine-print { color: var(--muted); font-size: 0.82rem; margin: 16px 0 0; }
.form-error-summary { color: var(--error); font-weight: 600; margin: 16px 0 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: 9px;
  padding: 13px 26px; transition: background .15s, transform .05s, box-shadow .15s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: var(--navy); box-shadow: 0 6px 16px rgba(193,154,78,0.32); }
.btn-primary:hover { background: var(--gold-dark); color: #fff; text-decoration: none; }
.btn-lg { padding: 15px 34px; font-size: 1.04rem; }
.btn-text { background: none; color: var(--muted); padding: 13px 8px; }
.btn-text:hover { color: var(--ink); }
.btn[disabled] { opacity: 0.75; cursor: progress; }

.spinner {
  width: 18px; height: 18px; border: 2.5px solid rgba(14,28,61,0.25);
  border-top-color: var(--navy); border-radius: 50%; display: none;
  animation: spin .7s linear infinite;
}
.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Honeypot */
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* Confirmation */
.confirmation { max-width: 680px; margin: 20px auto; }
.confirmation-inner {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 50px 36px; text-align: center;
}
.confirm-check {
  width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%;
  background: rgba(30,138,76,0.12); color: var(--success);
  display: flex; align-items: center; justify-content: center;
}
.confirmation h2 { font-size: 1.8rem; margin: 0 0 12px; }
.confirmation p { color: var(--text); margin: 0 auto 12px; max-width: 46ch; }
.confirm-ref { color: var(--muted) !important; font-size: 0.9rem; }
.confirm-contact { font-size: 0.95rem; }
.confirmation .btn { margin-top: 14px; }

/* ----------------------------- Footer ----------------------------- */
.site-footer { background: var(--navy); color: #cdd4e0; margin-top: 20px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px;
  padding: 48px 22px 36px;
}
.footer-logo { filter: brightness(0) invert(1); opacity: 0.95; }
.footer-tag { color: var(--gold); font-weight: 600; margin: 14px 0 0; }
.footer-col h3 { color: #fff; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 14px; }
.footer-col p { margin: 0 0 9px; font-size: 0.92rem; color: #c3cbda; }
.footer-col a { color: #d7dce6; }
.footer-col a:hover { color: var(--gold); text-decoration: none; }
.social-row { display: flex; flex-direction: column; gap: 9px; }

.footer-legal { border-top: 1px solid rgba(255,255,255,0.12); padding: 22px 0 30px; }
.legal-links { margin: 0 0 12px; display: flex; gap: 10px; font-size: 0.86rem; }
.legal-links a { color: #d7dce6; }
.disclosure { font-size: 0.78rem; color: #97a1b5; line-height: 1.6; margin: 0 0 12px; max-width: 92ch; }
.disclosure a { color: #c8cfdc; text-decoration: underline; }
.disclosure a:hover { color: var(--gold); }
.copyright { font-size: 0.8rem; color: #8c96ab; margin: 0; }

/* --------------------------- Responsive --------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); padding: 8px 0; display: none;
  }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: 13px 22px; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .primary-nav a:last-child { border-bottom: 0; }
  .nav-cta { margin: 8px 22px; text-align: center; border-radius: 8px; }

  .grid.two { grid-template-columns: 1fr; }
  .card { padding: 22px 18px 24px; }
  .hero { padding: 30px 0 14px; }
  .section-title { font-size: 1.55rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .submit-row { flex-direction: column; align-items: stretch; }
  .submit-row .btn { width: 100%; }
}

@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .brand-logo { height: 38px; }
  .confirmation-inner { padding: 36px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation: none; }
}
