/* Thinklab Governance
   One stylesheet for every page. Colours, type and spacing are set once
   in :root so the whole site changes together. */

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

:root {
  --paper: #ffffff;
  --mist: #f3f5f7;
  --ink: #17191c;
  --slate: #555b65;
  --rule: #dde1e6;
  --blue: #1f6feb;
  --blue-deep: #1557c0;

  --sans: "Montserrat", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--sans);
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.25rem, 4.6vw, 3.75rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.25rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
h3 {
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.35;
}

p { margin: 0 0 1.1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue-deep); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

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

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 10;
  font-family: var(--sans); font-size: 0.9rem;
}
.skip:focus { left: 0; color: #fff; }

/* Header. The current page is marked with a blue tab on the top edge,
   the same device as the tabs and ribbons in the photographs. */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; align-items: stretch; justify-content: space-between;
  min-height: 5.25rem;
}
.brand { display: flex; align-items: center; padding-block: 1rem; }
.brand img { height: 2.75rem; width: auto; }

.nav { display: flex; align-items: stretch; }
.nav ul { display: flex; gap: clamp(1.25rem, 2.6vw, 2.25rem); margin: 0; padding: 0; list-style: none; }
.nav li { display: flex; }
.nav a {
  display: flex; align-items: center;
  border-top: 4px solid transparent;
  padding-bottom: 4px;
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 400;
  color: var(--ink); text-decoration: none;
}
.nav a:hover { color: var(--blue-deep); }
.nav a[aria-current="page"] { border-top-color: var(--blue); font-weight: 500; }

.nav-toggle {
  display: none; align-self: center;
  background: none; border: 1px solid var(--rule); border-radius: 3px;
  padding: 0.5rem 0.9rem; cursor: pointer;
  font-family: var(--sans); font-size: 0.9375rem; color: var(--ink);
}

/* Hero. Text sits on the left; the photograph fills the right and fades
   into the band colour, which is sampled from each photograph. */
.hero { position: relative; background: var(--hero-bg, var(--mist)); overflow: hidden; }
.hero .wrap {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  min-height: 26rem; padding-block: 4rem;
}
.hero-home .wrap { min-height: 36rem; }
.hero-text { max-width: 31rem; }
.hero-home .hero-text { max-width: 36rem; }
.hero p {
  margin-top: 1.4rem; font-size: 1.25rem; line-height: 1.55; color: #2c3036; max-width: 34rem;
}
.hero-media {
  position: absolute; top: 0; right: 0; bottom: 0; width: 54%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%);
          mask-image: linear-gradient(to right, transparent, #000 22%);
}
.hero-home .hero-media { width: 58%; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }

.actions { display: flex; flex-wrap: wrap; gap: 0.875rem; margin-top: 2.25rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 1.4rem; border-radius: 3px; border: 1px solid var(--blue);
  background: var(--blue); color: #fff;
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 500; line-height: 1.2;
  text-decoration: none; transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-quiet:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Sections. Heading on the left, content on the right. */
.section { padding-block: var(--section); }
.section-mist { background: var(--mist); }
.section + .section:not(.section-mist):not(.section-ink) { border-top: 1px solid var(--rule); }
.section-mist + .section { border-top: 0 !important; }

.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2rem clamp(2rem, 5vw, 4.5rem); }
.split-head p { margin-top: 1rem; color: var(--slate); font-size: 1.0625rem; }
.split-head .more { margin-top: 1.5rem; }
.split-head h2 + .more { margin-top: 1.25rem; }

.more { font-family: var(--sans); font-size: 0.9375rem; font-weight: 500; }

.lede { font-size: 1.3125rem; line-height: 1.55; }

/* Rows: the one list pattern used for services, courses and writing. */
.rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.rows > li, .rows > article { padding-block: 1.75rem; border-bottom: 1px solid var(--rule); }
.rows h3 a { color: var(--ink); text-decoration: none; }
.rows h3 a:hover { color: var(--blue-deep); text-decoration: underline; }
.rows p { margin-top: 0.5rem; color: var(--slate); }
.rows .meta { margin-top: 0.75rem; font-family: var(--sans); font-size: 0.875rem; color: var(--slate); }
.rows .btn { margin-top: 1.25rem; }

.row-dated { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 0.25rem 1.5rem; align-items: baseline; }
.row-dated time, .row-dated .when { font-family: var(--sans); font-size: 0.875rem; color: var(--slate); }
.row-dated p { grid-column: 2; margin-top: 0.15rem; font-size: 1rem; }

/* Bulleted detail lists use a small blue tab as the marker. */
.ticks { margin: 1.25rem 0 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 1.5rem; margin-top: 0.7rem; max-width: 64ch; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 0.4375rem; height: 0.8125rem; background: var(--blue); border-radius: 1px;
}
.ticks strong { font-family: var(--sans); font-size: 0.9375rem; font-weight: 500; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.steps li { counter-increment: step; border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.steps li::before { content: counter(step); display: block; font-family: var(--sans); font-size: 1.5rem; font-weight: 300; color: var(--blue-deep); margin-bottom: 0.5rem; }
.steps p { margin-top: 0.4rem; color: var(--slate); font-size: 1.0625rem; }

.facts { margin: 0; }
.facts dt { font-family: var(--sans); font-size: 0.9375rem; font-weight: 500; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.facts dt:first-child { margin-top: 0; border-top-color: var(--ink); }
.facts dd { margin: 0.5rem 0 0; color: var(--slate); font-size: 1.0625rem; }

.figure-split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.figure-split img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 3px; }
.figure-split h2 + p { margin-top: 1.25rem; }

.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 5vw, 4.5rem); }
.contact-grid .facts a { font-family: var(--sans); font-size: 1.0625rem; }

/* Closing band and footer */
.section-ink { background: var(--ink); color: #fff; }
.section-ink h2 { color: #fff; }
.section-ink p { color: #c5cad2; margin-top: 1rem; }
.section-ink .btn-quiet { color: #fff; border-color: #fff; }
.section-ink .btn-quiet:hover { background: #fff; color: var(--ink); }
.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.band .actions { margin-top: 0; }

.site-footer { background: var(--ink); color: #c5cad2; border-top: 1px solid #2c3036; padding-block: 3.5rem 2.5rem; font-family: var(--sans); font-size: 0.9375rem; line-height: 1.6; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: 2.5rem; }
.footer-grid img { width: 9.5rem; height: auto; }
.footer-grid ul { margin: 0; padding: 0; list-style: none; }
.footer-grid li { margin-bottom: 0.45rem; }
.footer-grid h2 { font-size: 0.9375rem; font-weight: 500; letter-spacing: 0; color: #fff; margin-bottom: 0.9rem; }
.footer-note { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #2c3036; font-size: 0.8125rem; color: #9aa1ab; }
.footer-note p { max-width: none; margin-bottom: 0.4em; }

/* Smaller screens */
@media (max-width: 62rem) {
  .hero .wrap, .hero-home .wrap { min-height: 0; padding-block: 3rem 2.5rem; }
  .hero-text, .hero-home .hero-text { max-width: 38rem; }
  .hero-media, .hero-home .hero-media {
    position: static; width: 100%; aspect-ratio: 16 / 9;
    -webkit-mask-image: none; mask-image: none;
  }
  .split, .figure-split, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-grid .facts + .facts { margin-top: 1.75rem; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 50rem) {
  .site-header .wrap { flex-wrap: wrap; min-height: 4.5rem; }
  .brand img { height: 2.25rem; }
  .nav-toggle { display: block; }
  .nav { display: none; flex-basis: 100%; padding-bottom: 1rem; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { width: 100%; border-top: 0; border-left: 4px solid transparent; padding: 0.7rem 0 0.7rem 0.9rem; }
  .nav a[aria-current="page"] { border-left-color: var(--blue); }
}

@media (max-width: 36rem) {
  body { font-size: 1.0625rem; }
  .row-dated { grid-template-columns: minmax(0, 1fr); }
  .row-dated p { grid-column: 1; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .band { flex-direction: column; align-items: flex-start; }
}

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