/* Ben Potts: site styles */

@font-face { font-family: "Lato"; font-style: normal; font-weight: 300; font-display: swap; src: url("/assets/fonts/lato-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: italic; font-weight: 300; font-display: swap; src: url("/assets/fonts/lato-latin-300-italic.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/lato-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/lato-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: italic; font-weight: 700; font-display: swap; src: url("/assets/fonts/lato-latin-700-italic.woff2") format("woff2"); }

:root {
  --taupe: #bdad9b;        /* header */
  --taupe-dark: #a89581;   /* button hover */
  --sand: #d1c5b9;         /* footer */
  --mist: #eaebec;         /* top of page gradient */
  --card: #f2f2f3;
  --ink: #1f1f1f;
  --ink-soft: #3a3a3a;
  --radius: 12px;
  --wrap: 1224px;
  --gutter: clamp(20px, 5vw, 72px);
}

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

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

body {
  margin: 0;
  font-family: "Lato", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

h1, h2, h3, p { margin: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 6px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */

.site-header { background: var(--taupe); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 136px;
}
.brand {
  font-size: 1.625rem; font-weight: 700; color: var(--ink-soft); text-decoration: none;
  padding-left: 16px; white-space: nowrap;
}
.brand:hover { color: var(--ink); }

.site-nav { display: flex; align-items: center; gap: 24px; flex: 1; justify-content: space-between; }
.site-nav ul { list-style: none; margin: 0 auto; padding: 0; display: flex; gap: 38px; }
.site-nav ul a {
  font-weight: 700; font-size: 1.125rem; color: var(--ink-soft); text-decoration: none;
  padding: 6px 0; border-bottom: 1.5px solid transparent;
}
.site-nav ul a:hover { color: #000; border-bottom-color: currentColor; }
.site-nav ul a[aria-current="page"] { color: #000; border-bottom-color: #000; }

.nav-toggle { display: none; }

/* ---------- Buttons ---------- */

.button {
  display: inline-block; font-weight: 700; font-size: 1.0625rem; line-height: 1.2;
  color: #000; text-decoration: none; background: transparent;
  border: 2px solid var(--ink-soft); border-radius: 6px; padding: 14px 30px;
  transition: background-color 0.15s ease;
}
.button:hover { background: var(--taupe-dark); text-decoration: none; }
.button--soft { border-color: var(--taupe-dark); padding: 12px 20px; }
.button--soft:hover { background: var(--taupe); }
.button-row { display: flex; flex-wrap: wrap; gap: 16px 24px; margin-top: 24px; }

/* ---------- Main ---------- */

main {
  flex: 1;
  background: linear-gradient(180deg, var(--mist), #fff);
  padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px);
}

.page-title { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.15; font-weight: 400; letter-spacing: -0.01em; }
.page-title strong, .page-title--bold { font-weight: 700; }
.lead { font-size: 1.1875rem; max-width: 46rem; }
.center { text-align: center; }
.center .lead { margin: 16px auto 0; }

.prose > * + * { margin-top: 1.2em; }
.prose { max-width: 40rem; }

/* Two-column layout used on Home, About and Research */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split--top { align-items: start; }

/* ---------- Home ---------- */

.portrait {
  width: 100%; max-width: 504px; aspect-ratio: 768 / 733; object-fit: cover;
  border-radius: 0 60% 0 60%;
}
.intro-card {
  background: rgba(242, 242, 243, 0.85);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(31, 31, 31, 0.08);
  padding: clamp(28px, 4vw, 48px) clamp(24px, 3vw, 40px);
  max-width: 440px;
}
.intro-card h1 { font-size: clamp(2.75rem, 5vw, 4rem); line-height: 1.1; font-weight: 700; }
.intro-card .role { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; margin-top: 18px; }
.intro-card .summary { margin-top: 36px; }

/* ---------- About ---------- */

.blob {
  width: 100%; max-width: 640px; margin-left: auto; aspect-ratio: 1; object-fit: cover;
  border-radius: 58% 42% 52% 48% / 46% 56% 44% 54%;
}
.about-more { margin-top: clamp(40px, 6vw, 64px); max-width: 68rem; }
.about-more p + p { margin-top: 1.2em; }

/* ---------- Research ---------- */

.feature {
  border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  padding: 28px 0 32px; margin-bottom: clamp(48px, 7vw, 88px);
}
.eyebrow { font-size: 1.5rem; letter-spacing: 0.01em; text-transform: uppercase; color: var(--ink-soft); }
.feature .needs-logo { width: 296px; margin-top: 28px; }
.feature p.feature-text { font-weight: 700; font-size: 1rem; max-width: 32rem; margin-top: 28px; }
.feature .button { margin-top: 16px; }

.research-photo { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; }
.research-body { margin-top: clamp(40px, 6vw, 72px); }

/* ---------- Resources ---------- */

.cards {
  list-style: none; padding: 0; margin: clamp(48px, 7vw, 96px) 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 24px;
}
.card { display: flex; flex-direction: column; }
.card-media {
  aspect-ratio: 10 / 7; border-radius: var(--radius); overflow: hidden; background: #fff;
  box-shadow: 0 6px 20px rgba(31, 31, 31, 0.06);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media--logo { display: grid; place-items: center; padding: 6%; }
.card-media--logo img { object-fit: contain; }
.card h2 { font-size: 1.5rem; line-height: 1.25; margin-top: 24px; }
.card p { margin-top: 12px; }
.card .button-row { margin-top: auto; padding-top: 24px; }

/* ---------- Contact ---------- */

.contact-line { font-weight: 700; margin-top: 28px; }
.contact-links { list-style: none; padding: 0; margin: 20px 0 0; display: flex; justify-content: center; gap: 28px; font-weight: 700; }

/* ---------- 404 ---------- */

.not-found .lead { margin: 16px auto 0; }
.not-found .button-row { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer { background: var(--sand); padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-email { font-weight: 700; font-size: 1.125rem; color: var(--ink-soft); text-decoration: none; }
.footer-email:hover { text-decoration: underline; }
.footer-logos { display: flex; align-items: center; gap: 28px; margin-top: 28px; }
.footer-logos .crrag { width: 64px; }
.footer-logos .needs { width: 160px; }
.footer-links { list-style: none; margin: 0; padding: 0; text-align: right; font-weight: 700; }
.footer-links li + li { margin-top: 4px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- Smaller screens ---------- */

@media (max-width: 1100px) {
  .site-nav ul { gap: 24px; }
}

@media (max-width: 920px) {
  .site-header .wrap { min-height: 88px; flex-wrap: wrap; }
  .brand { padding-left: 0; font-size: 1.5rem; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    background: transparent; border: 2px solid transparent; border-radius: 6px;
    font: inherit; font-weight: 700; color: var(--ink); padding: 8px 10px; cursor: pointer;
  }
  .nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
    display: block; width: 26px; height: 2px; background: currentColor; position: relative;
  }
  .nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle .bars::before { top: -8px; }
  .nav-toggle .bars::after { top: 8px; }
  .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

  .site-nav { flex-basis: 100%; flex-direction: column; align-items: flex-start; gap: 20px; padding: 8px 0 28px; }
  .js .site-nav[data-open="false"] { display: none; }
  .site-nav ul { flex-direction: column; gap: 4px; margin: 0; width: 100%; }
  .site-nav ul a { display: inline-block; font-size: 1.25rem; padding: 8px 0; }

  .split { grid-template-columns: 1fr; }
  .split .portrait, .split .blob { margin: 0 auto; }
  .intro-card { max-width: none; }
  .cards { grid-template-columns: 1fr 1fr; }
  .research-figure { order: -1; max-width: 520px; }
}

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .cards { grid-template-columns: 1fr; }
  .site-footer .wrap { flex-direction: column; }
  .footer-links { text-align: left; }
  .eyebrow { font-size: 1.25rem; }
  .feature .needs-logo { width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media print {
  .site-header, .site-footer, .button-row, .skip-link { display: none; }
  main { background: none; padding: 0; }
}
