/* CashGo — cheque-paper sage, graphite ink, the logo's red for "Apply" only. */
:root {
  --ink: #23272E;
  --muted: #5B6470;
  --paper: #FBFCFA;
  --sage: #E6EFE8;
  --sage-deep: #D3E2D7;
  --line: #A9C3B1;
  --red: #E2262D;
  --red-dark: #B81B21;
  --focus: #1F6FEB;

  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* modular scale, ratio 1.25 on an 18px body */
  --s-1: 0.889rem;
  --s0: 1.125rem;
  --s1: 1.406rem;
  --s2: 1.758rem;
  --s3: 2.197rem;
  --s4: 2.747rem;
  --s5: clamp(2.6rem, 6.2vw, 4.29rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 66ch;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--s0)/1.6 var(--body);
  font-optical-sizing: auto;
  font-variant-numeric: lining-nums;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a[href^="tel:"] { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.008em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--s5); font-weight: 760; letter-spacing: -0.018em; line-height: 1.04; }
h2 { font-size: var(--s3); }
h3 { font-size: var(--s1); line-height: 1.2; }
p, ul, ol, dl { margin: 0 0 1em; }
p { text-wrap: pretty; }

.wrap { width: min(100% - 2 * var(--gutter), 72rem); margin-inline: auto; }
.prose { max-width: var(--measure); }
.lede { font-size: var(--s1); line-height: 1.45; color: var(--ink); max-width: 34ch; }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: -999px; top: 0.5rem; z-index: 10;
  background: var(--ink); color: #fff; padding: 0.5rem 1rem;
}
.skip:focus { left: 0.5rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.7rem 1.35rem;
  border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1.1 var(--body); text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }
.btn--quiet { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--quiet:hover { background: var(--ink); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* ---------- masthead ---------- */
.masthead { background: var(--paper); border-bottom: 1px solid var(--sage-deep); position: relative; z-index: 5; }
.masthead__bar { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }
.brand img { width: 150px; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; margin-left: auto; }
.site-nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { text-decoration: none; font-weight: 700; color: var(--muted); padding: 0.5rem 0; }
.site-nav ul a:hover, .site-nav ul a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }
.site-nav__actions { display: flex; gap: 0.6rem; }
.menu-toggle { display: none; }

@media (max-width: 920px) {
  .masthead__bar { flex-wrap: wrap; min-height: 64px; }
  .brand img { width: 128px; }
  .menu-toggle {
    display: inline-flex; align-items: center; margin-left: auto; min-height: 44px; padding: 0 1rem;
    border: 2px solid var(--ink); border-radius: 999px; background: transparent;
    font: 700 1rem var(--body); color: var(--ink); cursor: pointer;
  }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 1rem; padding: 0.5rem 0 1.25rem; margin: 0; }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--sage-deep); box-shadow: none; }
  .site-nav ul a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--red); padding-left: 0.75rem; }
  .site-nav__actions { flex-direction: column; }
  .js .site-nav:not(.is-open) { display: none; }
}
/* without JS the menu stays visible on small screens */
@media (max-width: 920px) { html:not(.js) .site-nav { display: flex; } html:not(.js) .menu-toggle { display: none; } }

/* ---------- cheque-paper band (hero + page heads) ---------- */
.cheque {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--sage);
  border-bottom: 1px solid var(--line);
}
.cheque .guilloche {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1;
  color: var(--line); opacity: 0.55;
}

.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { max-width: 13ch; }
.hero .lede { margin-bottom: 1.75rem; }
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; } }

/* ---------- payment calculator (signature element) ---------- */
.calc {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(35, 39, 46, 0.35);
}
.calc__title { font-size: var(--s1); margin-bottom: 1.25rem; }
.calc__field { margin: 0 0 1.35rem; padding: 0; border: 0; min-width: 0; }
.calc__label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.5rem; }
.calc__label-row label, .calc__freq legend { font-weight: 700; }
.calc__value { font: 700 var(--s2)/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.calc__scale { display: flex; justify-content: space-between; font-size: var(--s-1); color: var(--muted); margin-top: -0.1rem; }

/* range slider: graphite track, red fill up to the thumb (--fill set by site.js) */
.range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 32px; margin: 0; background: transparent; cursor: pointer;
  --fill: 26%;
}
.range::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(to right, var(--red) 0 var(--fill), var(--sage-deep) var(--fill) 100%);
}
.range::-moz-range-track { height: 8px; border-radius: 999px; background: var(--sage-deep); }
.range::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--red); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 30px; height: 30px; margin-top: -11px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--ink);
  box-shadow: 0 2px 6px rgba(35, 39, 46, 0.25);
}
.range::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--ink);
  box-shadow: 0 2px 6px rgba(35, 39, 46, 0.25);
}
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--focus); outline-offset: 2px; }
.range:focus-visible::-moz-range-thumb { outline: 3px solid var(--focus); outline-offset: 2px; }

.calc__freq legend { margin-bottom: 0.5rem; padding: 0; }
.segmented { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ink); border-radius: 8px; overflow: hidden; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 0.35rem 0.4rem; font-size: 0.9rem; font-weight: 700; line-height: 1.15;
  cursor: pointer; color: var(--muted);
}
.segmented label + input + label, .segmented input + label ~ label { border-left: 1px solid var(--ink); }
.segmented input:checked + label { background: var(--ink); color: var(--paper); }
.segmented input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: -3px; }
@media (max-width: 420px) { .segmented { grid-template-columns: repeat(2, minmax(0, 1fr)); } .segmented input + label ~ label { border-left: 0; } .segmented label:nth-of-type(even) { border-left: 1px solid var(--ink); } .segmented label:nth-of-type(n+3) { border-top: 1px solid var(--ink); } }

.calc__result { border-top: 1px dashed var(--line); padding-top: 1.1rem; margin-bottom: 1.1rem; }
.calc__payment { margin: 0 0 0.35rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.6rem; }
#calc-payment { font: 800 var(--s4)/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.calc__per { font-weight: 700; color: var(--muted); }
.calc__detail { margin: 0; color: var(--muted); font-size: var(--s-1); }
.calc__cta { width: 100%; }
.calc__fine { margin: 0.9rem 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--muted); }

.hero__note { margin-top: 1.1rem; color: var(--muted); }

/* ---------- sections ---------- */
.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section--sage { background: var(--sage); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink a { color: #fff; }
.section--ink .muted { color: #B9C3CC; }
.section__head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head p { color: var(--muted); font-size: var(--s1); line-height: 1.45; }
.section--ink .section__head p { color: #C9D2DA; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); }
.split--wide-left { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
@media (max-width: 820px) { .split, .split--wide-left { grid-template-columns: 1fr; } }

/* steps: a real sequence, so numbered */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.steps li { counter-increment: step; padding: 0 clamp(1rem, 3vw, 2.25rem) 0 0; position: relative; }
.steps li + li { padding-left: clamp(1rem, 3vw, 2.25rem); border-left: 1px solid var(--line); }
.steps li::before {
  content: counter(step);
  display: block; font: 800 var(--s4)/1 var(--display); color: var(--red); margin-bottom: 0.75rem;
}
.steps h3 { margin-bottom: 0.4rem; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 1.75rem; }
  .steps li, .steps li + li { padding: 0 0 0 4rem; border: 0; }
  .steps li::before { position: absolute; left: 0; top: -0.2rem; }
}

/* check list for requirements */
.checks { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.checks li { position: relative; padding: 0.6rem 0 0.6rem 2.25rem; border-bottom: 1px solid var(--sage-deep); }
.checks li::before {
  content: ""; position: absolute; left: 0.15rem; top: 0.95rem; width: 1.15rem; height: 0.6rem;
  border-left: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(-45deg);
}
.section--sage .checks li { border-color: var(--line); }

/* plain cost table */
.costs { width: 100%; border-collapse: collapse; font-size: var(--s0); font-variant-numeric: tabular-nums; }
.costs th, .costs td { text-align: left; padding: 0.85rem 0; border-bottom: 1px solid rgba(251, 252, 250, 0.18); vertical-align: top; }
.costs th { font-weight: 400; color: #C9D2DA; width: 46%; padding-right: 1rem; }
.costs td { font-weight: 700; }
.costs tr:last-child th, .costs tr:last-child td { border-bottom: 0; }

.example {
  align-self: start;
  border: 1px solid rgba(251, 252, 250, 0.25); border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.example__figure { font: 800 var(--s4)/1 var(--display); margin: 0.25rem 0 0.75rem; letter-spacing: -0.02em; }
.example p { margin-bottom: 0.6rem; }

.columns-list { columns: 2 16rem; column-gap: 3rem; padding-left: 1.2rem; }
.columns-list li { break-inside: avoid; margin-bottom: 0.5rem; }

/* quote */
.pull {
  font: 600 var(--s2)/1.25 var(--display); letter-spacing: -0.01em;
  border-left: 4px solid var(--red); padding-left: 1.25rem; margin: 0 0 2rem; max-width: 30ch;
}

/* FAQ */
.faq { border-top: 1px solid var(--line); max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font: 700 var(--s1)/1.3 var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.5rem; top: 50%; width: 0.7rem; height: 0.7rem;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 0 1.25rem; max-width: var(--measure); }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* page heads */
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.page-head h1 { font-size: var(--s4); max-width: 18ch; }
.page-head p { font-size: var(--s1); line-height: 1.45; max-width: 40ch; margin: 0; color: var(--ink); }

/* forms page */
.form-shell { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.form-shell__form { background: #fff; border: 1px solid var(--sage-deep); border-radius: var(--radius); padding: clamp(0.5rem, 2vw, 1.5rem); min-width: 0; }
.form-shell__form iframe { display: block; width: 100%; border: 0; }
.aside { position: sticky; top: 1.5rem; }
.aside h2 { font-size: var(--s1); }
.aside ul { padding-left: 1.1rem; }
@media (max-width: 900px) { .form-shell { grid-template-columns: 1fr; } .aside { position: static; } }

/* contact */
.contact-lines { list-style: none; padding: 0; margin: 0 0 2rem; }
.contact-lines li { padding: 1rem 0; border-bottom: 1px solid var(--sage-deep); }
.contact-lines span { display: block; color: var(--muted); font-size: var(--s-1); }
.contact-lines a, .contact-lines strong { font: 700 var(--s1)/1.3 var(--display); text-decoration: none; }
.contact-lines a:hover { text-decoration: underline; }
.map { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--radius); }

/* customer strip */
.customer-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.customer-strip a { display: block; padding: 1.25rem 1.25rem 1.25rem 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.customer-strip a + a { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.customer-strip strong { display: block; font: 700 var(--s1)/1.25 var(--display); }
.customer-strip span { color: var(--muted); }
.customer-strip a:hover strong { text-decoration: underline; text-underline-offset: 0.18em; }
@media (max-width: 720px) {
  .customer-strip { grid-template-columns: 1fr; }
  .customer-strip a + a { padding-left: 0; border-left: 0; }
}

.provinces { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.provinces li { border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.9rem; background: var(--paper); }

/* confirmation pages */
.confirm { padding-block: clamp(3rem, 9vw, 7rem); }
.confirm h1 { font-size: var(--s4); }

/* ---------- footer ---------- */
.footer { background: var(--sage); border-top: 1px solid var(--line); padding-top: clamp(2.5rem, 6vw, 4rem); font-size: 1rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; }
.footer__brand img { width: 140px; margin-bottom: 1rem; }
.footer__lender { color: var(--muted); }
.footer__heading { font: 700 1rem/1.3 var(--body); margin-bottom: 0.75rem; }
.footer__list { list-style: none; padding: 0; margin: 0; }
.footer__list li { margin-bottom: 0.45rem; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.5rem; margin-top: 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--s-1); }
.footer__legal p { margin: 0; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- contact form ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-form { max-width: 44rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.field__optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 0.65rem 0.8rem;
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #8C96A0; border-radius: 8px;
}
.field textarea { resize: vertical; min-height: 9rem; line-height: 1.5; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.5rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--red-dark); border-width: 2px; }
.field__hint { margin: 0.35rem 0 0; font-size: var(--s-1); color: var(--muted); }
.field__error { margin: 0.35rem 0 0; font-size: var(--s-1); font-weight: 700; color: var(--red-dark); }
.form-status { padding: 0.9rem 1rem; border-radius: 8px; margin-bottom: 1.5rem; font-weight: 700; }
.form-status--error { background: #FCE8E8; color: var(--red-dark); border: 1px solid #F2B8BA; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-aside .map { margin-top: 1.5rem; }
.contact-form button[disabled] { opacity: 0.7; cursor: progress; }

.faq__more { margin-top: 1.5rem; }
.footer__disclosure { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: var(--s-1); color: var(--muted); max-width: none; }
.footer__disclosure p { max-width: 90ch; }
.footer__disclosure strong { color: var(--ink); }
.footer__legal { margin-top: 0; }

/* privacy / legal pages */
.legal h2 { font-size: var(--s2); margin-top: 2.5rem; }
.legal h3 { font-size: var(--s0); font-family: var(--body); font-weight: 700; margin: 1.5rem 0 0.35rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.6rem; }
.form-note { margin: 1rem 0.25rem 0.25rem; font-size: var(--s-1); color: var(--muted); }
