/* ============================================================
   Kestrel Business Group — shared stylesheet
   Palette + type + layout described in build notes; see about.html
   for the one place the firm name gets explained.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@600;700;800&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink: #1c2024;          /* dark surfaces: hero, footer, stat band */
  --ink-raised: #262b31;   /* lighter dark panel, for cards on dark bg */
  --stone: #e7e4dc;        /* light surface, body of the site */
  --stone-raised: #dcd8c9; /* deeper light surface for alt sections */
  --dial: #efe7d3;         /* warm ivory: headlines on dark */
  --dial-soft: #b9af97;    /* muted ivory: body text on dark */
  --brass: #c68a15;        /* primary accent: links, buttons, needles */
  --brass-deep: #a5730f;   /* hover state for brass */
  --steel: #5c7078;        /* secondary accent, dividers on dark */
  --steel-soft: #8695a0;   /* ghost/before marks, muted labels on dark */
  --moss: #6e8258;         /* reserved: "improved" indicator in data only */
  --line: #cfc9b8;         /* hairline border on light stone */
  --line-dark: #34393f;    /* hairline border on dark ink */

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --max: 1180px;
  --pad: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

h1, h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 0.5em;
  color: inherit;
}
h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: inherit;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.55rem); }

p { margin: 0 0 1.2em; color: var(--ink); opacity: 0.82; max-width: 62ch; }
a { color: var(--brass); }
a:hover { color: var(--brass-deep); }

main { scroll-margin-top: 90px; }

.mono-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--steel);
}

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }

.skip-link {
  position: absolute; left: -9999px; top: auto;
  background: var(--ink); color: var(--dial);
  padding: 10px 16px; z-index: 100; text-decoration: none;
  font-family: var(--font-mono); font-size: 0.8rem;
}
.skip-link:focus { left: 16px; top: 16px; }

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, label:focus-visible, .nav-toggle-label:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* ---------- Header / Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--stone); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: 16px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { color: var(--brass); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: 0.02em; text-transform: uppercase; }
.brand-sub { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--steel); margin-top: 3px; }

nav.primary-nav { display: flex; align-items: center; gap: 28px; }
nav.primary-nav a {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; color: var(--ink); padding-bottom: 3px; border-bottom: 1px solid transparent;
}
nav.primary-nav a:hover, nav.primary-nav a[aria-current="page"] { border-bottom-color: var(--brass); color: var(--brass-deep); }
.nav-cta { background: var(--brass); color: var(--ink) !important; padding: 9px 18px; border-radius: 2px; border-bottom: none !important; font-weight: 500; }
.nav-cta:hover { background: var(--brass-deep); color: var(--dial) !important; }

.nav-toggle { display: none; }
.nav-toggle-label { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; }
.nav-toggle-label span { display: block; width: 22px; height: 2px; background: var(--ink); }

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-block; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none; padding: 14px 26px; border-radius: 2px;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--brass); color: var(--ink); border: none; cursor: pointer; font-weight: 500; }
.btn-primary:hover { background: var(--brass-deep); color: var(--dial); }
.btn-outline { border: 1px solid currentColor; color: inherit; background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--dial); border-color: var(--ink); }
.text-link {
  font-family: var(--font-mono); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em;
  text-decoration: none; color: var(--brass); border-bottom: 1px solid var(--brass); padding-bottom: 2px;
}
.text-link:hover { color: var(--brass-deep); border-color: var(--brass-deep); }

/* ---------- Hero (home only — the one place the design spends its boldness) ---------- */
.hero { background: var(--ink); color: var(--dial-soft); padding-block: clamp(64px, 10vw, 110px) clamp(50px, 8vw, 80px); }
.hero h1 { color: var(--dial); max-width: 15ch; }
.hero .lede { color: var(--dial-soft); }
.hero-eyebrow { display: block; margin-bottom: 18px; color: var(--brass); }
.cta-row { display: flex; gap: 18px; margin-top: 32px; flex-wrap: wrap; }

.gauge-cluster { display: flex; gap: clamp(18px, 3vw, 44px); margin-top: 56px; flex-wrap: wrap; }
.gauge { flex: 1 1 150px; max-width: 190px; }
.gauge svg { width: 100%; height: auto; }
.gauge-label { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--steel-soft); text-align: center; }

/* ---------- Page header (interior pages — quiet, no gauge cluster) ---------- */
.page-header { border-bottom: 1px solid var(--line); padding-block: clamp(48px, 8vw, 84px) 44px; }
.page-header h1 { max-width: 20ch; }
.page-header .lede { margin-top: 16px; }
.page-header .mono-label { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }

.lede { font-size: 1.08rem; max-width: 56ch; opacity: 0.85; }

/* ---------- Stat band ---------- */
.stat-band { background: var(--ink); border-top: 1px solid var(--line-dark); padding-block: 44px; }
.stat-band .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding-inline: 24px; border-left: 1px solid var(--line-dark); }
.stat:first-child { border-left: none; padding-left: 0; }
.stat .num { font-family: var(--font-display); font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 800; color: var(--dial); line-height: 1; }
.stat .label { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--steel-soft); margin-top: 10px; }

/* ---------- Sections ---------- */
section { padding-block: clamp(52px, 8vw, 96px); }
.alt-bg { background: var(--stone-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head .mono-label { display: block; margin-bottom: 14px; }

/* Numbered list — used only where content is a real sequence (the Approach phases) */
.numbered-list { border-top: 1px solid var(--line); }
.numbered-item { display: grid; grid-template-columns: 84px 1fr; gap: 30px; padding-block: 34px; border-bottom: 1px solid var(--line); }
.numbered-item .n { font-family: var(--font-mono); font-size: 1.05rem; color: var(--brass-deep); padding-top: 4px; }
.numbered-item .n .n-phase { display: block; color: var(--steel); font-size: 0.6rem; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.08em; }
.numbered-item h3 { margin-bottom: 10px; }
.numbered-item ul { margin: 14px 0 0; padding-left: 18px; }
.numbered-item li { margin-bottom: 6px; opacity: 0.82; }

/* Module grid — practice areas / what-we-do (parallel disciplines, not a sequence, so no numbers) */
.module-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.module { background: var(--stone); padding: 32px; }
.module-icon { color: var(--brass); margin-bottom: 16px; }
.module h3 { margin-bottom: 10px; }
.module ul { margin: 14px 0 0; padding-left: 18px; }
.module li { margin-bottom: 6px; opacity: 0.82; }

/* Team grid */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 38px; }
.team-card { border-top: 3px solid var(--brass); padding-top: 18px; }
.team-card .name { text-transform: uppercase; font-size: 1.2rem; margin-bottom: 2px; }
.team-card .role { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel); margin-bottom: 12px; display: block; }

/* Insights */
.insight-item { border-bottom: 1px solid var(--line); padding-block: 32px; }
.insight-item .mono-label { margin-bottom: 10px; display: block; }

/* Callout */
.callout { background: var(--stone-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.callout .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 22px; padding-block: 44px; }
.callout h2 { margin: 0; max-width: 14ch; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-grid h3 { margin-bottom: 18px; }
.direct-item { margin-bottom: 22px; }
.direct-item .mono-label { display: block; margin-bottom: 4px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 620px; }
.form-grid .full { grid-column: 1 / -1; }
label { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--steel); display: block; margin-bottom: 6px; }
input, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--stone); padding: 12px 14px;
  font-family: var(--font-serif); font-size: 1rem; color: var(--ink); border-radius: 2px;
}
input:focus, textarea:focus { outline: 2px solid var(--brass); outline-offset: 1px; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--ink); color: var(--dial-soft); padding-block: 56px 26px; }
footer.site-footer a { color: var(--dial-soft); text-decoration: none; }
footer.site-footer a:hover { color: var(--dial); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid var(--line-dark); }
.footer-grid .brand-name { font-family: var(--font-display); font-size: 1.25rem; text-transform: uppercase; font-weight: 800; color: var(--dial); }
.footer-grid p { color: var(--steel-soft); opacity: 1; margin-top: 10px; }
.footer-grid h4 { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel-soft); margin-bottom: 16px; font-weight: 500; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-contact { font-family: var(--font-mono); font-size: 0.8rem; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 22px; font-family: var(--font-mono); font-size: 0.68rem; color: var(--steel); flex-wrap: wrap; gap: 10px; }

/* ---------- 404 ---------- */
.error-page { padding-block: 120px 140px; }

/* ---------- Reduced motion / accessibility floor ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle-label { display: flex; }
  nav.primary-nav {
    position: fixed; top: 62px; left: 0; right: 0; z-index: 45;
    background: var(--stone); flex-direction: column; align-items: flex-start;
    padding: 22px var(--pad) 30px; gap: 18px;
    transform: translateY(-120%); transition: transform .25s ease;
    border-bottom: 1px solid var(--line);
  }
  .nav-toggle:checked ~ nav.primary-nav { transform: translateY(0); }
  .stat-band .wrap { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .stat:nth-child(3) { border-left: none; padding-left: 0; }
  .module-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .numbered-item { grid-template-columns: 1fr; gap: 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .gauge { flex: 1 1 40%; }
}
