/* ============================================================
   Foothold Homes landing page
   Component styles reproduce the Keybridge Design System
   (Button, Badge, Tag, Input, Select, Radio, Checkbox) exactly;
   page styles reproduce Keybridge Landing Page.dc.html.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface-page);
  font-family: var(--font-body);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--slate-900); }
a:hover { color: var(--accent-hover); }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-500);
}

.section-heading {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-heading);
  margin: 10px 0 14px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* -------- Wordmark -------- */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--slate-900);
  text-decoration: none;
}
.wordmark:hover { color: var(--slate-900); }
.site-footer .wordmark:hover { color: #F8FAFC; }
.wordmark__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--honey-500);
}

/* ============================================================
   DS component: Button
   ============================================================ */
.btn {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.2;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-smooth),
              transform var(--dur-fast) var(--ease-smooth);
}
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn--md { padding: 12px 24px; font-size: 15px; }
.btn--lg { padding: 16px 32px; font-size: 16px; }
.btn--full { width: 100%; }

/* colour repeated on :hover so the global a:hover rule can't recolour button labels */
.btn--accent, .btn--accent:hover { color: var(--text-on-accent); }
.btn--accent { background: var(--accent); border: 1px solid transparent; }
.btn--accent:hover { background: var(--accent-hover); }
.btn--secondary, .btn--secondary:hover { color: var(--slate-900); }
.btn--secondary { background: transparent; border: 1.5px solid var(--slate-300); }
.btn--secondary:hover { background: var(--slate-100); }
/* dark closing-band / slate button */
.btn--slate, .btn--slate:hover { color: #fff; }
.btn--slate { background: var(--slate-900); border: 1px solid transparent; }
.btn--slate:hover { background: var(--slate-800); }

/* ============================================================
   DS component: Badge
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  line-height: 1.5;
  background: var(--accent-soft);
  color: #92400E;
}

/* ============================================================
   DS component: Tag (selectable chip)
   ============================================================ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: var(--weight-medium);
  cursor: pointer;
  border: 1.5px solid var(--border-strong);
  background: transparent;
  color: var(--slate-700);
  transition: all var(--dur-fast) var(--ease-smooth);
}
.tag:hover { background: var(--slate-100); }
.tag:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.tag[aria-pressed="true"] {
  border: 1.5px solid var(--slate-900);
  background: var(--slate-900);
  color: var(--text-on-inverse);
}

/* ============================================================
   DS form components: Input, Select, Radio, Checkbox
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-body); }
.field__label { font-size: 14px; font-weight: var(--weight-semibold); color: var(--slate-900); }

.input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1.5px solid var(--border-strong);
  transition: border-color var(--dur-fast) var(--ease-smooth),
              box-shadow var(--dur-fast) var(--ease-smooth);
}
.input:focus-within { border-color: var(--slate-900); box-shadow: var(--focus-ring); }
.input__prefix { color: var(--text-muted); font-size: 15px; }
.input input {
  border: none; outline: none; background: transparent;
  flex: 1; min-width: 0;
  font-family: inherit; font-size: 15px; color: var(--slate-900);
}
.input input::placeholder { color: var(--text-muted); }

.select { position: relative; }
.select select {
  appearance: none; -webkit-appearance: none;
  width: 100%;
  padding: 12px 40px 12px 16px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1.5px solid var(--border-strong);
  font-family: inherit; font-size: 15px;
  color: var(--slate-900);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-smooth),
              box-shadow var(--dur-fast) var(--ease-smooth);
}
.select select:focus { outline: none; border-color: var(--slate-900); box-shadow: var(--focus-ring); }
.select select:required:invalid { color: var(--text-muted); }
.select option[value=""][disabled] { display: none; }
.select__chevron {
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--slate-500);
  font-size: 12px;
}

.radio-group { display: flex; flex-direction: row; gap: 20px; font-family: var(--font-body); }
.radio {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 15px; color: var(--slate-700);
  user-select: none;
}
.radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio__dot {
  width: 22px; height: 22px; flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: #fff; box-sizing: border-box;
  transition: border var(--dur-fast) var(--ease-smooth);
}
.radio input:checked + .radio__dot { border: 7px solid var(--slate-900); }
.radio input:focus-visible + .radio__dot { box-shadow: var(--focus-ring); }

.checkbox {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; font-family: var(--font-body);
  font-size: 15px; color: var(--slate-700); user-select: none;
}
.checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox__box {
  width: 22px; height: 22px; flex: none;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border-strong);
  background: #fff;
  transition: all var(--dur-fast) var(--ease-smooth);
}
.checkbox__box svg { opacity: 0; transition: opacity var(--dur-fast) var(--ease-smooth); }
.checkbox input:checked + .checkbox__box { border: 1.5px solid var(--slate-900); background: var(--slate-900); }
.checkbox input:checked + .checkbox__box svg { opacity: 1; }
.checkbox input:focus-visible + .checkbox__box { box-shadow: var(--focus-ring); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 246, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.site-nav { display: flex; gap: 32px; font-size: 15px; font-weight: 500; color: var(--slate-700); }
.site-nav a { color: inherit; text-decoration: none; }
.site-nav a:hover { color: var(--accent-hover); }
.header-cta { flex: none; }

/* ============================================================
   Hero
   ============================================================ */
.hero { background: var(--surface-page); padding: 88px 0 92px; }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 64px; align-items: center;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.08; letter-spacing: -0.02em; font-weight: 800;
  color: var(--text-heading);
  margin: 20px 0 18px;
}
.hero__lead {
  font-size: 18px; line-height: 1.6; color: var(--text-body);
  margin: 0 0 32px; max-width: 500px;
}
.hero__actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero__trust {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  margin-top: 32px; font-size: 14px; color: var(--text-body);
}
.trust-item { display: inline-flex; align-items: center; gap: 8px; }
.trust-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--honey-500); }

.hero__media { position: relative; }
.hero__photo {
  aspect-ratio: 4 / 4.4;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, var(--linen-200), var(--linen-300));
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  color: var(--slate-500); font-size: 14px; text-align: center; padding: 24px;
}
.hero__stat {
  position: absolute; left: -28px; bottom: 32px;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  padding: 16px 20px; display: flex; gap: 12px; align-items: center;
}
.hero__stat-badge {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--honey-100); color: var(--honey-600);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.hero__stat-label { font-size: 13px; color: var(--text-body); }
.hero__stat-value { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--text-heading); }

/* ============================================================
   Why this exists
   ============================================================ */
.why { background: #fff; padding: 96px 0; }
.why__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.why__lead { font-size: 16px; line-height: 1.65; color: var(--text-body); margin: 0 0 18px; }
.why__lead:nth-of-type(2) { margin-bottom: 24px; }
.why__kicker {
  font-family: var(--font-display); font-size: 19px; line-height: 1.5;
  font-weight: 700; color: var(--text-heading); margin: 0;
}
.stat-panel {
  background: var(--surface-inverse); border-radius: var(--radius-xl);
  padding: 36px 36px 32px;
}
.stat-panel__eyebrow {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--honey-400);
}
.stat-hero { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 22px 0 8px; }
.stat-hero__num {
  font-family: var(--font-display); font-size: 56px; font-weight: 800;
  letter-spacing: -0.03em; color: var(--honey-400); line-height: 1;
}
.stat-hero__text { font-size: 15px; color: var(--text-on-inverse-muted); max-width: 180px; line-height: 1.4; }
.stat-hero__text strong { color: #F8FAFC; font-weight: 700; }
.stat-panel__divider { height: 1px; background: var(--border-inverse); margin: 24px 0; }
.stat-rows { display: flex; flex-direction: column; gap: 18px; }
.stat-row { display: flex; gap: 14px; align-items: baseline; }
.stat-row__num { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: #F8FAFC; flex: none; min-width: 64px; }
.stat-row__text { font-size: 14px; line-height: 1.5; color: var(--text-on-inverse-muted); }
.stat-panel__source { margin-top: 26px; font-size: 12px; line-height: 1.5; color: var(--slate-500); }
.stat-panel__source a { color: var(--honey-400); text-decoration: underline; }

/* ============================================================
   How it works
   ============================================================ */
.how { background: var(--surface-page); padding: 96px 0; }
.section-head { text-align: center; margin: 0 auto 48px; }
.section-head--how { max-width: 580px; }
.section-head--ready { max-width: 640px; margin-bottom: 44px; }
.section-head--costs { max-width: 680px; margin-bottom: 44px; }
.section-head--faq { max-width: none; margin-bottom: 40px; }
.section-head p { font-size: 16px; line-height: 1.6; color: var(--text-body); margin: 0; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step-card {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: 26px 22px; display: flex; flex-direction: column; gap: 10px;
}
.step-card__num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--honey-100); color: var(--honey-600);
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.step-card__title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text-heading); margin-top: 4px; }
.step-card__body { font-size: 14px; line-height: 1.55; color: var(--text-body); }

/* ============================================================
   Getting mortgage-ready
   ============================================================ */
.ready { background: #fff; padding: 96px 0; }
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tip-card {
  background: var(--surface-sunken); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 22px;
}
.tip-card__title { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; color: var(--text-heading); margin-bottom: 6px; }
.tip-card__body { font-size: 14px; line-height: 1.55; color: var(--text-body); }

/* ============================================================
   The costs most people don't see
   ============================================================ */
.costs { background: var(--surface-page); padding: 96px 0; }
.cost-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cost-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 28px; }
.cost-card--dark { background: var(--surface-inverse); }
.cost-card__title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-heading); margin-bottom: 10px; }
.cost-card--dark .cost-card__title { color: #F8FAFC; }
.cost-card p { font-size: 14.5px; line-height: 1.6; color: var(--text-body); margin: 0; }
.cost-card--dark p { color: var(--text-on-inverse-muted); }
.cost-card__pill {
  display: inline-block; background: var(--honey-500); color: var(--slate-900);
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq { background: #fff; padding: 96px 0; }
.faq .container { max-width: 760px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface-page); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); overflow: hidden;
}
.faq-item__q {
  width: 100%; text-align: left;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 24px; border: none; background: transparent; cursor: pointer;
  font-family: var(--font-display); font-size: 16.5px; font-weight: 700; color: var(--text-heading);
}
.faq-item__icon { color: var(--honey-600); font-size: 18px; flex: none; }
.faq-item__a { padding: 0 24px 20px; font-size: 15px; line-height: 1.65; color: var(--text-body); }
.faq-item__a[hidden] { display: none; }

/* ============================================================
   Questionnaire
   ============================================================ */
.apply { background: var(--surface-inverse); padding: 88px 0; }
.apply__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.apply__aside { position: sticky; top: 96px; }
.apply__aside .eyebrow { color: var(--honey-400); }
.apply__title {
  font-family: var(--font-display); font-size: var(--text-h2); font-weight: 700;
  letter-spacing: -0.01em; color: #F8FAFC; margin: 10px 0 16px;
}
.apply__intro { font-size: 16px; line-height: 1.65; color: var(--text-on-inverse-muted); margin: 0 0 28px; }
.apply__reassure {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text-on-inverse-muted);
}
.apply__reassure > span[aria-hidden] { color: var(--honey-400); }

/* White card frame that hosts the embedded Tally form */
.form-card { background: #fff; border-radius: var(--radius-xl); box-shadow: var(--shadow-float); padding: 36px; }

/* The embed slot. When you paste Tally's <iframe>, it fills this width;
   Tally's embed script sets the height. */
.tally-embed { width: 100%; }
.tally-embed iframe { width: 100%; border: 0; display: block; }

/* Placeholder shown until the Tally embed code is pasted in. */
.tally-embed__placeholder {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px;
  min-height: 360px; justify-content: center;
  padding: 32px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-sunken);
}
.tally-embed__icon { font-size: 34px; color: var(--slate-400); line-height: 1; }
.tally-embed__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--text-heading); margin: 0; }
.tally-embed__hint { font-size: 14px; line-height: 1.6; color: var(--text-body); margin: 0; max-width: 380px; }
.tally-embed__hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; background: var(--linen-200); color: var(--slate-700);
  padding: 1px 5px; border-radius: 5px;
}

/* ============================================================
   Closing band
   ============================================================ */
.closing { background: var(--honey-500); padding: 64px 0; }
.closing__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.closing__title { font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -0.02em; color: var(--slate-900); margin: 0 0 6px; }
.closing__text { margin: 0; font-size: 16px; color: var(--slate-800); max-width: 520px; }
.closing .btn { white-space: nowrap; padding: 16px 32px; font-size: 16px; font-weight: 600; font-family: var(--font-body); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--surface-inverse); padding: 56px 0 40px; }
.site-footer__top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.site-footer__brand { max-width: 320px; }
.site-footer .wordmark { color: #F8FAFC; }
.site-footer__about { font-size: 13.5px; line-height: 1.6; color: var(--text-on-inverse-muted); margin: 14px 0 0; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col__label {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-on-inverse-muted); margin-bottom: 14px;
}
.footer-col__links { display: flex; flex-direction: column; gap: 10px; }
.footer-col__links a { font-size: 14px; color: #CBD5E1; text-decoration: none; }
.footer-col__links a:hover { color: #F8FAFC; }
.site-footer__legal {
  max-width: var(--container-max); margin: 44px auto 0; padding: 24px 24px 0;
  border-top: 1px solid var(--border-inverse);
  font-size: 12.5px; line-height: 1.6; color: var(--slate-500);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__media { max-width: 440px; }
  .why__grid { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .tips { grid-template-columns: repeat(2, 1fr); }
  .cost-grid { grid-template-columns: 1fr; }
  .apply__grid { grid-template-columns: 1fr; gap: 40px; }
  .apply__aside { position: static; }
}
@media (max-width: 720px) {
  .site-nav { display: none; }
}
@media (max-width: 560px) {
  .hero { padding: 56px 0 64px; }
  .why, .how, .ready, .costs, .faq { padding: 64px 0; }
  .apply { padding: 64px 0; }
  .steps { grid-template-columns: 1fr; }
  .tips { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-card { padding: 24px; }
  .hero__stat { left: 12px; right: 12px; bottom: 12px; }
}
