/* Shared styles for the Zo Labs site (landing page and /drug-discovery/).
   Extracted verbatim from the former inline <style> block in /index.html. */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-300-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --graphite: #5e5e5e;
  --rule: #e2e2e2;
  --mist: #f6f6f6;
  --gutter: clamp(20px, 4vw, 48px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a:hover {
  color: var(--graphite);
}

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

section[id] {
  scroll-margin-top: 64px;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.wordmark {
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav ul {
  display: flex;
  gap: clamp(14px, 3vw, 36px);
  list-style: none;
  font-size: 15px;
}

.nav ul a {
  text-decoration: none;
  color: var(--graphite);
}

.nav ul a:hover {
  color: var(--ink);
}

@media (max-width: 640px) {
  .nav ul li.hide-sm {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(72px, 11vw, 152px) 0 clamp(64px, 8vw, 112px);
}

.hero h1 {
  font-weight: 300;
  font-size: clamp(42px, 6.4vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 13ch;
  /* Without this the headline sets 466px/194px, stranding the last word; balance
     evens the lines and keeps "Frontier AI" from splitting across them. Ignored
     by browsers that do not support it, which just fall back to the ragged set. */
  text-wrap: balance;
}

.hero-foot {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
}

.hero-foot p {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--graphite);
  max-width: 46ch;
}

.btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- Sections ---------- */
.section {
  border-top: 1px solid var(--ink);
  padding: clamp(48px, 6vw, 72px) 0 clamp(64px, 8vw, 104px);
}

.split {
  display: grid;
  grid-template-columns: 3fr 9fr;
  gap: 32px 48px;
}

.split > * {
  min-width: 0;
}

.section h2 {
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
}

/* The model sections are named after the products, so their headings carry the
   hero's display voice rather than the small sidebar-label treatment the
   navigational sections (Results, Team, Latest writing) keep. */
#zo1 h2,
#zo2 h2 {
  font-weight: 300;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.intro {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

/* Target discovery */
.video {
  margin-top: 36px;
  aspect-ratio: 16 / 9;
  background: var(--mist);
  border: 1px solid var(--rule);
  position: relative;
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.steps {
  list-style: none;
  display: grid;
  gap: 24px;
}

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

.steps .num {
  display: block;
  font-size: 14px;
  color: var(--graphite);
  margin-bottom: 16px;
}

.steps h3 {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.35;
  margin-bottom: 6px;
}

.steps p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--graphite);
}

.steps-4 {
  margin-top: 36px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.case {
  margin-top: 56px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--mist);
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 32px 48px;
  align-items: end;
}

.case .label {
  font-size: 14px;
  color: var(--graphite);
}

.case h3 {
  margin: 6px 0 12px;
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.case p {
  font-size: 16px;
  line-height: 1.6;
}

.case .desc {
  color: var(--graphite);
}

.case .result {
  border-top: 1px solid var(--ink);
  padding-top: 16px;
}

.case .big {
  font-size: clamp(44px, 4.4vw, 56px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
}

.case .result p:last-child {
  margin-top: 10px;
  line-height: 1.5;
}

/* Candidates */
.candidate {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px 56px;
  align-items: center;
}

.candidate figure {
  height: clamp(380px, 46vw, 640px);
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.candidate picture {
  display: contents;
}

.candidate img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 82%;
  object-fit: contain;
  transform: rotate(-8deg);
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.19));
}

.candidate .steps {
  gap: 28px;
}

.candidate .steps .num {
  margin-bottom: 14px;
}

.candidate .steps h3 {
  font-size: 18px;
}

.candidate .steps p {
  font-size: 16px;
  line-height: 1.6;
}

/* Results */
.results {
  list-style: none;
  margin-top: 36px;
  border-top: 1px solid var(--rule);
}

.results li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: 8px 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.results .claim {
  font-size: 18px;
  line-height: 1.45;
}

.results .context {
  font-size: 15px;
  line-height: 1.45;
  color: var(--graphite);
}

.results a.context {
  text-underline-offset: 3px;
}

/* Team */
.team {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.team figure {
  width: 220px;
}

.team img {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  background: var(--mist);
}

.team h3 {
  margin-top: 14px;
  font-weight: 500;
  font-size: 17px;
}

.team p {
  font-size: 15px;
  color: var(--graphite);
}

/* Writing */
.post {
  display: block;
  text-decoration: none;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 24px 0;
}

.post:hover {
  color: inherit;
}

.post time {
  font-size: 14px;
  color: var(--graphite);
}

.post h3 {
  margin: 6px 0 8px;
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 34ch;
}

.post:hover h3 {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.post p {
  font-size: 15px;
  color: var(--graphite);
  max-width: 60ch;
}

/* Footer */
footer {
  border-top: 1px solid var(--rule);
  padding: 28px 0 36px;
  font-size: 14px;
  color: var(--graphite);
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Page head (subpages) ---------- */
.page-head {
  padding: clamp(56px, 8vw, 104px) 0 clamp(32px, 4vw, 56px);
}

.page-head h1 {
  font-weight: 300;
  font-size: clamp(38px, 5.4vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 14ch;
}

.page-head p {
  margin-top: clamp(24px, 3vw, 36px);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--graphite);
  max-width: 52ch;
}

/* ---------- Model sections (Zo-1, Zo-2) ---------- */
.model-body {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--graphite);
  max-width: 62ch;
}

.model-body a {
  color: inherit;
  text-underline-offset: 3px;
}

.model-body a:hover {
  color: var(--ink);
}

.model-links {
  list-style: none;
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.model-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
  background: var(--paper);
  transition: background 0.15s ease, color 0.15s ease;
}

.model-links a:hover {
  background: var(--ink);
  color: var(--paper);
}

.model-links svg {
  width: 16px;
  height: 16px;
  flex: none;
}

/* ---------- Waiting list ---------- */
/* HubSpot renders the form inside a cross-origin iframe, so its fields and submit
   button cannot be styled from here. Change those in HubSpot's form editor. */
.waitlist {
  margin-top: 48px;
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--mist);
  max-width: 62ch;
}

.waitlist .hs-form-frame iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .steps-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {

  .split,
  .hero-foot,
  .case,
  .candidate,
  .results li {
    grid-template-columns: minmax(0, 1fr);
  }

  .candidate figure {
    height: 400px;
    padding: 36px 0 20px;
  }
}

@media (max-width: 480px) {
  .steps-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .team {
    gap: 20px;
  }

  .team figure,
  .team img {
    width: 150px;
  }

  .team img {
    height: 150px;
  }
}

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

  .btn {
    transition: none;
  }
}
