/* 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);
  corner-shape: var(--sq-shape, round);
}
.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: calc(16px * var(--sq-scale, 1)); display: grid; place-items: center; background: var(--logo-bg); box-shadow: var(--shadow-xs); corner-shape: var(--sq-shape, round); }
.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: calc(12px * var(--sq-scale, 1)); display: grid; place-items: center; background: var(--sheet-bg); color: var(--ink); box-shadow: var(--shadow-xs); corner-shape: var(--sq-shape, round); }
.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: auto 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, .ig-cards-soon .ig-coins { 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; }
/* Built into Flowella: two across, each card's copy beside a small working miniature of that part at work, on a
   Mist stage, as the HubSpot record sits beside its copy above. The miniatures are drawn without words (skeleton
   lines stand in for message text), so they read the same in every language; the API's path and events are real. */
.ig-cards-built { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ig-cards-built .ig-built {
  grid-row: auto; grid-template-rows: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  column-gap: clamp(18px, 2vw, 26px); align-items: stretch;
}
.ig-built-copy { display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; align-content: start; justify-items: start; min-width: 0; }
.ig-stage {
  display: grid; place-items: center; min-width: 0; min-height: 228px;
  padding: 18px 16px;
  border-radius: calc(20px * var(--sq-scale, 1));
  background: var(--surface-2);
  overflow: hidden;
  corner-shape: var(--sq-shape, round);
}

/* Coming soon: Flowella's disc over the platform's, the coin pair of the integration heroes, standing in the card */
.ig-coins.int-coins { position: relative; z-index: auto; align-self: start; --coin: 50px; --coin-logo: 26px; --coin-ring: var(--card-bg); }
@supports not (grid-template-rows: subgrid) {
  .ig-card { display: flex; }
}
.ig-card-ic { width: 52px; height: 52px; border-radius: calc(16px * var(--sq-scale, 1)); display: grid; place-items: center; box-shadow: var(--shadow-xs); corner-shape: var(--sq-shape, round); }
.ig-card-ic .i { width: 26px; height: 26px; }
.ig-card-ic.is-wa { background: var(--green); color: var(--on-bright); }
.ig-card-ic.is-wa .i { color: var(--wa-glyph); }
.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)); }
  .ig-cards-built .ig-built { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
  .ig-stage { order: -1; min-height: 210px; }
}
@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; }
  .ig-cards-built .ig-built { display: grid; }
}
@media (max-width: 479px) {
  .ig-cards-soon .ig-card { grid-template-columns: auto 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: calc(14px * var(--sq-scale, 1)); corner-shape: var(--sq-shape, round); }
  .ig-cards-soon .ig-card-ic.is-logo img { width: 26px; height: 26px; }
  .ig-coins.int-coins { --coin: 42px; --coin-logo: 22px; }
}
@media (max-width: 559px) {
  .ig-hub-points { grid-template-columns: minmax(0, 1fr); }
  .ig-hub-cta { width: 100%; }
}
