@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Source+Sans+3:wght@400;500;600&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500&display=swap');

:root {
  --bg: #fbfaf7;
  --text: #171717;
  --muted: #66615a;
  --rule: #ded9cf;
  --accent: #2457a6;
  --mono-bg: #f5f2ec;
  --measure: 780px;
  --wide: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", system-ui, sans-serif;
  line-height: 1.55;
  font-size: 18px;
}

.site-header {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid var(--rule);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
}

nav {
  display: flex;
  gap: 18px;
  row-gap: 8px;
  flex-wrap: wrap;
  font-size: 15px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav a:hover { color: var(--text); }

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 32px 32px 24px;
}

.hero { margin-bottom: 88px; }

.hero-copy {
  color: #2d2a26;
  font-size: 20px;
  max-width: var(--measure);
  margin-bottom: 0;
}

h1, h2, h3 {
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0;
}

h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(48px, 8vw, 84px);
  max-width: 980px;
  margin-bottom: 22px;
}

.hero-brand {
  align-items: flex-end;
  display: flex;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: clamp(52px, 9vw, 96px);
  font-weight: 600;
  gap: 12px;
  letter-spacing: -0.035em;
}

.hero-logo {
  display: block;
  flex: 0 0 auto;
  height: clamp(54px, 8vw, 88px);
  transform: translateY(-0.2em);
  width: clamp(54px, 8vw, 88px);
}

.hero-wordmark {
  display: inline-block;
}

.kern-db {
  margin-left: -0.055em;
}

h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(34px, 5vw, 52px);
  max-width: 900px;
  margin: 0 0 20px;
}

.lede {
  font-size: clamp(22px, 3vw, 29px);
  line-height: 1.34;
  color: #2d2a26;
  max-width: var(--measure);
  margin: 0 0 14px;
}

.endpoint-box {
  align-items: stretch;
  border: 1px solid var(--rule);
  border-radius: 8px;
  display: flex;
  max-width: var(--measure);
  overflow: hidden;
  width: 100%;
  margin: 0 0 20px;
}

.endpoint-box code {
  background: var(--mono-bg);
  color: #2d2a26;
  flex: 1 1 auto;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 18px;
  padding: 12px 14px;
  overflow-wrap: anywhere;
}

.endpoint-box button {
  appearance: none;
  background: white;
  border: 0;
  border-left: 1px solid var(--rule);
  color: var(--text);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-weight: 600;
  padding: 0 18px;
}

.endpoint-box button:hover,
.endpoint-box button:focus-visible {
  background: #f5f2ec;
}

p { margin: 0 0 20px; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

section > p,
section > pre,
section > .publication,
section > .faq-list {
  max-width: var(--measure);
}

section {
  margin: 88px 0;
  padding-top: 6px;
}

.rule {
  border-top: 1px solid var(--rule);
  padding-top: 44px;
}

figure { margin: 36px 0; }

.hero-video {
  margin-top: 28px;
  margin-bottom: 18px;
}

figcaption {
  color: var(--muted);
  font-size: 15px;
  margin-top: 12px;
  max-width: var(--measure);
}

.wide-figure,
.media-figure {
  max-width: 100%;
}

.media-figure img {
  width: 100%;
  display: block;
  border: 1px solid var(--rule);
  border-radius: 24px;
  background: white;
  box-shadow: 0 18px 50px rgba(31, 28, 22, 0.08);
}

.video-frame, .site-video, .diagram {
  border: 1px solid var(--rule);
  background: white;
}

.video-frame {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 16px;
  text-align: center;
  padding: 24px;
}

.video-frame-large {
  min-height: 420px;
}

.site-video {
  aspect-ratio: var(--video-aspect, 16 / 9);
  border-radius: 8px;
  display: block;
  width: 100%;
  object-fit: contain;
}

.site-video-large {
  min-height: 420px;
}

.video-aspect-3-2 {
  --video-aspect: 3 / 2;
}

.video-aspect-407-270 {
  --video-aspect: 407 / 270;
}

.video-aspect-479-270 {
  --video-aspect: 479 / 270;
}

.callout {
  display: block;
}

.callout p {
  max-width: var(--measure);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 20px;
}

.button {
  border: 1px solid var(--text);
  color: var(--bg);
  background: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

.button.secondary {
  color: var(--text);
  background: transparent;
}

.button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.tool-card {
  background: white;
  border: 1px solid var(--rule);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tool-card img {
  aspect-ratio: 16 / 10;
  background: white;
  border-bottom: 1px solid var(--rule);
  display: block;
  flex: 0 0 auto;
  object-fit: cover;
  width: 100%;
}

.tool-card-contain img {
  object-fit: contain;
  padding: 8px;
}

.tool-card h3 {
  align-items: center;
  display: flex;
  flex: 0 0 48px;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.2;
  padding: 0 16px;
  margin: 0;
}

.contact-block p:last-child {
  font-size: 22px;
  font-weight: 500;
}

.report-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 34px;
  align-items: start;
}

.report-section p {
  max-width: var(--measure);
}

.report-preview {
  margin: 0;
}

.report-preview img {
  background: white;
  border: 1px solid var(--rule);
  border-radius: 8px;
  display: block;
  width: 100%;
}

.diagram { padding: 34px; }

.diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

pre {
  background: var(--mono-bg);
  border: 1px solid var(--rule);
  padding: 22px;
  overflow-x: auto;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 15px;
  line-height: 1.65;
}

.publication {
  border-top: 1px solid var(--rule);
  padding: 22px 0;
}

.publication a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.faq-list { border-top: 1px solid var(--rule); }

.faq-list details {
  border-bottom: 1px solid var(--rule);
  padding: 22px 0;
}

summary {
  cursor: pointer;
  font-weight: 500;
}

.site-footer {
  max-width: var(--wide);
  margin: 80px auto 0;
  padding: 28px 24px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 15px;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 900ms cubic-bezier(.2, .8, .2, 1),
    transform 900ms cubic-bezier(.2, .8, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="media"] { --reveal-delay: 160ms; }
[data-reveal="late"] { --reveal-delay: 260ms; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  main {
    padding-left: 24px;
    padding-right: 24px;
    padding-top: 28px;
  }

  .button-row {
    margin-bottom: 0;
  }

  .tool-card-grid {
    grid-template-columns: 1fr;
  }

  .report-section {
    grid-template-columns: 1fr;
  }

  .video-frame-large {
    min-height: 260px;
  }

  .hero-brand {
    gap: 14px;
  }

  .media-figure img {
    border-radius: 16px;
  }
}

@media (min-width: 681px) and (max-width: 980px) {
  .tool-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .tool-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
