/* ==========================================================================
   CL Consulting — stylesheet
   Hand-maintained. No build step, no framework, no external dependencies.
   Sections: 1 Tokens · 2 Base · 3 Layout · 4 Header · 5 Buttons · 6 Sections
             7 Components · 8 Forms · 9 Footer · 10 Utilities · 11 Dark mode
   ========================================================================== */

/* --------------------------------------------------------------- 1 Tokens */
:root {
  /* Colour */
  --ink:          #101d28;
  --ink-soft:     #2c3d4b;
  --body:         #51616d;
  --muted:        #7d8b96;
  --paper:        #fbfaf8;
  --surface:      #ffffff;
  --surface-alt:  #f4f2ee;
  --line:         #e3dfd8;
  --line-strong:  #cfc9c0;
  --accent:       #14655e;
  --accent-hover: #0e4b46;
  --accent-soft:  #e7f0ee;
  --focus:        #14655e;

  /* Type */
  --font-head: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Space & shape */
  --container: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(56px, 8vw, 104px);
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 29, 40, .05), 0 1px 3px rgba(16, 29, 40, .04);
  --shadow-md: 0 4px 12px rgba(16, 29, 40, .06), 0 12px 32px rgba(16, 29, 40, .06);
}

/* ----------------------------------------------------------------- 2 Base */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.15rem, 1.35rem + 3.4vw, 3.5rem); letter-spacing: -.022em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.35rem); letter-spacing: -.018em; }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
h4 { font-size: 1.02rem; font-family: var(--font-body); font-weight: 650; }

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

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

hr { border: 0; border-top: 1px solid var(--line); margin: var(--section-y) 0; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection { background: var(--accent-soft); color: var(--ink); }

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

/* --------------------------------------------------------------- 3 Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 760px; }

.section { padding-block: var(--section-y); }
.section--alt { background: var(--surface-alt); border-block: 1px solid var(--line); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }

.section-head { max-width: 640px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head p { font-size: 1.05rem; }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9em;
}

.grid { display: grid; gap: clamp(20px, 2.4vw, 32px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* --------------------------------------------------------------- 4 Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 248, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 68px;
}

.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-head);
  font-size: 1.14rem; font-weight: 600; letter-spacing: -.015em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 30px; height: 30px; flex: 0 0 30px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  display: inline-block;
  padding: 8px 13px;
  font-size: .93rem; font-weight: 550;
  color: var(--ink-soft); text-decoration: none;
  border-radius: 7px;
}
.nav__link:hover { background: var(--surface-alt); color: var(--ink); }
.nav__link[aria-current="page"] { color: var(--accent); }

.nav__cta { margin-left: 10px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line-strong); border-radius: 8px;
  color: var(--ink); cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-alt); }
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open  { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px var(--gutter) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .nav.is-open { display: flex; }
  .nav__link { padding: 12px 8px; font-size: 1rem; }
  .nav__cta { margin: 8px 0 0; text-align: center; }
}

/* -------------------------------------------------------------- 5 Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px;
  font-family: var(--font-body);
  font-size: .95rem; font-weight: 600; line-height: 1;
  border-radius: 8px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface); border-color: var(--ink-soft); color: var(--ink); }

.btn--small { padding: 9px 16px; font-size: .88rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: .93rem; text-decoration: none;
}
.link-arrow::after { content: "\2192"; transition: transform .15s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ------------------------------------------------------------- 6 Sections */
.hero {
  padding-block: clamp(64px, 9vw, 128px) clamp(56px, 8vw, 104px);
  background:
    radial-gradient(70% 120% at 12% 0%, var(--accent-soft) 0%, transparent 60%),
    var(--paper);
}
.hero__inner { max-width: 720px; }
.hero__lede { font-size: clamp(1.05rem, .98rem + .35vw, 1.22rem); color: var(--ink-soft); max-width: 60ch; }

.page-head {
  padding-block: clamp(52px, 7vw, 88px) clamp(36px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.page-head__inner { max-width: 720px; }
.page-head p { font-size: 1.06rem; color: var(--ink-soft); max-width: 60ch; }

.cta-band {
  background: var(--ink);
  color: #cfd8de;
  padding-block: clamp(52px, 7vw, 84px);
}
.cta-band h2 { color: #fff; }
.cta-band p  { color: #b9c4cc; max-width: 56ch; }
.cta-band .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.cta-band .btn--ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .55); color: #fff; }

/* ----------------------------------------------------------- 7 Components */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 2.6vw, 32px);
  box-shadow: var(--shadow-sm);
}
.card--link { display: flex; flex-direction: column; }
.card--link .link-arrow { margin-top: auto; padding-top: 18px; }
.card h3 { margin-bottom: .45em; }
.card p  { font-size: .97rem; }

.card__icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}
.card__icon svg { width: 20px; height: 20px; }

.stat { text-align: left; }
.stat__value {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem);
  font-weight: 600; color: var(--ink); line-height: 1.05;
  letter-spacing: -.025em;
  margin-bottom: 6px;
}
.stat__label { font-size: .9rem; color: var(--muted); }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.steps li { counter-increment: step; padding-left: 58px; position: relative; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 2px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 50%;
  font-family: var(--font-head); font-size: .95rem; color: var(--accent);
  background: var(--surface);
}
.steps h3 { margin-bottom: .3em; }
.steps p  { font-size: .97rem; }

.service-block {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding-block: clamp(36px, 4.5vw, 56px);
  border-top: 1px solid var(--line);
}
.service-block:first-of-type { border-top: 0; padding-top: 0; }
@media (max-width: 760px) { .service-block { grid-template-columns: 1fr; } }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.check-list li { position: relative; padding-left: 28px; font-size: .96rem; }
.check-list li::before {
  content: ""; position: absolute; left: 3px; top: .55em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); opacity: .65;
}

.quote {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 1.02rem + .8vw, 1.6rem);
  line-height: 1.45; color: var(--ink); letter-spacing: -.012em;
}
.quote__cite {
  display: block; margin-top: 20px;
  font-family: var(--font-body); font-size: .9rem; font-style: normal;
  color: var(--muted); letter-spacing: .01em;
}

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.contact-list dt, .contact-list__label {
  font-size: .76rem; font-weight: 650; letter-spacing: .11em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}
.contact-list__value { font-size: 1.02rem; color: var(--ink); }
.contact-list__value a { font-weight: 550; }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px;
  background: var(--accent-soft);
  border: 1px solid rgba(20, 101, 94, .22);
  border-radius: var(--radius);
  font-size: .9rem; color: var(--ink-soft);
}
.notice[hidden] { display: none; }
.notice__icon { flex: 0 0 auto; margin-top: 2px; color: var(--accent); }
.notice__icon svg { width: 17px; height: 17px; }

/* ---------------------------------------------------------------- 8 Forms */
.form { display: grid; gap: 18px; }
.form__row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field { display: grid; gap: 7px; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  width: 100%;
  font: inherit; font-size: .96rem;
  color: var(--ink);
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
.field textarea { min-height: 148px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field__hint { font-size: .82rem; color: var(--muted); }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --------------------------------------------------------------- 9 Footer */
.site-footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
  padding-block: clamp(44px, 5vw, 68px) 28px;
  font-size: .92rem;
}
.site-footer__grid {
  display: grid; gap: clamp(28px, 4vw, 48px);
  /* Every track has the same floor, and that floor (190px) is wider than the
     intrinsic width of the `white-space: nowrap` wordmark (~163px). The old
     `minmax(0, 1.4fr)` first track could be crushed below that, at which point
     the wordmark overflowed its cell and sat on top of the next column. */
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 40px;
}

/* On phones, give the brand + blurb the full width and pair up the link
   groups, rather than letting auto-fit stack all four into one long column. */
@media (max-width: 760px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }
  .site-footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 380px) {
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
}
.site-footer h4 {
  font-size: .76rem; font-weight: 650; letter-spacing: .11em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.footer-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); text-decoration: underline; }
.site-footer__bar {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  padding-top: 22px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .85rem;
}

/* ----------------------------------------------------------- 10 Utilities */
.lede { font-size: 1.08rem; color: var(--ink-soft); }
.small { font-size: .88rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.stack > * + * { margin-top: 1.1em; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ----------------------------------------------------------- 11 Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --ink:          #eef3f6;
    --ink-soft:     #c3ced6;
    --body:         #9dabb5;
    --muted:        #7d8b96;
    --paper:        #0e1720;
    --surface:      #14202b;
    --surface-alt:  #111c25;
    --line:         #22323f;
    --line-strong:  #334655;
    --accent:       #5cbfb4;
    --accent-hover: #7ed2c8;
    --accent-soft:  #17322f;
    --focus:        #5cbfb4;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .34), 0 12px 32px rgba(0, 0, 0, .3);
  }
  .site-header { background: rgba(14, 23, 32, .88); }
  .btn--primary { background: var(--accent); color: #06211f; }
  .btn--primary:hover { background: var(--accent-hover); color: #06211f; }
  .cta-band { background: #0a121a; }
  .cta-band h2 { color: #fff; }
}

/* --------------------------------------------------------- Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ------------------------------------------------------------------ Print */
@media print {
  .site-header, .site-footer, .cta-band, .btn-row { display: none; }
  body { background: #fff; color: #000; font-size: 12pt; }
}

/* ------------------------------------------------- Late additions (in use) */
.footer-blurb { margin-top: 14px; max-width: 34ch; }
.contact-list dd { margin: 0; }
.btn-row--center { justify-content: center; }
