/* What Flowella connects to, ported from the phase 2 /integrations concept (ig-list): HubSpot featured on the Mint
   Field with a sample record beside it, then what is built into Flowella, then what is coming. The cards are the
   theme's .card, .card-sheet, .card-field and .card-link, and the record is .crm-rec (styles/components.css).
   Logical properties throughout, so Arabic (dir="rtl") mirrors. */

/* HubSpot: the one integration, on the mint field, with what lands on the record beside it */
.ig-hub {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(28px, 4vw, 64px); align-items: center;
  margin-top: clamp(32px, 4vw, 52px);
  padding: clamp(22px, 3.6vw, 52px);
  border-radius: var(--r-xl);
  background: var(--field-mint);
}
.ig-hub-copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; justify-items: start; min-width: 0; }
.ig-hub-name { display: flex; align-items: center; gap: 14px; }
.ig-logo { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--logo-bg); box-shadow: var(--shadow-xs); }
.ig-logo img { width: 26px; height: 26px; }
.ig-hub-name h3 { font: 800 clamp(1.7rem, 1.3rem + 1vw, 2.2rem)/1.1 var(--display); letter-spacing: -0.02em; }
.ig-hub-text { max-width: 54ch; font-size: clamp(1.04rem, 1rem + 0.2vw, 1.14rem); line-height: 1.55; color: var(--ink-soft); text-wrap: pretty; }
.ig-hub-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; width: 100%; }
.ig-hub-points li { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.ig-hub-points b { display: block; font: 800 15px/1.3 var(--text); }
.ig-hub-points small { display: block; margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.ig-hub-ic { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--sheet-bg); color: var(--ink); box-shadow: var(--shadow-xs); }
.ig-hub-ic .i { width: 18px; height: 18px; }
.ig-hub-plan { display: flex; align-items: flex-start; gap: 10px; max-width: 62ch; font-size: 14px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.ig-hub-plan .i { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--accent-ink); }
.ig-hub-cta { max-width: 100%; margin-top: 4px; white-space: normal; text-wrap: balance; }
/* The record sits on a small tilt; the chapter's one sticker rides its top corner, in its own room */
.ig-hub-art { position: relative; min-width: 0; padding-top: 46px; }
.ig-rec { rotate: 1.4deg; }
[dir="rtl"] .ig-rec { rotate: -1.4deg; }
.ig-rec .crm-rec-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.ig-rec .crm-rec-row dt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ig-rec-h { padding: 4px 18px 2px; font: 700 13px/1.2 var(--text); color: var(--ink-soft); }
.ig-rec-acts { display: grid; padding: 4px 12px 12px; }
.ig-rec-acts li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 52px; padding: 6px; border-top: 1px solid var(--line); }
.ig-rec-acts li:first-child { border-top-color: transparent; }
.ig-rec-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--logo-bg); box-shadow: var(--shadow-xs); }
.ig-rec-ic img { width: 14px; height: 14px; }
.ig-rec-acts b { display: block; font: 800 14px/1.3 var(--text); }
.ig-rec-acts small { display: block; font-size: 12.5px; line-height: 1.35; color: var(--ink-soft); overflow-wrap: anywhere; }
.ig-rec-acts time { font: 500 12px/1.2 var(--mono); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ig-hub-sticker { position: absolute; z-index: 2; top: 0; inset-inline-end: 14px; --rot: 4deg; }
[dir="rtl"] .ig-hub-sticker { --rot: -4deg; }

/* The other cards, in groups; repeated cards share their rows, so titles, text and links line up */
.ig-group-h { margin-top: clamp(44px, 5vw, 64px); font: 800 1.3rem/1.25 var(--text); letter-spacing: -0.01em; }
.ig-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); margin-top: 18px; }
.ig-card { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 12px; align-content: start; }
/* Coming soon cards lie flat: the logo on the start side, the name and its pill on one row, the link at the foot */
.ig-cards-soon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ig-cards-soon .ig-card {
  grid-row: auto; grid-template-rows: auto 1fr auto;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  grid-template-areas: "ic title tag" "ic text text" "ic cta cta";
  column-gap: 18px; row-gap: 8px;
}
.ig-cards-soon .ig-card-ic { grid-area: ic; }
.ig-cards-soon .card-title { grid-area: title; align-self: center; }
.ig-cards-soon .ig-card-soon { grid-area: tag; align-self: center; }
.ig-cards-soon .card-text { grid-area: text; }
.ig-cards-soon .card-cta { grid-area: cta; margin-top: 4px; }
@supports not (grid-template-rows: subgrid) {
  .ig-card { display: flex; }
}
.ig-card-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; box-shadow: var(--shadow-xs); }
.ig-card-ic .i { width: 26px; height: 26px; }
.ig-card-ic.is-wa { background: var(--green); color: var(--on-bright); }
.ig-card-ic.is-ads { background: var(--coral); color: var(--on-bright); }
.ig-card-ic.is-api { background: var(--ink); color: var(--ground); }
.ig-card-ic.is-standalone { background: var(--sky); color: var(--on-bright); }
.ig-card-ic.is-logo { background: var(--logo-bg); }
.ig-card-ic.is-logo img { width: 30px; height: 30px; border-radius: 6px; }
.ig-card .card-cta { align-self: end; color: var(--accent-ink); }
.ig-card-soon { justify-self: start; align-self: start; }

/* Responsive */
@media (max-width: 1199px) {
  .ig-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .ig-hub { grid-template-columns: minmax(0, 1fr); }
  .ig-hub-art { max-width: 520px; width: 100%; justify-self: center; }
}
@media (max-width: 719px) {
  .ig-cards, .ig-cards-soon { grid-template-columns: minmax(0, 1fr); }
  .ig-card { display: flex; }
  .ig-card .card-cta { align-self: flex-start; }
  .ig-cards-soon .ig-card { display: grid; }
}
@media (max-width: 479px) {
  .ig-cards-soon .ig-card { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "ic title" "ic tag" "text text" "cta cta"; grid-template-rows: none; column-gap: 14px; }
  .ig-cards-soon .ig-card-ic { width: 44px; height: 44px; border-radius: 14px; }
  .ig-cards-soon .ig-card-ic.is-logo img { width: 26px; height: 26px; }
}
@media (max-width: 559px) {
  .ig-hub-points { grid-template-columns: minmax(0, 1fr); }
  .ig-hub-cta { width: 100%; }
}
