/* =========================================================
   Resilient People · v4 Design System
   Brand: Figtree + Baskerville · #1C3520 / #218D44 / #FDA A B0 / #FF84C0
   ========================================================= */

:root {
  --dk: #1C3520;         /* Primary dark green */
  --mid: #218D44;        /* Primary medium green */
  --mid-tint: #E8F5EC;   /* Light mint bg */
  --amber: #F59E0B;      /* Secondary warm — interpreted from brandbook RGB 253/170/176 */
  --amber-tint: #FEF3C7;
  --pink: #FF84C0;       /* Secondary pink — use sparingly */
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --surface: #F8FAFC;
  --cream: #FBF9F5;
  --white: #FFFFFF;
  --dk-tint: #143018;    /* Even darker for depth on hero */

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow: 0 4px 12px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.08);

  --max: 1160px;
  --max-narrow: 820px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { text-decoration: none; color: inherit; transition: color .2s ease; }
a:hover { color: var(--mid); }
img, svg { display: block; max-width: 100%; height: auto; }

/* Type scale */
h1, h2, h3, h4, h5 { font-family: 'Figtree', sans-serif; color: var(--dk); line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { font-size: 1.05rem; color: var(--text); }
p.lead { font-size: 1.2rem; color: var(--muted); font-weight: 400; }
small, .small { font-size: 0.85rem; color: var(--muted); }
.italic { font-family: 'Libre Baskerville', 'Baskerville', Georgia, serif; font-style: italic; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: .75rem;
}

/* Layout */
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: var(--max-narrow); }
section { padding: 5rem 0; }
section.pad-sm { padding: 3rem 0; }
section.pad-lg { padding: 7rem 0; }
section.bg-cream { background: var(--cream); }
section.bg-surface { background: var(--surface); }
section.bg-dk { background: var(--dk); color: var(--white); }
section.bg-dk h1, section.bg-dk h2, section.bg-dk h3, section.bg-dk h4 { color: var(--white); }
section.bg-dk p { color: rgba(255,255,255,0.78); }
section.bg-dk .eyebrow { color: var(--mid); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 0.95rem 1.6rem;
  border-radius: var(--radius);
  font-family: 'Figtree', sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  border: none; cursor: pointer;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
  text-align: center;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--mid); outline-offset: 2px; }

.btn-primary { background: var(--mid); color: var(--white); }
.btn-primary:hover { background: #1B7536; color: var(--white); }
.btn-dark { background: var(--dk); color: var(--white); }
.btn-dark:hover { background: #0E1F11; color: var(--white); }
.btn-outline { background: transparent; color: var(--dk); border: 2px solid var(--dk); }
.btn-outline:hover { background: var(--dk); color: var(--white); }
.btn-outline-light { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.4); }
.btn-outline-light:hover { background: var(--white); color: var(--dk); }
.btn-ghost { background: transparent; color: var(--dk); padding: 0.5rem .8rem; }
.btn-ghost:hover { color: var(--mid); }
.btn-lg { padding: 1.1rem 2rem; font-size: 1.05rem; }
.btn-arrow::after { content: "→"; transition: transform .2s ease; }
.btn:hover .btn-arrow::after, .btn-arrow:hover::after { transform: translateX(3px); }

/* ==== NAV ==== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--max); margin: 0 auto; padding: .85rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.nav__logo { display: flex; align-items: center; gap: .6rem; color: var(--dk); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.nav__logo svg { width: 34px; height: 34px; flex-shrink: 0; }
.nav__logo strong { font-weight: 800; }
.nav__links { display: flex; align-items: center; gap: 1.8rem; list-style: none; }
.nav__links a { font-size: 0.94rem; color: var(--text); font-weight: 500; }
.nav__links a:hover, .nav__links a.is-active { color: var(--mid); }
.nav__cta { display: flex; align-items: center; gap: .5rem; }
.nav__burger { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--dk); }
.nav__burger svg { width: 26px; height: 26px; }

/* ==== HERO variants ==== */
.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: calc(100vh - 64px);
}
.hero-split__left {
  background: var(--dk);
  color: var(--white);
  padding: 5rem 4rem;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.hero-split__left::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, transparent 0 24px, rgba(33,141,68,.08) 24px 27px);
  pointer-events: none;
}
.hero-split__left > * { position: relative; z-index: 1; }
.hero-split__left h1 { color: var(--white); max-width: 560px; }
.hero-split__left h1 em { font-style: normal; color: var(--mid); }
.hero-split__left p { color: rgba(255,255,255,.78); max-width: 480px; margin: 1.25rem 0 2rem; font-size: 1.1rem; }
.hero-split__right {
  background: var(--cream);
  padding: 5rem 4rem;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-split__right h2 { color: var(--dk); max-width: 460px; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; }
.hero-split__right p { max-width: 440px; margin: 1rem 0 1.8rem; color: var(--muted); }

.hero-basic {
  padding: 5.5rem 1.5rem 4rem;
  background: linear-gradient(180deg, var(--cream) 0%, var(--white) 100%);
  text-align: left;
}
.hero-basic__inner { max-width: var(--max); margin: 0 auto; }
.hero-basic h1 { max-width: 780px; }
.hero-basic p.lead { max-width: 680px; margin-top: 1.25rem; }
.hero-basic__cta { margin-top: 2rem; display: flex; gap: .8rem; flex-wrap: wrap; }

/* ==== Logo bar (client logos) ==== */
.logo-bar {
  background: var(--white);
  padding: 3rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.logo-bar__label { text-align: center; color: var(--muted); font-size: 0.88rem; font-weight: 500; margin-bottom: 1.5rem; letter-spacing: .05em; }
.logo-bar__row {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 3.5rem; flex-wrap: wrap;
}
.logo-bar__item {
  font-family: 'Figtree', sans-serif;
  font-weight: 700; font-size: 1.1rem;
  color: #94A3B8;
  letter-spacing: -.01em;
  transition: color .2s ease;
}
.logo-bar__item:hover { color: var(--dk); }

/* ==== Stats ==== */
.stats {
  padding: 4rem 1.5rem;
  background: var(--white);
}
.stats__grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  text-align: center;
}
.stat__num { font-family: 'Figtree', sans-serif; font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 800; color: var(--dk); line-height: 1; }
.stat__num .accent { color: var(--mid); }
.stat__label { font-size: 0.92rem; color: var(--muted); margin-top: .5rem; font-weight: 500; }

/* ==== Pillar grid ==== */
.pillars {
  padding: 6rem 1.5rem;
}
.pillars__header { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.pillars__grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.pillar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--mid); }
.pillar__icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--mid-tint); color: var(--mid);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.pillar__icon svg { width: 24px; height: 24px; }
.pillar h3 { margin-bottom: .6rem; }
.pillar p { color: var(--muted); font-size: 0.98rem; }

/* ==== Two-col alternating ==== */
.alt {
  padding: 5rem 1.5rem;
}
.alt__grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.alt--reverse .alt__grid { direction: rtl; }
.alt--reverse .alt__grid > * { direction: ltr; }
.alt__media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; background: var(--surface); }
.alt__media img { width: 100%; height: 100%; object-fit: cover; }
.alt__body h2 { margin: .5rem 0 1.25rem; }
.alt__body p { color: var(--muted); margin-bottom: .85rem; font-size: 1.02rem; }
.alt__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.alt__tag {
  background: var(--mid-tint); color: var(--mid);
  padding: .4rem .9rem; border-radius: 999px;
  font-size: .85rem; font-weight: 600;
}

/* ==== Testimonial / Quote ==== */
.quote {
  padding: 2rem 2.25rem;
  background: var(--white);
  border-left: 4px solid var(--mid);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
  margin: 1.5rem 0;
}
.quote p {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.5;
}
.quote .attr {
  display: block; margin-top: 1rem;
  font-family: 'Figtree', sans-serif; font-style: normal;
  font-size: 0.88rem; font-weight: 600; color: var(--mid);
}
.quote.quote--dark { background: rgba(255,255,255,.05); }
.quote.quote--dark p { color: rgba(255,255,255,0.9); }
.quote.quote--dark .attr { color: var(--mid); }

/* ==== Metric cards (case study) ==== */
.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.metric {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: left;
}
.metric__icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--mid-tint); color: var(--mid);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .85rem;
}
.metric__num { font-size: 1.8rem; font-weight: 800; color: var(--dk); line-height: 1.1; letter-spacing: -.02em; }
.metric__label { font-size: 0.85rem; color: var(--muted); margin-top: .3rem; }

/* ==== Card grid (case studies, team, services) ==== */
.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__media { aspect-ratio: 3/2; background: var(--surface); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card__tag { font-size: 0.75rem; font-weight: 700; color: var(--mid); text-transform: uppercase; letter-spacing: .08em; }
.card__title { font-size: 1.25rem; font-weight: 700; color: var(--dk); }
.card__text { color: var(--muted); font-size: 0.96rem; flex: 1; }
.card__cta { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--mid); margin-top: .5rem; }

/* Team card variant */
.team-card { text-align: left; }
.team-card .card__media { aspect-ratio: 1/1; }
.team-card__origin {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mid);
  padding: .2rem .6rem;
  background: var(--mid-tint);
  border-radius: 999px;
  margin-top: .3rem;
}

/* ==== Process timeline (how-it-works) ==== */
.process {
  counter-reset: step;
  display: grid; gap: 1.25rem;
}
.process__step {
  display: grid; grid-template-columns: 60px 1fr; gap: 1.5rem; align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
}
.process__step::before {
  counter-increment: step;
  content: "0" counter(step);
  grid-column: 1;
  font-family: 'Figtree', sans-serif;
  font-size: 1.4rem; font-weight: 800; color: var(--mid);
  background: var(--mid-tint);
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.process__step h3 { margin-bottom: .5rem; }
.process__step p { color: var(--muted); }

/* ==== Forms ==== */
.form { display: grid; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-weight: 600; font-size: 0.9rem; color: var(--dk); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-family: 'Figtree', sans-serif;
  font-size: 1rem;
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--mid);
  box-shadow: 0 0 0 3px rgba(33,141,68,.15);
}
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field__hint { font-size: 0.82rem; color: var(--muted); }

/* ==== FAQ (accordion) ==== */
.faq { display: grid; gap: .75rem; }
.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
.faq__item[open] { border-color: var(--mid); }
.faq__q {
  padding: 1.25rem 1.5rem;
  font-weight: 600; font-size: 1.02rem;
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--dk);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "+"; font-size: 1.4rem; font-weight: 300; color: var(--mid); transition: transform .2s ease; }
.faq__item[open] .faq__q::after { content: "–"; }
.faq__a { padding: 0 1.5rem 1.25rem; color: var(--muted); font-size: 0.98rem; }

/* ==== CTA banners ==== */
.cta-banner {
  padding: 5rem 1.5rem;
  background: linear-gradient(135deg, var(--dk) 0%, var(--dk-tint) 100%);
  color: var(--white);
  text-align: center;
  position: relative; overflow: hidden;
}
.cta-banner::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, transparent 0 28px, rgba(33,141,68,.08) 28px 31px);
  pointer-events: none;
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 { color: var(--white); max-width: 720px; margin: 0 auto 1rem; }
.cta-banner p { color: rgba(255,255,255,.8); max-width: 560px; margin: 0 auto 2rem; font-size: 1.1rem; }

/* ==== Calculator widget (resources page) ==== */
.calc {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.calc__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.calc__result {
  background: var(--dk);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1rem;
  text-align: center;
}
.calc__result-num { font-size: 2.4rem; font-weight: 800; color: var(--mid); }
.calc__result-label { font-size: 0.9rem; color: rgba(255,255,255,.8); }

/* ==== Footer ==== */
footer {
  background: #0A1A0D;
  color: rgba(255,255,255,.65);
  padding: 4rem 1.5rem 2rem;
}
.footer__grid {
  max-width: var(--max); margin: 0 auto 3rem;
  display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 2.5rem;
}
.footer__brand p { font-size: 0.92rem; margin-top: .75rem; color: rgba(255,255,255,.55); }
.footer__brand .nav__logo { color: var(--white); }
.footer__col h4 {
  color: var(--white);
  font-size: 0.85rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.footer__col a { color: rgba(255,255,255,.65); font-size: 0.94rem; }
.footer__col a:hover { color: var(--mid); }
.footer__bottom {
  max-width: var(--max); margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  font-size: 0.85rem;
}
.footer__newsletter { display: flex; gap: .5rem; margin-top: 1rem; max-width: 360px; }
.footer__newsletter input {
  flex: 1; padding: .7rem 1rem; border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius); background: rgba(255,255,255,.05); color: var(--white);
  font-family: inherit; font-size: 0.92rem;
}
.footer__newsletter input::placeholder { color: rgba(255,255,255,.45); }
.footer__newsletter button {
  background: var(--mid); color: var(--white);
  border: 0; padding: .7rem 1.2rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.92rem; cursor: pointer;
}
.footer__social { display: flex; gap: .75rem; }
.footer__social a {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
}
.footer__social a:hover { background: var(--mid); color: var(--white); }
.footer__social svg { width: 18px; height: 18px; }

/* ==== Utilities ==== */
.text-center { text-align: center; }
.flex { display: flex; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
.banner-note {
  display: inline-block;
  padding: .35rem .8rem;
  background: var(--amber-tint); color: #92400E;
  border-radius: 999px;
  font-size: .8rem; font-weight: 600;
}

/* ==== Responsive ==== */
@media (max-width: 960px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-split__left, .hero-split__right { padding: 3.5rem 1.5rem; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .pillars__grid { grid-template-columns: 1fr; }
  .alt__grid, .alt--reverse .alt__grid { grid-template-columns: 1fr; gap: 2.5rem; direction: ltr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .card-grid, .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .nav__links { display: none; }
  .nav__burger { display: inline-flex; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
  }
  .nav.is-open .nav__links li { padding: .75rem 0; border-bottom: 1px solid var(--border); }
  .nav.is-open .nav__links li:last-child { border: 0; }
  .calc__row { grid-template-columns: 1fr; }
  .field--row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  section { padding: 3.5rem 0; }
  .card-grid, .card-grid--2, .card-grid--4 { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
  h1 { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
