/* APIs — dense reference material within the shared HUMMBL editorial shell. */
.apis-layout {
  padding-top: 72px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(48px, 7vw, 110px);
}

.api-sidebar {
  align-self: start;
  position: sticky;
  top: 112px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.api-sidebar nav {
  padding-left: 22px;
  border-left: 1px solid var(--border-strong);
}

.sidebar-title,
.sidebar-group {
  margin: 0;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-group {
  margin-top: 26px;
  color: var(--muted);
}

.sidebar-link {
  padding: 6px 0;
  display: block;
  color: #2d463a;
  font-size: 13px;
  text-decoration: none;
}

.sidebar-link:hover {
  color: var(--green);
}

.api-content {
  min-width: 0;
}

.api-hero {
  min-height: 610px;
  padding: 40px 0 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.api-hero h1 {
  max-width: 980px;
  margin: 20px 0 0;
  font-size: clamp(58px, 6.8vw, 100px);
  font-weight: 730;
  letter-spacing: -0.06em;
  line-height: 0.93;
}

.api-hero h1 span {
  color: var(--green-bright);
}

.api-hero .lede {
  max-width: 850px;
  margin: 34px 0 0;
  color: #34483f;
  font-size: clamp(19px, 1.6vw, 24px);
  line-height: 1.55;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta {
  margin: 34px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.8;
}

.hero-meta code,
.hero-meta a {
  color: #12643c;
}

.api-family,
.api-resources {
  padding: 92px 0;
  border-top: 1px solid var(--border-strong);
}

.family-heading {
  max-width: 820px;
  margin: 0;
  color: var(--forest);
  font-size: clamp(40px, 4.5vw, 66px);
  letter-spacing: -0.05em;
  line-height: 1;
}

.family-blurb {
  max-width: 780px;
  margin: 24px 0 44px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

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

.api-card {
  min-height: 270px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.api-card:hover {
  transform: translateY(-3px);
  border-color: var(--green);
  box-shadow: var(--shadow);
}

.api-card h3 {
  margin: 0 0 18px;
  color: var(--forest);
  font-size: 27px;
  letter-spacing: -0.035em;
}

.api-card p {
  margin: 0 0 30px;
  color: var(--muted);
  line-height: 1.65;
}

.card-tag {
  margin-top: auto;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 650;
}

.api-foot {
  margin-top: 16px;
  padding: 36px 0 4px;
  border-top: 1px solid var(--border-strong);
  color: var(--muted);
}

.api-foot a {
  color: #12643c;
}

@media (max-width: 1000px) {
  .apis-layout {
    padding-top: 36px;
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .api-sidebar {
    position: relative;
    top: auto;
    max-height: none;
    overflow-x: auto;
  }

  .api-sidebar nav {
    width: max-content;
    min-width: 100%;
    padding: 0 0 16px;
    display: flex;
    gap: 18px;
    border-left: 0;
    border-bottom: 1px solid var(--border-strong);
  }

  .sidebar-title,
  .sidebar-group {
    display: none;
  }

  .sidebar-link {
    flex-shrink: 0;
  }

  .api-hero {
    min-height: 520px;
    padding-top: 0;
  }
}

@media (max-width: 760px) {
  .api-hero {
    min-height: 0;
    padding: 18px 0 70px;
  }

  .api-hero h1 {
    font-size: clamp(50px, 15vw, 72px);
  }

  .hero-cta .button {
    width: 100%;
  }

  .api-family,
  .api-resources {
    padding: 70px 0;
  }

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

  .api-card {
    min-height: 240px;
  }
}
