/* Total Trust Home Loans — brand: navy #113a5c, sky #3f93d1, ink #0b0b0c */
:root {
  --navy: #113a5c;
  --navy-deep: #0c2b45;
  --sky: #3f93d1;
  --sky-soft: #e8f2fa;
  --ink: #16181d;
  --muted: #5a6472;
  --line: #e3e8ee;
  --bg: #ffffff;
  --bg-alt: #f6f9fc;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(17, 58, 92, .10);
  --font-head: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* ---------- Spacing scale ----------------------------------------------
     Every vertical gap on the site comes from this ladder. Before this
     existed the bands were on ad-hoc values (80/72, 64/70.4, 25.6, 48…)
     which is what made the rhythm look uneven. One band = one token.
     The clamps handle mobile, so no separate mobile padding overrides. */
  --s-1:  .5rem;
  --s-2:  .85rem;
  --s-3:  1.25rem;
  --s-4:  1.75rem;
  --s-5:  2.5rem;
  --s-6:  3.5rem;

  /* the single vertical rhythm every full-width band shares */
  --band:      clamp(3.25rem, 6.5vw, 5.5rem);
  --band-tight: clamp(2rem, 4vw, 3rem);
  --band-slim: clamp(1.25rem, 2.4vw, 1.75rem);

  /* inner padding for every card/panel, so nothing is cramped */
  --pad-card:  clamp(1.35rem, 2.4vw, 1.9rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1160px, 92%); margin-inline: auto; }
.center { text-align: center; margin-top: 2.2rem; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; color: var(--navy); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; letter-spacing: -.01em; margin-bottom: 1.2rem; }
h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: .5rem; }

.eyebrow {
  font-family: var(--font-head); font-weight: 700; font-size: .8rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--sky);
  margin-bottom: .7rem;
}

.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 700;
  border-radius: 10px; padding: .78rem 1.5rem; font-size: .95rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  cursor: pointer; border: 2px solid transparent; text-decoration: none !important;
}
.btn-lg { padding: .95rem 1.9rem; font-size: 1.03rem; }
.btn-primary { background: var(--sky); color: #fff; box-shadow: 0 6px 18px rgba(63,147,209,.35); }
.btn-primary:hover { background: #2f82c2; transform: translateY(-2px); }
.btn-ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-ghost:hover { background: var(--navy); color: #fff; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .55rem 0; }
.brand-logo { height: 54px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 1.6rem; list-style: none; }
.nav-menu a:not(.btn) {
  color: var(--ink); font-weight: 600; font-size: .93rem;
}
.nav-menu a:not(.btn):hover { color: var(--sky); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 34px; position: relative; }
.nav-toggle span {
  position: absolute; left: 8px; right: 8px; height: 2.5px; background: var(--navy); border-radius: 2px;
  transition: all .2s ease;
}
.nav-toggle span:nth-child(1){ top: 8px } .nav-toggle span:nth-child(2){ top: 16px } .nav-toggle span:nth-child(3){ top: 24px }

/* Hero */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(63,147,209,.18), transparent 60%),
    linear-gradient(180deg, var(--bg-alt), #fff 75%);
  padding: var(--band) 0;
}
.hero-inner { display: grid; grid-template-columns: 1.25fr .75fr; gap: 3.5rem; align-items: center; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 1.1rem 0 1.8rem; max-width: 34rem; }
.accent { color: var(--sky); }
.hero-ctas { display: flex; gap: .9rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.hero-points { list-style: none; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.hero-points li { font-size: .88rem; font-weight: 600; color: var(--navy); padding-left: 1.3rem; position: relative; }
.hero-points li::before {
  content: "✓"; position: absolute; left: 0; color: var(--sky); font-weight: 800;
}
.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 2.2rem; text-align: center;
}
.hero-house svg { width: 70%; margin: 0 auto 1.2rem; }
.hero-card-title { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: var(--navy); }
.hero-card-sub { font-size: .9rem; color: var(--muted); margin-top: .5rem; }

/* Trust bar */
.trustbar { background: var(--navy); color: #fff; padding: var(--band-slim) 0; }
.trustbar-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.trust-item { display: flex; flex-direction: column; gap: .15rem; }
.trust-num { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; color: #9ecbec; }
.trust-label { font-size: .82rem; opacity: .85; }

/* Sections */
.section { padding: var(--band) 0; }
.section:nth-of-type(even) { background: var(--bg-alt); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.2rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem; transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card p { color: var(--muted); font-size: .93rem; flex: 1; }
.card-link { font-weight: 700; font-size: .92rem; margin-top: 1rem; display: inline-block; }

/* Process */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; margin-top: 2.4rem; counter-reset: step; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem;
  position: relative;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--sky-soft); color: var(--sky);
  font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; margin-bottom: 1rem;
}
.step p { color: var(--muted); font-size: .92rem; }

/* About */
.about-inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3.5rem; align-items: center; }
.about-photo { position: relative; }
.about-photo img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: auto; }
.about-badge {
  position: absolute; left: 1rem; bottom: 1rem; right: 1rem;
  background: rgba(17,58,92,.92); color: #fff; border-radius: 10px; padding: .7rem 1rem;
  display: flex; flex-direction: column; backdrop-filter: blur(4px);
}
.about-badge strong { font-family: var(--font-head); }
.about-badge span { font-size: .8rem; opacity: .85; }
.about-copy p:not(.eyebrow) { color: var(--muted); margin-bottom: 1rem; }
.about-ctas { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* Reviews */
.reviews-sub { color: var(--muted); margin-top: -.4rem; }
.review-rotator { max-width: 720px; margin: 2.2rem auto 0; }
.review-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 2.4rem; text-align: center; min-height: 240px;
  display: flex; flex-direction: column; justify-content: center; gap: 1rem;
  transition: opacity .35s ease;
}
.review-card.is-fading { opacity: 0; }
.review-stars { color: #f5a623; font-size: 1.25rem; letter-spacing: .2em; }
.review-text { font-size: 1.08rem; color: var(--ink); font-style: italic; }
.review-meta { display: flex; gap: .8rem; justify-content: center; align-items: baseline; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.review-meta cite { font-style: normal; font-weight: 700; color: var(--navy); }
.review-source { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.review-controls { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin-top: 1.3rem; }
.review-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  font-size: 1.05rem; cursor: pointer; color: var(--navy); transition: background .15s ease;
}
.review-btn:hover { background: var(--sky-soft); }
.review-dots { display: flex; gap: .45rem; }
.review-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); border: 0; padding: 0; cursor: pointer; }
.review-dot.is-active { background: var(--sky); }
.review-cta { margin-top: 1.6rem; font-weight: 600; }
.review-sample-flag {
  display: inline-block; background: #fff3cd; color: #7a5d00; font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; border-radius: 6px; padding: .2rem .55rem;
}

/* Contact */
.contact-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: start; }
.contact-copy > p:not(.eyebrow) { color: var(--muted); margin-bottom: 1.4rem; }
.contact-list { list-style: none; margin: 0 0 1.8rem; display: flex; flex-direction: column; gap: .9rem; }
.contact-list li { display: flex; flex-direction: column; }
.contact-label { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sky); }
.contact-list a, .contact-list span:not(.contact-label) { font-size: 1.08rem; font-weight: 600; color: var(--ink); }
.contact-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 2rem; display: flex; flex-direction: column; gap: 1rem;
}
.contact-form label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .88rem; color: var(--navy); }
.contact-form input, .contact-form textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem; font: inherit;
  background: var(--bg-alt);
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--sky); background: #fff; }
.form-note { font-size: .78rem; color: var(--muted); }

/* Footer */
.site-footer { background: var(--navy-deep); color: #cfdbe6; padding: var(--band-tight) 0 var(--band-slim); }
.footer-inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; }
.footer-logo {
  height: 96px; width: auto; background: #fff; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 1rem;
}
@media (max-width: 700px) { .footer-logo { height: 80px; } }
.footer-brand p { font-size: .88rem; }
.footer-legal { font-size: .8rem; display: flex; flex-direction: column; gap: .6rem; }
.footer-legal a { color: #9ecbec; }
.footer-eho { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.eho { width: 60px; height: 60px; fill: #e8f2fa; flex: none; }
.footer-eho {
  display: flex; align-items: center; gap: .8rem;
  margin: 1.1rem 0 .6rem; font-weight: 700; color: #e8f2fa;
  font-family: var(--font-head); font-size: .95rem; letter-spacing: .01em;
}

/* ===== Scroll effects ===== */

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--sky), var(--navy));
  z-index: 100; transition: width .1s linear;
}

/* Header condenses on scroll */
.site-header { transition: box-shadow .25s ease; }
.brand-logo { transition: height .25s ease; }
.site-header.is-scrolled { box-shadow: 0 4px 22px rgba(17, 58, 92, .10); }
.site-header.is-scrolled .brand-logo { height: 42px; }

/* Hero entrance */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
.js-anim .hero-copy > * { animation: rise-in .65s ease both; }
.hero-copy > *:nth-child(1) { animation-delay: .05s; }
.hero-copy > *:nth-child(2) { animation-delay: .15s; }
.hero-copy > *:nth-child(3) { animation-delay: .25s; }
.hero-copy > *:nth-child(4) { animation-delay: .35s; }
.hero-copy > *:nth-child(5) { animation-delay: .45s; }
.js-anim .hero-card { animation: rise-in .75s ease .4s both; will-change: transform; }
.hero-card { will-change: transform; }

/* Attention pulse on the nav Apply button */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 6px 18px rgba(63, 147, 209, .35); }
  50% { box-shadow: 0 6px 30px rgba(63, 147, 209, .75); }
}
.nav-menu .js-apply { animation: pulse-glow 3s ease-in-out infinite; }

/* Trust bar number pop */
@keyframes num-pop {
  0% { opacity: 0; transform: translateY(14px) scale(.85); }
  60% { transform: translateY(-3px) scale(1.06); }
  100% { opacity: 1; transform: none; }
}
.js-anim .trustbar .trust-item { opacity: 0; }
.trustbar.is-visible .trust-item { opacity: 1; }
.trustbar.is-visible .trust-num { animation: num-pop .6s ease both; }
.trustbar.is-visible .trust-item:nth-child(1) .trust-num { animation-delay: .05s; }
.trustbar.is-visible .trust-item:nth-child(2) .trust-num { animation-delay: .2s; }
.trustbar.is-visible .trust-item:nth-child(3) .trust-num { animation-delay: .35s; }
.trustbar.is-visible .trust-item:nth-child(4) .trust-num { animation-delay: .5s; }

/* Section heading underline sweep */
.section h2 { position: relative; }
.section h2::after {
  content: ""; display: block; height: 4px; width: 0; margin-top: .55rem;
  border-radius: 2px; background: linear-gradient(90deg, var(--sky), var(--navy));
  transition: width .7s ease .15s;
}
.section.is-visible h2::after { width: 84px; }

/* Reveal on scroll (staggered + directional) */
.js-anim .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .6s ease, transform .6s ease;
  transition-delay: var(--d, 0s);
}
.reveal-left { transform: translateX(-36px); }
.reveal-right { transform: translateX(36px); }
.js-anim .reveal.is-visible { opacity: 1; transform: none; }
/* Failsafe: if the observer never fires, show everything rather than hide it. */
.reveal-off .reveal,
.reveal-off .hero-copy > *,
.reveal-off .hero-card,
.reveal-off .trustbar .trust-item,
.reveal-off .trustbar .trust-num {
  opacity: 1 !important; transform: none !important; animation: none !important;
}

/* Calm mode for motion-sensitive visitors */
@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-card, .nav-menu .js-apply,
  .trustbar.is-visible .trust-num { animation: none !important; }
  .trustbar .trust-item { opacity: 1; }
  .js-anim .reveal { opacity: 1; transform: none; transition: none; }
  .section h2::after { width: 84px; transition: none; }
  .scroll-progress { display: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner, .about-inner, .contact-inner, .footer-inner { grid-template-columns: 1fr; }
  .hero-card { display: none; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .trustbar-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .card-grid, .steps { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 1.2rem 5%; gap: 1rem; align-items: flex-start;
  }
  .nav-menu.is-open { display: flex; }
}

/* ---------- Explainer promo band (links to /heloc-vs-mortgage.html) ----------
   A <div>, not a <section>, so it doesn't flip the .section:nth-of-type(even)
   background alternation for everything below it. */
.explainer-promo {
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 70%, #17507c 100%);
  color: #fff;
  padding: var(--band) 0;
}
.explainer-promo-inner {
  display: grid; grid-template-columns: 1.4fr .9fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.explainer-promo h2 { color: #fff; margin-bottom: var(--s-3); max-width: 20ch; }
.explainer-promo .eyebrow { color: #8fc4ea; }
.explainer-promo > .container > .explainer-promo-copy p { color: #d6e6f3; max-width: 54ch; }

/* The CTA gets its own panel so the button reads as a destination,
   not as a stray link floating in the middle of a paragraph. */
.promo-panel {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  backdrop-filter: blur(3px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
}
.promo-panel-kicker {
  font-family: var(--font-head); font-weight: 800; font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; color: #8fc4ea;
  margin-bottom: var(--s-2);
}
.promo-panel-line {
  color: #e3eef8 !important; font-size: .96rem; line-height: 1.5;
  margin-bottom: var(--s-4); max-width: 32ch; margin-inline: auto;
}
.promo-btn {
  display: inline-block; width: 100%;
  padding-block: 1.05rem; font-size: 1.06rem;
  box-shadow: 0 10px 26px rgba(63, 147, 209, .45);
}
.promo-btn span { display: inline-block; transition: transform .18s ease; margin-left: .2rem; }
.promo-btn:hover span { transform: translateX(4px); }
.explainer-promo-note {
  font-size: .82rem; color: #a9c8e0 !important; line-height: 1.5;
  margin-top: var(--s-3); margin-bottom: 0;
}
@media (max-width: 820px) {
  .explainer-promo-inner { grid-template-columns: 1fr; }
  .explainer-promo h2 { max-width: none; }
  .promo-panel { text-align: left; }
  .promo-panel-line { margin-inline: 0; }
}

/* ---------- $2,000 Best Price Guarantee banner (top of home page) ----------
   A <div>, not a <section>, so it does not flip .section:nth-of-type(even). */
.guarantee-bar {
  background: linear-gradient(135deg, #0c2b45 0%, #113a5c 55%, #17507c 100%);
  color: #fff; padding: var(--band-tight) 0;
  border-bottom: 3px solid var(--sky);
}
.guarantee-inner {
  display: grid; grid-template-columns: 1.6fr auto;
  gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
}
.guarantee-kicker {
  font-family: var(--font-head); font-weight: 800; font-size: .74rem;
  letter-spacing: .16em; text-transform: uppercase; color: #7dc0ee;
  margin-bottom: .4rem;
}
.guarantee-head {
  color: #fff; font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  margin-bottom: .5rem; letter-spacing: -.01em;
}
.guarantee-sub { color: #e3eef8; font-size: clamp(.98rem, 1.6vw, 1.08rem); max-width: 62ch; }
.guarantee-sub strong { color: #fff; }
.guarantee-fine {
  color: #a9c8e0; font-size: .78rem; line-height: 1.55;
  margin-top: .7rem; max-width: 72ch;
}
.guarantee-fine a { color: #7dc0ee; font-weight: 700; white-space: nowrap; }
.guarantee-cta { text-align: center; }
.guarantee-cta .btn { box-shadow: 0 10px 26px rgba(63,147,209,.45); }
.guarantee-terms-link {
  display: block; margin-top: .7rem; font-size: .82rem;
  color: #a9c8e0; text-decoration: underline;
}
.guarantee-terms-link:hover { color: #fff; }
@media (max-width: 820px) {
  .guarantee-inner { grid-template-columns: 1fr; }
  .guarantee-cta { text-align: left; }
  .guarantee-cta .btn { width: 100%; }
}
