/* Our tests: a replica of the biograph.com "Our tests" section, measured from the live site at 1440px,
   set in our type and section 2's colours (Manrope headline and Figtree text in the site's black, #120c08,
   on white). Section 2 has no eyebrow above its headline, so this one has none.
   Top: a 400px band holding a 1800px ring of 24 tiles (12 images, each twice, 15° apart, 860px from
   the centre), turning once every 150s like theirs. Only the top of the ring shows, fading to white
   behind the heading. Below: every test in rows of three with its image and what it measures,
   collapsed to the first few until "See all biomarkers" opens the rest. */
.tests {
  --tests-ink: #120c08;
  --tests-muted: rgba(18, 12, 8, .8);
  padding: calc(150 * var(--px)) calc(60 * var(--px)); background: #fff; color: var(--tests-ink);
}
.tests__top { position: relative; height: calc(400 * var(--w)); margin: 0 calc(-60 * var(--px)); overflow: hidden; }
.tests__ring {
  position: absolute; top: 0; left: 50%; width: calc(1800 * var(--w)); height: calc(1800 * var(--w)); margin-left: calc(-900 * var(--w));
  animation: tests-spin 150s linear infinite;
}
.tests__tile {
  position: absolute; top: 0; left: calc(860 * var(--w)); width: calc(80 * var(--w)); height: calc(80 * var(--w)); overflow: hidden; border-radius: calc(16 * var(--w));
  background: #ecebe7; transform-origin: calc(40 * var(--w)) calc(900 * var(--w)); transform: rotate(calc(var(--i) * 15deg));
}
.tests__tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tests__top::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0) 25%, #fff 90%);
}
@keyframes tests-spin { to { transform: rotate(360deg); } }

.tests__intro { position: absolute; right: calc(24 * var(--px)); bottom: calc(50 * var(--px)); left: calc(24 * var(--px)); z-index: 1; text-align: center; }
.tests__title {
  margin: 0; font: 500 calc(46 * var(--px))/calc(51.06 * var(--px)) var(--landing-head); letter-spacing: normal; color: var(--tests-ink);
  text-wrap: balance;
}
.tests__sub {
  max-width: calc(525 * var(--px)); margin: calc(20 * var(--px)) auto 0; font: 400 calc(15 * var(--px))/calc(22 * var(--px)) var(--landing-body); letter-spacing: -0.2px;
  color: var(--tests-muted); text-wrap: pretty;
}

.tests__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(10 * var(--px)); margin: 0; padding: 0; list-style: none;
}
.test {
  display: flex; align-items: center; gap: calc(10 * var(--px)); min-width: 0; padding: calc(8 * var(--px)); border-radius: calc(16 * var(--px));
  background: #f7f7f5; transition: background-color .2s ease;
}
.test:hover { background: #efefec; }
/* Tests without an image yet show an empty tile. */
.test__img { flex: none; width: calc(55 * var(--px)); height: calc(55 * var(--px)); overflow: hidden; border-radius: calc(8 * var(--px)); background: #e9e8e3; }
.test__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.test__name { margin: 0; font: 500 calc(14 * var(--px))/calc(21 * var(--px)) var(--landing-head); color: var(--tests-ink); }
.test__desc { margin: 0; font: 400 calc(14 * var(--px))/calc(21 * var(--px)) var(--landing-body); color: var(--tests-muted); }

/* Collapsed (landing.js adds .is-collapsed, so without script the full list shows): four clear rows
   and a fifth that blurs and fades into white, as on their site, then a "See all
   biomarkers" pill in the rows' grey. Expanding opens the list to its full height. */
.tests__list { position: relative; max-width: calc(1240 * var(--w)); margin: 0 auto; }
.tests__fade { display: none; }
.tests.is-collapsed .tests__grid {
  max-height: calc(400 * var(--px)); overflow: hidden; transition: max-height .8s var(--quint);
}
.tests.is-collapsed .tests__fade {
  display: block; position: absolute; right: 0; bottom: 0; left: 0; height: calc(115 * var(--px)); pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 95%);
}
.tests.is-collapsed .tests__fade::before {
  content: ""; position: absolute; inset: 0;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  -webkit-mask-image: linear-gradient(transparent, #000 70%); mask-image: linear-gradient(transparent, #000 70%);
}
.tests__more {
  display: flex; align-items: center; justify-content: center; height: calc(38 * var(--px)); margin: calc(24 * var(--px)) auto 0; padding: 0 calc(20 * var(--px));
  border: 0; border-radius: var(--landing-pill); background: #f2f2ef; color: var(--tests-ink);
  font: 500 calc(14 * var(--px))/calc(16.8 * var(--px)) var(--landing-body); cursor: pointer; transition: background-color .2s ease;
}
.tests__more[hidden] { display: none; }
.tests__more:hover { background: #e9e9e5; }
.tests__more:focus-visible { outline: 2px solid var(--tests-ink); outline-offset: calc(3 * var(--px)); }

/* The hero's own type steps. */
@media (max-width: 1439.98px) {
  .tests__title { font-size: 36px; line-height: 39.96px; letter-spacing: -0.5px; }
  .tests__sub { font-size: 16px; line-height: 24px; }
}
/* Tablet: two columns, section 2's padding. */
@media (max-width: 1199.98px) {
  .tests { padding: 80px 15px; }
  .tests__top { margin: 0 -15px; }
  .tests__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phone: one column, a shorter band, and a smaller ring (1000px, 64px tiles) so an arc of four or
   five tiles crowns the heading instead of one or two drifting through an empty band. */
@media (max-width: 809.98px) {
  .tests__top { height: 360px; }
  .tests__ring { width: 1000px; height: 1000px; margin-left: -500px; }
  .tests__tile { left: 468px; width: 64px; height: 64px; border-radius: 14px; transform-origin: 32px 500px; }
  .tests__intro { bottom: 36px; }
  .tests__title { font-size: 32px; line-height: 35.52px; }
  .tests__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .tests__ring { animation: none; }
  .test, .tests.is-collapsed .tests__grid, .tests__more { transition: none; }
}
