/* TeamKentAtUplend.com — hybrid template rev 2 (Advisor content / Brand layout, light).
   Tokens per the ratified Uplend palette + V.I.P. base v2.3 (proposal 2026-08-17).
   RULES BAKED IN: accent #8ACB90 is FILL ONLY under dark text ON LIGHT grounds — on a
   sanctioned dark BAND it flips to a strong text/accent (see .cta-dark, brand-ruled
   2026-08-26; full-dark PAGE still not approved); no gradient headlines; fine print in
   full ink on light (interim — #566472 is an OPEN item; on dark bands use white/paper). */

:root {
  /* Uplend's three tokens */
  --uplend-primary: #337C3B;
  --uplend-accent: #8ACB90;
  --uplend-surface: #FFFFFF;

  /* V.I.P. base v2.3 */
  --vipmtginc-ink: #20303F;
  --vipmtginc-paper: #F6F7F9;
  --vipmtginc-paper-deep: #ECF1F6;
  --vipmtginc-poseidon: #13375E;    /* sanctioned base dark ground (vip-brand) */
  --vipmtginc-black: #000000;       /* sanctioned base dark ground (vip-brand) */
  --vipmtginc-rule: #D5DEE7;        /* decorative only — fails 3:1 */
  --vipmtginc-border-interim: #868686; /* flagged stand-in, 3.64:1 — brand escalating */
  --vipmtginc-error: #B0451E;
  --vipmtginc-success: #157960;      /* success state — never Uplend green */
  --vipmtginc-blue-chip: #1B5D93;
  --vipmtginc-star: #B87D08;

  /* Type roles (Gibson licensed; Mukta = ratified free substitute) */
  --font-display: 'Inter', system-ui, sans-serif;          /* 700 — H1/display/stats */
  --font-body: 'Mukta', system-ui, sans-serif;             /* 400 body / 600 heads */
  --font-serif: 'Literata', Georgia, serif;                /* ledes, pull quotes */
  --font-cond: 'Roboto Condensed', system-ui, sans-serif;  /* eyebrows/chips */
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 400 17px/26px var(--font-body);
  color: var(--vipmtginc-ink);
  background: var(--uplend-surface);
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

h1, .h1 { font: 700 clamp(34px, 5vw, 54px)/1.1 var(--font-display); color: var(--vipmtginc-ink); margin: 0 0 16px; }
h2 { font: 600 clamp(26px, 3.5vw, 36px)/1.2 var(--font-body); color: var(--vipmtginc-ink); margin: 0 0 16px; }
h3 { font: 600 20px/1.3 var(--font-body); margin: 0 0 8px; }

.lede { font: 400 20px/32px var(--font-serif); max-width: 60ch; }
.eyebrow {
  font: 700 13px/1 var(--font-cond);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--uplend-primary);
  margin: 0 0 12px;
}

a { color: var(--uplend-primary); }
a:hover { color: var(--vipmtginc-blue-chip); }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 6px;
  font: 600 16px/1.3 var(--font-body); text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--uplend-primary); color: #fff; }
.btn-primary:hover { background: #2A6831; color: #fff; }
.btn-ghost { background: transparent; color: var(--uplend-primary); border-color: var(--uplend-primary); }

/* Dev banner (placeholder LO record) */
.dev-banner {
  background: var(--vipmtginc-error); color: #fff; text-align: center;
  padding: 8px 16px; font: 600 14px/1.4 var(--font-body);
}

/* Header (S1) */
.site-header { background: var(--uplend-surface); border-bottom: 1px solid var(--vipmtginc-rule); }
.header-row { display: flex; align-items: center; gap: 32px; padding: 16px 24px; }
.brand img { display: block; max-width: 200px; height: auto; }
.site-nav { display: flex; gap: 24px; margin-left: auto; flex-wrap: wrap; }
.site-nav a { text-decoration: none; font-weight: 600; color: var(--vipmtginc-ink); }
.site-nav a:hover { color: var(--uplend-primary); }

/* Sections */
.section { padding: 72px 0; }
.section-wash { background: var(--vipmtginc-paper); }
.section-more { margin-top: 32px; }
.page-head { padding: 64px 0 24px; }

/* Hero (S2) — light-adapted cinematic; photo TODO, light wash placeholder */
.hero { position: relative; overflow: hidden; background: var(--vipmtginc-paper-deep); }
.hero-media {
  position: absolute; inset: 0;
  /* Downtown Flagstaff (Weatherford Hotel), G. Edward Johnson, CC BY 4.0,
     via Wikimedia Commons — credit rendered in the footer. Light scrim keeps
     ink text AA-readable and the ground light (no dark grounds, brand rule). */
  background:
    linear-gradient(180deg, rgba(246,247,249,0.92) 0%, rgba(246,247,249,0.72) 45%, rgba(246,247,249,0.88) 100%),
    url('/assets/img/hero-flagstaff.jpg') center 35% / cover no-repeat;
}
.hero-inner { position: relative; padding-top: 88px; padding-bottom: 72px; }
.hero-actions { display: flex; gap: 16px; margin: 24px 0 32px; flex-wrap: wrap; }
.trust-row {
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  list-style: none; margin: 0; padding: 0; font-size: 15px;
}
.stars { color: var(--vipmtginc-star); letter-spacing: 2px; }

/* Trust strip (S3) — chips are accent FILLS under dark text */
.trust-strip { background: var(--uplend-surface); padding: 24px 0; border-bottom: 1px solid var(--vipmtginc-rule); }
.trust-strip-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.google-badge { display: inline-flex; gap: 10px; align-items: center; font-weight: 600; text-decoration: none; color: var(--vipmtginc-ink); }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.chip {
  background: var(--uplend-accent); color: var(--vipmtginc-ink); /* dark text only */
  font: 700 13px/1 var(--font-cond); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px;
}

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card { background: var(--uplend-surface); border: 1px solid var(--vipmtginc-rule); border-radius: 10px; padding: 24px; }
.program-bestfor { min-height: 52px; }
.program-down strong { color: var(--uplend-primary); }
.program-highlights { padding-left: 20px; }

/* Calculator (S4) */
.calc-form { display: grid; gap: 24px; max-width: 760px; }
.calc-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.calc-fields label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.calc-fields input, .calc-fields select {
  padding: 10px 12px; border: 1px solid var(--vipmtginc-border-interim);
  border-radius: 6px; font: inherit; color: var(--vipmtginc-ink);
}
.calc-track { height: 8px; border-radius: 999px; background: var(--vipmtginc-paper-deep); overflow: hidden; }
.calc-track-fill { height: 100%; width: 0; background: var(--uplend-accent); /* green track = accent fill */ }
.calc-payment { font: 700 44px/1 var(--font-display); margin: 12px 0 4px; }
.calc-per { font: 400 18px/1 var(--font-body); margin-left: 4px; }
.calc-note { font-size: 14px; line-height: 1.5; max-width: 60ch; }

/* About (S6) */
.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; }
.portrait-placeholder { aspect-ratio: 1; border-radius: 16px; background: var(--vipmtginc-paper-deep); }
.portrait { width: 100%; height: auto; border-radius: 16px; display: block; }
.credential-card { border-left: 4px solid var(--uplend-primary); background: var(--vipmtginc-paper); padding: 16px 20px; margin: 16px 0; }
.credential-card p { margin: 4px 0; }

/* /about "My story" — family photo beside the bio (Paul-directed 2026-09-08).
   Wider column than .about-grid's 320px: four faces have to stay legible, and the
   crop is 3:4 rather than the square the teaser portrait uses. Radius matches
   .portrait so both photos read as one treatment. No dark override needed — a
   photograph carries its own light in either theme. */
.story-grid { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 48px; align-items: start; }
.story-photo { margin: 0; }
.story-photo img { width: 100%; height: auto; border-radius: 16px; display: block; }

/* Testimonials (S7) */
.card-walk { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.review-card { margin: 0; }
.review-card footer { font-weight: 600; margin-top: 8px; }
.reviews-cta { margin-top: 32px; text-align: center; }

/* Process (S8) */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; counter-reset: step; list-style: none; padding: 0; }
.step { counter-increment: step; }
.step h3::before {
  content: counter(step);
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; margin-right: 10px; border-radius: 50%;
  background: var(--uplend-accent); color: var(--vipmtginc-ink);
  font: 700 15px/1 var(--font-display);
}

/* Pre-qualify (S9) */
.prequal-form { display: grid; gap: 20px; max-width: 640px; }
.prequal-form fieldset { border: none; margin: 0; padding: 0; }
.prequal-form legend { font-weight: 600; margin-bottom: 8px; }
.choice-row { display: flex; gap: 16px; flex-wrap: wrap; }
.choice { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--vipmtginc-border-interim); border-radius: 6px; padding: 10px 16px; }
.prequal-form input[type=text], .prequal-form input[type=email], .prequal-form input[type=tel] {
  padding: 10px 12px; border: 1px solid var(--vipmtginc-border-interim); border-radius: 6px; font: inherit; width: 100%;
}

/* Dark CTA band (S9) — ratified Uplend dark-band spec (brand seat, Paul 2026-08-26).
   A BAND, not a full-dark page. Ground #000000; accent #8ACB90 FLIPS to a strong
   text/accent on dark (11.03:1 AA); primary green #337C3B is NOT used as text here
   (fails on dark); white/paper for body text; NO logo on the band until the reverse
   master lands. Form fields kept white for input readability. */
.cta-dark { background: #000000; border-top: 3px solid var(--uplend-accent); }
.cta-dark .eyebrow { color: var(--uplend-accent); }          /* green pop — 11.03:1 on black */
.cta-dark h2 { color: #FFFFFF; }
.cta-dark .prequal-form legend,
.cta-dark .calc-fields label { color: #FFFFFF; }
.cta-dark .calc-note { color: var(--vipmtginc-paper); }
.cta-dark a { color: var(--uplend-accent); }                 /* not #337C3B (4.09:1 fails on black) */
.cta-dark a:hover { color: #A9DBAE; }
.cta-dark .choice { color: #FFFFFF; border-color: rgba(255, 255, 255, 0.55); }
.cta-dark .prequal-form input[type=text],
.cta-dark .prequal-form input[type=email],
.cta-dark .prequal-form input[type=tel] {
  background: #FFFFFF; color: var(--vipmtginc-ink); border-color: var(--vipmtginc-border-interim);
}
.cta-dark .prequal-form input:focus { outline: 2px solid var(--uplend-accent); outline-offset: 1px; }

/* Accent button — #8ACB90 fill with dark ink ONLY (never green-on-green). The pop CTA. */
.btn-accent { background: var(--uplend-accent); color: var(--vipmtginc-ink); }
.btn-accent:hover { background: #79BD80; color: var(--vipmtginc-ink); }

/* FAQ (S10) */
.faq-list { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--vipmtginc-rule); padding: 8px 0; }
.faq-item summary { font-weight: 600; cursor: pointer; padding: 10px 0; }

/* Footer (S12) */
.site-footer { background: var(--vipmtginc-paper); border-top: 1px solid var(--vipmtginc-rule); padding: 56px 0; margin-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 40px; }
.footer-nav { display: grid; gap: 8px; align-content: start; }
.footer-nav a { text-decoration: none; color: var(--vipmtginc-ink); }
.footer-legal p { margin: 4px 0; font-size: 14px; color: var(--vipmtginc-ink); /* full ink interim — hush-aa OPEN */ }
.footer-ehl { display: flex; align-items: center; gap: 8px; }

/* Forms: states */
.field-error { color: var(--vipmtginc-error); }
.field-success { color: var(--vipmtginc-success); }

@media (max-width: 800px) {
  .about-grid, .story-grid, .footer-grid { grid-template-columns: 1fr; }
  .header-row { flex-wrap: wrap; }
  .header-cta { margin-left: auto; }
}
.footer-credit { font-size: 12.5px; color: var(--vipmtginc-ink); margin-top: 12px; }

/* Loan-programs comparison table */
.table-scroll { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.compare-table th, .compare-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--vipmtginc-rule); }
.compare-table thead th { font: 700 13px/1 var(--font-cond); letter-spacing: 0.12em; text-transform: uppercase; color: var(--uplend-primary); }
.compare-table tbody th { font-weight: 600; white-space: nowrap; }

/* Insights topic previews */
.post-card.coming-soon { background: var(--vipmtginc-paper); }
.post-card.coming-soon h2 { font-size: 20px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-card h2 { font-size: 22px; }

/* About bio */
.bio h2 { margin-top: 40px; }
.bio p { max-width: 68ch; }

/* Apply funnel */
.apply-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; max-width: 720px; }
.apply-step h2 { display: flex; align-items: center; gap: 12px; outline: none; }
.step-num {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; background: var(--uplend-accent); color: var(--vipmtginc-ink);
  font: 700 16px/1 var(--font-display);
}
.apply-step fieldset { border: none; margin: 0 0 16px; padding: 0; }
.apply-step legend { font-weight: 600; margin-bottom: 8px; }
.apply-direct { margin-top: 40px; max-width: 720px; }

/* Blog post (S13) — the long-form reading column.
   Literata is the ratified serif for sustained reading; at 18/32 in a ~68ch
   measure it carries a 1,100-word article without the page reading like a form.
   The green rule is DECORATIVE here (a blockquote border), never text. */
.wrap-narrow { max-width: 768px; }

/* The article starts right under the byline: page-head's bottom padding plus a
   full .section top padding leaves a dead band where other pages carry a lede. */
.post-head { padding-bottom: 8px; }
.post-section { padding-top: 32px; }

.post-byline { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.post-byline-avatar { border-radius: 50%; object-fit: cover; }
.post-byline p { margin: 0; font-size: 15px; line-height: 1.5; }
.post-byline-name { font-weight: 600; }
.post-byline-title::before, .post-byline time::before { content: "\0020\00b7\0020"; }

.post-body { font: 400 18px/32px var(--font-serif); }
.post-body > * + * { margin-top: 24px; }
.post-body h2 { font: 700 26px/34px var(--font-display); margin-top: 44px; }
.post-body h3 { font: 600 21px/30px var(--font-body); margin-top: 32px; }
.post-body ul, .post-body ol { padding-left: 22px; }
.post-body li + li { margin-top: 8px; }
.post-body a { text-decoration: underline; }
.post-body blockquote {
  margin: 32px 0; padding: 6px 0 6px 20px;
  border-left: 3px solid var(--uplend-primary);
  font-size: 22px; line-height: 34px; font-style: italic;
}
.post-body blockquote p { margin: 0; }

/* Rate-figure disclosure. Fine print stays at FULL ink (the hush-aa floor is
   still open, same interim as .footer-legal) — a compliance line is the last
   text on the page that may be dimmed to make it disappear. */
.post-disclosure {
  margin-top: 40px; padding: 16px 20px; border-radius: 6px;
  background: var(--vipmtginc-paper);
  border-left: 3px solid var(--vipmtginc-border-interim);
}
.post-disclosure p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--vipmtginc-ink); }

.post-back { margin-top: 40px; }

/* Index cards. auto-FIT with a max track, not the site-wide auto-fill: with one
   post, auto-fill leaves a 300px column and a title that stacks eight lines deep. */
.post-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 520px)); }
.post-card h2 { font: 700 22px/30px var(--font-display); }
.post-card h2 a { text-underline-offset: 3px; }
.post-date { font: 700 12px/1 var(--font-cond); letter-spacing: 0.12em; text-transform: uppercase; color: var(--uplend-primary); margin-bottom: 10px; }
.post-more { margin-top: 12px; font-size: 15px; }

@media (max-width: 700px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   FULL-DARK PAGE — the site DEFAULT. ?theme=light = light escape hatch.
   Tokens = vip-brand's delivered dark Uplend scheme (deliver-uplend-dark-
   scheme-0826): ground black / Poseidon; accent #8ACB90 FLIPS to a strong AA
   text/accent on dark; #337C3B NEVER as text on dark; body/heading white or paper;
   fine print white/paper (never #566472). The Uplend transparent logo sits on dark
   AS-IS (Paul-ruled; 'UP' pops, 'LEND'/disclosure low-contrast — logos are WCAG-
   contrast-exempt; the footer carries the NMLS attribution as readable text).
   ============================================================================ */
body.theme-dark { background: var(--vipmtginc-black); color: var(--vipmtginc-paper); }
body.theme-dark h1, body.theme-dark h2, body.theme-dark h3, body.theme-dark .h1 { color: #FFFFFF; }
body.theme-dark .lede { color: var(--vipmtginc-paper); }
body.theme-dark .eyebrow { color: var(--uplend-accent); }
body.theme-dark a { color: var(--uplend-accent); }
body.theme-dark a:hover { filter: brightness(1.12); }
body.theme-dark main a:not(.btn) { text-decoration: underline; }  /* colour is not the only link cue */

/* Header + footer dark; transparent logo placed directly on dark (no chip) */
body.theme-dark .site-header { background: var(--vipmtginc-black); border-bottom-color: rgba(213, 222, 231, 0.18); }
body.theme-dark .site-nav a { color: var(--vipmtginc-paper); }
body.theme-dark .site-nav a:hover { color: var(--uplend-accent); }
body.theme-dark .site-footer { background: var(--vipmtginc-black); border-top-color: rgba(213, 222, 231, 0.18); }
body.theme-dark .footer-nav a,
body.theme-dark .footer-nap,
body.theme-dark .footer-legal { color: var(--vipmtginc-paper); }
/* Legal fine print: base `.footer-legal p { color: ink }` is more specific than the div
   rule above, so target the paragraphs directly — light like the nav on dark. */
body.theme-dark .footer-legal p { color: var(--vipmtginc-paper); }
/* Equal Housing Lender mark is black line art (invisible on dark) — reverse it to white.
   Standard permitted reversed rendering of the federal mark; swap for a dedicated white
   SVG later if preferred. */
body.theme-dark .footer-ehl img { filter: invert(1); }
body.theme-dark .footer-credit { color: var(--vipmtginc-paper); }
body.theme-dark .footer-credit a { color: var(--uplend-accent); }

/* Hero: dark scrim so white text reads on the photo */
body.theme-dark .hero { background: var(--vipmtginc-black); }
body.theme-dark .hero-media {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.74) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.82) 100%),
    url('/assets/img/hero-flagstaff.jpg') center 35% / cover no-repeat;
}

/* Sections, washes, cards — cards on ratified ink + a #D5DEE7 hairline for separation */
body.theme-dark .section-wash { background: var(--vipmtginc-black); }
body.theme-dark .card { background: var(--vipmtginc-ink); border-color: rgba(213, 222, 231, 0.25); color: var(--vipmtginc-paper); }
body.theme-dark .credential-card { background: var(--vipmtginc-ink); border-left-color: var(--uplend-accent); }
body.theme-dark .trust-strip { background: var(--vipmtginc-black); border-bottom-color: rgba(213, 222, 231, 0.18); }
body.theme-dark .google-badge { color: var(--vipmtginc-paper); }

/* Buttons: primary → accent fill with dark ink so the green pops on dark */
body.theme-dark .btn-primary { background: var(--uplend-accent); color: var(--vipmtginc-ink); }
body.theme-dark .btn-primary:hover { filter: brightness(0.94); color: var(--vipmtginc-ink); }
body.theme-dark .btn-ghost { color: var(--uplend-accent); border-color: var(--uplend-accent); }

/* Form fields stay white for input readability on dark */
body.theme-dark .calc-fields input, body.theme-dark .calc-fields select,
body.theme-dark .prequal-form input[type=text],
body.theme-dark .prequal-form input[type=email],
body.theme-dark .prequal-form input[type=tel] { background: #FFFFFF; color: var(--vipmtginc-ink); }
body.theme-dark .choice { color: #FFFFFF; border-color: rgba(255, 255, 255, 0.55); }

/* Tables / insights on dark */
body.theme-dark .compare-table th, body.theme-dark .compare-table td { border-bottom-color: rgba(213, 222, 231, 0.18); }
body.theme-dark .post-card.coming-soon { background: var(--vipmtginc-ink); }

/* CTA band on the full-dark page: Poseidon ground so it separates from the black */
body.theme-dark .cta-dark { background: var(--vipmtginc-poseidon); }

/* Blog post on dark. Accent carries emphasis; #337C3B is barred as text here,
   so the blockquote rule flips to #8ACB90 and the disclosure keeps paper copy
   rather than a dimmed grey. */
body.theme-dark .post-body { color: var(--vipmtginc-paper); }
body.theme-dark .post-body blockquote { border-left-color: var(--uplend-accent); color: #FFFFFF; }
body.theme-dark .post-byline { color: var(--vipmtginc-paper); }
body.theme-dark .post-date { color: var(--uplend-accent); }
body.theme-dark .post-disclosure { background: var(--vipmtginc-ink); border-left-color: var(--vipmtginc-border-interim); }
body.theme-dark .post-disclosure p { color: var(--vipmtginc-paper); }
