:root {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #656560;
  --line: #d2d2cc;
  --blue: #2455ff;
  --button-bg: #2455ff;
  --button-hover: #163bd0;
  --button-text: #ffffff;
  --inverse-bg: #111111;
  --inverse-text: #ffffff;
  --max: 1180px;
  --sans: Arial, Helvetica, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11110f;
    --surface: #191917;
    --ink: #f2f2ed;
    --muted: #aaa9a1;
    --line: #3b3b36;
    --blue: #8ea5ff;
    --button-bg: #4762df;
    --button-hover: #3b55cf;
    --button-text: #ffffff;
    --inverse-bg: #f2f2ed;
    --inverse-text: #11110f;
  }
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: 0.18em; }
h1, h2, h3, p, ul { margin-top: 0; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--inverse-text);
  background: var(--inverse-bg);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.header,
main,
.footer {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}

.header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-bottom: 1px solid var(--line);
}
.identity { display: flex; flex-direction: column; gap: 3px; text-decoration: none; }
.identity strong { font-size: 0.94rem; }
.header nav { display: flex; align-items: center; gap: 26px; font-size: 0.75rem; }
.header nav > a:not(.header-cta):hover,
.header nav > a:not(.header-cta):focus-visible,
.footer a:hover,
.footer a:focus-visible { color: var(--blue); }
.header-cta {
  padding: 11px 15px;
  color: var(--inverse-text);
  background: var(--inverse-bg);
  font-weight: 700;
  text-decoration: none;
}
.header-cta:hover,
.header-cta:focus-visible { color: var(--button-text); background: var(--button-bg); }

.hero {
  min-height: 590px;
  padding: 78px 0 72px;
  border-bottom: 1px solid var(--line);
}
.hero-copy { max-width: 900px; }
.hero h1 {
  max-width: 850px;
  margin-bottom: 28px;
  font-size: clamp(3.5rem, 6.6vw, 6.3rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.065em;
}
.hero h1 code {
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.82em;
  font-weight: 600;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
.lede { max-width: 660px; margin-bottom: 12px; font-size: clamp(1.2rem, 2vw, 1.65rem); line-height: 1.3; letter-spacing: -0.025em; }
.lede { margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button {
  display: inline-flex;
  min-height: 48px;
  padding: 13px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
.button-primary { color: var(--button-text); background: var(--button-bg); border-color: var(--button-bg); }
.button-primary:hover,
.button-primary:focus-visible { background: var(--button-hover); border-color: var(--button-hover); }
.button-secondary { background: transparent; }
.button-secondary:hover,
.button-secondary:focus-visible { color: var(--blue); border-color: var(--blue); }

.section { padding: 92px 0 100px; border-bottom: 1px solid var(--line); }
.section-head {
  margin-bottom: 50px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(2.5rem, 4.8vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
.section-head > p { max-width: 760px; margin: 18px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--line);
}
.service-grid article {
  min-height: 320px;
  padding: 34px 30px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.service-grid h3 { margin-bottom: 14px; font-size: clamp(1.65rem, 2.8vw, 2.5rem); letter-spacing: -0.045em; }
.service-grid .description { max-width: 500px; margin-bottom: 26px; font-size: 1rem; line-height: 1.45; }
.service-grid ul { margin: 0; padding: 0; color: var(--muted); list-style: none; font-size: 0.8rem; line-height: 1.7; }
.service-grid li::before { content: "•"; margin-right: 9px; color: var(--ink); }
.mentoring-service { grid-column: 1 / -1; }
.mentoring-service .description,
.mentoring-service ul { max-width: 650px; }

.footer {
  display: grid;
  padding: 22px 0 38px;
  grid-template-columns: 1fr 1fr auto;
  gap: 22px;
  color: var(--muted);
  font-size: 0.72rem;
}
.footer p { margin: 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: 12px 20px; }

.content-page {
  padding: 76px 0 104px;
  border-bottom: 1px solid var(--line);
}
.content-page-header {
  max-width: 900px;
  padding-bottom: 54px;
  border-bottom: 1px solid var(--line);
}
.content-page .eyebrow {
  margin-bottom: 16px;
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.content-page h1 {
  max-width: 900px;
  margin-bottom: 24px;
  font-size: clamp(3.3rem, 7vw, 6.4rem);
  line-height: 0.94;
  letter-spacing: -0.065em;
}
.content-page h1 code {
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.82em;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
.content-page .page-lede {
  max-width: 730px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.35;
  letter-spacing: -0.025em;
}
.prose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-left: 1px solid var(--line);
}
.prose-grid section {
  min-height: 300px;
  padding: 34px 30px 38px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.prose-grid h2 {
  margin-bottom: 18px;
  font-size: clamp(1.65rem, 2.8vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.prose-grid p,
.prose-grid li {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}
.prose-grid p:last-child { margin-bottom: 0; }
.prose-grid ul { margin-bottom: 0; padding-left: 1.1rem; }
.prose-grid strong { color: var(--ink); }
.prose-grid .wide { grid-column: 1 / -1; min-height: 0; }
.inline-action { color: var(--blue); font-weight: 700; }
.not-found { min-height: calc(100vh - 180px); }
.not-found .content-page-header { padding-bottom: 0; border-bottom: 0; }
.recovery-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }

@media (max-width: 850px) {
  .hero { min-height: 0; }
}

@media (max-width: 650px) {
  .header,
  main,
  .footer { width: min(calc(100% - 30px), var(--max)); }
  .header { min-height: 68px; }
  .header nav > a:not(.header-cta) { display: none; }
  .header-cta { padding: 10px 12px; }
  .hero { padding: 58px 0 66px; }
  .hero h1 { font-size: clamp(3.3rem, 15vw, 5rem); }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .section { padding: 68px 0 76px; }
  .service-grid { grid-template-columns: 1fr; }
  .mentoring-service { grid-column: auto; }
  .service-grid article { min-height: 0; padding: 24px 22px 30px; }
  .content-page { padding: 56px 0 72px; }
  .content-page-header { padding-bottom: 40px; }
  .prose-grid { grid-template-columns: 1fr; }
  .prose-grid section { min-height: 0; padding: 26px 22px 30px; }
  .prose-grid .wide { grid-column: auto; }
  .footer { grid-template-columns: 1fr auto; row-gap: 18px; }
  .footer nav { grid-column: 1 / -1; grid-row: 2; }
  .footer > a { grid-column: 2; grid-row: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Client-focused consulting pages */
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; }
.header nav { font-size: 0.875rem; }
.header { gap: 24px; }
.hero { min-height: 0; padding: 76px 0 60px; }
.hero-copy { max-width: 1000px; }
.hero h1 { max-width: 950px; line-height: 0.98; }
.eyebrow {
  margin-bottom: 22px;
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lede { max-width: 730px; line-height: 1.45; }
.button { font-size: 0.875rem; min-height: 50px; }
.credentials { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 36px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.875rem; line-height: 1.6; }
.credentials li:first-child { color: var(--ink); font-weight: 700; }
.section-head > p:not(.eyebrow) { max-width: 760px; font-size: 1.05rem; line-height: 1.6; }
.section-head > .eyebrow { margin: 0 0 18px; color: var(--blue); font-size: 0.8rem; }
.focused-services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.focused-services article { display: flex; flex-direction: column; padding: 30px 26px; }
.service-index { display: block; margin-bottom: 24px; color: var(--blue); font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 0.75rem; line-height: 1.6; letter-spacing: 0.05em; }
.focused-services h3 { font-size: 2rem; line-height: 1.05; }
.focused-services .description { line-height: 1.6; }
.focused-services ul { margin-bottom: 30px; font-size: 0.9rem; line-height: 1.65; }
.focused-services li { margin-bottom: 8px; }
.service-output { margin: auto 0 0; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; line-height: 1.6; }
.service-output strong { display: block; margin-bottom: 8px; color: var(--ink); }
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
.case-study { padding-top: 24px; border-top: 2px solid var(--ink); }
.case-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 30px; }
.case-meta h3 { margin: 0; font-size: 1.3rem; letter-spacing: -0.03em; }
.case-meta span { color: var(--muted); font-size: 0.8rem; }
.case-study h4 { margin: 0 0 16px; font-size: clamp(1.7rem, 2.6vw, 2.4rem); line-height: 1.1; letter-spacing: -0.045em; }
.case-study > p { font-size: 1rem; line-height: 1.7; }
.case-study .case-result { padding: 18px 20px; background: var(--surface); border-left: 3px solid var(--blue); }
.case-result-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.8rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.tags li { padding: 7px 10px; border: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; }
.section-note { margin: 34px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.7; }
.project-grid, .process-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.project-grid article { display: flex; flex-direction: column; padding-top: 25px; border-top: 1px solid var(--ink); }
.project-grid h3, .process-grid h3 { margin: 0 0 18px; font-size: 1.65rem; line-height: 1.15; letter-spacing: -0.04em; }
.project-grid p:not(.service-index), .process-grid p { margin-bottom: 24px; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.project-grid a { margin-top: auto; font-size: 0.9rem; line-height: 1.5; }
.process-grid { margin: 0; padding: 0; list-style: none; counter-reset: none; }
.process-grid li { padding-top: 24px; border-top: 1px solid var(--line); }
.process-grid p { margin-bottom: 0; }
.contact-band { display: grid; grid-template-columns: 1.5fr 1fr; align-items: center; gap: 60px; padding: 84px 0 88px; border-bottom: 1px solid var(--line); }
.contact-band h2 { margin-bottom: 24px; font-size: clamp(2.5rem, 4.8vw, 4.2rem); line-height: 1.03; letter-spacing: -0.055em; }
.contact-band p:not(.eyebrow) { max-width: 540px; margin-bottom: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.contact-actions { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.email-link { color: var(--muted); font-size: 0.9rem; }
.footer { font-size: 0.8rem; }
@media (max-width: 950px) {
  .focused-services { grid-template-columns: 1fr; }
  .focused-services article { padding: 30px; }
  .focused-services h3 { max-width: none; }
  .focused-services .description { max-width: 650px; }
  .focused-services ul { margin-bottom: 20px; }
  .contact-band { gap: 30px; }
}
@media (max-width: 700px) {
  .project-grid, .process-grid, .case-grid, .contact-band { grid-template-columns: 1fr; }
  .project-grid, .case-grid { gap: 44px; }
  .project-grid article { min-height: 0; }
  .contact-band { gap: 32px; padding: 64px 0 72px; }
}
@media (max-width: 650px) {
  .hero { padding: 50px 0 46px; }
  .hero h1 { font-size: clamp(2.7rem, 12.5vw, 4.4rem); }
  .hero .eyebrow { max-width: 310px; font-size: 0.75rem; }
  .credentials { flex-direction: column; gap: 8px; margin-top: 28px; }
  .section { padding: 58px 0 64px; }
  .section-head { margin-bottom: 32px; }
  .focused-services article { padding: 26px 22px; }
  .contact-actions { align-items: stretch; }
}
