/* Crawling Stone Consulting — site stylesheet
   Layout idea: a briefing book. Narrow section-title column on the left, running content on the right;
   one navy "bearing" band on the home page carries the compass motif. Everything else stays quiet. */
/* header can run wider than the reading column */
:root {
  --navy: #0c2b5a;
  --navy-deep: #071c3d;
  --gold: #d19a1f;
  --gold-deep: #b5831a;
  --steel: #5c636c;
  --mist: #dfe4ec;
  --panel: #eef1f6;
  --paper: #f7f8fb;
  --white: #ffffff;
  --ink: #16202c;

  --font-display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;

  --measure: 64ch;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1180px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern" 1, "liga" 1;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; color: var(--ink); }
p { margin: 0 0 1em; max-width: var(--measure); }
ul, ol { max-width: var(--measure); padding-left: 1.2em; }
li { margin-bottom: .35em; }
small, .small { font-size: .9rem; }
.lede { font-size: 1.2rem; line-height: 1.5; color: var(--steel); max-width: 56ch; }

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

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--mist); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { max-width: 1320px; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 132px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 108px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(12px, 1.8vw, 26px); }
.nav a { text-decoration: none; white-space: nowrap; font-weight: 500; font-size: .96rem; color: var(--ink); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--gold); }
.nav a[aria-current="page"] { border-bottom-color: var(--navy); color: var(--navy); }
.nav-toggle { display: none; background: none; border: 1px solid var(--mist); border-radius: 4px; padding: 8px 10px; font: inherit; color: var(--navy); cursor: pointer; }

.btn { display: inline-block; text-decoration: none; font-weight: 600; font-size: .98rem; padding: 12px 20px; border-radius: 4px; border: 1px solid transparent; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-deep); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: var(--gold-deep); color: var(--navy-deep); }
.btn-ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-ghost:hover { background: var(--white); }
.btn-on-dark { border-color: rgba(255,255,255,.45); color: var(--white); background: transparent; }
.btn-on-dark:hover { border-color: var(--white); color: var(--white); }

/* Hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: .45em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-proof { border-left: 3px solid var(--gold); padding-left: 20px; display: grid; gap: 18px; align-self: start; margin-top: 10px; }
.hero-proof div { max-width: 34ch; }
.hero-proof strong { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--navy); line-height: 1.2; margin-bottom: 4px; }
.hero-proof span { color: var(--steel); font-size: .95rem; }

/* Bearing band (compass motif) */
.bearing { background: var(--navy); color: var(--white); padding: clamp(36px, 5vw, 64px) 0; }
.bearing h2 { color: var(--white); font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin-bottom: 8px; }
.bearing p { color: rgba(255,255,255,.78); max-width: none; }
.bearing .wrap { max-width: 1520px; }
.bearing svg { width: 100%; height: auto; display: block; margin-top: 28px; }
.bearing .stage-list { display: none; }

/* Section scaffold: title column + content */
.section { padding: clamp(44px, 6vw, 88px) 0; border-top: 1px solid var(--mist); }
.section.alt { background: var(--white); }
.section .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(20px, 4vw, 64px); }
.section-title h2 { position: sticky; top: 150px; }
.section-title .sub { color: var(--steel); font-size: .98rem; max-width: 28ch; }
.section-body > :first-child { margin-top: 0; }

/* Service list */
.services { display: grid; gap: 0; }
.service { padding: 26px 0; border-top: 1px solid var(--mist); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 24px; }
.service:first-child { border-top: 0; padding-top: 0; }
.service h3 { margin-bottom: .3em; }
.service .who { color: var(--steel); font-size: .95rem; margin: 0; }
.service ul { margin: .5em 0 0; }
.service p:last-child, .service ul:last-child { margin-bottom: 0; }

/* Work / engagements */
.engagement { padding: 32px 0; border-top: 1px solid var(--mist); }
.engagement:first-child { border-top: 0; padding-top: 0; }
.engagement h3 { margin-bottom: .25em; }
.engagement .meta { color: var(--steel); font-size: .95rem; margin-bottom: .9em; }
.engagement .meta em { font-style: normal; color: var(--navy); font-weight: 500; }
.engagement .status { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--navy-deep); background: #f3e6c3; border-radius: 3px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }
.engagement p:last-child { margin-bottom: 0; }

.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.work-card { background: var(--white); border: 1px solid var(--mist); border-top: 3px solid var(--navy); padding: 22px 22px 20px; display: flex; flex-direction: column; }
.work-card h3 { font-size: 1.15rem; margin-bottom: .4em; }
.work-card .meta { color: var(--steel); font-size: .9rem; margin-bottom: .8em; }
.work-card p { font-size: .98rem; margin-bottom: 0; }
.work-card a.more { margin-top: auto; padding-top: 14px; font-weight: 500; font-size: .95rem; }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.portrait { border: 1px solid var(--mist); background: var(--white); padding: 10px; }
.portrait img { width: 100%; }
.portrait figcaption { font-size: .9rem; color: var(--steel); padding: 10px 4px 2px; }
.timeline { list-style: none; padding: 0; margin: 0; max-width: none; }
.timeline li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 18px; padding: 16px 0; border-top: 1px solid var(--mist); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline .when { color: var(--steel); font-size: .92rem; font-variant-numeric: tabular-nums; padding-top: 3px; }
.timeline h4 { margin: 0 0 .2em; }
.timeline .org { color: var(--navy); font-weight: 500; }
.timeline p { font-size: .98rem; margin: .35em 0 0; max-width: 78ch; }
.timeline ul { font-size: .96rem; margin: .4em 0 0; }

.platforms { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; max-width: none; }
.platforms li { background: var(--panel); border-radius: 3px; padding: 6px 12px; font-size: .92rem; margin: 0; }

/* Home: principal snapshot */
.principal { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; }
.principal img { border: 1px solid var(--mist); background: var(--white); padding: 8px; }

/* Publications */
.pubs { counter-reset: pub; list-style: none; padding: 0; max-width: none; }
.pubs li { counter-increment: pub; display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: 8px; padding: 12px 0; border-top: 1px solid var(--mist); font-size: .98rem; max-width: 78ch; }
.pubs li::before { content: counter(pub) "."; color: var(--steel); font-variant-numeric: tabular-nums; }
.pubs li:first-child { border-top: 0; }
.pubs .me { font-weight: 600; }
.pubs cite { font-style: italic; }
details { border: 1px solid var(--mist); background: var(--white); padding: 12px 18px; max-width: 78ch; }
summary { cursor: pointer; font-weight: 600; color: var(--navy); }
details .pubs li:first-child { border-top: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); }
.contact-card { background: var(--white); border: 1px solid var(--mist); padding: 24px; }
.contact-card p { margin-bottom: .6em; }
.contact-card .email { font-family: var(--font-display); font-size: 1.1rem; white-space: nowrap; }
.contact-card .email a { display: inline-block; max-width: 100%; }
form.contact { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field textarea, .field select { font: inherit; padding: 10px 12px; border: 1px solid #b9c1cc; border-radius: 4px; background: var(--white); color: var(--ink); width: 100%; }
.field textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: .9rem; color: var(--steel); }
.form-status { display: none; background: var(--panel); border-left: 3px solid var(--gold); padding: 12px 16px; }
.form-status.show { display: block; }

/* CTA band */
.cta { background: var(--navy-deep); color: var(--white); padding: clamp(40px, 5vw, 64px) 0; }
.cta .wrap { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 24px; align-items: center; }
.cta h2 { color: var(--white); margin-bottom: .3em; }
.cta p { color: rgba(255,255,255,.8); margin: 0; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* Footer */
.site-footer { background: var(--white); border-top: 1px solid var(--mist); padding: 36px 0 28px; font-size: .92rem; color: var(--steel); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.site-footer img { height: 84px; width: auto; margin-bottom: 12px; }
.site-footer .tagline { font-family: var(--font-display); font-size: 1.05rem; color: var(--navy); margin-bottom: 4px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--steel); text-decoration: none; }
.site-footer a:hover { color: var(--navy); text-decoration: underline; }
.site-footer .legal { margin-top: 6px; }

/* Page intro (interior pages) */
.page-intro { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); }
.page-intro h1 { margin-bottom: .3em; }

/* Responsive */
@media (max-width: 900px) {
  .hero .wrap, .section .wrap, .about-grid, .contact-grid, .cta .wrap { grid-template-columns: 1fr; }
  .section-title h2 { position: static; }
  .work-grid { grid-template-columns: 1fr; }
  .service { grid-template-columns: 1fr; gap: 10px; }
  .principal { grid-template-columns: 160px minmax(0, 1fr); gap: 24px; }
  .cta .actions { justify-content: flex-start; }
  .hero-proof { margin-top: 8px; }
}
@media (max-width: 700px) {
  .contact-card .email { white-space: normal; overflow-wrap: anywhere; font-size: 1rem; }
  .site-header .wrap { min-height: 96px; }
  .brand img { height: 72px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 96px; background: var(--white); border-bottom: 1px solid var(--mist); flex-direction: column; align-items: stretch; padding: 10px var(--gutter) 16px; gap: 4px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--mist); }
  .nav .btn { margin-top: 10px; text-align: center; border-bottom: 0; }
  .nav-toggle { display: inline-block; }
  .principal { grid-template-columns: 1fr; }
  .principal img { max-width: 200px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .bearing svg { display: none; }
  .bearing .stage-list { display: grid; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; max-width: none; }
  .bearing .stage-list li { border-left: 2px solid var(--gold); padding-left: 12px; color: rgba(255,255,255,.9); font-size: .95rem; }
  .bearing .stage-list li strong { color: var(--white); display: block; }
}
