/*
 * Product page layout.
 *
 * Loaded only by the pages the CMS renders, on top of css/site.css. It lives in
 * its own file with its own cache buster so the product pages can change shape
 * without invalidating the stylesheet every other page on the site links, and
 * without touching the 78 files that carry that link.
 *
 * Everything here builds on tokens and components that already exist. The hero
 * grid, the buttons, the eyebrow and the cards are the site's; what is added is
 * the accent on the headline, the figure beside it, and the shapes a product
 * page needs that no other page on the site does.
 */

/* ── Hero ── */

/* One phrase per page is lifted out of the title in the platform blue, which is
 * what makes a product page read as a headline rather than as a sentence.
 * Italic because weight alone does not separate it from a heading that is
 * already bold. */
.product-hero__accent {
  color: var(--primary);
  font-style: italic;
}

.product-hero__title {
  font-size: clamp(2.6rem, 5.2vw, 4.15rem);
  max-width: 20ch;
}

/* The painted character from the platform canvas, so a visitor arriving from
 * the canvas meets the figure they just clicked.
 *
 * The height is a named knob because it is about to matter. Today's figures are
 * torsos cut out of the group tableau, where the head is 29% of the height. The
 * full-length replacements put the head at about 13%, so holding this at 30rem
 * would render the face at under half its current size, and the face is what
 * ties this page back to the canvas. Raise it when the new art lands.
 * See assets/council2/reference/figure-prompts.md. */
.product-hero__figure {
  --product-figure-height: 30rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 1rem;
}

.product-hero__figure img {
  width: auto;
  max-width: 100%;
  max-height: var(--product-figure-height);
  object-fit: contain;
  /* Grounds the cut-out so it does not float on the page background. */
  filter: drop-shadow(0 32px 40px rgba(27, 28, 28, 0.16));
}

/* ── Cards ── */

.capability-card__icon {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 1.25rem;
  color: var(--primary);
}

.capability-card__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.capability-grid,
.audience-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.25rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Audiences are read side by side and compared, so they hold their columns
 * rather than reflowing to whatever fits. */
.audience-cards {
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.capability-card__title {
  margin-bottom: 0.65rem;
  font-family: var(--heading);
  font-size: 1.05rem;
  font-weight: 700;
}

.capability-card__body {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--on-surface-variant);
}

.product-why__intro {
  max-width: 46rem;
  /* Tight between the paragraphs of the lede, open before the cards below it. */
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--on-surface-variant);
}

.product-why__intro:last-of-type {
  margin-bottom: 2.5rem;
}

.product-note {
  max-width: 52rem;
  margin: 2rem auto 0;
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  background: var(--surface-container-low);
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--on-surface-variant);
  text-align: center;
}

/* ── Ordered steps ── */

.product-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.25rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  /* The ordinal is rendered as text and marked aria-hidden, so the list still
   * has to be an <ol> for the order to reach a screen reader. */
  counter-reset: none;
}

.product-steps__item {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(194, 198, 214, 0.15);
  background: var(--surface-container-lowest);
  box-shadow: 0 24px 48px -12px rgba(27, 28, 28, 0.04);
}

.product-steps__index {
  flex-shrink: 0;
  min-width: 2.5rem;
  padding: 0.35rem 0;
  border-radius: 0.55rem;
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary-dark);
  font-family: var(--heading);
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* ── Pricing ── */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.5rem;
  max-width: 60rem;
  margin: 0 auto;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.pricing-card--featured {
  border-color: rgba(59, 130, 246, 0.45);
}

.pricing-card__badge {
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.85rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--heading);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.pricing-card__name {
  margin-bottom: 0.75rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.pricing-card__price {
  font-family: var(--heading);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.pricing-card__period {
  margin-left: 0.25rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--on-surface-variant);
}

/* A plan whose price is not published yet. It reads as a deliberate statement
 * rather than as a missing number. */
.pricing-card__price-note {
  font-family: var(--heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}

.pricing-card__audience {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--on-surface-variant);
}

.pricing-card__features {
  margin: 1.75rem 0 2rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.pricing-card__feature {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.6rem;
  align-items: start;
  font-size: 0.9rem;
  line-height: 1.6;
}

.pricing-card__feature span {
  color: var(--primary);
  font-weight: 700;
}

.pricing-card__feature--out {
  color: #94a3b8;
}

.pricing-card__feature--out span {
  color: #94a3b8;
}

.pricing-card__cta {
  margin-top: auto;
  justify-content: center;
  text-align: center;
}

/* ── Closing ── */

.product-cta {
  max-width: 60rem;
  margin: 0 auto;
  padding: 4rem 2rem;
  border-radius: 0.9rem;
  background: var(--surface-container-lowest);
  border: 1px solid rgba(194, 198, 214, 0.15);
  box-shadow: 0 24px 48px -12px rgba(27, 28, 28, 0.05);
  text-align: center;
}

.product-cta .section-subtitle {
  margin: 1rem auto 2rem;
  max-width: 38rem;
}

/* ── Footer ── */

/* The footer copy is the site's, unchanged. These rules only rule a line above
 * it and between its two halves, which is what separates the end of the page
 * from the end of the site. */
.product-page .footer {
  border-top: 1px solid rgba(194, 198, 214, 0.35);
}

.product-page .footer__bottom {
  border-top: 1px solid rgba(194, 198, 214, 0.35);
  margin-top: 3rem;
  padding-top: 2rem;
}

/* ── Narrow ── */

@media (max-width: 1100px) {
  /* The hero is one column here, and a portrait figure under the copy pushes
   * everything below it off the first screen for no gain. */
  .product-hero__figure {
    display: none;
  }

  .product-hero__title {
    max-width: none;
  }
}
