/* Integrations page. The converging scene reuses the platform's .pl-int styles (platform-story.css);
   this file adds the page's hero, how it connects, examples and closing. */

.ig-hero, .ig-how, .ig-flows, .ig-closing { width: calc(100% - 100px); max-width: 1400px; margin-inline: auto; }
#all-integrations, #how-it-works, #in-practice { scroll-margin-top: 96px; }

/* ---------------------------------------------------------------- hero */

/* The hero holds the first screen, with the Olmi ring just showing below it, so the tools gather as you scroll. */
.ig-hero { display: grid; justify-items: center; align-content: center; gap: 22px; max-width: 980px; min-height: clamp(520px, calc(100svh - 250px), 760px); padding: 24px 0 0; text-align: center; }
.ig-hero h1 { margin: 0; font-size: clamp(44px, 5.6vw, 84px); font-weight: 400; line-height: 1.02; letter-spacing: -.06em; color: var(--text-strong); text-wrap: balance; }
.ig-hero h1 span { color: #77845d; }
.ig-hero > p:not(.pl-overline) { max-width: 610px; margin: 0; font-size: 17.5px; line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }
.ig-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 16px; margin-top: 8px; }
.ig-link { display: inline-flex; align-items: center; gap: 8px; padding: 12px 12px; border-radius: 11px; font-size: 14px; color: var(--action-hover); transition: background-color 200ms ease, gap 300ms var(--ease-glide); }
.ig-link:hover { gap: 12px; background: var(--olive-50); }
.ig-link .icon { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- every integration */

.ig-all { padding: 34px 0 0; }
.ig-all .pl-int-scene { margin-top: 28px; }
.ig-all .pl-int-core { width: 156px; }
/* The centre is the live grain ring (fluid-ring.js): it stirs as the tools gather and as the pointer passes. */
.pl-int-core > .pl-int-ring { position: absolute; inset: 0; }
.pl-int-ring img, .pl-int-ring .fluid-ring-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pl-int-ring[data-renderer='ready'] img { visibility: hidden; }

/* ---------------------------------------------------------------- how it connects */

.ig-how, .ig-flows { padding-top: 150px; }
.ig-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 56px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ig-steps li { display: grid; align-content: start; gap: 12px; padding: 30px 36px 8px 0; }
.ig-steps li + li { padding-left: 36px; border-left: 1px solid var(--line); }
.ig-step-n { font: 500 12px/1 var(--font-mono); letter-spacing: .12em; color: var(--olive-600); }
.ig-steps h3 { margin: 6px 0 0; font-size: clamp(24px, 2.2vw, 30px); font-weight: 400; line-height: 1.1; letter-spacing: -.045em; color: var(--text-strong); }
.ig-steps p { max-width: 380px; margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--text-muted); }
.ig-assure { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 48px 0 0; padding: 0; list-style: none; }
.ig-assure li { display: flex; align-items: flex-start; gap: 12px; padding: 18px 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-raised); font-size: 14px; line-height: 1.5; color: var(--text); }
.ig-assure .icon { flex-shrink: 0; width: 16px; height: 16px; padding: 5px; border-radius: 8px; background: var(--olive-50); color: var(--olive-600); box-sizing: content-box; }

/* ---------------------------------------------------------------- in practice */

.ig-flow-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 56px 0 0; padding: 0; list-style: none; }
.ig-flow { display: grid; align-content: start; gap: 12px; padding: 14px 14px 26px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 1px 2px #1d25140a; }
.ig-flow h3 { margin: 12px 10px 0; font-size: 19px; font-weight: 500; line-height: 1.25; letter-spacing: -.03em; color: var(--text-strong); }
.ig-flow > p:not(.ig-chain) { margin: 0 10px; font-size: 14.5px; line-height: 1.55; color: var(--text-muted); }
.ig-chain { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 22px 12px; border-radius: 14px; background: var(--moss-75); }
.ig-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 5px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 12.5px; font-weight: 500; color: var(--text-strong); box-shadow: 0 1px 2px #1d25140a; }
.ig-chip i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--olive-50); font-size: 11px; font-style: normal; font-weight: 600; color: var(--olive-600); }
.ig-chip-olmi { border-color: #d7e1c0; background: var(--olive-50); }
.ig-chip-olmi img { width: 22px; height: 22px; object-fit: contain; }
.ig-arrow { width: 14px; height: 14px; color: var(--text-subtle); }
/* Work travels across the chain once, left to right, as the card arrives. */
.motion-ready .ig-flow .ig-chip, .motion-ready .ig-flow .ig-arrow { transition: opacity 500ms ease, border-color 500ms ease, box-shadow 500ms ease; }
.motion-ready .ig-flow:not(.is-revealed) :is(.ig-chip, .ig-arrow) { opacity: .35; }
.motion-ready .ig-flow .ig-chain > :nth-child(2) { transition-delay: 350ms; }
.motion-ready .ig-flow .ig-chain > :nth-child(3) { transition-delay: 500ms; }
.motion-ready .ig-flow .ig-chain > :nth-child(4) { transition-delay: 850ms; }
.motion-ready .ig-flow .ig-chain > :nth-child(5) { transition-delay: 1000ms; }

/* ---------------------------------------------------------------- questions and closing */

.ig-faq { padding-top: 150px; }
.ig-closing { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; align-items: center; gap: 32px; margin-top: 110px; margin-bottom: 10px; padding: 46px 0; border-top: 1px solid var(--line); }
.ig-closing-orb { width: 160px; height: 160px; }
.ig-closing-orb img { width: 100%; height: 100%; object-fit: contain; }
.ig-closing h2 { margin: 0 0 14px; font-size: clamp(28px, 2.6vw, 36px); font-weight: 400; line-height: 1.14; letter-spacing: -.045em; color: var(--text-strong); }
.ig-closing p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.ig-closing-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

/* ---------------------------------------------------------------- smaller screens */

@media (max-width: 1080px) {
  .ig-hero, .ig-how, .ig-flows, .ig-closing { width: calc(100% - 64px); }
  .ig-assure { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ig-flow-list { grid-template-columns: 1fr; max-width: 640px; }
}

@media (max-width: 760px) {
  .ig-hero, .ig-how, .ig-flows, .ig-closing { width: calc(100% - 40px); }
  .ig-hero { min-height: 0; padding-top: 44px; gap: 18px; }
  .ig-hero > p:not(.pl-overline) { font-size: 16px; }
  .ig-all .pl-int-core { width: 120px; }
  .ig-how, .ig-flows, .ig-faq { padding-top: 96px; }
  .ig-steps { grid-template-columns: 1fr; margin-top: 36px; }
  .ig-steps li, .ig-steps li + li { padding: 24px 0; border-left: 0; }
  .ig-steps li + li { border-top: 1px solid var(--line); }
  .ig-assure { grid-template-columns: 1fr; margin-top: 24px; }
  .ig-flow-list { margin-top: 36px; }
  .ig-closing { grid-template-columns: 96px minmax(0, 1fr); gap: 20px; margin-top: 80px; }
  .ig-closing-orb { width: 96px; height: 96px; }
  .ig-closing-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .ig-closing h2 br { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ig-link { transition: none; }
}
