/* ============================================================
   Fast Financial — 2026-11 revamp
   ------------------------------------------------------------
   The current design. Loaded after legacy.css, which holds the
   older sheets inside `@layer legacy`; nothing in this file is
   layered, so every rule here wins over the old one it replaces.

   Direction: one type family for headlines (Schibsted Grotesk)
   and one for text (Switzer), ink-navy heroes with white cards,
   brand red kept for the actions, and the first question of the
   rate walkthrough in view on the home page.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* The serif and the mono are retired; both aliases now resolve to the text face. */
  --font-serif: var(--font-sans);
  --font-mono: var(--font-sans);

  --display-lg: clamp(2.5rem, 1.6rem + 3.7vw, 4.5rem);    /* home h1 */
  --display-md: clamp(2.2rem, 1.55rem + 2.7vw, 3.5rem);   /* page h1 */
  --display-sm: clamp(1.85rem, 1.45rem + 1.7vw, 2.7rem);  /* section h2 */
  --text-xl: clamp(1.0625rem, 1rem + 0.3vw, 1.2rem);
  --text-lead: var(--text-xl);

  --leading-display: 1.04;
  --leading-tight: 1.06;
  --tracking-tighter: -0.035em;
  --tracking-tight: -0.03em;
  --tracking-label: 0.1em;

  --surface-page: #f5f7fa;
  --header-h: 72px;
  --hero-ink: #0a0e14;
}

/* ---------- 2. Base type ---------- */
/* Tabular figures are switched off everywhere: in both brand faces the tabular set also
   widens the comma and the period, which opened gaps inside "$4,467" and "6.875". */
:where(*) { font-variant-numeric: normal; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: var(--tracking-tight); text-wrap: balance; }
h1, h2 { font-weight: 800; line-height: var(--leading-tight); }
h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
p { text-wrap: pretty; }

.ff-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-brand);
}
.ff-eyebrow::before { display: none; }

.sec-head { max-width: 46rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem); }
.sec-head h2, .page-sections .sec-head h2 { font-family: var(--font-display); font-size: var(--display-sm); font-weight: 800; line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
.sec-head .ff-eyebrow { margin-bottom: var(--space-3); }
.sec-head p { font-size: var(--text-lead); line-height: 1.6; }
.sec-head--split { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-5); }
.sec-head--split > div { max-width: 40rem; }

/* ---------- 3. Buttons ---------- */
.ff-btn { font-weight: 700; letter-spacing: -0.005em; }
.ff-btn--lg { min-height: 54px; }
.ff-btn--primary { box-shadow: 0 1px 2px rgba(134, 19, 27, 0.3), 0 10px 22px -10px rgba(224, 22, 36, 0.6); }
.ff-btn--primary:hover { box-shadow: 0 1px 2px rgba(134, 19, 27, 0.3), 0 14px 28px -10px rgba(224, 22, 36, 0.7); }

/* ---------- 4. Header ---------- */
.ff-header { background: rgba(255, 255, 255, 0.95); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--border-subtle); }
.ff-header__link { font-size: 0.95rem; font-weight: 600; }

/* ---------- 5. Home hero with the goal picker ---------- */
.hero-x { position: relative; isolation: isolate; overflow: clip; background: var(--hero-ink); color: #fff; }
.hero-x__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero-x__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 14, 20, 0.94) 0%, rgba(10, 14, 20, 0.82) 42%, rgba(10, 14, 20, 0.42) 100%),
    linear-gradient(180deg, rgba(10, 14, 20, 0.15) 0%, rgba(10, 14, 20, 0.55) 100%);
}
.hero-x__inner { display: grid; gap: clamp(2rem, 1rem + 4vw, 3rem); align-items: center; padding-block: clamp(2.25rem, 1.5rem + 4vw, 5rem); }
.hero-x__copy { display: grid; gap: var(--space-5); justify-items: start; max-width: 40rem; }
.hero-x__eyebrow { font-size: 0.76rem; font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ff-red-300); }
.hero-x h1 { color: #fff; font-size: var(--display-lg); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.hero-x__sub { max-width: 34rem; font-size: var(--text-lead); line-height: 1.6; color: rgba(255, 255, 255, 0.84); }
.hero-x__reassure { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; font-weight: 600; color: rgba(255, 255, 255, 0.92); }
.hero-x__reassure svg { flex: none; width: 20px; height: 20px; color: #4ade80; }
.hero-x__talk { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; color: #fff; border-bottom: 1.5px solid rgba(255, 255, 255, 0.45); padding-bottom: 2px; transition: border-color 0.2s ease; }
.hero-x__talk svg { width: 18px; height: 18px; transition: transform 0.2s ease; }
.hero-x__talk:hover { border-color: #fff; }
.hero-x__talk:hover svg { transform: translateX(3px); }
@media (min-width: 1000px) {
  .hero-x__inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 480px); gap: clamp(2.5rem, 5vw, 5.5rem); min-height: min(720px, calc(100dvh - var(--header-h))); }
}
@media (max-width: 999px) {
  .hero-x__scrim { background: linear-gradient(180deg, rgba(10, 14, 20, 0.9) 0%, rgba(10, 14, 20, 0.8) 50%, rgba(10, 14, 20, 0.62) 100%); }
  .hero-x__copy { gap: var(--space-4); }
  .hero-x__reassure, .hero-x__talk { display: none; }
}

.goal-card { background: #fff; color: var(--text-body); border-radius: 22px; padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); box-shadow: 0 4px 12px rgba(10, 14, 20, 0.12), 0 30px 70px -26px rgba(10, 14, 20, 0.6); scroll-margin-top: calc(var(--header-h) + 16px); }
.goal-card h2 { margin-top: 0.4rem; font-size: clamp(1.5rem, 1.35rem + 0.7vw, 1.85rem); letter-spacing: -0.03em; line-height: 1.1; color: var(--text-strong); }
.goal-card__intro { margin-top: 0.4rem; font-size: 0.95rem; color: var(--text-muted); }
.goal-card__list { display: grid; gap: 0.6rem; margin-top: 1.1rem; }
.goal-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.9rem; padding: 0.8rem 0.95rem; border: 1.5px solid var(--border-strong); border-radius: 14px; background: #fff; color: var(--text-strong); transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease; }
.goal-row:hover { border-color: var(--brand); background: var(--brand-tint); transform: translateY(-1px); }
.goal-row:active { transform: scale(0.99); }
.goal-row__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--ff-ink-75); color: var(--ff-ink-800); }
.goal-row__icon svg { width: 22px; height: 22px; }
.goal-row--buy .goal-row__icon { background: var(--ff-buy-tint); color: var(--ff-buy-strong); }
.goal-row--refi .goal-row__icon { background: var(--ff-refi-tint); color: var(--ff-refi-strong); }
.goal-row--self .goal-row__icon { background: var(--ff-self-tint); color: var(--ff-self-strong); }
.goal-row--inv .goal-row__icon { background: var(--ff-inv-tint); color: var(--ff-inv-strong); }
.goal-row__text { display: grid; gap: 0.15rem; min-width: 0; }
.goal-row__text b { font-family: var(--font-display); font-size: 1.06rem; font-weight: 700; letter-spacing: -0.015em; }
.goal-row__text small { font-size: 0.84rem; line-height: 1.4; color: var(--text-muted); }
.goal-row__arrow { width: 20px; height: 20px; color: var(--brand); transition: transform 0.18s ease; }
.goal-row:hover .goal-row__arrow { transform: translateX(3px); }
.goal-card__foot { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--border-subtle); font-size: 0.84rem; color: var(--text-muted); }

/* ---------- 6. Press strip, self-employed band ---------- */
.pressband { background: #fff; }
.pressband__label { font-family: var(--font-sans); font-weight: 700; letter-spacing: var(--tracking-label); }
.self-employed-section { padding-block: clamp(1.5rem, 1rem + 2vw, 2.5rem) 0; }

/* ---------- 7. Steps, how it works + example scenario ---------- */
.sec-head::after, h2.sec-head::after { display: none; }
.steps { gap: var(--space-5); border: 0; }
.step { min-height: 0; padding: 1.5rem; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.step::after { display: none; }
.step__n { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 1rem; border-radius: 12px; background: var(--ff-ink-900); color: #fff; font-family: var(--font-display); font-size: 1rem; font-weight: 800; line-height: 1; }
.step h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.step p { max-width: none; font-size: 1rem; }

.how-grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
.how-grid .sec-head { margin-bottom: var(--space-6); }
.how-grid .steps { grid-template-columns: 1fr; gap: 0; }
.how-grid .step { display: grid; grid-template-columns: auto 1fr; column-gap: 1.1rem; padding: 1.2rem 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; }
.how-grid .step:last-child { border-bottom: 1px solid var(--border); }
.how-grid .step__n { grid-row: span 2; margin: 0; }
@media (min-width: 960px) { .how-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); } }

.snap { border-radius: 20px; }
.snap__head { background: var(--ff-ink-900); border-bottom: 3px solid var(--brand); }
.snap__head::after { display: none; }
.snap__city { font-family: var(--font-sans); }
.snap__cell .v, .calc-input .val, .ff-figure { font-family: var(--font-sans); font-weight: 700; }

.self-employed-band { margin-top: 0; background: var(--ff-ink-50); border: 1px solid var(--border); border-left: 1px solid var(--border); border-radius: 16px; }

/* ---------- 8. Cards ---------- */
.step h3, .art-card h3, .calc-card h3, .info h3, .ff-pathway__title { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
.art-card h3 { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); line-height: 1.25; }
.calc-card, .art-card { border-radius: 16px; }
.art-card__tag, .art-card__meta { font-family: var(--font-sans); }
.ff-pathway__title { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); }

/* ---------- 9. Page heroes (refinance, rental loans, city pages) ---------- */
.subhero { background: var(--hero-ink); color: #fff; padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.subhero::before { background: radial-gradient(60% 90% at 92% 0%, rgba(224, 22, 36, 0.28), transparent 62%); }
.subhero h1 { color: #fff; font-size: var(--display-md); font-weight: 800; line-height: 1.03; letter-spacing: -0.035em; }
.subhero__lead { color: rgba(255, 255, 255, 0.82); font-size: var(--text-lead); line-height: 1.6; }
.subhero .ff-eyebrow { color: var(--ff-red-300); }
.subhero .breadcrumb, .subhero .breadcrumb a { color: rgba(255, 255, 255, 0.62); }
.subhero .breadcrumb a:hover { color: #fff; }
.subhero .ff-btn--secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.subhero .ff-btn--secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }

/* ---------- 10. Sticky bar and cookie notice ---------- */
body .cookie-consent {
  right: auto;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  grid-template-columns: 1fr;
  gap: 0.75rem;
  width: min(360px, calc(100vw - 2rem));
  min-height: 0;
  margin: 0;
  padding: 1rem;
  border-radius: 16px;
}
body .cookie-consent__copy h2 { font-family: var(--font-sans); font-size: 0.98rem; font-weight: 700; letter-spacing: -0.01em; }
body .cookie-consent__copy p { font-size: 0.84rem; line-height: 1.45; }
body .cookie-consent__actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
body .cookie-consent__button { min-height: 40px; padding: 0.5rem 0.6rem; font-size: 0.84rem; }
@media (max-width: 899px) {
  /* sits above the sticky action bar on phones and tablets */
  body .cookie-consent { left: 0.75rem; right: 0.75rem; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; padding: 0.75rem 0.85rem; gap: 0.55rem; }
  body .cookie-consent__copy h2 { display: none; }
  body .cookie-consent__copy p { font-size: 0.8rem; line-height: 1.4; margin: 0; }
  body .cookie-consent__button { min-height: 38px; }
}

/* ---------- 11. Page hero alignment, rate walkthrough surface ---------- */
.subhero__inner { max-width: var(--container-wide); }
.subhero__inner > h1 { max-width: 20ch; }
.subhero__lead { max-width: 40rem; }
.rate-wizard__surface { border-radius: 22px; }
.rate-screen h1, .talk-screen h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; }
.rate-progress__label { font-family: var(--font-sans); }

/* ---------- 12. City pages, pathway cards ---------- */
.cityhero { background: var(--hero-ink); border-radius: 22px; }
.cityhero::after { background: radial-gradient(60% 90% at 92% 0%, rgba(224, 22, 36, 0.3), transparent 62%); }
.cityhero h1 { color: #fff; font-weight: 800; line-height: 1.03; letter-spacing: -0.035em; }
.cityhero p { color: rgba(255, 255, 255, 0.84); font-size: var(--text-lead); line-height: 1.6; }
.cityhero .ff-eyebrow { color: var(--ff-red-300) !important; }

.ff-pathway { background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: none; }
.ff-pathway:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.cityhero { min-height: 0; padding: clamp(2rem, 1.5rem + 3vw, 4rem); }
.cityhero__in { max-width: 52rem; }
.cityhero h1 { max-width: 20ch; font-size: var(--display-md); }
.cityhero p { max-width: 40rem; }

/* ---------------------------------------------------------------- Footer (2026-11-11)
   Brand block with two buttons, four link columns (calculators get their own), then one
   legal bar. The cookie buttons that cookie-consent.js adds sit in the same row as Privacy
   and Terms, so they are styled here, outside the legacy layer, to beat cookie-consent.css. */
.ff-footer__top { grid-template-columns: minmax(240px, 1fr) 3fr; gap: var(--space-9); }
.ff-footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-7) var(--space-6); }
.ff-footer__col { gap: .7rem; }
.ff-footer__col-title { margin-bottom: .35rem; }
.ff-footer__link { font-size: .9375rem; line-height: 1.35; }
.ff-footer__link--phone { color: #fff; font-weight: 700; white-space: nowrap; }
.ff-footer__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: var(--space-6); }
.ff-footer__cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.15rem;
  border: 1px solid var(--brand); border-radius: 10px; background: var(--brand); color: #fff;
  font-size: var(--text-sm); font-weight: 700; transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.ff-footer__cta:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.ff-footer__cta--ghost { background: transparent; border-color: var(--border-on-ink); }
.ff-footer__cta--ghost:hover { background: rgba(255, 255, 255, .06); border-color: var(--ff-ink-400); }
.ff-footer__legal { gap: var(--space-6); }
.ff-footer__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-7); }
.ff-footer__bar--fine { justify-content: space-between; }
.ff-footer__ehl p { color: #fff; font-size: var(--text-xs); font-weight: 700; }
.ff-footer__legal-links { align-items: center; gap: .5rem var(--space-5); }
.ff-footer .cookie-consent__footer-links { display: contents; }
.ff-footer__legal-link,
.ff-footer .cookie-consent__footer-links button {
  font-size: var(--text-xs); line-height: 1.4; color: var(--ff-ink-300);
  text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .28); text-underline-offset: .22em;
}
.ff-footer__legal-link:hover,
.ff-footer .cookie-consent__footer-links button:hover { color: #fff; }
@media (max-width: 1100px) {
  .ff-footer__top { grid-template-columns: 1fr; gap: var(--space-8); }
}
@media (max-width: 760px) {
  .ff-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ff-footer__bar--fine { flex-direction: column; align-items: flex-start; }
}
.ff-footer .ff-compliance { gap: .2rem; }
