:root {
  --header-height: 72px;
}

html {
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  padding-top: var(--header-height);
}

.skip-link {
  position: fixed;
  z-index: 1100;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header-height);
  display: block;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header nav {
  height: 100%;
  gap: 26px;
  flex-shrink: 0;
}

.site-header .study-nav {
  justify-self: end;
  gap: 22px;
}

.study-nav a {
  font-weight: 600;
}

.site-header .section-nav {
  gap: 20px;
}

.site-header nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  white-space: nowrap;
}

.site-header nav > a:nth-child(3) {
  display: inline-flex;
}

.homepage main {
  display: flex;
  min-height: calc(100svh - var(--header-height));
}

.homepage .hero {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: calc(100svh - var(--header-height));
  padding-block: 0 18px;
}

.hero-content {
  margin-block: auto;
  padding-block: 36px;
}

.homepage .hero h1 {
  margin: 0 0 36px;
  font-size: clamp(40px, 5.9vw, 76px);
  line-height: 1.12;
  letter-spacing: -3.8px;
}

.homepage .hero-bottom {
  padding: 0;
  gap: 24px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 54px;
  padding: 15px 20px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
}

.secondary-link:hover {
  border-color: var(--muted);
}

.homepage .hero-foot {
  border-bottom: 0;
  padding-block: 18px 0;
  flex-shrink: 0;
}

.collection-page {
  padding-block: 40px 70px;
}

.experiments-heading {
  margin-bottom: 32px;
}

.experiments-heading h1 {
  margin: 0 0 12px;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.13;
  letter-spacing: -1.8px;
}

.experiments-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.analysis-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0c1013;
  transition: border-color .15s ease, background-color .15s ease;
}

.analysis-card:hover,
.analysis-card:focus-visible {
  border-color: var(--blue);
  background: #0e151a;
}

.analysis-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .5px;
}

.analysis-meta > :first-child {
  color: var(--blue-soft);
}

.analysis-card h2 {
  margin: 32px 0 14px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -1px;
}

.analysis-card > p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.analysis-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: auto;
  padding-bottom: 24px;
  color: var(--muted);
  font-size: 12px;
}

.analysis-facts strong {
  color: var(--text);
  font-weight: 600;
}

.analysis-open {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--blue-soft);
  font-size: 13px;
  font-weight: 600;
}

.collection-page .section-heading h1,
.about-page h1 {
  margin: 14px 0 0;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.13;
  letter-spacing: -1.8px;
}

.about-page {
  min-height: calc(100svh - var(--header-height) - 160px);
  padding-block: 40px 70px;
}

.about-page h1 {
  font-size: clamp(36px, 4.7vw, 58px);
}

.about-page > p {
  max-width: 680px;
  margin-block: 28px;
  font-size: 18px;
  line-height: 1.8;
  color: var(--muted);
}

.about-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

@media (max-width: 1000px) {
  .homepage .hero h1 {
    letter-spacing: -2.5px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .primary-link,
  .hero-actions .secondary-link {
    padding-inline: 16px;
    gap: 15px;
  }

  .homepage .hero-bottom p {
    font-size: 16px;
  }
}

@media (max-width: 1100px) {
  :root {
    --header-height: 116px;
  }

  .header-inner {
    grid-template-columns: auto 1fr;
    grid-template-rows: 60px 56px;
    gap: 0 24px;
  }

  .site-header .section-nav {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .site-header .study-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    border-top: 1px solid var(--line);
    gap: 32px;
  }
}

@media (max-width: 700px) {
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .site-header nav .header-x {
    display: none;
  }

  .homepage .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  :root {
    --header-height: 116px;
  }

  .header-inner {
    gap: 0 12px;
  }

  .site-header nav {
    gap: 14px;
    font-size: 11px;
  }

  .site-header .section-nav {
    gap: 14px;
  }

  .site-header .study-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    font-size: 12px;
  }

  .site-header .study-nav a {
    white-space: normal;
    line-height: 1.4;
  }

  .homepage .hero {
    padding-bottom: 14px;
  }

  .hero-content {
    padding-block: 28px;
  }

  .homepage .hero h1 {
    font-size: clamp(32px, 8.4vw, 48px);
    line-height: 1.14;
    letter-spacing: -1.5px;
    margin-bottom: 26px;
  }

  .homepage .hero-bottom {
    gap: 22px;
  }

  .homepage .hero-bottom p {
    font-size: 15px;
    line-height: 1.6;
  }

  .hero-actions {
    width: 100%;
    gap: 10px;
  }

  .hero-actions .primary-link,
  .hero-actions .secondary-link {
    min-height: 44px;
    padding: 11px 14px;
    font-size: 12px;
  }

  .homepage .hero-foot {
    padding-top: 16px;
    font-size: 10px;
    line-height: 1.6;
  }

  .collection-page {
    padding-block: 28px 50px;
  }

  .collection-page .section-heading h1 {
    font-size: 34px;
    letter-spacing: -1.3px;
  }

  .experiments-heading h1 {
    font-size: 34px;
    letter-spacing: -1.3px;
  }

  .experiments-heading p {
    font-size: 15px;
  }

  .analysis-card {
    padding: 24px;
  }

  .analysis-card h2 {
    margin-top: 24px;
    font-size: 29px;
  }

  .about-page {
    padding-block: 28px 50px;
  }

  .about-page h1 {
    font-size: 37px;
    letter-spacing: -1.4px;
  }

  .about-page > p {
    font-size: 16px;
  }
}

@media (max-width: 380px) {
  .site-header .wordmark {
    font-size: 20px;
  }

  .site-header .wordmark-fyi {
    font-size: 12px;
  }

  .site-header nav {
    gap: 10px;
    font-size: 10.5px;
  }

  .site-header .section-nav {
    gap: 10px;
  }

  .hero-content {
    padding-block: 12px;
  }

  .homepage .hero h1 {
    margin-bottom: 18px;
  }

  .homepage .hero-bottom {
    gap: 18px;
  }
}
