/* Merit Ridge Group LLC — meritridgegroup.com
   Layout idea: a deep navy masthead and hero that the white page rises into as a ridge line;
   everything below is left-aligned, plain, and built from the tokens here.
   Single light theme by choice (brand site). */

:root {
  color-scheme: light;

  --navy:      #0d1b3e;   /* masthead, hero, call band */
  --navy-2:    #17295a;   /* far ridge */
  --navy-3:    #223a7c;   /* near ridge */
  --blue:      #1f4bc4;   /* links, numerals, focus */
  --amber:     #f5b82e;   /* the one accent: primary action, ridge line */
  --amber-d:   #dea017;
  --ink:       #0f1a33;   /* text */
  --muted:     #54607a;   /* secondary text */
  --paper:     #ffffff;
  --mist:      #eef2f9;   /* tinted band */
  --line:      #d4dbe9;
  --on-navy:   #c8d2ea;   /* body text on navy */
  --error:     #b3261e;

  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --body: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.15rem, 4vw, 3rem);
  --measure: 36rem;

  --t-xs:   0.8125rem;
  --t-sm:   0.9375rem;
  --t-base: 1.0625rem;
  --t-md:   1.25rem;
  --t-lg:   1.5rem;
  --t-xl:   clamp(1.75rem, 3.4vw, 2.4rem);
  --t-2xl:  clamp(2.35rem, 6.2vw, 4.4rem);
}

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

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

h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }

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

[id] { scroll-margin-top: 1.5rem; }

.shell { max-width: 70rem; margin: 0 auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  position: fixed; left: 1rem; top: 1rem; z-index: 60;
  background: var(--amber); color: var(--navy);
  padding: 0.65rem 1rem; text-decoration: none; font-weight: 600;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--body);
  font-size: var(--t-sm);
  font-weight: 700;
  line-height: 1.2;
  padding: 0.9rem 1.5rem;
  border-radius: 4px;
  border: 2px solid var(--amber);
  background: var(--amber);
  color: var(--navy);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--amber-d); border-color: var(--amber-d); color: var(--navy); }

.btn-line { background: transparent; border-color: currentColor; color: var(--navy); }
.btn-line:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

.on-navy .btn-line { color: #fff; }
.on-navy .btn-line:hover { background: #fff; border-color: #fff; color: var(--navy); }

.btn-sm { padding: 0.6rem 1.05rem; }

/* ---------- masthead ---------- */

.top { background: var(--navy); color: #fff; }

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.75rem;
  padding-block: 1.1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: #fff; }
.wordmark svg { width: 1.9rem; height: 1.9rem; flex: none; }

.mainnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  font-size: var(--t-sm);
}
.mainnav a:not(.btn) { color: var(--on-navy); text-decoration: none; font-weight: 500; }
.mainnav a:not(.btn):hover,
.mainnav a[aria-current="page"]:not(.btn) { color: #fff; text-decoration: underline; }
.mainnav .phone { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 40rem) {
  .mainnav .phone { display: none; }   /* the dock carries the call button on phones */
  .mainnav { gap: 0.4rem 1.1rem; }
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 4vw, 2.5rem); }

.hero h1 {
  font-size: var(--t-2xl);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 13ch;
  margin-bottom: 1.4rem;
}

.lede { font-size: var(--t-md); line-height: 1.55; color: var(--on-navy); max-width: 46ch; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; margin-top: 2rem; }

.callline { margin-top: 1.25rem; font-size: var(--t-sm); color: var(--on-navy); }
.callline a { color: #fff; font-weight: 700; white-space: nowrap; }

.ridge { display: block; width: 100%; height: clamp(4.5rem, 14vw, 11rem); margin-bottom: -1px; }
.ridge .far  { fill: var(--navy-2); }
.ridge .near { fill: var(--navy-3); }
.ridge .land { fill: var(--paper); }
.ridge .edge { fill: none; stroke: var(--amber); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linejoin: round; }

/* ---------- facts ---------- */

.facts {
  list-style: none;
  margin: 0;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.facts li { border-top: 3px solid var(--navy); padding-top: 0.85rem; }
.facts b { display: block; font-family: var(--display); font-stretch: 112%; font-size: 1.1rem; line-height: 1.2; margin-bottom: 0.3rem; }
.facts span { font-size: var(--t-sm); color: var(--muted); }

/* ---------- sections ---------- */

.band { padding-block: clamp(3rem, 7vw, 5rem); }
.band-mist { background: var(--mist); }
.band-navy { background: var(--navy); color: #fff; }
.band-navy p { color: var(--on-navy); }

.band h2 { font-size: var(--t-xl); max-width: 22ch; margin-bottom: 1.5rem; }

.prose { max-width: var(--measure); }

.duo { display: grid; gap: 1.5rem clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) {
  .duo { grid-template-columns: minmax(0, 19rem) minmax(0, 1fr); }
  .duo > h2 { margin-bottom: 0; }
}

/* ---------- products ---------- */

.offers { margin: 0; border-top: 1px solid var(--line); }
.offers > div {
  display: grid;
  gap: 0.2rem 2rem;
  grid-template-columns: minmax(0, 1fr);
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 40rem) {
  .offers > div { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); align-items: baseline; }
}
.offers dt { font-weight: 700; }
.offers dd { margin: 0; color: var(--muted); font-size: var(--t-sm); max-width: 56ch; }

.aside-note {
  margin-top: 1.75rem;
  font-size: var(--t-sm);
  color: var(--muted);
  max-width: 58ch;
  border-left: 3px solid var(--amber);
  padding-left: 1rem;
}

/* ---------- steps (a real sequence, so it is numbered) ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: 3rem;
  line-height: 1;
  color: var(--blue);
  margin-bottom: 0.6rem;
}
.steps strong { display: block; font-family: var(--display); font-stretch: 112%; font-size: var(--t-md); line-height: 1.2; margin-bottom: 0.4rem; }
.steps p { font-size: var(--t-sm); color: var(--muted); max-width: 40ch; }

/* ---------- three things we won't do ---------- */

.nots { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.nots li { border-top: 3px solid var(--navy); padding-top: 1rem; }
.nots b { display: block; font-family: var(--display); font-stretch: 112%; font-size: var(--t-md); line-height: 1.2; margin-bottom: 0.5rem; }
.nots p { font-size: var(--t-sm); color: var(--muted); max-width: 44ch; }

/* ---------- FAQ ---------- */

.faq { margin: 0; display: grid; gap: 0 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) { .faq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.faq > div { border-top: 1px solid var(--line); padding-block: 1.25rem; }
.faq dt { font-weight: 700; margin-bottom: 0.35rem; }
.faq dd { margin: 0; color: var(--muted); font-size: var(--t-sm); max-width: 52ch; }

/* ---------- call band ---------- */

.callband { display: grid; gap: 1.5rem 3rem; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 52rem) { .callband { grid-template-columns: minmax(0, 1fr) auto; } }
.callband h2 { margin-bottom: 0.6rem; }
.callband .bignum {
  display: inline-block;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.callband .bignum:hover { color: var(--amber); }
.callband .side { display: grid; gap: 1rem; justify-items: start; }

.note {
  margin-top: 0.25rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--amber);
  background: #fff;
  color: var(--ink);
  font-size: var(--t-sm);
  max-width: 34rem;
}
.band-navy .note { color: var(--ink); }
.note[hidden] { display: none; }

/* ---------- contact ---------- */

.contact { display: grid; gap: 1.5rem 3rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); font-size: var(--t-sm); max-width: 44rem; }
.contact h3 { font-family: var(--body); font-stretch: 100%; letter-spacing: 0; font-size: var(--t-xs); font-weight: 700; color: var(--muted); margin-bottom: 0.4rem; }
.contact address { font-style: normal; line-height: 1.7; }
.contact .hours { margin-top: 0.75rem; color: var(--muted); }

/* ---------- apply page ---------- */

.pagehead { padding-block: clamp(1.75rem, 5vw, 3rem); }
.pagehead h1 { font-size: var(--t-xl); font-weight: 800; }
.pagehead p { color: var(--on-navy); max-width: 52ch; margin-top: 0.75rem; }

.applygrid { display: grid; gap: 2.5rem clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 58rem) { .applygrid { grid-template-columns: minmax(0, 38rem) minmax(0, 1fr); } }

.sidecard { border-top: 3px solid var(--navy); padding-top: 1rem; font-size: var(--t-sm); display: grid; gap: 0.9rem; justify-items: start; max-width: 24rem; }
.sidecard h2 { font-size: var(--t-md); margin: 0; }
.sidecard p { color: var(--muted); margin: 0; }
.sidecard .num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sidecard ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.sidecard li { margin-bottom: 0.3rem; }

.field { margin-bottom: 1.3rem; }
.field label { display: block; font-size: var(--t-sm); font-weight: 700; margin-bottom: 0.35rem; }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-xs); margin-top: 0.15rem; }

.field input,
.field select {
  width: 100%;
  font: inherit;
  font-size: var(--t-base);
  color: var(--ink);
  padding: 0.75rem 0.85rem;
  border: 1px solid #aeb8cc;
  border-radius: 4px;
  background: #fff;
}
.field input:focus, .field select:focus { border-color: var(--blue); }
.field [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }

.err { display: block; margin-top: 0.35rem; font-size: var(--t-xs); font-weight: 600; color: var(--error); }

.req { color: var(--error); font-weight: 400; }
.reqnote { font-size: var(--t-xs); color: var(--muted); margin-bottom: 1.25rem; }

.pair { display: grid; gap: 0 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 34rem) { .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.consent { border: 1px solid var(--line); border-radius: 4px; background: var(--mist); padding: 1.15rem; margin-bottom: 1rem; }
.consent-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem; align-items: start; }
.consent-row input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin: 0.2rem 0 0; accent-color: var(--blue); }
.consent-row label { font-size: var(--t-sm); font-weight: 500; line-height: 1.5; }
.optional { color: var(--muted); font-weight: 400; }
.disclosure { font-size: var(--t-xs); color: var(--muted); line-height: 1.6; margin: 0.85rem 0 0; }

.formnote { font-size: var(--t-xs); color: var(--muted); margin-top: 1.25rem; max-width: 52ch; }

.formstate { margin-top: 1.25rem; padding: 0.85rem 1rem; border-left: 3px solid var(--error); background: var(--mist); font-size: var(--t-sm); }
.formstate[hidden] { display: none; }

/* ---------- legal pages ---------- */

.legal { max-width: var(--measure); padding-block: clamp(2.5rem, 6vw, 4rem); }
.legal h1 { font-size: var(--t-xl); font-weight: 800; margin-bottom: 0.4rem; }
.legal .updated { font-size: var(--t-xs); color: var(--muted); margin-bottom: 2.5rem; }
.legal h2 { font-size: var(--t-md); margin: 2.25rem 0 0.6rem; }
.legal ul { padding-left: 1.1rem; }
.legal li { margin-bottom: 0.45rem; }
.legal address { font-style: normal; line-height: 1.7; }
.legal .callout { border-left: 3px solid var(--amber); background: var(--mist); padding: 1rem 1.1rem; margin: 1.25rem 0; }

/* ---------- footer ---------- */

.siteftr { background: var(--mist); border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: var(--t-sm); color: var(--muted); }
.ftr-grid { display: grid; gap: 1.75rem 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 46rem) { .ftr-grid { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr) auto; } }
.siteftr address { font-style: normal; line-height: 1.7; }
.siteftr .legalname { font-weight: 700; color: var(--ink); }
.ftr-links { display: flex; flex-direction: column; gap: 0.4rem; }
.disclaim { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: var(--t-xs); max-width: 68ch; line-height: 1.6; }

/* ---------- phone dock: call and apply always one thumb away ---------- */

.dock { display: none; }
@media (max-width: 40rem) {
  .dock {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom, 0px));
    background: var(--navy);
    border-top: 1px solid var(--navy-3);
  }
  .dock .btn { text-align: center; padding: 0.8rem 0.5rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .dock .btn-line { color: #fff; }
  body { padding-bottom: 4.6rem; }
}
