/* =========================================================
   Mortgage Lending Utah — design system
   ========================================================= */

:root {
  --ink: #1E2A32;
  --ink-soft: #47555D;
  --ink-faint: #6B7A82;
  --paper: #F7F5EE;
  --panel: #EFEAD9;
  --panel-deep: #E6DFC7;
  --line: #DCD3B8;
  --brass: #9C6B34;
  --brass-deep: #7C5427;
  --brass-soft: #C6976A;
  --juniper: #47593F;
  --juniper-soft: #EEF0E7;
  --white: #FFFFFF;
  --cream: #FBFAF6;

  --shadow-sm: 0 1px 2px rgba(30, 42, 50, 0.06), 0 1px 1px rgba(30, 42, 50, 0.04);
  --shadow-md: 0 6px 20px rgba(30, 42, 50, 0.08), 0 2px 6px rgba(30, 42, 50, 0.05);
  --shadow-lg: 0 20px 50px rgba(30, 42, 50, 0.14), 0 6px 16px rgba(30, 42, 50, 0.08);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --max: 1120px;
  --max-text: 720px;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.4rem, 4.2vw + 1rem, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 2.2vw + 1rem, 2.35rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: inherit; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

section { padding: 88px 0; }
section + section { border-top: 1px solid var(--line); }

.eyebrow-line {
  display: inline-block;
  width: 46px;
  height: 3px;
  background: var(--brass);
  border-radius: 2px;
  margin-bottom: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin-bottom: 14px;
}

.section-head { max-width: var(--max-text); margin-bottom: 48px; }
.section-head p { font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--brass-deep);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--ink); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--brass-deep); color: var(--brass-deep); }
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 245, 238, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  gap: 24px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.22rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark span { color: var(--brass-deep); font-style: italic; }

nav.links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.94rem;
  font-weight: 500;
}
nav.links a {
  text-decoration: none;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.15s ease;
}
nav.links a:not(.call-btn):hover { color: var(--ink); }
nav.links a:not(.call-btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--brass-deep);
  transition: right 0.18s ease;
}
nav.links a:not(.call-btn):hover::after { right: 0; }

.call-btn {
  background: var(--brass-deep);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.15s ease;
}
.call-btn:hover { background: var(--ink); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin: -8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 90px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
}
.hero.no-rule { border-top: none; }
.hero .topo-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero .lede { font-size: 1.18rem; max-width: 46ch; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

.trust-strip {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
}
.trust-chip svg { width: 16px; height: 16px; flex: none; }

.hero-art {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--panel);
  aspect-ratio: 4 / 3.3;
}
.hero-art svg { width: 100%; height: 100%; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}
.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--juniper-soft);
  color: var(--juniper);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; font-size: 0.96rem; }

/* ---------- Two-col cards ---------- */
.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 34px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card .icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 10px; }
.card p { margin: 0; }

/* ---------- Licensing / disclosure ---------- */
.disclosure {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 38px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.disclosure dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 18px 40px;
  margin: 0;
  flex: 1 1 420px;
}
.disclosure dt {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-deep);
  font-weight: 700;
  margin-bottom: 3px;
}
.disclosure dd {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.98rem;
}
.eho {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  max-width: 30ch;
  padding-top: 4px;
}
.eho a { color: var(--brass-deep); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Text-updates CTA band ---------- */
#updates {
  background: var(--ink);
  border-top: none;
}
.text-signup { max-width: var(--max-text); }
.text-signup .eyebrow-line { background: var(--brass-soft); }
.text-signup h2 { color: var(--white); }
.text-signup p { color: rgba(251, 250, 246, 0.78); }
.text-signup .code {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 14px 26px;
  border-radius: 999px;
  margin: 22px 0 20px;
}
.text-signup .fine {
  font-size: 0.85rem;
  color: rgba(251, 250, 246, 0.6);
  max-width: 62ch;
}
.text-signup .fine a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Footer ---------- */
footer.site {
  background: var(--ink);
  color: rgba(251, 250, 246, 0.72);
  padding: 64px 0 32px;
  border-top: none;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
footer.site h3 {
  color: var(--white);
  font-size: 1.02rem;
  margin-bottom: 12px;
}
footer.site p { color: rgba(251, 250, 246, 0.62); margin: 0; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer.site a { text-decoration: none; color: rgba(251, 250, 246, 0.72); transition: color 0.15s ease; }
footer.site a:hover { color: var(--white); }
.foot-legal {
  padding-top: 26px;
  font-size: 0.82rem;
  color: rgba(251, 250, 246, 0.5);
  max-width: 78ch;
}

/* ---------- Page hero (secondary pages) ---------- */
.page-hero { padding-bottom: 20px; }
.page-hero .lede { max-width: 62ch; }
.updated-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brass-deep);
  background: var(--panel);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 18px;
}

/* ---------- Legal content ---------- */
.legal {
  max-width: var(--max-text);
}
.legal h2 {
  font-size: 1.3rem;
  margin-top: 2.2em;
  padding-top: 0.2em;
}
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--ink-soft); font-size: 1rem; }
.legal ul { padding-left: 1.2em; }
.legal .callout {
  background: var(--juniper-soft);
  border: 1px solid #D7DECB;
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin: 1.6em 0;
}
.legal .callout p:last-child { margin: 0; }
.legal .contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
}
.legal .contact-card p { margin: 0 0 4px; }

/* ---------- Webinar form ---------- */
.webinar-layout {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: start;
}
.webinar-copy h2 { margin-top: 1.4em; }
.webinar-copy h2:first-child { margin-top: 0; }
.webinar-copy ul { padding-left: 1.2em; color: var(--ink-soft); }
.webinar-copy li { margin-bottom: 0.5em; }

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 38px;
  box-shadow: var(--shadow-md);
}
.form-card h3 { margin-bottom: 6px; }
.form-card > p { font-size: 0.94rem; margin-bottom: 26px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--juniper);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(71, 89, 63, 0.14);
}
.checkbox-field {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 22px 0 26px;
}
.checkbox-field input { width: auto; margin-top: 4px; accent-color: var(--juniper); }
.checkbox-field label {
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.5;
  font-weight: 400;
}
.submit-btn {
  background: var(--brass-deep);
  color: var(--white);
  border: none;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  width: 100%;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.15s ease;
}
.submit-btn:hover { background: var(--ink); transform: translateY(-1px); }
.submit-btn:disabled { opacity: 0.65; cursor: default; transform: none; }
.form-note { font-size: 0.84rem; color: var(--ink-soft); margin-top: 14px; }
#form-status {
  margin-top: 18px;
  font-size: 0.94rem;
  display: none;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
#form-status.success { display: block; background: var(--juniper-soft); color: var(--juniper); border: 1px solid #D7DECB; }
#form-status.error { display: block; background: #FBEAE7; color: #96341F; border: 1px solid #F2CFC7; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  section { padding: 64px 0; }
  .hero { padding: 56px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { order: -1; aspect-ratio: 16/9; }
  .steps { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .disclosure { padding: 28px; }
  .disclosure dl { grid-template-columns: 1fr 1fr; }
  .webinar-layout { grid-template-columns: 1fr; }

  nav.links {
    position: fixed;
    inset: 68px 16px auto 16px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
  }
  nav.links a { padding: 12px 10px; border-radius: 6px; }
  nav.links a:hover { background: var(--panel); }
  nav.links a::after { display: none; }
  nav.links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .call-btn { text-align: center; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 20px; }
  .disclosure dl { grid-template-columns: 1fr; }
}
