/* Palette taken from an H&E stain: hematoxylin purple for nuclei, eosin pink for everything else. */
:root {
  --hema-900: #241B52;
  --hema-700: #3A2C80;
  --eosin-600: #A82E62;
  --eosin-300: #EBA0BD;
  --eosin-100: #F8E4EC;
  --slide: #FDF9FB;
  --ink: #1E1838;
  --ink-soft: #4C4566;
  --on-dark: #F5EFF8;
  --on-dark-soft: #CFC6E4;
  --rule: rgba(58, 44, 128, 0.22);

  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(72px, 10vw, 136px);
}

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

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

body {
  margin: 0;
  background: var(--slide);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--sans);
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--hema-900);
}

p { margin: 0; }
a { color: inherit; }

::selection { background: var(--eosin-300); color: var(--hema-900); }

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

.wrap {
  width: min(100% - 2 * var(--gutter), 1160px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--hema-900);
  color: #fff;
  font-family: var(--sans);
  text-decoration: none;
}
.skip:focus { top: 16px; }

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 24px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--hema-900);
  text-decoration: none;
}

.mark { width: 34px; height: 34px; flex: none; }

.wordmark-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.wordmark-name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.wordmark-sub {
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.9375rem;
}

.site-header nav a {
  padding-block: 4px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-header nav a:hover { border-bottom-color: var(--eosin-300); }

/* Links and buttons */

.button {
  display: inline-block;
  padding: 15px 24px;
  border-radius: 6px;
  background: var(--hema-700);
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.15s;
}
.button:hover { background: var(--hema-900); }

.text-link {
  color: var(--hema-700);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: rgba(168, 46, 98, 0.4);
}
.text-link:hover { text-decoration-color: var(--eosin-600); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
  padding-block: clamp(32px, 6vw, 80px) var(--section);
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--hema-900);
}

.lede {
  max-width: 32em;
  margin-top: 28px;
  font-size: 1.3125rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 36px;
}

/* The microscope field */

.scope {
  justify-self: end;
  width: 100%;
  max-width: 480px;
  margin: 0;
}

.scope-field {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #F2C4D5;
  box-shadow: 0 0 0 1px rgba(36, 27, 82, 0.12), 0 30px 60px -30px rgba(36, 27, 82, 0.45);
}

/* Eyepiece vignette */
.scope-field::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 50px 14px rgba(36, 27, 82, 0.5);
  pointer-events: none;
}

.scope canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.scope canvas.focus-in {
  animation: focus-in 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both;
}

@keyframes focus-in {
  from { filter: blur(14px) saturate(0.6); transform: scale(1.08); }
  to { filter: blur(0) saturate(1); transform: scale(1); }
}

.scope figcaption {
  max-width: 26em;
  margin: 20px auto 0;
  text-align: center;
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* The idea */

.idea {
  padding-block: var(--section);
  background: var(--hema-900);
  color: var(--on-dark);
}

.idea h2 {
  max-width: 17ch;
  color: #fff;
}

.idea-lede {
  max-width: 34em;
  margin-top: 28px;
  font-size: 1.3125rem;
  line-height: 1.55;
  color: var(--on-dark-soft);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px clamp(40px, 6vw, 96px);
  margin-top: clamp(56px, 7vw, 88px);
  padding-top: 40px;
  border-top: 1px solid rgba(235, 160, 189, 0.35);
}

.pillars h3 {
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--eosin-300);
}

.pillars p {
  max-width: 30em;
  margin-top: 12px;
  color: var(--on-dark-soft);
}

.disciplines {
  max-width: 28em;
  margin-top: clamp(64px, 8vw, 104px);
  font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.25rem);
  line-height: 1.3;
  color: #fff;
}

/* Founder's letter */

.letter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px clamp(40px, 6vw, 96px);
  padding-block: var(--section);
}

.letter-head {
  position: sticky;
  top: 32px;
  align-self: start;
}

.letter-head p {
  margin-top: 16px;
  font-style: italic;
  color: var(--ink-soft);
}

.letter-body {
  max-width: 34em;
  font-size: 1.25rem;
  line-height: 1.7;
}

.letter-body p + p { margin-top: 1.1em; }
.letter-body .signoff { margin-top: 2em; }

.signature {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--hema-900);
}

.alias {
  font-style: italic;
  color: var(--eosin-600);
}

/* Get involved */

.involved {
  padding-block: var(--section);
  background: var(--eosin-100);
}

.involved-lede {
  max-width: 32em;
  margin-top: 20px;
  font-size: 1.3125rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Rows share one grid so the columns line up */
.ways {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto;
  column-gap: 40px;
  margin: clamp(40px, 5vw, 64px) 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--rule);
}

.ways li {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: baseline;
  row-gap: 8px;
  padding-block: 28px;
  border-top: 1px solid var(--rule);
}

.ways h3 {
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--hema-900);
}

.ways p {
  max-width: 32em;
  color: var(--ink-soft);
}

.ways .text-link { white-space: nowrap; }

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding-block: 32px 40px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.site-footer a {
  color: var(--hema-700);
  font-weight: 600;
}

@media (max-width: 860px) {
  .hero,
  .letter,
  .pillars,
  .ways,
  .ways li {
    grid-template-columns: minmax(0, 1fr);
  }

  .scope {
    justify-self: center;
    max-width: 400px;
  }

  .letter-head { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scope canvas.focus-in { animation: none; }
  .button { transition: none; }
}
