/* ─────────────────────────────────────────────────────────────
   TreeIG — design system
   ──────────────────────────────────────────────────────────── */

:root {
  --green-900: #0e2e1d;
  --green-800: #173e26;
  --green-700: #00501F;
  --green-600: #1a6a3a;
  --green-100: #e0eae1;
  --green-050: #f1f5f1;

  --ink:       #111418;
  --text:      #2a2e33;
  --muted:     #677067;
  --rule:      #d9dcd5;
  --rule-soft: #ecedea;
  --cream:     #faf7f1;
  --white:     #ffffff;

  --accent:    #b08a4b; /* champagne / aged gold — used very sparingly */

  --serif:  "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --sans:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1180px;
  --gutter:    24px;

  --shadow-1: 0 1px 2px rgba(14, 46, 29, 0.04);
  --shadow-2: 0 10px 30px -12px rgba(14, 46, 29, 0.18);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.page { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

body.nav-open { overflow: hidden; }

img, svg { max-width: 100%; height: auto; display: block; }

a {
  color: var(--green-700);
  text-decoration: none;
  text-decoration-skip-ink: auto;
  transition: color 0.2s ease;
}
a:hover, a:focus-visible { color: var(--green-900); }

::selection { background: var(--green-100); color: var(--green-900); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  z-index: 1000;
}
.skip-link:focus { left: 16px; top: 16px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container--narrow { max-width: 760px; }
.container--medium { max-width: 920px; }

/* ─── Typography ─── */

h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.012em;
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); font-weight: 500; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); font-weight: 500; letter-spacing: -0.014em; }
h3 { font-size: clamp(1.35rem, 2.1vw, 1.65rem); font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: 600; color: var(--ink); }

cite, em, i { font-style: italic; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-700);
  margin: 0 0 0.85rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 12px;
  margin-bottom: 3px;
  opacity: 0.55;
}

.lede {
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink);
  font-weight: 400;
  max-width: 60ch;
  letter-spacing: -0.005em;
}

.muted { color: var(--muted); }
.caps  { letter-spacing: 0.03em; }

hr.rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 3rem 0;
}

/* ─── Header / nav ─── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.site-header[data-scrolled="true"] {
  border-bottom-color: var(--rule);
  box-shadow: var(--shadow-1);
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  min-height: 96px;
  transition: min-height 0.3s ease;
}
.site-header[data-scrolled="true"] .site-header__row {
  min-height: 68px;
}

/* Brand band — pale-mint "letterhead" above the sticky nav */
.brand-band {
  background: var(--green-100);
  padding: 18px 0;
  border-bottom: 1px solid rgba(0, 80, 31, 0.07);
}
.brand-band__inner {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.brand-band__logo {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.2s ease;
}
.brand-band__logo:hover { opacity: 0.78; }
.brand-band__logo img {
  height: 56px;
  width: auto;
  max-width: 100%;
  display: block;
}

.primary-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav__item > a {
  display: inline-block;
  padding: 10px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  white-space: nowrap;
}
.primary-nav__item > a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}
.primary-nav__item > a:hover::after,
.primary-nav__item > a:focus-visible::after { transform: scaleX(1); }
.primary-nav__item.is-current > a { color: var(--green-700); }
.primary-nav__item.is-current > a::after { transform: scaleX(1); background: var(--green-700); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  padding: 14px 10px;
  cursor: pointer;
  position: relative;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  margin: 3px 0;
  transform-origin: center;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* ─── Sections ─── */

.section {
  padding: clamp(40px, 6vw, 80px) 0;
}
.section + .section { padding-top: 0; }
/* But when crossing a background change, restore the top padding so the new section gets its own breathing room. */
.section--cream + .section,
.section + .section--cream { padding-top: clamp(40px, 6vw, 80px); }
.section--tight { padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(28px, 4vw, 48px); }
.section--cream { background: var(--cream); }
.section--green {
  background: var(--green-900);
  color: rgba(255,255,255,0.85);
}
.section--green h1, .section--green h2, .section--green h3 { color: #fff; }
.section--green .eyebrow { color: var(--green-100); }

/* ─── Hero ─── */

.hero {
  padding: clamp(48px, 6vw, 88px) 0 clamp(40px, 5vw, 64px);
  background:
    radial-gradient(800px 360px at 78% 18%, rgba(0, 80, 31, 0.06), transparent 60%),
    linear-gradient(180deg, var(--green-050) 0%, var(--white) 70%);
  border-bottom: 1px solid var(--rule-soft);
}
.hero__inner { max-width: 880px; }
.hero__brand {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-700);
  margin: 0 0 0.9rem;
}
.hero__tag {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: var(--green-900);
  margin: 0 0 1.4rem;
  max-width: 20ch;
}
.hero__rule {
  border: 0;
  border-top: 1px solid var(--green-700);
  width: 56px;
  margin: 0 0 1.4rem;
  opacity: 0.7;
}
.hero__title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--green-900);
  margin: 0 0 1.5rem;
  white-space: nowrap;
}
.hero__title em {
  font-style: italic;
  color: var(--green-700);
  font-weight: 500;
}
.hero__lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink);
  max-width: 60ch;
  margin: 0;
}
.hero__lineage {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 55ch;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-soft);
}
.hero__lineage::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--green-700);
  vertical-align: middle;
  margin-right: 10px;
  margin-bottom: 3px;
}

/* ─── Page header (sub-pages) ─── */

.page-header {
  padding: clamp(40px, 5vw, 72px) 0 clamp(24px, 3vw, 40px);
  background: linear-gradient(180deg, var(--green-050) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--rule-soft);
}
.page-header__title {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  margin: 0;
}
.page-header__eyebrow { margin-bottom: 1.5rem; }

/* ─── Prose (long-form text blocks) ─── */

.prose { max-width: 70ch; }
.prose p,
.prose ul,
.prose ol { margin: 0 0 1.1em; }
.prose ul,
.prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--green-700); }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose > :first-child { margin-top: 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose cite { display: block; font-size: 0.95rem; color: var(--muted); margin-top: 1.4em; padding-top: 1.4em; border-top: 1px solid var(--rule-soft); }

/* ─── SAVR / pillar cards ─── */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.pillar {
  position: relative;
  padding: 36px 28px 32px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.pillar:hover {
  transform: translateY(-2px);
  border-color: var(--green-700);
  box-shadow: var(--shadow-2);
}
.pillar__letter {
  font-family: var(--serif);
  font-size: 3.6rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1;
  color: var(--green-700);
  display: block;
  margin: -4px 0 16px;
  letter-spacing: -0.02em;
}
.pillar__title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.25;
}
.pillar__desc {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* ─── Performance teaser ─── */

.perf-teaser {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  margin-top: 28px;
}
.perf-teaser__chart {
  border: 1px solid var(--rule);
  padding: 16px;
  background: var(--white);
}
.perf-teaser__chart img { width: 100%; height: auto; }
.perf-teaser__chart--placeholder {
  aspect-ratio: 2 / 1;
  background:
    repeating-linear-gradient(45deg, var(--rule-soft) 0 1px, transparent 1px 14px),
    var(--green-050);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.perf-teaser__meta { display: flex; flex-direction: column; gap: 18px; }
.perf-teaser__meta a {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink);
}
.perf-teaser__meta a:hover { color: var(--green-700); }
.perf-teaser__meta img { display: block; }

.cta-arrow::after { content: " →"; }

/* ─── Compliance band ─── */

.compliance {
  padding: 48px 0 56px;
  border-top: 1px solid var(--rule-soft);
  background: var(--cream);
}
.compliance--quiet {
  background: transparent;
  padding: 32px 0 56px;
  border-top: 1px solid var(--rule-soft);
}
.compliance--quiet .compliance__text {
  font-size: 0.82rem;
  margin-bottom: 20px;
}
.compliance--quiet .compliance__banner {
  width: 100%;
  max-width: 560px;
  opacity: 0.85;
}
.compliance__text {
  font-size: 0.92rem;
  font-style: italic;
  color: var(--muted);
  max-width: 70ch;
  margin: 0 auto 28px;
  text-align: center;
  line-height: 1.65;
}
.compliance__banner {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: block;
  opacity: 0.92;
}

/* ─── Profile (team) ─── */

.profile__name {
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin: 0 0 0.8em;
  letter-spacing: -0.01em;
}
.profile__media {
  float: left;
  position: relative;
  width: 240px;
  margin: 0.4em 36px 16px 0;
  shape-outside: margin-box;
}
.profile__media::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  background: var(--green-700);
  opacity: 0.18;
  z-index: 0;
}
.profile__photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(0.08) contrast(1.02);
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.35);
}
.profile .prose::after {
  content: "";
  display: block;
  clear: both;
}

/* ─── Document list ─── */

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.doc-list li {
  border-bottom: 1px solid var(--rule);
}
.doc-list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 20px 2px;
  font-size: 1.02rem;
  color: var(--ink);
  transition: color 0.2s ease;
}
.doc-list a::before {
  content: "";
  flex: 0 0 2px;
  align-self: stretch;
  background: var(--green-700);
  opacity: 0.35;
  transition: opacity 0.2s ease;
}
.doc-list a::after {
  content: "→";
  margin-left: auto;
  font-size: 0.95rem;
  color: var(--muted);
  transition: transform 0.25s ease, color 0.25s ease;
}
.doc-list a:hover { color: var(--green-700); }
.doc-list a:hover::before { opacity: 1; }
.doc-list a:hover::after { color: var(--green-700); transform: translateX(4px); }

/* ─── Contact card ─── */

.contact-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 64px 48px;
  background: var(--white);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-1);
  position: relative;
}
.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 2px;
  background: var(--green-700);
}
.contact-card p { color: var(--muted); }
.contact-card__email {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 500;
  font-style: italic;
  display: inline-block;
  margin-top: 18px;
  color: var(--green-700);
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  letter-spacing: -0.005em;
  transition: color 0.2s ease;
}
.contact-card__email:hover { color: var(--green-900); }

/* ─── Footer ─── */

.site-footer {
  background: var(--green-900);
  color: rgba(255,255,255,0.78);
  margin-top: 0;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1fr;
  gap: 48px;
  padding: 72px 24px 56px;
}
.site-footer__title {
  font-family: var(--serif);
  font-size: 1.55rem;
  color: #fff;
  margin: 0 0 0.25em;
  font-weight: 500;
  letter-spacing: -0.008em;
}
.site-footer__tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--green-100);
  margin: 0;
  letter-spacing: 0.005em;
  position: relative;
  padding-top: 14px;
}
.site-footer__tag::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 1px;
  background: var(--green-100);
  opacity: 0.5;
}
.site-footer__label {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-100);
  margin: 0 0 1.1em;
  font-weight: 600;
}
.site-footer__nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 24px;
}
.site-footer__nav a,
.site-footer__contact a {
  color: rgba(255,255,255,0.78);
  font-size: 0.92rem;
}
.site-footer__nav a:hover,
.site-footer__contact a:hover { color: #fff; }
.site-footer__legal {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 22px 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
}
.site-footer__legal-row { display: flex; justify-content: center; }
.site-footer__legal p { margin: 0; }

/* ─── Inline-style overrides (kill WP inline color attrs) ─── */

[style*="color: #111111"],
[style*="color: #222222"] { color: inherit !important; }
[style*="border: 0px"] { border: 0 !important; }
[style*="height: 139px"] { height: auto !important; }
table[width="409"] { width: 100% !important; }
.entry-content table { border-collapse: collapse; }

/* ─── Responsive ─── */

@media (max-width: 880px) {
  .site-header__row {
    min-height: 72px;
    justify-content: flex-end;
  }
  .brand { gap: 10px; }
  .brand__mark { height: 32px; }
  .brand-band { padding: 14px 0; }
  .brand-band__logo img { height: 38px; }
  .brand__name { font-size: 1rem; }
  .brand__tag { display: none; }
  .nav-toggle { display: block; }
  .primary-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    background: var(--white);
    padding: 24px 24px 48px;
    transform: translateY(-100%);
    transition: transform 0.3s ease, visibility 0s 0.3s;
    overflow-y: auto;
    border-top: 1px solid var(--rule);
    z-index: 90;
    pointer-events: none;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
  }
  .primary-nav.is-open {
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition: transform 0.3s ease, visibility 0s 0s;
  }
  .primary-nav__list {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .primary-nav__item {
    width: 100%;
  }
  .primary-nav__item > a {
    display: block;
    width: 100%;
    padding: 18px 8px;
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: var(--ink);
    border-bottom: 1px solid var(--rule-soft);
    white-space: normal;
  }
  .primary-nav__item.is-current > a { color: var(--green-700); }
  .primary-nav__item > a::after { display: none; }

  .perf-teaser { grid-template-columns: 1fr; gap: 24px; }
  .profile__media {
    float: none;
    width: 200px;
    margin: 0 0 28px;
  }
  .profile__media::before { inset: 10px -10px -10px 10px; }

  .site-footer__grid { grid-template-columns: 1fr; gap: 36px; padding: 48px 24px 32px; }
  .site-footer__nav ul { grid-template-columns: 1fr; }
}

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