/* Affinity Consulting. Colours come from the logo: forest green #0d574a and purple #610d75.
   Light by default, dark follows the device, and the header button overrides it (saved as localStorage "theme"). */
:root {
  --bg: #f6f8f5; --surface: #ffffff; --sunken: #ecf1ed; --ink: #17231f; --ink-2: #44524d; --ink-3: #6d7a75;
  --line: #dce4df; --green: #0d574a; --green-ink: #0d574a; --green-soft: #e1efe9; --purple: #610d75; --purple-ink: #610d75;
  --on-green: #ffffff; --ball-hi: #cfeee0; --ball-mid: #2f8a70; --ball-lo: #063a30;
  --shadow: 0 1px 2px rgba(13, 50, 40, .06), 0 8px 24px rgba(13, 50, 40, .08);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101614; --surface: #17201d; --sunken: #141c19; --ink: #e8efec; --ink-2: #b4c1bc; --ink-3: #85938e;
    --line: #26322e; --green: #6fd0ae; --green-ink: #7fdcb9; --green-soft: #18302a; --purple: #c58bd8; --purple-ink: #d5a4e5;
    --on-green: #0b1d17; --ball-hi: #f2fff9; --ball-mid: #58c19c; --ball-lo: #1c6b55;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101614; --surface: #17201d; --sunken: #141c19; --ink: #e8efec; --ink-2: #b4c1bc; --ink-3: #85938e;
  --line: #26322e; --green: #6fd0ae; --green-ink: #7fdcb9; --green-soft: #18302a; --purple: #c58bd8; --purple-ink: #d5a4e5;
  --on-green: #0b1d17; --ball-hi: #f2fff9; --ball-mid: #58c19c; --ball-lo: #1c6b55;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-ink); text-underline-offset: 2px; }
a:hover { color: var(--purple-ink); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 750; }
h2 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 700; }
h3 { font-size: 21px; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: block; line-height: 0; }
.logo { width: 170px; height: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: 16px; padding: 8px 12px; border-radius: 10px; }
.nav a:hover { color: var(--ink); background: var(--sunken); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin-left: 4px;
  border: 0; border-radius: 10px; background: none; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { color: var(--ink); background: var(--sunken); }
.icon-btn:focus-visible, a:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* Buttons */
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 999px; font-weight: 650; text-decoration: none;
  background: var(--green); color: var(--on-green); border: 2px solid var(--green);
}
.btn:hover { background: var(--purple); border-color: var(--purple); color: var(--on-green); }
.btn-quiet { background: transparent; color: var(--green-ink); }
.btn-quiet:hover { background: var(--green-soft); color: var(--green-ink); border-color: var(--green); }
.btn-big { font-size: clamp(17px, 2.6vw, 22px); padding: 14px 26px; overflow-wrap: anywhere; }

/* Hero */
.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--purple-ink); font-weight: 650; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 14px; }
.lede { font-size: 20px; color: var(--ink-2); }
.lede strong { color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-photo { margin: 0; }
.hero-photo img { border-radius: 22px; box-shadow: var(--shadow); aspect-ratio: 1087 / 723; object-fit: cover; }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--sunken); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-intro { font-size: 19px; color: var(--ink-2); max-width: 720px; margin-bottom: 36px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 22px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; border-top: 4px solid var(--green);
}
.card:nth-child(2) { border-top-color: var(--purple); }
.card p { color: var(--ink-2); font-size: 16px; }
.card-kicker { font-size: 13px !important; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3) !important; margin-bottom: 8px; }
.card-links { margin-top: auto; margin-bottom: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 600; }

.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; }
.headshot { margin: 0; }
.headshot img { border-radius: 50%; box-shadow: var(--shadow); border: 6px solid var(--surface); }
.about-text { max-width: 680px; }
.about-text h3 { margin-top: 28px; }
.placeholder {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 6px 0 4px; color: var(--ink-3);
  background: var(--surface);
}
.placeholder p { margin: 0; }
.elsewhere { list-style: none; padding: 0; margin: 0; }
.elsewhere li { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.elsewhere li:last-child { border-bottom: 0; }

.contact { text-align: center; }
.contact p { color: var(--ink-2); font-size: 19px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--ink-3); font-size: 15px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-row p { margin: 0; }
.site-footer a { color: var(--ink-2); }

/* Narrow screens */
@media (max-width: 900px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .cards { grid-template-columns: 1fr; }
  .headshot { max-width: 240px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .logo { width: 128px; }
  .header-row { height: 62px; gap: 8px; }
  .nav a { padding: 6px 8px; font-size: 15px; }
  .nav a[href="#about"] { display: none; }
  .hero { padding: 36px 0 40px; }
  .section { padding: 52px 0; }
  .lede { font-size: 18px; }
}
