/* Treeline Consulting - styles.css
   Consumes DESIGN_SYSTEM.md v1 (brand-book/website/). No page-local style values.
   Palette + type per locked Brand Book v1.1 Section 5. Flexbox only. */

:root {
  --c-slate: #1B3A4B;
  --c-forest: #2D5F3E;
  --c-pine: #C4956A;
  --c-pine-hover: #B3835A;
  --c-sage: #8B9A8F;
  --c-frost: #E8EDE5;
  --c-dark: #1E2328;
  --c-white: #FFFFFF;

  --ff-display: "Instrument Sans", sans-serif;
  --ff-body: "Source Serif 4", Georgia, serif;

  --fs-h1: clamp(2.1rem, 4.5vw, 3.25rem);
  --fs-h2: clamp(1.5rem, 2.8vw, 2rem);
  --fs-h3: 1.25rem;
  --fs-body: 1.125rem;
  --fs-small: 1rem;
  --fs-micro: 0.8125rem;
  --fs-data: clamp(1.75rem, 3.5vw, 2.5rem);

  --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 32px;
  --sp-6: 48px; --sp-8: 64px; --sp-12: 96px;
  --ridge-h: 118px; /* ridge divider height (spacing B, 2026-07-12) */
  --content-max: 1080px;
  --measure: 68ch;
  /* spatial system (2026-07-03 round 5): one rhythm, four gaps */
  --pad-section: 96px;
  --gutter: 32px;
  --gap-block: 48px;
  --gap-stack: 24px;
  --gap-text: 12px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--c-dark);
  background: var(--c-white);
}

h1, h2, h3, nav, .cta-button, .button-quiet, .data-figure, .figure-label {
  font-family: var(--ff-display);
  font-weight: 500;
  line-height: 1.15;
}

h1 { font-size: var(--fs-h1); color: var(--c-white); }
h2 { font-size: var(--fs-h2); color: var(--c-slate); margin-bottom: var(--sp-3); }
h3 { font-size: var(--fs-h3); color: var(--c-forest); margin-bottom: var(--sp-1); }

p { max-width: var(--measure); margin-bottom: var(--sp-2); }
a { color: var(--c-forest); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--c-pine); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--c-slate);
  color: var(--c-white); padding: var(--sp-1) var(--sp-2); z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-4);
  background: var(--c-slate);
  position: sticky; top: 0; z-index: 50;
}
.brand {
  font-family: var(--ff-display); font-weight: 500; font-size: 1.15rem;
  color: var(--c-frost); text-decoration: none; margin-right: auto;
  display: flex; align-items: center; gap: var(--sp-1); min-height: 44px;
}
.site-header nav { display: flex; gap: var(--sp-3); flex-wrap: nowrap; }
.site-header nav a {
  color: var(--c-frost); text-decoration: none; font-size: var(--fs-small);
  white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 44px;
}
.site-header nav a[aria-current="page"] { border-bottom: 2px solid var(--c-pine); }
.site-header nav a:hover { color: var(--c-pine); }

/* ---------- Buttons ---------- */
.cta-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: max-content;
  background: var(--c-pine); color: var(--c-dark);
  font-size: var(--fs-small); text-decoration: none;
  padding: 12px 24px; min-height: 44px; border-radius: 2px;
}
.cta-button:hover { background: var(--c-pine-hover); }
.button-quiet {
  display: inline-flex; align-items: center;
  border: 1px solid var(--c-slate); color: var(--c-slate);
  padding: 10px 20px; min-height: 44px; border-radius: 2px;
  text-decoration: none; font-size: var(--fs-small);
}

/* ---------- Sections ---------- */
main section { padding: var(--pad-section) var(--gutter); }
.section-inner { max-width: var(--content-max); margin: 0 auto; }
.section-inner > .kicker { margin-bottom: var(--gap-text); }
.section-inner > h1, .section-inner > h2 { margin-bottom: var(--gap-stack); }
.section-inner > p { margin-bottom: var(--gap-text); }
.section-inner > .pillar-row, .section-inner > figure, .section-inner > table,
.section-inner > ol, .section-inner > ul, .section-inner > .note-box,
.section-inner > .calendly-inline-widget { margin: var(--gap-block) 0; }
.section-inner > :first-child { margin-top: 0; }
.section-inner > :last-child { margin-bottom: 0; }
.section-inner > a { display: inline-flex; margin-top: var(--gap-stack); }
.section-inner.center { text-align: center; }
.section-inner.center p { margin-left: auto; margin-right: auto; }
.section-inner.center > a { margin-left: auto; margin-right: auto; }

.hero { background: var(--c-slate); color: var(--c-frost); }
.hero h1 { max-width: 26ch; }
.hero .hero-sub { color: var(--c-frost); font-size: var(--fs-body); max-width: 55ch; }
.hero .hero-answer { color: var(--c-frost); font-size: var(--fs-small); max-width: 60ch; }
.hero .cta-button { margin-top: var(--gap-stack); }

.tagline-support { font-family: var(--ff-display); color: var(--c-forest); font-size: var(--fs-small); }

/* ---------- Pillars ---------- */
#pillars .pillar-row { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.pillar {
  flex: 1 1 260px; background: var(--c-white);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(27,58,75,.08);
  padding: var(--sp-4);
}
.band-frost { background: var(--c-frost); }
.pillar-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--c-frost); margin-bottom: var(--sp-2);
}
.pillar-proof {
  font-size: var(--fs-micro); color: var(--c-slate);
  border-top: 1px solid var(--c-frost); padding-top: var(--sp-2); margin-top: var(--sp-2);
}
.pillar p { font-size: var(--fs-small); }

/* ---------- Proof band ---------- */
#proof { background: var(--c-slate); color: var(--c-white); }
#proof h2 { color: var(--c-white); }
#proof a { color: var(--c-frost); }
.proof-figures { display: flex; gap: var(--sp-4); flex-wrap: nowrap; list-style: none; }
@media (max-width: 720px) { .proof-figures { flex-wrap: wrap; } }
.proof-figures li {
  flex: 1 1 0; min-width: 160px; border-top: 2px solid var(--c-pine);
  padding-top: var(--sp-2); font-size: var(--fs-small);
}
.proof-figures .data-figure { display: block; font-size: var(--fs-data); color: var(--c-white); margin-bottom: var(--sp-1); }

/* ---------- Readout figure ---------- */
.readout-graphic {
  background: var(--c-white); border: 1px solid var(--c-frost);
  border-top: 2px solid var(--c-slate);
  padding: var(--sp-4); box-shadow: 0 2px 8px rgba(27,58,75,.08);
}
.readout-graphic svg { width: 100%; height: auto; display: block; }
.figure-label { font-size: var(--fs-micro); color: var(--c-slate); letter-spacing: .04em; text-transform: uppercase; margin-bottom: var(--sp-2); }

/* ---------- Method steps ---------- */
.method-steps { display: flex; gap: var(--sp-3); flex-wrap: wrap; list-style: none; counter-reset: step; }
.method-steps li {
  flex: 1 1 0; min-width: 130px; background: var(--c-frost); padding: var(--sp-3);
  font-family: var(--ff-display); font-size: var(--fs-small); counter-increment: step;
}
.method-steps li::before {
  content: counter(step); display: block; color: var(--c-pine);
  font-size: var(--fs-data); margin-bottom: var(--sp-1);
}

/* ---------- Tables ---------- */
.results-table { border-collapse: collapse; width: 100%; font-size: var(--fs-small); }
.results-table th {
  font-family: var(--ff-display); font-weight: 500; text-align: left;
  background: var(--c-frost); color: var(--c-slate);
  padding: var(--sp-2); border-bottom: 1px solid var(--c-sage);
}
.results-table td { padding: var(--sp-2); border-bottom: 1px solid var(--c-frost); }

/* ---------- Quote ---------- */
.owner-quote {
  font-style: italic; font-size: var(--fs-h3); max-width: var(--measure);
  border-left: 3px solid var(--c-pine); padding-left: var(--sp-3); color: var(--c-slate);
}

/* ---------- Founder strip ---------- */
#founder { background: var(--c-frost); }
.founder-photo {
  background: var(--c-white); border: 1px dashed var(--c-sage);
  padding: var(--sp-8) var(--sp-4); text-align: center;
  color: var(--c-sage); font-family: var(--ff-display); font-size: var(--fs-micro);
  margin-bottom: var(--sp-3);
}

/* ---------- Scheduler ---------- */
.no-js-fallback { font-size: var(--fs-small); }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-slate); color: var(--c-frost); padding: var(--sp-8) var(--gutter); }
.footer-inner { max-width: var(--content-max); margin: 0 auto; }
.entity-paragraph { font-size: var(--fs-small); max-width: var(--measure); margin-bottom: var(--sp-3); }
.footer-locality, .footer-tagline { font-family: var(--ff-display); font-size: var(--fs-small); margin-bottom: var(--sp-1); }
.site-footer nav { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin: var(--sp-3) auto; }
.site-footer nav a { color: var(--c-frost); font-size: var(--fs-small); display: inline-flex; align-items: center; min-height: 44px; }
.footer-legal { font-size: var(--fs-micro); color: var(--c-frost); }

/* ---------- Motion (progressive enhancement; JS adds .js) ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  :root { --pad-section: 64px; --gutter: 24px; }
  main section { padding: var(--pad-section) var(--gutter); }
  .site-header { flex-wrap: wrap; gap: var(--sp-2); }
}


/* ---------- Amendments 2026-07-03 (Justin design red-pen) ---------- */
.kicker {
  font-family: var(--ff-display); font-size: var(--fs-micro);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-pine); margin-bottom: var(--sp-2);
}
.hero .kicker { color: var(--c-pine); }
.accent { color: var(--c-pine); }
#proof .data-figure, .proof-figures .data-figure { color: var(--c-pine); }
.method-steps li::before { color: var(--c-pine); }
.band-forest { background: var(--c-forest); }
.band-forest p { color: var(--c-white); }
.band-forest .footer-locality { color: var(--c-frost); }
.footer-brand-row { display: flex; align-items: center; gap: var(--sp-2); font-family: var(--ff-display); font-weight: 500; font-size: 1.15rem; color: var(--c-frost); }
.footer-brand-row svg { height: 40px; width: auto; }
.band-slate { background: var(--c-slate); }
.band-slate h2, .band-slate p { color: var(--c-white); }
.band-slate .tagline-support { color: var(--c-frost); }
.note-box {
  background: rgba(232,237,229,.08); border-left: 3px solid var(--c-pine);
  padding: var(--sp-2) var(--sp-3); font-size: var(--fs-small); color: var(--c-frost);
}
.hero { position: relative; padding-bottom: calc(var(--sp-8) + var(--ridge-h)); }
.ridge {
  position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: var(--ridge-h);
  display: block; max-width: none; margin: 0;
}
#entity { position: relative; padding-bottom: calc(var(--sp-8) + var(--ridge-h)); }
.brand svg { height: 36px; width: auto; display: block; }
.footer-brand svg { height: 44px; width: auto; }
.brand img { height: 34px; width: auto; display: block; }
.footer-brand img { height: 40px; width: auto; margin-bottom: var(--sp-2); }

/* ---------- Amendments 2026-07-04 (round 6: Home worklist items 3, 11, 12) ---------- */
.founder-row { display: flex; gap: var(--gap-block); align-items: flex-start; }
.founder-row .founder-photo { flex: 0 0 320px; margin: 0; }
.founder-row .founder-photo img { width: 100%; height: auto; display: block; }
.founder-row .founder-text { flex: 1 1 0; }
.founder-row .founder-text > a { display: inline-flex; margin-top: var(--gap-stack); }
@media (max-width: 720px) { .founder-row { flex-wrap: wrap; } .founder-row .founder-photo { flex: 1 1 100%; } }
.founder-photo.has-photo { border: none; padding: 0; background: none; }
.hero h1 { letter-spacing: -0.01em; }

/* ---------- Amendments 2026-07-04 (round 8: forest band typography, Home why-section) ---------- */
.band-forest h2 { color: var(--c-white); }
.band-forest .kicker { color: var(--c-frost); }
.band-forest .figure-label { color: var(--c-frost); }

/* ---------- Amendments 2026-07-04 (round 7: footer brand stack, all pages) ---------- */
.footer-brand-stack { display: flex; flex-direction: column; line-height: 1.3; }
.footer-brand-stack .footer-brand-name { font-family: var(--ff-display); font-weight: 500; font-size: 1.15rem; color: var(--c-frost); }
.footer-brand-stack .footer-tagline { margin: 0; font-size: var(--fs-micro); color: var(--c-frost); }


/* ---------- Mobile pass 2026-07-24 (Justin ruling: header Option A no-JS two-row; ridge mobile crop) ---------- */
:root { --hairline-frost: rgba(232,237,229,.22); }
.ridge-m { display: none; }
@media (max-width: 720px) {
  .brand { font-size: 1rem; gap: 8px; }
  .brand svg { height: 28px; }
  .site-header { flex-wrap: wrap; gap: 2px 8px; padding: 8px var(--gutter) 4px; }
  .site-header .brand { flex: 0 1 auto; order: 1; min-width: 0; margin-right: auto; }
  .site-header > .cta-button { order: 2; padding: 8px 16px; flex: 0 0 auto; }
  .site-header nav { order: 3; flex: 1 1 100%; justify-content: space-between; gap: 0;
    border-top: 1px solid var(--hairline-frost); margin-top: 2px; }
  .site-header nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .ridge:not(.ridge-m) { display: none; }
  .ridge-m { display: block; }
}

/* Mobile readout treatment 2026-07-24 (restacked .readout-m; desktop svg unchanged) */
.readout-graphic svg.readout-m { display: none; }
@media (max-width: 720px) {
  .readout-graphic { padding: var(--sp-3) var(--sp-2); }
  .readout-graphic svg:not(.readout-m) { display: none; }
  .readout-graphic svg.readout-m { display: block; }
}
