:root {
  color-scheme: light dark;
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #ece8de;
  --ink: #15202b;
  --muted: #4d5966;
  --line: #d8d2c4;
  --navy: #1d3b53;
  --accent: #1d5f8a;
  --accent-ink: #ffffff;
  /* 5.2:1 on --surface-2 and more on --bg: small bold eyebrow text must reach 4.5:1 */
  --gold: #7d5800;
  --ok: #17663a;
  --ok-bg: #e3f3e8;
  --pending: #6b4a00;
  --pending-bg: #fbefcf;
  --focus: #c2410c;
  --radius: 10px;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10161d;
    --surface: #18212b;
    --surface-2: #212c38;
    --ink: #e8ecf0;
    --muted: #aab5c0;
    --line: #33404d;
    --navy: #0b1620;
    --accent: #8cc8f2;
    --accent-ink: #0b1620;
    --gold: #f2c14e;
    --ok: #8fdcaa;
    --ok-bg: #173323;
    --pending: #f5d27a;
    --pending-bg: #3a2f12;
    --focus: #ffab70;
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.15;
  margin: 0 0 0.6rem;
  font-weight: 700;
}
h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 2.5rem;
}
h3 {
  font-size: 1.35rem;
}
code {
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0 0.3em;
  border-radius: 4px;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 10;
  background: var(--surface);
  padding: 0.5rem 0.8rem;
}
main {
  outline: none;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.9rem;
}

/* header and footer */
.site-header {
  background: var(--navy);
  color: #fff;
}
.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f2c14e;
  color: #1d3b53;
  font-family: var(--serif);
}
.site-header nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}
.site-header nav a {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
}
.site-header nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}
.site-header :focus-visible {
  outline-color: #f2c14e;
}
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  font-size: 0.92rem;
}
.site-footer p {
  margin: 0.3rem 0;
}

/* hero */
.hero {
  background: var(--navy);
  color: #fff;
  padding: 3.5rem 0 3rem;
}
.hero .lead {
  max-width: 68ch;
  font-size: 1.15rem;
  color: #dbe5ee;
}
.hero a.button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}
.hero .button {
  background: #f2c14e;
  border-color: #f2c14e;
  color: #1d3b53;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 0.6rem;
}
.hero .eyebrow,
.case-head .eyebrow {
  color: #f2c14e;
}
/* the default focus colour is too dark on navy; gold reaches 6.9:1 there */
.hero :focus-visible,
.case-head :focus-visible {
  outline-color: #f2c14e;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  margin: 2rem 0 0;
}
.facts div {
  border-left: 3px solid #f2c14e;
  padding-left: 0.8rem;
}
.facts dt {
  font-size: 0.85rem;
  color: #c3d0dc;
}
.facts dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
}

/* buttons and links */
.links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 1rem 0 0;
}
a.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 1.05rem;
  border-radius: 8px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
a.button.secondary {
  background: transparent;
  color: var(--accent);
}

/* sections */
.section {
  padding: 1.5rem 0 1rem;
}
.section.alt {
  background: var(--surface-2);
  padding-bottom: 2.5rem;
  margin-top: 2rem;
}
.features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 3rem;
}
.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 2rem;
  align-items: start;
}
.feature-shot img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  width: 100%;
}
.feature:nth-child(even) .feature-text {
  order: 2;
}
.feature h3 {
  font-size: 1.9rem;
}
.feature h3 a {
  color: inherit;
  text-decoration: none;
}
.feature h3 a:hover {
  text-decoration: underline;
}
.tagline {
  font-weight: 600;
  margin-top: 0;
}
.feature-shot img,
.shot img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(15, 30, 45, 0.15);
  background: var(--surface);
}
.status {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 700;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
}
.status.published {
  background: var(--ok-bg);
  color: var(--ok);
}
.status.accepted {
  background: var(--pending-bg);
  color: var(--pending);
}
.cards {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}
.card p {
  margin: 0.3rem 0;
}
.approach {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1.5rem 2rem;
}
.approach h3 {
  font-size: 1.15rem;
}
.skills {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}
.skills th,
.skills td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
}
.skills thead th {
  background: var(--navy);
  color: #fff;
}

/* case study */
.case-head {
  background: var(--navy);
  color: #fff;
  padding: 2.5rem 0 2rem;
}
.case-head .lead {
  font-size: 1.2rem;
  color: #dbe5ee;
  max-width: 60ch;
}
.case-head .eyebrow a {
  color: #f2c14e;
}
.case-head .button {
  background: #f2c14e;
  border-color: #f2c14e;
  color: #1d3b53;
}
.case-head .button.secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}
.case-head .muted {
  color: #c3d0dc;
}
.case-body {
  max-width: 860px;
}
.case-body > section,
.case-body > p {
  max-width: 70ch;
}
.shot {
  margin: 2rem 0;
}
.shot figcaption {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.gallery {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.gallery .shot {
  margin: 1rem 0;
}
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
}
.tags li {
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.9rem;
}
.limits {
  border-left: 4px solid var(--gold);
  padding-left: 1rem;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .feature {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
  .feature:nth-child(even) .feature-text {
    order: 0;
  }
  .feature-shot {
    order: -1;
  }
  .gallery {
    grid-template-columns: minmax(0, 1fr);
  }
  .gallery .shot.mobile {
    max-width: 280px;
  }
  .skills thead {
    position: absolute;
    left: -9999px;
  }
  .skills tr,
  .skills th,
  .skills td {
    display: block;
  }
  .skills tbody th {
    background: var(--surface-2);
  }
}
