/* ==========================================================================
   Unity Lending — Design System
   Palette: Forest #173F32 · Bronze #BA895C · Warm neutrals
   Type: Fraunces (display) · Inter (text)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand — forest */
  --forest-900: #0d251d;
  --forest-800: #123528;
  --forest-700: #173f32;   /* primary brand */
  --forest-600: #235141;
  --forest-500: #326553;
  --forest-050: #eef3f0;

  /* Brand — bronze */
  --bronze-700: #8a5e38;   /* bronze for text on light */
  --bronze-600: #a9774b;
  --bronze-500: #ba895c;   /* primary accent / fills / rules */
  --bronze-400: #cda379;
  --bronze-300: #d8b48f;
  --bronze-100: #f3e8db;
  --bronze-050: #faf4ec;

  /* Neutrals */
  --ink:      #1b211e;
  --slate:    #4a544e;
  --slate-2:  #6b746e;
  --line:     #e3e5e1;
  --line-2:   #eceee9;
  --paper:    #ffffff;
  --paper-2:  #f7f6f2;   /* warm off-white section bg */
  --mist:     #eef3f0;   /* pale green section bg */

  /* Semantic */
  --focus:  #173f32;
  --danger: #a3312a;
  --star:   #ba895c;

  /* Radius */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* Shadow */
  --sh-sm: 0 1px 2px rgba(23, 63, 50, .06), 0 1px 3px rgba(23, 63, 50, .10);
  --sh-md: 0 10px 24px -12px rgba(23, 63, 50, .22);
  --sh-lg: 0 30px 60px -24px rgba(13, 37, 29, .30);

  /* Spacing scale */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px;  --s-6: 32px;  --s-7: 48px;  --s-8: 64px;
  --s-9: 96px;  --s-10: 128px;

  /* Layout */
  --container: 1200px;
  --container-narrow: 860px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(64px, 9vw, 112px);
  --header-h: 88px;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --fs-eyebrow: .78rem;
  --fs-sm: .875rem;
  --fs-base: 1.0625rem;   /* 17px */
  --fs-lg: 1.1875rem;
  --fs-xl: 1.375rem;
  --step-h4: clamp(1.15rem, 1.4vw + .9rem, 1.4rem);
  --step-h3: clamp(1.4rem, 2vw + 1rem, 1.9rem);
  --step-h2: clamp(1.9rem, 3.2vw + 1rem, 2.9rem);
  --step-h1: clamp(2.5rem, 5vw + 1rem, 4rem);
  --step-display: clamp(3rem, 7vw + 1rem, 5rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-text);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul[class], ol[class] { list-style: none; padding: 0; }

:focus-visible {
  outline: 3px solid var(--forest-700);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection { background: var(--bronze-300); color: var(--forest-900); }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--forest-800);
  font-optical-sizing: auto;
}
h1 { font-size: var(--step-h1); font-weight: 460; }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); }
h4 { font-size: var(--step-h4); letter-spacing: -0.01em; }

p { max-width: 68ch; }
strong { font-weight: 600; color: var(--forest-800); }

.lede {
  font-size: var(--fs-xl);
  line-height: 1.55;
  color: var(--slate);
  font-weight: 400;
  max-width: 52ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-text);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze-700);
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--bronze-500);
}
.eyebrow--center::after {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--bronze-500);
}
.eyebrow--light { color: var(--bronze-300); }
/* Eyebrows are sometimes headings (see .program-lede below). Pin the body
   line-height so an h2.eyebrow renders identically to a p.eyebrow. */
.eyebrow { line-height: 1.65; }

/* Loan-program sections put the program NAME in the heading (h2.eyebrow) so the
   searchable term carries heading weight; the tagline under it is a paragraph
   styled to match what that h2 looked like before. Purely a markup change. */
.program-lede {
  font-family: var(--font-display);
  font-size: var(--step-h2);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--forest-800);
  font-optical-sizing: auto;
  max-width: none;
  margin: 0;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(48px, 6vw, 72px); }
.section--paper2 { background: var(--paper-2); }
.section--mist { background: var(--mist); }
.section--forest {
  background: var(--forest-700);
  color: #dfe8e3;
}
.section--forest h2,
.section--forest h3 { color: #fff; }
.section--forest + .section--forest { border-top: 1px solid rgba(255, 255, 255, .1); }

.section-head { max-width: 640px; margin-bottom: var(--s-8); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--wide { max-width: none; }
.section-head--wide h2 { font-size: clamp(1.7rem, 2.2vw + 0.9rem, 2.4rem); }
@media (min-width: 1040px) {
  .section-head--wide h2 { white-space: nowrap; }
}
.section-head p { color: var(--slate); font-size: var(--fs-lg); }
.section--forest .section-head p { color: #b9c8c1; }

.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.split > * { min-width: 0; }

@media (max-width: 1120px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--forest-700);
  --btn-fg: #fff;
  --btn-bd: var(--forest-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  min-height: 52px;
  font-family: var(--font-text);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1.5px solid var(--btn-bd);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.btn:hover { background: var(--forest-800); transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn:active { transform: translateY(0); }

.btn--bronze {
  --btn-bg: var(--bronze-500);
  --btn-fg: var(--forest-900);
  --btn-bd: var(--bronze-500);
}
.btn--bronze:hover { background: var(--bronze-600); border-color: var(--bronze-600); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--forest-700);
  --btn-bd: #c9d3ce;
}
.btn--ghost:hover { background: var(--forest-050); border-color: var(--forest-700); color: var(--forest-800); }

.btn--on-forest {
  --btn-bg: #fff;
  --btn-fg: var(--forest-800);
  --btn-bd: #fff;
}
.btn--on-forest:hover { background: var(--bronze-100); border-color: var(--bronze-100); }

.btn--ghost-light {
  --btn-bg: transparent;
  --btn-fg: #fff;
  --btn-bd: rgba(255,255,255,.4);
}
.btn--ghost-light:hover { background: rgba(255,255,255,.08); border-color: #fff; }

.btn--sm { min-height: 44px; padding: 11px 18px; }
.btn--wide { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--forest-700);
}
.link-arrow svg { transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(4px); }
.section--forest .link-arrow { color: var(--bronze-300); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  min-height: var(--header-h);
}
.site-header__logo { flex-shrink: 0; display: block; }
.site-header__logo img { width: clamp(178px, 21vw, 240px); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 36px);
  margin-left: auto;
}
.nav a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--forest-800);
  padding: 6px 2px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.nav a:hover { color: var(--bronze-700); }
.nav a[aria-current="page"] { border-bottom-color: var(--bronze-500); color: var(--forest-800); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-shrink: 0;
}
.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  align-items: center;
  justify-content: center;
  background: var(--forest-050);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: var(--forest-800);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after  { transform: translateY(4px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: rotate(-45deg) translateY(-1.4px) translateX(1.4px); }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: var(--s-3) var(--gutter) var(--s-6);
    box-shadow: var(--sh-lg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav[data-open="true"] { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav a {
    padding: 15px 4px;
    border-bottom: 1px solid var(--line-2);
  }
  .nav a[aria-current="page"] { border-bottom-color: var(--line-2); color: var(--bronze-700); }
}
@media (max-width: 460px) {
  .site-header__inner { gap: 12px; }
  .site-header__logo img { width: 146px; }
  .site-header__actions { gap: 10px; }
  .site-header__actions .btn { padding: 10px 13px; font-size: .78rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(40px, 6vw, 88px) clamp(56px, 9vw, 116px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -14%;
  right: -6%;
  width: 44vw;
  max-width: 620px;
  aspect-ratio: 1;
  background: radial-gradient(circle at 32% 30%, var(--bronze-050), transparent 65%);
  z-index: 0;
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero__copy { max-width: 640px; }
.hero__title {
  font-size: clamp(2.5rem, 4.9vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.032em;
  font-weight: 470;
  margin-bottom: var(--s-5);
}
.hero__title > span { white-space: nowrap; }
.hero__title em { font-style: italic; color: var(--bronze-600); }
@media (max-width: 600px) {
  .hero__title > span { white-space: normal; }
}
.hero .lede { max-width: 46ch; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  margin-top: var(--s-7);
}

.hero__figure { position: relative; }
.hero__figure img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--r-xl) var(--r-xl) var(--r-xl) 84px;
  object-fit: cover;
  aspect-ratio: 4 / 3.5;
  border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
}
.hero__figure::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 60%;
  height: 66%;
  border: 1.5px solid var(--bronze-500);
  border-radius: var(--r-xl) var(--r-xl) var(--r-xl) 84px;
  z-index: 0;
}

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__figure { max-width: 560px; margin-inline: auto; }
  .hero__figure img { aspect-ratio: 4 / 3; }
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-6);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-md);
  border-color: var(--bronze-300);
}
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: var(--r-sm);
  background: var(--forest-050);
  color: var(--forest-700);
  margin-bottom: var(--s-4);
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { font-size: var(--step-h4); margin-bottom: var(--s-2); }
.card h4 { font-size: var(--step-h4); margin-bottom: var(--s-2); }

/* Loan-programs hub: group headings above each band of program cards */
.program-group {
  font-size: var(--fs-eyebrow);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: var(--font-text);
  color: var(--bronze-700);
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
}
.card p { color: var(--slate); font-size: var(--fs-base); }
.card__link { margin-top: var(--s-4); }

/* Program card */
.program-card {
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--bronze-500);
}
.program-card ul {
  margin: var(--s-4) 0 var(--s-5);
  display: grid;
  gap: 8px;
}
.program-card li {
  position: relative;
  padding-left: 26px;
  font-size: var(--fs-sm);
  color: var(--slate);
}
.program-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 14px; height: 8px;
  border-left: 2px solid var(--bronze-600);
  border-bottom: 2px solid var(--bronze-600);
  transform: rotate(-45deg);
}
.program-card .card__link { margin-top: auto; }

/* ---------- Stats band ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
  text-align: center;
}
.stats div { padding: var(--s-4); }
.stats dt {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 500;
  color: var(--bronze-500);
  line-height: 1;
}
.section--forest .stats dt { color: var(--bronze-300); }
.stats dd {
  margin-top: 10px;
  font-size: var(--fs-sm);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--slate-2);
}
.section--forest .stats dd { color: #b9c8c1; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Steps / Process ---------- */
.steps { display: grid; gap: var(--s-8); }
.step {
  padding-top: var(--s-6);
  border-top: 2px solid var(--line);
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.step h3 { font-size: var(--step-h4); margin-bottom: var(--s-3); }
.step__main p { color: var(--slate); }
.step__roles { display: grid; gap: 10px; }
.step__role {
  border-radius: var(--r-sm);
  padding: 15px 17px;
  border-left: 3px solid;
}
.step__role--you { background: var(--forest-050); border-left-color: var(--forest-600); }
.step__role--we { background: var(--bronze-050); border-left-color: var(--bronze-500); }
.step__role-label {
  display: block;
  font-size: var(--fs-eyebrow);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 5px;
}
.step__role--you .step__role-label { color: var(--forest-700); }
.step__role--we .step__role-label { color: var(--bronze-700); }
.step__role p { font-size: var(--fs-sm); color: var(--slate); margin: 0; }
@media (max-width: 760px) {
  .step { grid-template-columns: 1fr; gap: var(--s-5); }
}

/* ---------- Feature split media ---------- */
.framed {
  position: relative;
  border-radius: var(--r-lg);
}
.framed img {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  width: 100%;
  object-fit: cover;
}
.framed::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1.5px solid var(--bronze-300);
  border-radius: var(--r-lg);
  z-index: -1;
}
.check-list { display: grid; gap: var(--s-3); margin-top: var(--s-5); }
.check-list li {
  position: relative;
  padding-left: 34px;
  color: var(--slate);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--forest-050);
  border: 1px solid var(--bronze-300);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 7px; top: 8px;
  width: 9px; height: 5px;
  border-left: 2px solid var(--forest-700);
  border-bottom: 2px solid var(--forest-700);
  transform: rotate(-45deg);
}

/* ---------- Testimonials ---------- */
.testimonials { position: relative; }
.tstage { overflow: hidden; }
.ttrack {
  display: flex;
  transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}
@media (prefers-reduced-motion: reduce) { .ttrack { transition: none; } }
.tslide {
  flex: 0 0 100%;
  padding: 6px;
}
.tcard {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--bronze-500);
  border-radius: var(--r-lg);
  padding: clamp(28px, 5vw, 52px);
  text-align: center;
  max-width: 780px;
  margin-inline: auto;
  box-shadow: var(--sh-md);
}
.section--forest .tcard {
  background: var(--forest-800);
  border-color: var(--forest-600);
}
.tcard__stars {
  display: inline-flex;
  gap: 4px;
  color: var(--star);
  margin-bottom: var(--s-4);
}
.tcard__quote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.4;
  color: var(--forest-800);
  font-weight: 400;
  margin-bottom: var(--s-5);
  max-width: none;
}
.section--forest .tcard__quote { color: #fff; }
.tcard__quote::before { content: "\201C"; }
.tcard__quote::after  { content: "\201D"; }
.tcard__who { font-weight: 600; color: var(--forest-700); }
.section--forest .tcard__who { color: var(--bronze-300); }
.tcard__meta { font-size: var(--fs-sm); color: var(--slate-2); }

.tnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  margin-top: var(--s-6);
}
.tnav button {
  width: 46px; height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #c9d3ce;
  background: var(--paper);
  border-radius: 50%;
  cursor: pointer;
  color: var(--forest-700);
  transition: background-color .15s ease, border-color .15s ease;
}
.tnav button:hover { background: var(--forest-050); border-color: var(--forest-700); }
.section--forest .tnav button {
  background: transparent;
  border-color: var(--forest-500);
  color: #fff;
}
.section--forest .tnav button:hover { background: var(--forest-800); }
.tdots { display: flex; gap: 8px; }
.tdots button {
  width: 9px; height: 9px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: #c9d3ce;
  cursor: pointer;
}
.tdots button[aria-current="true"] { background: var(--bronze-500); width: 26px; border-radius: var(--r-pill); }

/* Testimonial grid (reviews page) */
.review-grid { columns: 3 280px; column-gap: var(--s-5); }
.review-grid .tcard {
  text-align: left;
  break-inside: avoid;
  margin-bottom: var(--s-5);
  padding: var(--s-6);
}
.review-grid .tcard__quote {
  font-size: 1.15rem;
  font-family: var(--font-text);
  line-height: 1.6;
  color: var(--ink);
}
.review-grid .tcard__stars { margin-bottom: var(--s-3); }

/* ---------- Calculator ---------- */
.calc {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(24px, 4vw, 56px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--sh-md);
}

/* Purchase / Refinance tabs */
.calc__tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  margin-bottom: var(--s-6);
}
.calc__tab {
  border: 0;
  background: transparent;
  padding: 9px 24px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--slate);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.calc__tab[aria-selected="true"] { background: var(--forest-700); color: #fff; }

.calc__field { margin-bottom: var(--s-5); }
.calc__field label {
  display: block;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--forest-800);
  margin-bottom: 10px;
}
.calc__input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper-2);
  font: inherit;
  color: var(--ink);
  transition: border-color .15s ease;
}
.calc__input:focus-visible { border-color: var(--forest-700); outline: none; background: #fff; }

.calc__money { position: relative; display: flex; align-items: center; }
.calc__money-sym {
  position: absolute;
  left: 14px;
  font-weight: 600;
  color: var(--slate-2);
  pointer-events: none;
}
.calc__money-sym--suffix { left: auto; right: 14px; }
.calc__input--money { padding-left: 30px; }
.calc__input--suffix { padding-left: 14px; padding-right: 32px; }
.calc__input--down { padding-right: 78px; }
/* down-payment field: % sits after the number (before the unit toggle); $ stays a prefix */
.calc__money-sym.is-suffix { left: auto; right: 86px; }
.calc__input--down.is-pct { padding-left: 14px; padding-right: 104px; }

.calc__toggle {
  position: absolute;
  right: 6px;
  display: inline-flex;
  gap: 2px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 2px;
}
.calc__toggle button {
  border: 0;
  background: transparent;
  width: 30px;
  height: 26px;
  border-radius: 4px;
  font-weight: 700;
  font-size: .8rem;
  color: var(--slate-2);
  cursor: pointer;
}
.calc__toggle button[aria-pressed="true"] { background: var(--forest-700); color: #fff; }

.calc--refi [data-purchase-only] { display: none; }

/* Result panel */
.calc__result {
  background: var(--forest-700);
  color: #fff;
  border-radius: var(--r-md);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* donut palette (tuned for the dark-green panel) */
  --c-pi:  #e9d8b8;
  --c-tax: #cf9366;
  --c-ins: #d98d76;
  --c-hoa: #86a9c4;
  --c-pmi: #e9c96a;
}
.calc__chart {
  position: relative;
  width: min(232px, 80%);
  aspect-ratio: 1;
  margin: 0 auto var(--s-4);
}
.calc__chart-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(rgba(255, 255, 255, .12) 0 100%);
  -webkit-mask: radial-gradient(circle, #0000 0 56%, #000 56.6%);
          mask: radial-gradient(circle, #0000 0 56%, #000 56.6%);
}
.calc__chart-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.calc__chart-center strong {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 1.95rem);
  font-weight: 500;
  color: #fff;
  line-height: 1.1;
}
.calc__chart-center span { font-size: .78rem; color: #b9c8c1; }

.calc__result .label {
  display: block;
  text-align: center;
  font-size: var(--fs-sm);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #b9c8c1;
  margin-bottom: var(--s-4);
}
.calc__breakdown {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--forest-500);
  padding-top: var(--s-4);
}
.calc__breakdown > div { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); }
.calc__breakdown dt { color: #b9c8c1; display: flex; align-items: center; gap: 9px; }
.calc__breakdown dd { font-weight: 600; white-space: nowrap; }
.calc__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--d, #fff); flex-shrink: 0; }
.calc__breakdown-sum {
  border-top: 1px solid var(--forest-500);
  padding-top: 12px;
  margin-top: 2px;
}
.calc__breakdown-sum dt { color: #fff; }

.calc__disclaimer { font-size: .8rem; color: var(--slate-2); margin-top: var(--s-4); max-width: none; }
@media (max-width: 780px) { .calc { grid-template-columns: 1fr; } }

/* ---------- Loan officer ---------- */
.officer {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.officer__photo {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--mist);
  border: 1px solid var(--line);
}
.officer__photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: top; }
.officer__name { font-size: var(--step-h3); }
.officer__role {
  font-size: var(--fs-sm);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bronze-700);
  margin: 6px 0 var(--s-4);
}
.officer__contact { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-5); }
.officer__contact a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--fs-sm); color: var(--forest-700); }
.officer__contact svg { color: var(--bronze-600); }
@media (max-width: 700px) { .officer { grid-template-columns: 1fr; } .officer__photo { max-width: 320px; } }

/* Officer directory grid */
.officer-card { text-align: left; }
.officer-card__photo {
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--s-4);
  border: 1px solid var(--line);
  background: var(--mist);
}
.officer-card__photo img { width: 100%; aspect-ratio: 1/1; object-fit: cover; object-position: top; }
.officer-card h3 { font-size: var(--fs-xl); }
.officer-card .nmls { font-size: var(--fs-sm); color: var(--slate-2); margin-bottom: var(--s-3); }
.officer-card__bio { color: var(--slate); font-size: var(--fs-sm); margin-bottom: var(--s-3); }
.officer-card__bio + .officer-card__bio { margin-top: calc(var(--s-3) * -1 + 10px); }

/* ---------- Process step cards ---------- */
.step-card {
  border-top: 3px solid var(--bronze-500);
  display: flex;
  flex-direction: column;
  padding: var(--s-5);
}
.step-card__label {
  font-size: var(--fs-eyebrow);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bronze-700);
  font-weight: 600;
}
.step-card h3 { font-size: var(--fs-xl); margin: 8px 0 10px; }
.step-card p { font-size: var(--fs-sm); color: var(--slate); }
.section--forest .step-card { background: var(--forest-800); border-color: var(--bronze-400); }
.section--forest .step-card__label { color: var(--bronze-300); }
.section--forest .step-card p { color: #b9c8c1; }

/* ---------- Social links ---------- */
.social { display: flex; gap: 10px; margin-top: var(--s-4); }
.social a {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--forest-600);
  border-radius: var(--r-sm);
  color: #a9bcb3;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.social a:hover { background: var(--forest-700); color: #fff; border-color: var(--forest-700); }

/* ---------- Newsletter ---------- */
.newsletter { display: flex; gap: 10px; max-width: 420px; margin-top: var(--s-4); }
.newsletter input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--forest-600);
  background: var(--forest-800);
  color: #fff;
  border-radius: var(--r-sm);
}
.newsletter input::placeholder { color: #7c9389; }
.newsletter input:focus-visible { outline: 2px solid var(--bronze-400); outline-offset: 1px; }

/* ---------- Two-pillar (why choose) ---------- */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
.pillar h3 {
  font-size: var(--step-h3);
  margin-bottom: var(--s-3);
  padding-top: var(--s-4);
  border-top: 2px solid var(--bronze-500);
}
.pillar p { color: var(--slate); }
@media (max-width: 800px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Accordion (FAQ) ---------- */
.accordion { border-top: 1px solid var(--line); }
.accordion details {
  border-bottom: 1px solid var(--line);
}
.accordion summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-5) 0;
  font-family: var(--font-display);
  font-size: var(--step-h4);
  color: var(--forest-800);
  cursor: pointer;
  list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "";
  flex-shrink: 0;
  width: 14px; height: 14px;
  border-right: 2px solid var(--bronze-600);
  border-bottom: 2px solid var(--bronze-600);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.accordion details[open] summary::after { transform: rotate(-135deg); }
.accordion details > div { padding: 0 0 var(--s-5); color: var(--slate); max-width: 68ch; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-5); }
.form-field { display: flex; flex-direction: column; min-width: 0; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { font-weight: 600; font-size: var(--fs-sm); margin-bottom: 8px; color: var(--forest-800); }
.form-field label .req { color: var(--bronze-700); }
.form-field input, .form-field select, .form-field textarea {
  min-width: 0;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
  transition: border-color .15s ease;
}
.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible { border-color: var(--forest-700); outline: none; }
.form-field textarea { resize: vertical; min-height: 130px; }
.form-hint { font-size: var(--fs-sm); color: var(--slate-2); margin-top: 6px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Contact info list ---------- */
.info-list { display: grid; gap: var(--s-5); }
.info-list li { display: flex; gap: var(--s-4); }
.info-list .ico {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--forest-050);
  color: var(--forest-700);
}
.info-list dt { font-weight: 600; color: var(--forest-800); }
.info-list dd { color: var(--slate); font-size: var(--fs-sm); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { color: #fff; max-width: 18ch; margin-inline: auto; }
.cta-band p { color: #b9c8c1; margin: var(--s-4) auto 0; font-size: var(--fs-lg); }
.cta-band .hero__actions { justify-content: center; margin-top: var(--s-6); }
.cta-band:not(.section--forest) h2 { color: var(--forest-800); }
.cta-band:not(.section--forest) p { color: var(--slate); }

/* ---------- Page hero (interior) ---------- */
.page-hero {
  background: var(--forest-700);
  color: #dfe8e3;
  padding-block: clamp(56px, 8vw, 96px);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  right: -60px; top: 50%;
  transform: translateY(-50%);
  width: 320px; height: 320px;
  background: url("../img/mark.svg") center/contain no-repeat;
  opacity: .12;
}
.page-hero h1 { color: #fff; max-width: 18ch; }
.page-hero h1.oneline { max-width: none; font-size: clamp(1.9rem, 3.4vw + 0.5rem, 2.9rem); }
@media (min-width: 720px) { .page-hero h1.oneline { white-space: nowrap; } }
.page-hero h1.h1-lg { max-width: none; font-size: clamp(1.9rem, 3.4vw + 0.5rem, 2.9rem); text-wrap: balance; }
.page-hero h1.h1-2line {
  max-width: none;
  font-size: clamp(1.45rem, 2.7vw + 0.6rem, 2.7rem);
  text-wrap: balance;
}
@media (min-width: 640px) { .page-hero h1.h1-2line { max-width: 22ch; } }
.page-hero p { color: #b9c8c1; font-size: var(--fs-xl); max-width: 54ch; margin-top: var(--s-4); }
.breadcrumb { display: flex; gap: 8px; font-size: var(--fs-sm); color: #9db3aa; margin-bottom: var(--s-4); }
.breadcrumb a:hover { color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-900);
  color: #a9bcb3;
  padding-block: var(--s-9) var(--s-6);
  font-size: var(--fs-sm);
}
.site-footer__top {
  display: grid;
  grid-template-columns: 1fr 1.7fr 1fr;
  gap: var(--s-6);
  padding-bottom: var(--s-7);
  border-bottom: 1px solid var(--forest-600);
}
.site-footer__brand img { width: 180px; margin-bottom: var(--s-4); }
.site-footer__brand p { max-width: 34ch; color: #90a89e; }
.site-footer h4 {
  color: #fff;
  font-family: var(--font-text);
  font-size: var(--fs-sm);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: var(--s-4);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a:hover { color: #fff; }
/* "Explore" links — 3 columns x 2 rows; text left-aligned, block centered in its column */
.site-footer__top > div:nth-child(2) {
  width: max-content;
  margin-inline: auto;
}
.site-footer__top > div:nth-child(2) ul {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 12px var(--s-6);
}
.site-footer__top > div:nth-child(2) li { margin-bottom: 0; }
@media (max-width: 720px) {
  .site-footer__top > div:nth-child(2) ul { grid-template-columns: repeat(2, max-content); }
}
@media (max-width: 520px) {
  .site-footer__top > div:nth-child(2) { width: auto; margin-inline: 0; }
}
.site-footer__legal {
  padding-top: var(--s-6);
  display: grid;
  gap: var(--s-4);
  color: #7c9389;
  font-size: .82rem;
  line-height: 1.7;
}
.site-footer__legal p { max-width: none; }
.site-footer__legal .row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-4);
}
.eho {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #a9bcb3;
}
.eho svg { flex-shrink: 0; }
@media (max-width: 860px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .site-footer__top { grid-template-columns: 1fr; }
}

/* ---------- Legal / long-form pages ---------- */
.legal-body .legal-date {
  font-size: var(--fs-sm);
  color: var(--slate-2);
  margin-bottom: var(--s-7);
}
.legal-body > p:first-of-type { font-size: var(--fs-lg); color: var(--slate); }
.legal-body h2 {
  font-size: var(--step-h3);
  margin-top: var(--s-8);
  margin-bottom: var(--s-3);
}
.legal-body p { color: var(--slate); margin-bottom: var(--s-4); max-width: none; }
.legal-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-5);
  display: grid;
  gap: var(--s-3);
}
.legal-body li {
  position: relative;
  padding-left: 26px;
  color: var(--slate);
}
.legal-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--bronze-500);
}
.legal-body strong { color: var(--forest-800); }

/* ---------- Disclosure / callout ---------- */
.callout {
  background: var(--bronze-050);
  border: 1px solid var(--bronze-100);
  border-left: 3px solid var(--bronze-500);
  border-radius: var(--r-sm);
  padding: var(--s-5);
  font-size: var(--fs-sm);
  color: var(--slate);
}
.section--forest .callout {
  background: var(--forest-800);
  border-color: var(--forest-600);
  border-left-color: var(--bronze-400);
  color: #c6d5ce;
}
.section--forest .callout strong { color: #fff; }

/* Placeholder marker — flags copy/data Unity Lending still needs to supply.
   Cosmetic only. To ship: replace the content, then delete this rule (or add
   class "hide-tbd" to <body>). Find every spot by searching for class="tbd". */
.tbd {
  border-bottom: 1.5px dotted rgba(186, 137, 92, .7);
  background: linear-gradient(transparent 82%, rgba(186, 137, 92, .12) 0);
}
.hide-tbd .tbd { border-bottom: 0; background: none; }

/* ---------- Reveal on scroll (progressive enhancement) ---------- */
/* Content is visible by default; only hidden once JS confirms it can reveal it. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Helpers ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-5); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  background: var(--forest-700);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  z-index: 200;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }
