/* Midgley & Company, 2026 redesign. Light, high-contrast, WCAG 2.2 AA target. */

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --band: #f6f4ef;
  --ink: #1a1f24;
  --ink-2: #444d57;
  --navy: #14325c;
  --navy-dark: #0e2445;
  --rule: #d8d3c7;
  --field: #5b6570;
  --gold: #b8975a;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --space: clamp(64px, 9vw, 112px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--navy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 12px; top: -64px; z-index: 200;
  background: var(--navy); color: #fff; padding: 12px 18px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space) 0; }
.section.band { background: var(--band); }
.section + .section:not(.band) { border-top: 1px solid var(--rule); }
.section.band + .section:not(.band) { border-top: 0; }

/* Type */
.eyebrow {
  display: block; position: relative;
  font-size: 0.9375rem; font-weight: 600; color: var(--navy);
  padding-top: 18px; margin-bottom: 18px;
}
.eyebrow::before { content: ""; position: absolute; top: 0; left: 0; width: 40px; height: 2px; background: var(--gold); }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); }
h1 { font-size: clamp(2.5rem, 5.2vw, 3.875rem); line-height: 1.06; font-weight: 600; letter-spacing: -0.018em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.15; font-weight: 600; letter-spacing: -0.012em; max-width: 22ch; }
h3 { font-size: 1.3125rem; line-height: 1.3; font-weight: 600; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.6; color: var(--ink-2); max-width: 36em; }
.prose p { max-width: 38em; margin-top: 1.1em; color: var(--ink-2); }
.prose p:first-child { margin-top: 0; }
.section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.section-head .lede { margin-top: 18px; }

/* Buttons */
.btn {
  display: inline-block; font: 600 1rem/1.2 var(--sans);
  padding: 15px 26px; border: 2px solid var(--navy); border-radius: 2px;
  background: var(--navy); color: #fff; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.btn.secondary { background: transparent; color: var(--navy); }
.btn.secondary:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.brand { display: block; line-height: 0; }
.brand img { width: 220px; height: auto; }
.nav-toggle {
  display: none; font: 600 0.9375rem var(--sans); color: var(--navy);
  background: #fff; border: 2px solid var(--navy); border-radius: 2px; padding: 10px 16px; cursor: pointer;
}
.nav-list { display: flex; align-items: center; gap: 20px; }
.nav-list a { white-space: nowrap; }
.nav-list a {
  font-size: 0.9375rem; font-weight: 500; color: var(--ink); text-decoration: none;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav-list a:hover { border-bottom-color: var(--gold); color: var(--ink); }
.nav-list a[aria-current="true"] { border-bottom-color: var(--navy); color: var(--navy); }
.nav-list a.nav-cta {
  background: var(--navy); color: #fff; padding: 10px 18px; border: 2px solid var(--navy); border-radius: 2px; font-weight: 600;
}
.nav-list a.nav-ghost {
  color: var(--navy); padding: 8px 14px; border: 2px solid var(--navy); border-radius: 2px; font-weight: 600; background: transparent;
}
.nav-list a.nav-ghost:hover { background: var(--navy); color: #fff; }
.nav-list a.nav-cta:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }

/* Hero */
.hero { padding: clamp(48px, 7vw, 96px) 0 var(--space); }
.hero-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero h1 { margin-bottom: 24px; text-wrap: balance; }
h2 { text-wrap: balance; }
.hero-photo img {
  width: 100%; aspect-ratio: 1 / 1.05; object-fit: cover; object-position: 50% 18%;
  border: 1px solid var(--rule);
}
.hero-photo figcaption { margin-top: 12px; font-size: 0.9375rem; color: var(--ink-2); }

/* Practice areas */
.practice-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 6vw, 88px); }
.practice-item { border-top: 1px solid var(--ink); padding: 26px 0 36px; }
.practice-item h3 { margin-bottom: 10px; }
.practice-item p { color: var(--ink-2); max-width: 30em; }

/* About */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 7vw, 96px); align-items: start; }
.link-row { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 28px; font-weight: 500; }

/* Engagements */
.engagement-list { border-bottom: 1px solid var(--rule); }
.engagement { display: grid; grid-template-columns: 3fr 9fr; gap: clamp(20px, 4vw, 56px); border-top: 1px solid var(--rule); padding: 32px 0; }
.engagement-meta { font-size: 0.9375rem; color: var(--ink-2); }
.engagement-meta strong { display: block; color: var(--navy); font-weight: 600; margin-bottom: 4px; }
.engagement h3 { margin-bottom: 10px; max-width: 30em; }
.engagement p { color: var(--ink-2); max-width: 40em; }
.engagement-cta { margin-top: 36px; }

/* Argument and Advocacy */
.framework { border-left: 3px solid var(--gold); padding: 4px 0 4px 24px; margin-bottom: 32px; }
.framework .kicker { font-size: 0.9375rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.framework h3 { margin-bottom: 8px; }
.framework p { color: var(--ink-2); }
.evaluator { background: var(--bg); border: 1px solid var(--rule); padding: 28px 28px 30px; }
.evaluator .kicker { font-size: 0.9375rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.evaluator h3 { margin-bottom: 8px; }
.evaluator p { color: var(--ink-2); }

/* Writing */
.post-list { border-top: 1px solid var(--ink); }
.post-list li { border-bottom: 1px solid var(--rule); }
.post-list a.post { display: block; padding: 24px 0; text-decoration: none; color: inherit; }
.post-list a.post:hover .post-title { text-decoration: underline; text-decoration-thickness: 2px; }
.post-date { display: block; font-size: 0.9375rem; color: var(--ink-2); margin-bottom: 6px; }
.post-title { display: block; font-family: var(--serif); font-size: 1.3125rem; line-height: 1.3; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.post-excerpt { display: block; color: var(--ink-2); font-size: 1rem; }
.post-note { padding: 24px 0; color: var(--ink-2); }

/* Teaching and projects */
.course-card { border: 1px solid var(--ink); background: var(--bg); padding: 30px 30px 34px; margin-top: 32px; }
.course-card .kicker { font-size: 0.9375rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.course-card h3 { margin-bottom: 4px; }
.course-card .code { font-size: 0.9375rem; color: var(--ink-2); margin-bottom: 16px; }
.course-card p { color: var(--ink-2); margin-bottom: 22px; }
.record-label { font-size: 0.9375rem; font-weight: 600; color: var(--navy); margin-bottom: 14px; }
.record-list { border-top: 1px solid var(--ink); }
.record-list li { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.record-list .inst { display: block; font-size: 0.9375rem; color: var(--ink-2); }
.record-list .course { display: block; font-family: var(--serif); font-size: 1.1875rem; line-height: 1.35; font-weight: 600; }

.facts { margin-top: 28px; border-top: 1px solid var(--rule); }
.facts div { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-weight: 600; font-size: 0.9375rem; color: var(--ink); }
.facts dd { color: var(--ink-2); font-size: 1rem; }

/* Firm */
.principles { margin-top: 36px; border-top: 1px solid var(--ink); counter-reset: p; }
.principles li { counter-increment: p; display: grid; grid-template-columns: 2.5rem 1fr; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.principles li::before { content: counter(p, upper-roman); font-family: var(--serif); font-size: 1.375rem; font-weight: 600; color: var(--navy); line-height: 1.3; }
.principles strong { display: block; font-weight: 600; margin-bottom: 4px; }
.principles p { color: var(--ink-2); }
.office { border: 1px solid var(--rule); background: var(--bg); padding: 26px 28px; margin-bottom: 16px; }
.office h3 { margin-bottom: 2px; }
.office .country { font-size: 0.9375rem; font-weight: 600; color: var(--navy); margin-bottom: 12px; }
.office p { color: var(--ink-2); }

/* Contact */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--ink);
  background: #fff; border: 1px solid var(--field); border-radius: 2px; padding: 12px 14px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--navy); outline-offset: 1px; }
.form-note { font-size: 0.9375rem; color: var(--ink-2); margin-top: 12px; }
.form-success { border-left: 3px solid var(--gold); background: var(--band); padding: 24px 26px; }
.form-success h3 { margin-bottom: 8px; }
.contact-details > div { padding: 0 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--rule); }
.contact-details > div:last-child { border-bottom: 0; margin-bottom: 0; }
.contact-details dt { font-weight: 600; font-size: 0.9375rem; color: var(--ink-2); margin-bottom: 4px; }
.contact-details dd { font-family: var(--serif); font-size: 1.25rem; line-height: 1.4; }

/* Footer */
.site-footer { background: var(--band); border-top: 1px solid var(--rule); padding: 44px 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 40px; }
.footer-inner img { width: 180px; height: auto; }
.footer-inner p { font-size: 0.9375rem; color: var(--ink-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.9375rem; }

@media (min-width: 961px) and (max-width: 1200px) {
  .nav-list { gap: 14px; }
  .nav-list a { font-size: 0.875rem; }
  .nav-list a.nav-cta, .nav-list a.nav-ghost { padding: 8px 12px; }
  .brand img { width: 176px; }
}

/* Responsive */
@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--rule); display: none; }
  .nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; }
  .nav-list a { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .nav-list a.nav-cta, .nav-list a.nav-ghost { margin-top: 14px; text-align: center; }
  .hero-grid, .two-col, .practice-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 460px; }
  .engagement { grid-template-columns: 1fr; gap: 10px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 520px) {
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .btn-row .btn { width: 100%; text-align: center; }
}

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

@media print {
  .site-header, .skip-link { display: none; }
  .section { padding: 28px 0; }
}
