:root {
  color-scheme: light;
  --ink: #14211f;
  --muted: #5a6965;
  --line: #dbe5e2;
  --paper: #ffffff;
  --soft: #f3f8f6;
  --wash: #e8f3ef;
  --teal: #0f766e;
  --teal-dark: #0b4f4a;
  --green: #2f7d32;
  --gold: #b7791f;
  --navy: #17324d;
  --shadow: 0 24px 70px rgba(13, 58, 54, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fcfb 0%, #eef7f4 42%, #ffffff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(219, 229, 226, 0.85);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.site-footer nav,
.hero-actions,
.trust-strip {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 8px;
  font-size: 14px;
}

.nav {
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.nav a,
.site-footer a {
  text-decoration: none;
}

.nav a:hover,
.site-footer a:hover {
  color: var(--teal-dark);
}

.header-cta,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.header-cta,
.primary-button {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.22);
}

.header-cta:hover,
.primary-button:hover {
  background: var(--teal-dark);
}

.secondary-button {
  color: var(--teal-dark);
  background: #fff;
  border: 1px solid var(--line);
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.65fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: clamp(580px, 74vh, 760px);
  overflow: hidden;
  padding: clamp(58px, 8vw, 112px) clamp(18px, 5vw, 76px) 46px;
  background-image:
    linear-gradient(90deg, rgba(248, 252, 250, 0.96) 0%, rgba(248, 252, 250, 0.88) 38%, rgba(248, 252, 250, 0.22) 72%),
    linear-gradient(180deg, rgba(248, 252, 250, 0.18), rgba(232, 243, 239, 0.4)),
    url("referral-hero.jpg");
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid rgba(219, 229, 226, 0.9);
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 36%;
  background: linear-gradient(180deg, transparent, rgba(238, 247, 244, 0.92));
  content: "";
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(44px, 6vw, 74px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.2;
}

.hero-lede,
.section-heading p,
.split-section > div > p,
.form-copy p {
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 22px;
}

.trust-strip {
  flex-wrap: wrap;
  gap: 10px;
}

.trust-strip span {
  padding: 8px 12px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.match-panel,
.intake-form,
.category-grid article,
.steps article,
.business-notes article,
.faq-grid article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.match-panel {
  padding: 22px;
}

.panel-topline,
.match-card,
.metrics,
.section-heading,
.form-row,
.site-footer {
  display: flex;
}

.panel-topline {
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.panel-topline strong {
  color: var(--teal-dark);
}

.match-card {
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.match-card + .match-card {
  margin-top: 12px;
}

.match-card.active {
  border-color: rgba(15, 118, 110, 0.35);
  background: var(--soft);
}

.match-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.match-icon,
.category-icon,
.steps span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--navy);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.metrics {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 20px;
  justify-content: space-between;
  gap: 16px;
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
}

.metrics div {
  min-width: 0;
}

.metrics strong {
  display: block;
  font-size: 22px;
}

.metrics span {
  display: block;
  color: #c8d9d5;
  font-size: 13px;
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(58px, 8vw, 92px) 0;
}

.split-section {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.steps article,
.business-notes article,
.faq-grid article,
.category-grid article {
  padding: 20px;
}

.steps span {
  margin-bottom: 18px;
  background: var(--teal);
}

.steps p,
.category-grid p,
.business-notes p,
.faq-grid p {
  color: var(--muted);
  font-size: 15px;
}

.section-heading {
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading p:last-child {
  max-width: 420px;
}

.category-grid,
.business-layout,
.faq-grid {
  display: grid;
  gap: 16px;
}

.category-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-icon {
  margin-bottom: 18px;
  background: var(--wash);
  color: var(--teal-dark);
}

.form-band {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  width: 100%;
  max-width: none;
  padding-left: clamp(18px, 5vw, 76px);
  padding-right: clamp(18px, 5vw, 76px);
  background: var(--soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.check-list {
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin-bottom: 11px;
  padding-left: 28px;
  color: var(--ink);
  font-weight: 700;
}

.check-list li::before {
  position: absolute;
  left: 0;
  color: var(--green);
  content: "OK";
  font-size: 11px;
  font-weight: 900;
}

.intake-form {
  padding: 24px;
}

.form-row {
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd9d5;
  border-radius: 8px;
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(15, 118, 110, 0.18);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.consent input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
}

.full-button {
  width: 100%;
  margin-top: 6px;
  font-size: 16px;
}

.form-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--teal-dark);
  font-weight: 800;
}

.form-status.error {
  color: #b42318;
}

.honeypot {
  position: absolute;
  left: -10000px;
  opacity: 0;
}

.business-section {
  width: 100%;
  max-width: none;
  padding-left: clamp(18px, 5vw, 76px);
  padding-right: clamp(18px, 5vw, 76px);
  color: #fff;
  background: var(--ink);
}

.business-section .eyebrow,
.business-section h2,
.business-section .section-heading p {
  color: #fff;
}

.business-layout {
  grid-template-columns: 0.8fr 1fr;
  align-items: start;
}

.business-notes {
  display: grid;
  gap: 14px;
}

.business-notes article {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.business-notes p {
  color: #d5e5df;
}

.dark-form {
  color: var(--ink);
}

.faq-grid {
  grid-template-columns: repeat(4, 1fr);
}

.site-footer {
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px clamp(18px, 5vw, 76px);
  color: #d5e5df;
  background: #0c1615;
}

.site-footer p {
  margin: 6px 0 0;
  color: #9fb2ae;
}

.site-footer nav {
  flex-wrap: wrap;
  gap: 18px;
}

@media (max-width: 980px) {
  .nav {
    display: none;
  }

  .hero,
  .split-section,
  .form-band,
  .business-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    background-position: 58% center;
    background-image:
      linear-gradient(180deg, rgba(248, 252, 250, 0.96) 0%, rgba(248, 252, 250, 0.9) 48%, rgba(248, 252, 250, 0.42) 100%),
      url("referral-hero.jpg");
  }

  .category-grid,
  .faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .header-cta {
    width: 100%;
  }

  .hero {
    padding-top: 42px;
  }

  h1 {
    font-size: 42px;
  }

  .match-panel {
    padding: 16px;
  }

  .metrics,
  .form-row,
  .site-footer {
    display: grid;
  }

  .category-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }
}
