/* KMH Consulting Services — site styles (dark) */
:root {
  /* light (content sections) */
  --bg: #ffffff;
  --bg-alt: #eef1f4;
  --panel: #ffffff;
  --deep: #17212b;
  --heading: #111a24;
  --text: #26303a;
  --muted: #4f5a66;
  --rule: #c9d1d9;
  --rule-strong: #8995a2;
  --accent: #1f4e79;
  --accent-hover: #163a5c;
  --on-accent: #ffffff;

  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --slab: "Courier Prime", "Courier New", monospace;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* dark frame: header, hero, systems band, footer */
.site-header, .hero, .feature, .site-footer {
  --bg: #1d2834;
  --bg-alt: #223040;
  --panel: #283747;
  --heading: #f3f5f8;
  --text: #d8dfe6;
  --muted: #a9b6c3;
  --rule: #3a4a5b;
  --rule-strong: #576a7e;
  --accent: #7fb2e2;
  --accent-hover: #9cc4ea;
  --on-accent: #111a24;
  color: var(--text);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--heading);
  line-height: 1.12;
  margin: 0 0 0.6em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.375rem; }
p { margin: 0 0 1em; max-width: 38rem; }

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

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--on-accent); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

/* Buttons */
.btn {
  display: inline-block;
  font: 600 1rem/1 var(--sans);
  color: var(--on-accent);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 1rem 1.5rem;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-small { padding: .7rem 1rem; font-size: .9375rem; }
.btn-light { background: transparent; color: var(--heading); border-color: var(--rule-strong); }
.btn-light:hover { background: var(--panel); color: var(--heading); border-color: var(--heading); }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: .9rem; padding-bottom: .9rem; }
.brand img { width: 132px; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; font-size: .9375rem; }
.site-nav a:not(.btn):hover { color: var(--heading); text-decoration: underline; }
.nav-toggle { display: none; font: 600 .9375rem var(--sans); background: none; border: 1px solid var(--rule-strong); border-radius: 2px; padding: .5rem .9rem; cursor: pointer; color: var(--heading); }

/* Hero — the one lit room on the page */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem);
  /* Optional photo: save it as assets/hero.jpg (about 2000px wide). Without it, the slate glow shows. */
  background:
    linear-gradient(90deg, rgba(29, 40, 52, 0.94) 0%, rgba(29, 40, 52, 0.82) 50%, rgba(29, 40, 52, 0.6) 100%),
    radial-gradient(60rem 32rem at 18% 30%, rgba(127, 178, 226, 0.16), transparent 70%),
    url("assets/hero.jpg") center / cover no-repeat,
    var(--bg);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.lede { font-size: 1.1875rem; color: var(--muted); margin-bottom: 2rem; }

/* Stage picker — the signature element */
.stage-picker { background: var(--panel); border-top: 3px solid var(--accent); padding: 1.75rem 1.75rem 1.5rem; box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.6); }
.stage-q { font-size: 1.625rem; margin-bottom: 1.1rem; }
.stage-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.stage-tabs button {
  font: 500 .9375rem/1.2 var(--sans);
  color: var(--text);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: .55rem 1rem;
  cursor: pointer;
}
.stage-tabs button:hover { border-color: var(--heading); color: var(--heading); }
.stage-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.stage-intro { color: var(--muted); font-size: 1rem; margin-bottom: .75rem; }
.stage-list { list-style: none; margin: 0; padding: 0; }
.stage-list li { border-top: 1px solid var(--rule); }
.stage-list li:last-child { border-bottom: 1px solid var(--rule); }
.stage-list a { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; text-decoration: none; color: var(--heading); }
.stage-list a:hover .svc-name { text-decoration: underline; text-decoration-color: var(--accent); }
.svc-name { font-family: var(--serif); font-size: 1.25rem; }
.svc-cat { font-family: var(--slab); font-size: .875rem; color: var(--muted); align-self: center; white-space: nowrap; }
.stage-list.is-swapping { animation: swap .28s ease-out; }
@keyframes swap { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .stage-list.is-swapping { animation: none; } }

/* Reassurance strip */
.assure { border-bottom: 1px solid var(--rule); padding: 2.5rem 0 1.5rem; }
.assure-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.assure-h { font-size: 1.375rem; margin-bottom: .35em; }
.assure p { color: var(--muted); font-size: 1rem; }

/* Form error */
.form-error { margin: 0; padding: .8rem 1rem; background: #fbecea; border-left: 3px solid #a3322a; color: #5c1d18; font-size: .9375rem; max-width: none; }

/* Services ledger */
.services { background: var(--bg-alt); padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-lede { color: var(--muted); margin-bottom: 2.5rem; }
.ledger-group { display: grid; grid-template-columns: 11rem 1fr; gap: 2rem; border-top: 1px solid var(--rule-strong); padding: 1.5rem 0 1rem; }
.ledger-group:last-child { border-bottom: 1px solid var(--rule-strong); }
.ledger-group h3 { font-size: 1.75rem; margin: 0; }
.ledger dl { margin: 0; }
.ledger dl > div { display: grid; grid-template-columns: minmax(12rem, 18rem) 1fr; gap: 1.5rem; padding: .9rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.ledger dl > div:first-child { border-top: 0; padding-top: 0; }
.ledger dt { font-weight: 600; color: var(--heading); }
.ledger dd { margin: 0; color: var(--muted); max-width: 36rem; }
.ledger dl > div:target { background: #fff; outline: 1px solid var(--rule-strong); outline-offset: 6px; }

/* Process */
.process { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.steps { list-style: none; counter-reset: step; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.steps li { counter-increment: step; border-top: 1px solid var(--rule-strong); padding-top: 1rem; }
.steps li::before { content: counter(step); display: block; font-family: var(--serif); font-size: 3rem; line-height: 1; color: var(--accent); margin-bottom: .75rem; }
.steps h3 { font-size: 1.25rem; margin-bottom: .4em; }
.steps p { color: var(--muted); font-size: 1rem; }

/* Systems feature */
.feature { background: var(--bg); padding: clamp(3.5rem, 8vw, 6rem) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.feature-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.example { font-size: 1rem; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 1rem; margin: 1.5rem 0 2rem; }
.feature-points { list-style: none; margin: 0; padding: 0; }
.feature-points li { border-top: 1px solid var(--rule); padding: 1rem 0; }
.feature-points li:last-child { border-bottom: 1px solid var(--rule); }

/* About */
.about { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.about-grid { display: grid; grid-template-columns: 18rem 1fr; gap: clamp(2rem, 6vw, 4rem); align-items: start; }
.about-photo { margin: 0; aspect-ratio: 4 / 5; background: var(--panel); border: 1px solid var(--rule); display: grid; place-items: center; }
.about-photo span { font-family: var(--slab); color: var(--muted); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.creds { list-style: none; margin: 1.5rem 0 0; padding: 0; font-family: var(--slab); color: var(--heading); }
.creds li { border-top: 1px solid var(--rule); padding: .6rem 0; }
.creds li:last-child { border-bottom: 1px solid var(--rule); }

/* Contact */
.contact { background: var(--bg-alt); padding: clamp(3.5rem, 8vw, 6rem) 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact-direct { font-size: 1.0625rem; line-height: 1.9; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; background: var(--panel); padding: 1.75rem; border-top: 3px solid var(--accent); box-shadow: 0 1px 0 var(--rule); }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9375rem; color: var(--heading); }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: 400 1rem/1.4 var(--sans);
  color: var(--heading);
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: .7rem .8rem;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { background: #17212b; color: var(--muted); padding: 3rem 0; border-top: 1px solid var(--rule); }
.site-footer img { width: 120px; margin-bottom: 1rem; }
.site-footer a { color: var(--text); }
.site-footer .small { font-size: .875rem; margin-bottom: .25rem; }

/* Thank-you page */
.notice { padding: clamp(4rem, 12vw, 8rem) 0; min-height: 50vh; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .feature-grid, .contact-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .ledger-group { grid-template-columns: 1fr; gap: .75rem; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: flex-start; gap: 1rem; background: var(--bg); border-bottom: 1px solid var(--rule); padding: 1.25rem var(--gutter) 1.5rem; z-index: 20; }
  .site-nav.is-open { display: flex; }
  .site-header { position: relative; }
  .assure-grid { grid-template-columns: 1fr; gap: .5rem; }
  .ledger dl > div { grid-template-columns: 1fr; gap: .25rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 14rem; }
  .contact-form { grid-template-columns: 1fr; padding: 1.25rem; }
  .steps { grid-template-columns: 1fr; }
  .stage-picker { padding: 1.25rem; }
}
