/* HeyHi design system: product cards and the previews drawn from config/products.yml. */

/* ---------- Product grid and cards ---------- */
/* Any number of products: featured ones take a full row, the rest fill columns. */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.product-grid > .product-card--featured { grid-column: 1 / -1; }

.product-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; min-width: 0;
  border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
  overflow: hidden; transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s;
}
.product-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 26px 60px -30px rgba(0, 8, 20, 0.45); }
.band--day .product-card { box-shadow: 0 1px 2px rgba(5, 26, 48, 0.04); }
.band--day .product-card:hover { box-shadow: 0 1px 2px rgba(5, 26, 48, 0.05), 0 26px 60px -30px rgba(5, 26, 48, 0.3); }
.product-card__viz { display: block; padding: 18px 18px 0; text-decoration: none; }
.product-card__body { display: grid; gap: 10px; align-content: start; padding: 22px 24px 24px; min-width: 0; }
.product-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-card__category { font-family: var(--font-mono); font-stretch: var(--mono-w); font-size: 11.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.product-card__name { font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.6rem); font-stretch: 108%; font-weight: 720; letter-spacing: -0.025em; line-height: 1.12; }
.product-card__name a { color: var(--fg); text-decoration: none; }
.product-card__name a::after { content: ""; position: absolute; inset: 0; z-index: 0; } /* the whole card opens the product */
.product-card__tagline { font-size: 16px; line-height: 1.5; color: var(--fg); }
.product-card__summary { font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 40em; }
.product-card__actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 8px; }
.product-card__more { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 620; color: var(--fg); text-decoration: none; }
.product-card__more .icon { transition: transform 0.25s var(--ease); }
.product-card__more:hover .icon { transform: translateX(3px); }

/* Tiles: cards of words, for a full list of any length. Three across on wide screens, two on tablets, one on phones;
   a card left alone on the last row takes the whole row. */
.product-grid--tiles { grid-template-columns: minmax(0, 1fr); }
.product-card--tile { grid-template-rows: 1fr; }
.product-card--tile .product-card__body { display: flex; flex-direction: column; padding: 26px 26px 24px; gap: 12px; }
.product-card--tile .product-card__actions { margin-top: auto; padding-top: 10px; }
@media (min-width: 640px) {
  .product-grid--tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid--tiles > :last-child:nth-child(2n+1) { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .product-grid--tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid--tiles > :last-child:nth-child(2n+1) { grid-column: auto; }
  .product-grid--tiles > :last-child:nth-child(3n+1) { grid-column: 1 / -1; }
  .product-grid--tiles > :last-child:nth-child(3n+2) { grid-column: span 2; }
}

/* A featured product: preview beside the text on wide screens */
@media (min-width: 900px) {
  .product-card--featured { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: none; align-items: center; }
  .product-card--featured .product-card__viz { padding: 22px 0 22px 22px; }
  .product-card--featured .product-card__body { padding: 32px 36px; gap: 14px; }
  .product-card--featured .product-card__name { font-size: clamp(1.8rem, 1.2rem + 1.4vw, 2.5rem); }
}

/* ---------- Previews: always dark glass ---------- */
.preview {
  margin: 0; min-width: 0; border-radius: 14px; padding: 14px 16px 16px;
  background: linear-gradient(180deg, var(--night-700), var(--night-850));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 0 1px rgba(0, 19, 42, 0.5);
}
.preview--large { padding: 18px 20px 22px; border-radius: var(--r-lg); }
.preview__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 12px; }
.preview__bar .ui-label { white-space: nowrap; }
/* Every preview is a made-up example, and says so */
.preview__example {
  padding: 2px 7px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-stretch: var(--mono-w); font-size: 10.5px; letter-spacing: 0.06em; color: var(--muted);
}
.preview__meta { flex-basis: 100%; }
.preview__meta { font-family: var(--font-mono); font-stretch: var(--mono-w); font-size: 11px; color: var(--muted); }

/* Call: a waveform over the transcript */
.preview-call { display: grid; gap: 10px; }
.preview-call__wave { display: flex; align-items: center; gap: 3px; height: 30px; padding: 0 4px; }
.preview-call__bar { flex: 1; height: 30%; border-radius: 2px; background: var(--signal); opacity: 0.85; }
.preview-call__bar:nth-child(n+12) { background: var(--voice); }
.preview-call__bar--0 { height: 30%; } .preview-call__bar--1 { height: 70%; } .preview-call__bar--2 { height: 45%; }
.preview-call__bar--3 { height: 95%; } .preview-call__bar--4 { height: 55%; } .preview-call__bar--5 { height: 80%; }
.preview-call__bar--6 { height: 38%; }
.preview-call__lines { list-style: none; display: grid; gap: 8px; }
.preview-call__line { display: grid; gap: 3px; padding: 10px 12px; border-radius: var(--r-sm); background: rgba(140, 180, 230, 0.05); border: 1px solid var(--line); }
.preview-call__who { font-family: var(--font-mono); font-stretch: var(--mono-w); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal); }
.preview-call__line--ai .preview-call__who { color: var(--voice); }
.preview-call__text { font-size: 14px; line-height: 1.45; color: var(--fg); }
.preview--large .preview-call__text { font-size: 15.5px; }

/* Checklist: items with their due dates */
.preview-checklist { list-style: none; display: grid; }
.preview-checklist__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.preview-checklist__item:last-child { border-bottom: 0; padding-bottom: 2px; }
.preview-checklist__label { font-size: 14px; font-weight: 600; color: var(--fg); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-checklist__item .chip { grid-row: span 2; }
.preview-checklist__note { grid-column: 1; font-family: var(--font-mono); font-stretch: var(--mono-w); font-size: 11px; color: var(--faint); }

/* Pipeline: one bar per stage, drawn to scale */
.preview-pipeline { list-style: none; display: grid; gap: 11px; }
.preview-pipeline__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; align-items: baseline; }
.preview-pipeline__label { font-size: 13.5px; color: var(--muted); }
.preview-pipeline__value { font-size: 14px; font-weight: 650; color: var(--fg); }
.preview-pipeline__bar { grid-column: 1 / -1; display: block; width: 100%; height: 6px; border-radius: 3px; overflow: hidden; }
.preview-pipeline__track { fill: rgba(150, 192, 240, 0.12); }
.preview-pipeline__fill { fill: var(--voice); }
.preview-pipeline__row--last .preview-pipeline__fill { fill: var(--signal); }
.preview-pipeline__row--last .preview-pipeline__label { color: var(--fg); font-weight: 600; }

/* Chart: a line with its points, the latest in amber */
.preview-chart { display: grid; gap: 6px; }
.preview-chart__svg { display: block; width: 100%; height: auto; overflow: visible; }
.preview-chart__base { stroke: var(--line); stroke-width: 1; }
.preview-chart__area { fill: color-mix(in srgb, var(--voice) 12%, transparent); }
.preview-chart__line { fill: none; stroke: var(--voice); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.preview-chart__point { fill: var(--night-850); stroke: var(--voice); stroke-width: 2; }
.preview-chart__point--now { fill: var(--signal); stroke: var(--night-850); }
.preview-chart__legend { display: flex; justify-content: space-between; align-items: baseline; }
.preview-chart__legend .mono { font-size: 11px; color: var(--faint); }
.preview-chart__now { font-size: 15px; font-weight: 700; color: var(--fg); }
