/* ============================================================
   AVANFIN PARTNERS — Brand Design System
   v1.0
   ============================================================ */

:root {
  --slate: #0F1B2D;
  --slate-soft: #2C3A4F;
  --copper: #B07F4C;
  --copper-soft: #C9A073;
  --ivory: #F8F6F0;
  --ivory-deep: #EFEBE0;
  --charcoal: #1A1A1A;
  --mist: #6B7280;
  --pearl: #E5E2DA;
  --white: #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { font-family: inherit; color: var(--slate); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 500; line-height: 1.2; }
h3 { font-size: 1.375rem; font-weight: 500; line-height: 1.3; }
h4 { font-size: 1.0625rem; font-weight: 500; line-height: 1.4; letter-spacing: 0; }

p { line-height: 1.75; }
.lede { font-size: 1.25rem; line-height: 1.7; color: var(--slate-soft); font-weight: 400; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
}

.serif-quote {
  font-family: 'Spectral', Georgia, serif;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--slate);
}

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 2rem; }

section { padding: 6rem 0; }
section.tight { padding: 4rem 0; }

.section-ivory { background: var(--ivory); }
.section-slate { background: var(--slate); color: var(--white); }
.section-slate h1, .section-slate h2, .section-slate h3, .section-slate h4 { color: var(--white); }
.section-slate .lede { color: rgba(255,255,255,0.78); }
.section-slate .eyebrow { color: var(--copper-soft); }

/* ===== HEADER ===== */
header.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 0.5px solid var(--pearl);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2rem; max-width: 1400px; margin: 0 auto;
}
.header-logo img { height: 36px; width: auto; display: block; }
nav.primary-nav { display: flex; align-items: center; gap: 2.5rem; }
nav.primary-nav a {
  font-size: 0.9375rem; font-weight: 500; color: var(--slate);
  text-decoration: none; letter-spacing: 0.01em;
  transition: color 0.2s;
}
nav.primary-nav a:hover, nav.primary-nav a.active { color: var(--copper); }
.btn-contact {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--slate); color: var(--white);
  font-size: 0.9375rem; font-weight: 500;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.2s;
}
.btn-contact:hover { background: var(--slate-soft); }

/* ===== MOBILE NAV TOGGLE ===== */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--slate);
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  nav.primary-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--white);
    padding: 1rem 2rem 2rem;
    border-bottom: 0.5px solid var(--pearl);
    box-shadow: 0 8px 24px rgba(15,27,45,0.06);
    gap: 0;
    align-items: stretch;
  }
  nav.primary-nav.is-open { display: flex; }
  nav.primary-nav a {
    padding: 1rem 0;
    border-bottom: 0.5px solid var(--pearl);
    font-size: 1rem;
  }
  nav.primary-nav a:last-child { border-bottom: none; }
  nav.primary-nav .btn-contact {
    margin-top: 1rem;
    justify-content: center;
    padding: 1rem;
    background: var(--slate);
    color: var(--white);
    border-bottom: none;
  }
}

/* ===== PARTNER PHOTO SLOT ===== */
.person-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--ivory);
  border-top: 1px solid var(--copper);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.person-photo img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.person-photo .photo-placeholder {
  width: 56px; height: 56px;
  border: 1px solid var(--copper);
  display: flex; align-items: center; justify-content: center;
  color: var(--copper);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.person-with-photo { display: block; }
.person-with-photo .person-meta { padding-top: 0; border-top: none; }
.person-with-photo h3 { margin-top: 0.5rem; }
@media (max-width: 820px) {
  .person-photo { aspect-ratio: 4 / 3; max-width: 320px; }
}

/* ===== HERO ===== */
.hero {
  background: var(--slate); color: var(--white);
  padding: 9rem 0 7rem;
  position: relative;
  overflow: hidden;
}
.hero h1 { color: var(--white); max-width: 18ch; }
.hero .hero-lede {
  font-size: 1.25rem; color: rgba(255,255,255,0.8);
  max-width: 56ch; margin-top: 2rem; line-height: 1.65;
}
.hero .copper-rule {
  width: 56px; height: 2px; background: var(--copper); margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; margin-top: 3rem; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.75rem; background: var(--copper); color: var(--white);
  font-size: 0.9375rem; font-weight: 500; text-decoration: none;
  border-radius: 2px; transition: background 0.2s;
}
.btn-primary:hover { background: var(--copper-soft); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.75rem; background: transparent; color: var(--white);
  font-size: 0.9375rem; font-weight: 500; text-decoration: none;
  border: 0.5px solid rgba(255,255,255,0.4); border-radius: 2px;
  transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover { border-color: var(--copper); background: rgba(176,127,76,0.08); }

/* ===== TWO COLUMN ===== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.two-col-narrow { display: grid; grid-template-columns: 240px 1fr; gap: 3rem; align-items: start; }
@media (max-width: 820px) {
  .two-col, .two-col-narrow { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ===== PRACTICE CARDS ===== */
.practice-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
  border-top: 0.5px solid var(--pearl);
  border-left: 0.5px solid var(--pearl);
}
.practice {
  padding: 2.5rem;
  border-right: 0.5px solid var(--pearl);
  border-bottom: 0.5px solid var(--pearl);
  background: var(--white);
  transition: background 0.2s;
}
.practice:hover { background: var(--ivory); }
.practice .number {
  font-family: 'Spectral', Georgia, serif;
  font-size: 1.125rem; color: var(--copper); font-weight: 400; letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.practice h3 { margin-bottom: 0.75rem; }
.practice p { color: var(--slate-soft); font-size: 0.9375rem; line-height: 1.65; }
.practice .buyer {
  display: inline-block; margin-top: 1.25rem;
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mist); padding-top: 0.75rem;
  border-top: 0.5px solid var(--pearl); width: 100%;
}
@media (max-width: 820px) {
  .practice-grid { grid-template-columns: 1fr; }
}

/* ===== STATS / EVIDENCE ===== */
.evidence-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  margin: 2rem 0;
}
.evidence {
  padding: 2.5rem 1.5rem;
  border-left: 0.5px solid rgba(255,255,255,0.15);
  text-align: left;
}
.evidence:first-child { border-left: none; }
.evidence .figure {
  font-family: 'Spectral', Georgia, serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 300;
  color: var(--copper-soft);
  line-height: 1; margin-bottom: 0.75rem;
}
.evidence .label {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}
@media (max-width: 820px) {
  .evidence-grid { grid-template-columns: repeat(2, 1fr); }
  .evidence:nth-child(3) { border-left: none; }
}

/* ===== PEOPLE CARDS ===== */
.people-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  margin-top: 3rem;
}
.person {
  border-top: 1px solid var(--copper);
  padding-top: 1.5rem;
}
.person h3 { margin-bottom: 0.25rem; }
.person .role { color: var(--copper); font-size: 0.9375rem; font-weight: 500; margin-bottom: 1rem; letter-spacing: 0.01em; }
.person .bio { color: var(--slate-soft); font-size: 0.9375rem; line-height: 1.65; }
@media (max-width: 820px) {
  .people-grid { grid-template-columns: 1fr; }
}

/* ===== PARTNERSHIP CALLOUT ===== */
.partnership-callout {
  background: var(--ivory); padding: 3rem;
  border-left: 3px solid var(--copper);
  margin: 2rem 0;
}
.partnership-callout .eyebrow { margin-bottom: 1rem; }
.partnership-callout p { color: var(--slate); font-size: 1.0625rem; line-height: 1.7; }

/* ===== FOOTER ===== */
footer.site-footer {
  background: var(--slate); color: rgba(255,255,255,0.78);
  padding: 4rem 0 2.5rem;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem;
  margin-bottom: 3rem;
}
.footer-grid h4 { color: var(--white); font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; margin-bottom: 1.25rem; }
.footer-grid a { color: rgba(255,255,255,0.78); text-decoration: none; font-size: 0.9375rem; display: block; padding: 0.25rem 0; transition: color 0.2s; }
.footer-grid a:hover { color: var(--copper); }
.footer-bottom {
  padding-top: 2rem; border-top: 0.5px solid rgba(255,255,255,0.12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.8125rem; color: rgba(255,255,255,0.55);
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== FORM ===== */
.contact-form { display: grid; gap: 1.5rem; }
.field label {
  display: block; font-size: 0.875rem; font-weight: 500; color: var(--slate);
  margin-bottom: 0.5rem; letter-spacing: 0.01em;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 0.875rem 1rem;
  font-family: inherit; font-size: 1rem; color: var(--charcoal);
  background: var(--white); border: 0.5px solid var(--pearl);
  border-radius: 2px; transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--copper);
}
.field textarea { min-height: 140px; resize: vertical; }

/* ===== UTILITIES ===== */
.copper-line { width: 48px; height: 2px; background: var(--copper); margin: 0 0 1.5rem 0; }
.center-line { margin-left: auto; margin-right: auto; }
hr.section-rule { border: none; border-top: 0.5px solid var(--pearl); margin: 4rem 0; }
.mt-0 { margin-top: 0; }
.mb-sm { margin-bottom: 1rem; }
.mb-md { margin-bottom: 2rem; }
.mb-lg { margin-bottom: 3rem; }
.text-center { text-align: center; }

/* ===== INSIGHT CARDS (insights page) ===== */
.insight-card {
  padding: 2.5rem 0;
  border-bottom: 0.5px solid var(--pearl);
}
.insight-card:last-child { border-bottom: none; }
.insight-card .meta {
  font-size: 0.8125rem; color: var(--mist); letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 0.75rem;
}
.insight-card h3 { font-size: 1.5rem; line-height: 1.3; margin-bottom: 0.75rem; }
.insight-card h3 a { color: var(--slate); text-decoration: none; transition: color 0.2s; }
.insight-card h3 a:hover { color: var(--copper); }
.insight-card .summary { color: var(--slate-soft); font-size: 1rem; line-height: 1.7; }

.placeholder-block {
  text-align: center;
  padding: 6rem 2rem;
  background: var(--ivory);
  border-radius: 4px;
  margin-top: 2rem;
}
