/* ============================================================
   Capra HR — Summit Slate design system
   Palette: Stone White #F4F3EC · Evergreen Ink #26302A
            Pine #3C5230 · Lichen #7A8B6F · Copper #A8622F
   Type:    Fraunces (display) · Public Sans (body) · JetBrains Mono (data)
   ============================================================ */

:root {
  --stone: #f4f3ec;
  --stone-deep: #eceade;
  --ink: #26302a;
  --ink-soft: #5a655c;
  --pine: #3c5230;
  --pine-deep: #2e4025;
  --lichen: #7a8b6f;
  --lichen-faint: #dfe3d4;
  --copper: #a8622f;
  --line: #ddddd0;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Public Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max: 1080px;
  --measure: 64ch;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

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

img, svg { max-width: 100%; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 560;
  line-height: 1.14;
  text-wrap: balance;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.4rem, 6vw, 3.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.05em; max-width: var(--measure); }
ul { max-width: var(--measure); }
li { margin-bottom: 0.5em; }

a { color: var(--pine); text-underline-offset: 3px; }
a:hover { color: var(--copper); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.4rem; }

.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.9rem;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--stone) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
}
.brand:hover { color: var(--pine); }
.brand svg { flex: none; }

.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a[aria-current="page"] {
  color: var(--pine);
  border-bottom: 2px solid var(--copper);
  padding-bottom: 2px;
}
.site-nav a.btn { border-bottom: none; color: var(--stone); }
.site-nav a.btn[aria-current="page"] { border-bottom: none; padding-bottom: 0.5rem; }

@media (max-width: 720px) {
  .site-nav { gap: 0.9rem; }
  .site-nav a { font-size: 0.85rem; }
  .brand span { display: none; }         /* logo mark only on small screens */
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  background: var(--pine);
  color: var(--stone);
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.btn:hover { background: var(--pine-deep); color: var(--stone); transform: translateY(-1px); }
.btn.ghost {
  background: transparent;
  color: var(--pine);
  box-shadow: inset 0 0 0 1.5px var(--pine);
}
.btn.ghost:hover { background: var(--lichen-faint); transform: none; }
.btn.small { padding: 0.5rem 1.05rem; font-size: 0.85rem; }

/* ---------- hero ---------- */
.hero {
  padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3rem, 8vw, 5.5rem);
  position: relative;
  overflow: hidden;
}
.hero .kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 1.1rem;
}
.hero h1 { max-width: 17ch; }
.hero .lede {
  font-size: 1.22rem;
  color: var(--ink-soft);
  max-width: 54ch;
  margin-bottom: 2rem;
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.contours {
  position: absolute;
  right: -6%;
  top: 8%;
  width: min(520px, 55vw);
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}

@media (prefers-reduced-motion: no-preference) {
  .hero .kicker, .hero h1, .hero .lede, .hero .actions {
    animation: rise 640ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero h1 { animation-delay: 70ms; }
  .hero .lede { animation-delay: 140ms; }
  .hero .actions { animation-delay: 210ms; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- sections ---------- */
section.band { padding: clamp(3rem, 7vw, 5rem) 0; }
section.band.tint { background: var(--stone-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { margin-bottom: 2.2rem; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }

/* ---------- pillar cards ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}
.pillar {
  background: #fbfaf5;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.7rem 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.pillar .num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--copper);
}
.pillar h3 { margin-bottom: 0.2rem; }
.pillar p { font-size: 0.96rem; color: var(--ink-soft); flex: 1; }
.pillar a { font-weight: 600; font-size: 0.92rem; text-decoration: none; }
.pillar a::after { content: " →"; }

/* ---------- stat band ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem 1.5rem;
  text-align: left;
}
.stat .n {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  font-weight: 560;
  color: var(--pine);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat .n small { font-size: 0.55em; color: var(--copper); }
.stat .l {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-top: 0.45rem;
  max-width: 22ch;
}

/* ---------- bio strip ---------- */
.bio {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: center;
}
.bio .portrait {
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  background: var(--lichen-faint);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.bio .portrait img { width: 100%; height: 100%; object-fit: cover; }
.bio .portrait .ph { color: var(--lichen); opacity: 0.8; }
@media (max-width: 680px) {
  .bio { grid-template-columns: 1fr; }
  .bio .portrait { max-width: 260px; }
}

/* ---------- case studies ---------- */
.case {
  border: 1px solid var(--line);
  background: #fbfaf5;
  border-radius: 8px;
  padding: 1.9rem 1.9rem 1.6rem;
  margin-bottom: 1.6rem;
}
.case .org {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.5rem;
}
.case h3 { margin-bottom: 1rem; max-width: 30ch; }
.case dl { margin: 0; display: grid; gap: 0.8rem; }
.case dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.case dd { margin: 0.15rem 0 0; max-width: var(--measure); }
.case .outcome { border-left: 3px solid var(--pine); padding-left: 1rem; }

/* ---------- service sections ---------- */
.service { padding: clamp(2.6rem, 6vw, 4rem) 0; border-bottom: 1px solid var(--line); }
.service:last-of-type { border-bottom: none; }
.service .cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .service .cols { grid-template-columns: 1fr; } }
.service .fit {
  background: var(--stone-deep);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.3rem 1.4rem;
  align-self: start;
}
.service .fit h4 {
  margin: 0 0 0.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--copper);
  font-weight: 600;
}
.service .fit ul { margin: 0; padding-left: 1.1rem; font-size: 0.93rem; }
.service .fit li { margin-bottom: 0.4rem; }

/* ---------- credentials ---------- */
.creds { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0; margin: 1.2rem 0; list-style: none; max-width: none; }
.creds li {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  background: var(--lichen-faint);
  border: 1px solid var(--line);
  color: var(--pine-deep);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin: 0;
}

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: #fbfaf5;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.8rem;
}
.contact-card .how {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.4rem;
}
.contact-card p { font-size: 0.97rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--pine);
  color: var(--stone);
  padding: clamp(3rem, 7vw, 4.5rem) 0;
}
.cta-band h2 { color: var(--stone); }
.cta-band p { color: color-mix(in srgb, var(--stone) 82%, var(--pine)); font-size: 1.1rem; }
.cta-band .btn { background: var(--stone); color: var(--pine-deep); }
.cta-band .btn:hover { background: #fff; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0 2.8rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  justify-content: space-between;
  align-items: center;
}
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--pine); }
.site-footer .fine { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; }
