/* Models page: developer hero, the live catalogue, the API quick start, cloud supply and the closing CTA.
   Catalogue rows live in catalog.css; tokens, buttons and dark bands in base.css. */
.models-hero {
  padding: calc(var(--header-h) + clamp(48px, 7vw, 96px)) var(--gutter) clamp(40px, 5vw, 64px);
}
.models-hero h1 {
  max-width: 16ch;
  margin-top: 16px;
  /* Same scale as the tool and pricing heroes. */
  font-size: clamp(2.1rem, 1.5rem + 3vw, 4rem);
}
.models-lede {
  max-width: 38em;
  margin: 20px 0 0;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  color: var(--muted);
}
.models-lede a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em;
}
.models-lede a:hover {
  color: var(--accent-ink);
  text-decoration-color: currentColor;
}
.models-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.catalog-section,
.supply-section {
  padding: var(--section-space) var(--gutter);
}
.catalog-section {
  padding-top: clamp(24px, 3vw, 40px);
}
.supply-section {
  border-top: 1px solid var(--line);
}
.section-heading {
  margin-bottom: var(--heading-gap);
}
.section-heading h2 {
  margin-top: 12px;
}
.section-heading p:not(.eyebrow) {
  max-width: 34em;
  margin: 16px 0 0;
  color: var(--muted);
}
.section-heading a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------------ API quick start */
.api-section {
  padding: var(--section-space) var(--gutter);
}
.api-section::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(70% 45% at 50% 0%, rgba(255, 236, 214, 0.06), transparent 75%);
}
.api-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.api-section .section-heading {
  margin: 0;
}
.api-section .section-heading p:not(.eyebrow) {
  color: var(--night-muted);
}
.api-section code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--night-fg);
}

.code {
  overflow: hidden;
  background: var(--night-2);
  border: 1px solid var(--night-line);
  border-radius: 12px;
}
.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--night-line);
}
.code-tabs {
  display: flex;
  gap: 2px;
  padding: 6px;
}
.code-tab {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--night-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.code-tab[aria-selected='true'] {
  background: rgba(255, 255, 255, 0.1);
  color: var(--night-fg);
}
.copy-code {
  padding: 10px 14px;
  border: 0;
  background: none;
  color: var(--night-muted);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.copy-code:hover {
  color: var(--night-fg);
}
/* Fits the longest sample (Python, 19 lines), so no tab is cut and switching keeps the height. */
.code pre {
  height: 28.75rem;
  margin: 0;
  padding: 18px 18px 20px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #3a3a40 transparent;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--night-fg);
}
/* The card clips what lies outside it, and a sample's long lines scroll under its edge, so a focused
   sample rings the whole card. Without :has() the ring stays inside the sample's own edge. */
.code pre:focus-visible {
  outline-offset: -2px;
}
.code:has(> pre:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.code:has(> pre:focus-visible) > pre {
  outline: none;
}
.code .k {
  color: #c9b8f0;
}
.code .s {
  color: var(--night-accent);
}
.code .c {
  color: var(--night-faint);
}
.code .n {
  color: #9fc3e6;
}
.section-details {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.section-details summary {
  width: fit-content;
  min-height: 28px;
  font-size: 13px;
  cursor: pointer;
}
.section-details p {
  margin: 12px 0 0;
}
.code-note.section-details {
  margin: 0;
  padding: 12px 18px;
  border-top: 1px solid var(--night-line);
  color: var(--night-muted);
}
.code-note code {
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ supply */
.supply-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.supply-layout > .section-heading {
  margin: 0;
}
.suppliers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-block: 1px solid var(--line);
}
.supplier {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 0;
  min-height: 140px;
  padding: 24px 8px;
}
.supplier:nth-child(n + 4) {
  border-top: 1px solid var(--line);
}
.supplier:not(:nth-child(3n))::after {
  content: '';
  position: absolute;
  right: 0;
  top: 24px;
  bottom: 24px;
  width: 1px;
  background: var(--line);
}
.supplier__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
}
.supplier__logo {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.supplier__logo--aws {
  width: 62px;
  height: 38px;
}
.supplier__logo--microsoft {
  width: 34px;
  height: 34px;
}
.supplier__logo--tencent {
  width: 44px;
  height: 32px;
}
.supplier__logo--alibaba {
  width: 46px;
  height: 30px;
}
.supplier__name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: center;
}

/* ------------------------------------------------------------------ closing */
.cta {
  padding: clamp(80px, 11vw, 148px) var(--gutter) clamp(64px, 8vw, 104px);
}
.cta-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}
/* Same scale as the closing headings on the other pages. */
.cta h2 {
  max-width: 14em;
  font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.75rem);
}

@media (max-width: 900px) {
  .api-layout,
  .supply-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .code-tab {
    height: 40px;
    padding-inline: 10px;
  }
  .copy-code {
    padding-inline: 10px;
  }
  .section-details summary {
    min-height: 40px;
    padding-block: 10px;
  }
  .suppliers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .supplier {
    min-height: 124px;
  }
  .supplier:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .supplier::after {
    display: none;
  }
  .supplier:nth-child(odd)::after {
    display: block;
    content: '';
    position: absolute;
    right: 0;
    top: 20px;
    bottom: 20px;
    width: 1px;
    background: var(--line);
  }
  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
