/* ---------- Integrations ---------- */

/* 1. hub */
.ig-h-in { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.ig-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 1.2rem; margin-top: 1.6rem; }
.ig-legend li { display: grid; grid-template-columns: auto 1fr; column-gap: 0.65rem; align-items: center; }
.ig-legend li > span { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, #fff); }
.ig-legend .i { width: 1rem; height: 1rem; }
.ig-legend b { font-family: var(--f-head); font-weight: 600; font-size: 0.95rem; color: var(--navy); line-height: 1.2; }
.ig-legend small { font-size: 0.82rem; color: var(--muted); }

.ig-stage {
  position: relative; width: 100%; max-width: 540px; aspect-ratio: 1; margin-inline: auto; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #fff 30%, var(--bg-soft) 31%, var(--bg-soft) 62%, #fff 63%);
}
.ig-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ig-orbit { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 5; vector-effect: non-scaling-stroke; }
.ig-link { stroke: #f8c77f; stroke-width: 2; stroke-dasharray: 4 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ig-core {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 30%; aspect-ratio: 1; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem;
  background: radial-gradient(circle at 50% 35%, #2c2d74, #202158 60%, #15163d); color: #fff;
  box-shadow: 0 0 0 8px #fff, 0 0 0 10px #fbe0bd, 0 24px 40px -18px rgba(32, 33, 88, 0.7);
}
.ig-logo { width: 42%; height: auto; }
.ig-core b { font-family: var(--f-head); font-size: clamp(0.62rem, 1.1vw, 0.85rem); font-weight: 700; }
.ig-node {
  position: absolute; translate: -50% -50%; display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 0.7rem 0.9rem; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md);
  min-width: 96px; text-align: center;
}
.ig-node > span { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--tc); box-shadow: 0 8px 16px -8px var(--tc); }
.ig-node .i { width: 1.15rem; height: 1.15rem; }
.ig-node b { font-family: var(--f-head); font-weight: 600; font-size: 0.8rem; color: var(--navy); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  /* data "flows" out along each link */
  .ig-link { animation: ig-flow 2.4s linear infinite; animation-delay: calc(var(--i) * -0.4s); }
  .ig-node { animation: ig-bob 6s ease-in-out infinite; }
  .ig-node:nth-of-type(even) { animation-delay: -3s; }
}
@keyframes ig-flow { to { stroke-dashoffset: -20; } }
@keyframes ig-bob { 0%, 100% { margin-top: 0; } 50% { margin-top: -5px; } }

/* 2. data flow rows */
.ig-rows { display: grid; gap: var(--gap); }
.ig-row {
  display: grid; grid-template-columns: 200px 1fr; align-items: center; gap: 1.5rem;
  padding: 1.3rem 1.5rem; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.ig-row h3 { font-size: 1.1rem; font-weight: 700; }
.ig-row ol { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; }
.ig-row li {
  position: relative; display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.5rem 0.9rem 0.5rem 0.5rem; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--line-2); font-size: 0.9rem; font-weight: 500; color: var(--text);
}
.ig-row li > span { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--navy); color: #fff; }
.ig-row li:last-child > span { background: var(--orange); }
.ig-row li .i { width: 0.95rem; height: 0.95rem; }
/* arrow between steps */
.ig-row li:not(:last-child)::after {
  content: ''; width: 0.45rem; height: 0.45rem; margin-left: 0.4rem; margin-right: -0.2rem;
  border-top: 2px solid var(--orange); border-right: 2px solid var(--orange); rotate: 45deg;
}

/* 3. reliability */
.ig-rel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.ig-rel-grid li {
  display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; border-radius: 20px;
  background: linear-gradient(180deg, #fff, var(--bg-soft)); border: 1px solid var(--line);
  transition: translate 0.3s ease, box-shadow 0.3s ease;
}
.ig-rel-grid li:hover { translate: 0 -4px; box-shadow: var(--shadow-md); }
.ig-rel-grid li > span { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #e2f6fa; color: #0f8fb0; }
.ig-rel-grid .i { width: 1.3rem; height: 1.3rem; }
.ig-rel-grid b { display: block; font-family: var(--f-head); font-weight: 600; font-size: 1.05rem; color: var(--navy); }
.ig-rel-grid small { display: block; margin-top: 0.3rem; font-size: 0.93rem; line-height: 1.55; color: var(--muted); }

@media (max-width: 1100px) {
  .ig-h-in { grid-template-columns: 1fr; }
  .ig-rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ig-row { grid-template-columns: 1fr; gap: 0.9rem; }
}
@media (max-width: 760px) {
  .ig-legend { grid-template-columns: 1fr; }
  .ig-node { min-width: 0; padding: 0.5rem 0.6rem; }
  .ig-node > span { width: 32px; height: 32px; }
  .ig-node b { font-size: 0.68rem; }
  .ig-rel-grid { grid-template-columns: 1fr; }
  .ig-row ol { flex-direction: column; align-items: flex-start; }
  .ig-row li:not(:last-child)::after { display: none; }
}
