/* ============================================================
   Santa Fe Funding Group — Desert Modern Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,500;9..144,600;9..144,700;9..144,900&family=Public+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --clay: #c1502e;
  --clay-dark: #9c3f24;
  --clay-light: #e4855f;
  --teal: #2c6e68;
  --teal-dark: #1c4744;
  --teal-light: #4a938c;
  --sand: #f6efe2;
  --sand-deep: #ecdfc4;
  --sand-line: #d9c8a4;
  --ink: #2b2420;
  --ink-soft: #5c5248;
  --gold: #d9a441;
  --cream-card: #fffdf7;
  --white: #ffffff;

  --font-display: "Fraunces", serif;
  --font-body: "Public Sans", -apple-system, sans-serif;

  --container: 1180px;
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 20px 45px -20px rgba(43, 36, 32, 0.35);
  --shadow-card: 0 14px 30px -16px rgba(43, 36, 32, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

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

/* ---------- Grain / texture overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
h1 { font-weight: 600; font-size: clamp(2.6rem, 5vw, 4.4rem); }
h2 { font-weight: 600; font-size: clamp(2rem, 3.4vw, 2.9rem); }
h3 { font-weight: 600; font-size: 1.5rem; }
p { margin: 0 0 1.1em; color: var(--ink-soft); }
.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--clay);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}
.lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 640px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--clay);
  color: var(--white);
  box-shadow: 0 12px 24px -10px rgba(193, 80, 46, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--clay-dark); }
.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--sand); }
.btn-on-dark {
  background: var(--gold);
  color: var(--teal-dark);
  box-shadow: 0 12px 24px -10px rgba(217, 164, 65, 0.5);
}
.btn-on-dark:hover { transform: translateY(-2px); background: #e7b559; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 239, 226, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sand-line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
}
.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold), var(--clay) 70%);
  position: relative;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.25);
  flex-shrink: 0;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid rgba(255,255,255,0.55);
  border-radius: 50%;
}
.logo-text { font-size: 1.18rem; line-height: 1.1; }
.logo-text small {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.6rem;
  color: var(--teal);
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: auto;
}
.main-nav a { position: relative; padding: 6px 0; }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--clay);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
.main-nav a.active { color: var(--clay); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 880px) {
  .main-nav {
    position: fixed;
    top: 78px; left: 0; right: 0;
    background: var(--sand);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 18px 28px 26px;
    border-bottom: 1px solid var(--sand-line);
    transform: translateY(-130%);
    transition: transform 0.3s ease;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { width: 100%; padding: 10px 0; }
  .nav-cta { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 130px;
  background:
    radial-gradient(ellipse 900px 500px at 85% -10%, rgba(217,164,65,0.35), transparent 60%),
    linear-gradient(180deg, #f8f1e4 0%, var(--sand) 55%, var(--sand-deep) 100%);
}
.hero::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 160px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpath d='M0 200 L0 120 L120 60 L260 130 L400 40 L560 140 L700 70 L860 150 L1000 90 L1200 150 L1200 200 Z' fill='%232c6e68'/%3E%3C/svg%3E") no-repeat bottom / cover;
  opacity: 0.14;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.hero-copy .btn-row { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 34px;
  margin-top: 52px;
  flex-wrap: wrap;
}
.hero-stats div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--clay);
}
.hero-stats div span { font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; }

.hero-art {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--teal) 0%, var(--teal-dark) 100%);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.hero-art::before {
  content: "";
  position: absolute;
  top: 12%; right: 14%;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe3ac, var(--gold) 65%);
  box-shadow: 0 0 80px 20px rgba(217,164,65,0.45);
}
.hero-art::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 62%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 260' preserveAspectRatio='none'%3E%3Cpath d='M0 260 L0 150 L60 80 L100 150 L150 60 L210 150 L260 100 L310 160 L400 90 L400 260 Z' fill='%231c4744'/%3E%3C/svg%3E") no-repeat bottom / cover;
}
.hero-art-card {
  position: absolute;
  left: 24px; bottom: 24px;
  background: rgba(255,253,247,0.95);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  max-width: 220px;
  box-shadow: var(--shadow-card);
}
.hero-art-card p { margin: 0; color: var(--ink); font-size: 0.88rem; font-weight: 600; }
.hero-art-card .eyebrow { margin-bottom: 8px; }

/* ---------- Sections ---------- */
section { padding: 100px 0; }
.section-alt { background: var(--sand-deep); }
.section-teal {
  background: linear-gradient(160deg, var(--teal-dark), var(--teal));
  color: var(--sand);
}
.section-teal h2, .section-teal h3 { color: var(--white); }
.section-teal p { color: rgba(246,239,226,0.82); }
.section-teal .eyebrow { color: var(--gold); }
.section-head { max-width: 720px; margin: 0 auto 60px; text-align: center; }
.section-head.left { margin: 0 0 60px; text-align: left; }

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.card {
  background: var(--cream-card);
  border: 1px solid var(--sand-line);
  border-radius: var(--radius-md);
  padding: 34px 30px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 26px 46px -20px rgba(43,36,32,0.32); }
.card .num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--clay);
  display: block;
  margin-bottom: 8px;
}
.card h3 { margin-bottom: 10px; }
.card p { margin-bottom: 0; font-size: 0.96rem; }

.pain-card {
  background: var(--cream-card);
  border-radius: var(--radius-md);
  padding: 28px 26px;
  border-left: 4px solid var(--clay);
  box-shadow: var(--shadow-card);
}
.pain-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.pain-card p { font-size: 0.94rem; margin-bottom: 12px; }
.pain-card .stat {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--teal);
  background: rgba(44,110,104,0.1);
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-block;
}

.step {
  display: flex;
  gap: 22px;
  padding: 28px 0;
  border-bottom: 1px solid var(--sand-line);
}
.step:last-child { border-bottom: none; }
.step .step-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--sand-line);
  width: 64px;
  flex-shrink: 0;
}

.check-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  font-weight: 600;
}
.check-list li::before {
  content: "✓";
  color: var(--teal);
  font-weight: 800;
  background: rgba(44,110,104,0.12);
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.8rem;
}

/* ---------- Service cards ---------- */
.service-card {
  background: var(--cream-card);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.service-card .tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: rgba(44,110,104,0.12);
  padding: 5px 12px;
  border-radius: 999px;
}
.service-card ul { margin-top: 6px; }
.service-card ul li {
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding: 5px 0 5px 18px;
  position: relative;
}
.service-card ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--clay);
}

/* ---------- CTA banner ---------- */
.cta-banner {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--clay) 0%, var(--clay-dark) 100%);
  color: var(--white);
  padding: 64px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-soft);
}
.cta-banner h2 { color: var(--white); margin-bottom: 10px; }
.cta-banner p { color: rgba(255,255,255,0.85); margin-bottom: 0; max-width: 480px; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--cream-card);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--sand-line);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--ink);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--sand-line);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--clay);
}
.field small { color: var(--ink-soft); font-weight: 400; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.82rem; color: var(--ink-soft); margin: 18px 0 24px; }
.consent input { margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--sand-deep);
  padding: 76px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(246,239,226,0.14);
}
.footer-grid h4 {
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-grid a, .footer-grid p { color: rgba(246,239,226,0.72); font-size: 0.92rem; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid li a:hover { color: var(--gold); }
.footer-brand p { max-width: 300px; font-size: 0.9rem; }
.footer-disclosure {
  font-size: 0.78rem;
  color: rgba(246,239,226,0.5);
  margin-top: 18px;
  line-height: 1.6;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  font-size: 0.82rem;
  color: rgba(246,239,226,0.55);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a:hover { color: var(--gold); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  padding: 70px 0 90px;
  background: linear-gradient(180deg, #f8f1e4 0%, var(--sand) 100%);
  border-bottom: 1px solid var(--sand-line);
  position: relative;
}
.page-hero .eyebrow { margin-bottom: 14px; }
.page-hero p.lede { margin: 0 auto; }
.page-hero.center { text-align: center; }
.page-hero.center .eyebrow::before { display: none; }
.page-hero.center p.lede { text-align: center; }

/* ---------- Legal ---------- */
.legal h2 { font-size: 1.5rem; margin-top: 46px; }
.legal p, .legal li { color: var(--ink-soft); font-size: 0.96rem; }
.legal li { padding-left: 18px; position: relative; margin-bottom: 8px; }
.legal li::before { content: "•"; position: absolute; left: 0; color: var(--clay); }
.legal-meta {
  background: var(--sand-deep);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 40px;
}

/* ---------- Reveal animation ---------- */
.reveal { animation: fadeUp 0.8s ease both; }
.reveal-delay-1 { animation-delay: 0.12s; }
.reveal-delay-2 { animation-delay: 0.24s; }
.reveal-delay-3 { animation-delay: 0.36s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.divider {
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--sand-line) 0 10px, transparent 10px 20px);
  margin: 0 0 60px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-banner { padding: 44px 32px; }
}
@media (max-width: 640px) {
  section { padding: 70px 0; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; align-items: flex-start; }
}
