/*
  Products section ("Our Product Suite").
  Source: Figma node 3:173 (desktop 1440 × 1925).

  Three product groups stacked vertically: Computing, Sensing, Cores.
  Each group has an intro (title + description) and a row of product cards.
  Cards use the hairline-grid pattern (1px gap + bg color) to draw dividers
  between adjacent cards; outer border + rounded corners on the row.

  Card images use object-fit: contain so editors can swap in any product
  photo via ACF and have it render predictably inside the dark frame.
*/

.products {
  padding-block: var(--section-padding-block);
}

.products__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-inline);
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

/* ---------------------------------------------------------------
   Section header (same pattern as why-infleqtion)
   --------------------------------------------------------------- */
.products__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.products__eyebrow {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-eyebrow);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--color-text-heading);
  margin: 0;
}

.products__eyebrow-slash {
  color: var(--color-green-2);
  margin-right: 0.25em;
}

.products__heading-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  align-items: start;
}

.products__heading {
  font-family: var(--font-family-display);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-regular);
  line-height: 1.2;
  margin: 0;
  color: var(--color-text-heading);
}

.products__heading-accent {
  color: var(--color-green-2);
  font-weight: var(--font-weight-semibold);
}

.products__subheading {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body-lg);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-loose);
  color: var(--color-text-body);
  margin: 0;
}

@media (min-width: 900px) {
  .products__heading-row {
    grid-template-columns: 706fr 585fr;
    column-gap: clamp(var(--space-7), 8vw, 150px);
  }
}

/* ---------------------------------------------------------------
   Product groups
   --------------------------------------------------------------- */
.products__suites {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

.products__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.products__group-intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-4_5);
}

.products__group-title {
  font-family: var(--font-family-display);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-medium);
  line-height: 32px;
  margin: 0;
  color: var(--color-black);
}

.products__group-description {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: 1.5;
  color: var(--color-text-body);
  margin: 0;
}

/* ---------------------------------------------------------------
   Cards row
   --------------------------------------------------------------- */
.products__cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  background-color: var(--color-background);
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
  overflow: hidden;
}

/* Single-card group (Cores): full width at narrow viewports
   (matches the 3-card groups stacking to 1 column), shrinks to 480px
   left-aligned at 900px+ (when 3-card groups become 3 columns). */
.products__cards[data-count="1"] {
  width: 100%;
}

.products__cards > li {
  display: flex; /* make the inner card fill its flex item */
}

/* ---------------------------------------------------------------
   Individual card
   --------------------------------------------------------------- */
.products__card {
  background-color: var(--color-background);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-7); /* 32px */
  width: 100%;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 0 0 1px var(--color-card-border);
  transition: background-color 0.22s ease-out, color 0.22s ease-out;
}

/* Hover: the whole card flips white → navy. Name + detail go white and the
   image gains a 1px white ring. Scoped to <a> so non-link cards don't flip. */
a.products__card:hover,
a.products__card:focus-visible {
  background-color: var(--color-navy-blue);
  color: var(--color-text-on-dark);
}

a.products__card:hover .products__card-name,
a.products__card:focus-visible .products__card-name,
a.products__card:hover .products__card-detail,
a.products__card:focus-visible .products__card-detail {
  color: var(--color-text-on-dark);
}

a.products__card:hover .products__card-image,
a.products__card:focus-visible .products__card-image {
  box-shadow: 0 0 0 1px var(--color-text-on-dark);
}

.products__card-image {
  position: relative;
  height: 222px;
  background-color: var(--color-navy-blue);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.22s ease-out;
}

.products__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* SVG images: white panel + contain so the mark is never cropped. */
.products__card-image--svg {
  background-color: #fff;
  padding: 24px;
}

.products__card-image--svg img {
  object-fit: contain;
}

.products__card-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.products__card-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Optional green category eyebrow that sits above the card name (used
   by Industry Use Case Highlights on the Roadmap page; absent on the
   home/products page, so the rule is a no-op there). When present the
   eyebrow gets its own 16px gap before the name+detail block — this is
   handled by the eyebrow's bottom margin so we don't touch the existing
   card-text gap rule. */
.products__card-eyebrow {
  margin: 0 0 var(--space-4_5) 0;
  font-family: var(--font-family-sans);
  font-size: var(--font-size-eyebrow);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-wide);
  line-height: 0.93;
  text-transform: uppercase;
  color: var(--color-green-2);
}

.products__card-name {
  font-family: var(--font-family-display);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-card-title);
  color: var(--color-text-heading);
  margin: 0;
  transition: color 0.22s ease-out;
}

.products__card-detail {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: 1.5;
  color: var(--color-text-body);
  margin: 0;
  transition: color 0.22s ease-out;
}

/* ---------------------------------------------------------------
   At 900px+, multi-card groups switch to a CSS grid.
   Column count is driven by data-count so no empty cells show.
   data-count="1" keeps the Cores card at 480px, left-aligned.
   --------------------------------------------------------------- */
@media (min-width: 900px) {
  .products__cards:not([data-count="1"]) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .products__cards:not([data-count="1"]) > li {
    min-width: 0;
  }

  .products__cards[data-count="1"] {
    width: 480px; /* matches one column-width of the 3-card groups */
  }

  /* 2-card rows (e.g. related-products "Complete the Setup"): tighten
     the card side padding so the description stays within its 2-line
     limit at wider viewports. */
  .products__cards[data-count="2"] .products__card {
    padding-inline: var(--space-6);
  }
}

/* A max-length 2-card description (~155 chars) can't fit its 2-line target
   at 16px in the ~550-680px card content column across typical desktop
   widths. Step the description down (14px) at ≥900 so related-products
   cards honour the Content Doc line limit at every laptop/desktop width
   from 900 through the 1600 design frame. */
@media (min-width: 900px) {
  .products__cards[data-count="2"] .products__card-detail {
    font-size: var(--font-size-sm);
  }
}

/* Page-specific overrides --------------------------------------- */

/* Page 7206: image height unconstrained so tall images show in full. */
.page-id-7206 .products__card-image {
  height: auto;
}

/* ---------------------------------------------------------------
   Scroll-driven reveal
   Each group reveals as one unit: the intro fades up first, then the
   cards-ul (.reveal) fades + slides up with all its cards together (no
   per-card stagger — the <li>s are not individually .reveal).
   --------------------------------------------------------------- */
