/* ===========================================================
   INTEGRATIONS PAGE
   Uses tokens from style.css
   =========================================================== */

/* ============== HERO ============== */
.ig-hero {
  position: relative;
  padding: 140px 0 80px;
  overflow: clip;
}
.ig-hero__aurora {
  position: absolute; inset: -10% -5% auto;
  height: 70%;
  background: var(--grad-aurora);
  filter: blur(20px);
  pointer-events: none;
  opacity: 0.85;
}
.ig-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.ig-hero__copy h1 {
  font-weight: 280;
  font-size: clamp(48px, 6.4vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin: 22px 0 24px;
  color: var(--text);
}
.ig-hero__copy h2 {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-2);
  font-weight: 400;
  max-width: 520px;
  margin-bottom: 32px;
}
.ig-hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============== WIRE DIAGRAM ============== */
.ig-wire {
  position: relative;
  aspect-ratio: 6 / 4;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
}
.ig-wire__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ig-wire__core {
  position: absolute;
  top: 50%; left: 50%;
  translate: -50% -50%;
  z-index: 2;
  width: 130px; height: 130px;
  border-radius: 30px;
  background: var(--surface-card);
  border: 1px solid var(--line-strong);
  box-shadow: var(--glass-edge), var(--glow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ig-wire__core img {
  width: 38px; height: 38px;
  filter: var(--logo-filter);
}
.ig-wire__core span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.ig-wire__core::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 36px;
  border: 1px solid rgba(10,180,250,0.4);
  animation: igPulse 2.5s ease-in-out infinite;
}
@keyframes igPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 0; transform: scale(1.15); }
}

.ig-wire__node {
  position: absolute;
  z-index: 2;
}
.ig-wire__node--1 { top: 8%;  left: 4%; }
.ig-wire__node--2 { top: 8%;  right: 4%; }
.ig-wire__node--3 { top: 44%; right: -4%; }
.ig-wire__node--4 { bottom: 8%; right: 12%; }
.ig-wire__node--5 { bottom: 8%; left: 4%; }

.ig-wire__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--surface-card);
  border: 1px solid var(--line);
  box-shadow: var(--glass-edge);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  backdrop-filter: blur(10px);
}
.ig-wire__pill svg { color: var(--hilight-light); flex-shrink: 0; }

/* ============== STATS ============== */
.ig-stats {
  padding: 30px 0 60px;
}
.ig-stats__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--surface-card);
  border: 1px solid var(--line);
  box-shadow: var(--glass-edge);
  border-radius: 20px;
  overflow: hidden;
}
.ig-stats__cell {
  padding: 28px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ig-stats__cell:last-child { border-right: 0; }
.ig-stats__cell strong {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 320;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--text);
}
.ig-stats__cell span {
  font-size: 13px;
  color: var(--text-2);
}

/* ============== CATALOG ============== */
.ig-catalog { padding-top: 30px; }
.ig-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 32px 0 24px;
}
.ig-filter__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface-card);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.ig-filter__btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}
.ig-filter__btn span {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--glass-bg);
  color: var(--text-2);
}
.ig-filter__btn.is-active {
  background: var(--grad-blue);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow-sm);
}
.ig-filter__btn.is-active span {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.ig-card {
  background: var(--surface-card);
  border: 1px solid var(--line);
  box-shadow: var(--glass-edge);
  border-radius: 16px;
  padding: 22px 22px 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, border-color .25s ease;
}
.ig-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}
.ig-card.is-hidden {
  display: none;
}
.ig-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.ig-card__logo {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
}
.ig-card__logo--shopify    { background: #95BF47; }
.ig-card__logo--woo        { background: #7F54B3; }
.ig-card__logo--magento    { background: #EE672F; }
.ig-card__logo--bigc       { background: #34313F; }
.ig-card__logo--quickbooks { background: #2CA01C; }
.ig-card__logo--xero       { background: #13B5EA; }
.ig-card__logo--fresh      { background: #0075DD; }
.ig-card__logo--sage       { background: #00DC06; color: #002A18; }
.ig-card__logo--hubspot    { background: #FF7A59; }
.ig-card__logo--salesforce { background: #00A1E0; }
.ig-card__logo--zapier     { background: #FF4A00; }
.ig-card__logo--make       { background: #6D00CC; }
.ig-card__logo--api        { background: linear-gradient(135deg, #1478DC, #0AB4FA); }
.ig-card__logo--webhook    { background: linear-gradient(135deg, #FA6400, #FAC800); color: #2A1500; }
.ig-card__logo--node       { background: #339933; }
.ig-card__logo--slack      { background: #4A154B; }
.ig-card__logo--discord    { background: #5865F2; }

.ig-card__head h4 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.ig-card__head small {
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ig-card p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}
.ig-card__cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--hilight-light);
  align-self: flex-start;
}

.ig-grid__more {
  margin-top: 28px;
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
}
.ig-grid__more a {
  color: var(--hilight-light);
  font-weight: 500;
}

/* ============== FLOW ============== */
.ig-flow {
  padding-top: 90px;
}
.ig-flow__steps {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  position: relative;
}
.ig-flow__step {
  background: var(--surface-card);
  border: 1px solid var(--line);
  box-shadow: var(--glass-edge);
  border-radius: 18px;
  padding: 24px 22px 22px;
  position: relative;
}
.ig-flow__num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-2);
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.ig-flow__icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(10,180,250,0.15);
  border: 1px solid rgba(10,180,250,0.35);
  color: var(--hilight-light);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.ig-flow__body h4 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
  color: var(--text);
}
.ig-flow__body p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
}
/* Connector line between steps */
.ig-flow__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%; right: -10px;
  width: 14px; height: 1px;
  background: linear-gradient(90deg, rgba(10,180,250,0.6), rgba(10,180,250,0));
  z-index: 1;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1100px) {
  .ig-hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .ig-wire { max-width: 540px; margin: 0 auto; }
  .ig-stats__row { grid-template-columns: repeat(2, 1fr); }
  .ig-stats__cell:nth-child(2) { border-right: 0; }
  .ig-stats__cell:nth-child(1),
  .ig-stats__cell:nth-child(2) { border-bottom: 1px solid var(--line); }
  .ig-grid { grid-template-columns: repeat(2, 1fr); }
  .ig-flow__steps { grid-template-columns: repeat(2, 1fr); }
  .ig-flow__step:not(:last-child)::after { display: none; }
}
@media (max-width: 700px) {
  .ig-hero { padding: 110px 0 50px; }
  .ig-stats__row { grid-template-columns: 1fr; }
  .ig-stats__cell { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .ig-stats__cell:last-child { border-bottom: 0; }
  .ig-grid { grid-template-columns: 1fr; }
  .ig-flow__steps { grid-template-columns: 1fr; }
}
