/* Site v2 use-case pages: pages/_usecase.html (one use case) and pages/_usecase_group.html
   (a group of use cases, and the foundation-models catalogue). The page is built from the shared
   hero and plate, head, cells and cell links, points, checks, feature rows and gallery; this file
   only sizes the use-case pieces and picks grid columns that leave no card alone on a row.
   Colours from tokens.css only. */

.v2-uc-cap {
  text-transform: capitalize;
}

/* ---------- Hero: the BACK link (base.css) keeps its row tight ---------- */
.v2-uc-hero .v2-back {
  margin-block: calc(var(--space-2) * -1);
}
/* The artwork at the plate's full inner height, with the group badge on its top-left corner. */
.v2-uc-art {
  position: relative;
  display: block;
  height: 100%;
}
.v2-plate .v2-uc-art__img {
  width: auto;
  height: 100%;
  max-width: none;
}
.v2-plate .v2-uc-art__badge {
  position: absolute;
  top: -4%;
  left: -4%;
  width: 24%;
  height: auto;
  max-width: none;
  border-radius: 50%;
  box-shadow:
    0 0 0 3px var(--paper),
    var(--shadow-float);
}

/* ---------- Overview: the web_use_case paragraph beside its points ---------- */
.v2-uc-overview {
  display: grid;
  gap: var(--space-8);
}
.v2-uc-overview__text {
  display: grid;
  gap: var(--space-5);
}
.v2-uc-overview.is-text-only .v2-uc-overview__text {
  max-width: var(--read);
}
/* Round 4's use-case rows: a hairline over each point. */
.v2-uc-points {
  gap: 0;
}
.v2-uc-points li {
  padding-block: var(--space-4);
  box-shadow: inset 0 1px var(--rule);
}
@media (min-width: 1024px) {
  .v2-uc-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(40px, 6vw, 80px);
    align-items: start;
  }
  .v2-uc-overview.is-text-only {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- ChatLLM research (feature rows) ---------- */
.v2-uc-tile {
  display: block;
  aspect-ratio: 16 / 10;
}
.v2-uc-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
}

/* ---------- Enterprise Gen AI examples (in .v2-cells--text) ---------- */
.v2-uc-example {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}
.v2-uc-example__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-3);
  object-fit: contain;
}
/* Twelve examples stack on phones: the icon moves beside the copy to keep the list short. */
@media (max-width: 719px) {
  .v2-cells--text > .v2-uc-example {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: var(--space-1) var(--space-4);
    padding: var(--space-5);
  }
  .v2-uc-example__icon {
    grid-row: span 2;
    width: 40px;
    height: 40px;
    margin-bottom: 0;
  }
}

/* ---------- Vector Store pricing ---------- */
.v2-uc-pricing {
  min-width: 640px;
}
.v2-uc-pricing tbody th {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}
.v2-uc-pricing td:nth-child(2) {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.v2-uc-note {
  margin-top: var(--space-4);
}

/* ---------- Benefits: pillar cards, as many columns as the count needs ---------- */
@media (min-width: 720px) {
  .v2-uc-benefits--1 {
    grid-template-columns: minmax(0, 1fr);
  }
  .v2-uc-benefits--1 > .v2-point {
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: var(--space-5);
    align-items: center;
  }
  .v2-uc-benefits--1 > .v2-point > .v2-icon-tile {
    grid-row: span 2;
    margin-bottom: 0;
  }
}
@media (min-width: 720px) and (max-width: 1023px) {
  .v2-uc-benefits > .v2-point:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
@media (min-width: 1024px) {
  .v2-uc-benefits--3,
  .v2-uc-benefits--5,
  .v2-uc-benefits--6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Four sit two by two until the column is wide enough for four roomy cards. */
@media (min-width: 1200px) {
  .v2-uc-benefits--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Group: the use-case cards (and the foundation-model categories) ---------- */
.v2-uc-solution {
  gap: var(--space-4);
  align-content: start;
  padding: var(--space-6);
}
.v2-uc-solution__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
}
.v2-uc-solution__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 84%;
  margin: auto;
  object-fit: contain;
}
.v2-uc-solution__name {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.v2-uc-solution__name .v2-h3 {
  min-width: 0;
  overflow-wrap: break-word;
}
.v2-uc-solution__name svg {
  flex: none;
  margin-top: 5px;
}
/* The catalogue's category cards jump down the page: their chevron moves down. */
.v2-uc-solutions--5 .v2-cell-link:hover .v2-icon {
  transform: translateY(3px);
}
/* Phones: one card per row, the artwork beside the name. */
@media (max-width: 719px) {
  .v2-uc-solutions {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
  }
  .v2-uc-solution {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
  }
  .v2-uc-solution__media {
    aspect-ratio: 1;
  }
  .v2-uc-solution__media img {
    height: 100%;
  }
  .v2-uc-solution__name {
    align-items: center;
  }
  .v2-uc-solution__name svg {
    margin-top: 0;
  }
}
/* Four use cases sit two by two on tablets rather than three and one. */
@media (min-width: 720px) and (max-width: 1023px) {
  .v2-uc-solutions.v2-cells--4:not(.v2-uc-solutions--5) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .v2-uc-solutions--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* ---------- Foundation-model catalogue ---------- */
.v2-uc-fm {
  display: grid;
  gap: var(--section);
  margin-top: var(--section);
}
.v2-uc-model {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}
.v2-uc-model__icon {
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-3);
  object-fit: contain;
}
.v2-uc-model .v2-uc-list {
  display: grid;
  gap: var(--space-2);
  padding-left: 1.1em;
  list-style: disc;
}
.v2-uc-list li::marker {
  color: var(--subtle);
}
/* Tablets hold two cards a row: an odd last card takes the whole row. */
@media (min-width: 720px) and (max-width: 1023px) {
  .v2-uc-fm .v2-cells--text > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
