/* ===================================================================
   integrations.css — folk-style sliding integration orbit, site theme
   Owns: .strip, .integrations-copy, .integration-status, .logo-orbit
   Paired with js/integrations.js (logos in /logos).
   Geometry, motion, and masks sampled from getfolk.app; surfaces mapped
   to the site's dark monochrome tokens (tokens.css / DESIGN.md).
   =================================================================== */
.strip{
  position:relative;
  min-height:820px;
  overflow:hidden;
  color:var(--text);
  background-color:var(--bg);
}
.strip-inner{
  position:relative;
  z-index:1;
  max-width:var(--maxw);
  min-height:820px;
  margin:0 auto;
  padding:210px 40px 76px;
}
.strip .label{
  font-family:var(--mono);
  font-size:11.5px;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--faint);
}
.integrations-copy{
  position:relative;
  z-index:20;
  max-width:520px;
  opacity:0;
  filter:blur(4px);
  transform:translateY(16px);
  transition:opacity 700ms ease,filter 700ms ease,transform 700ms cubic-bezier(.16,1,.3,1);
}
.strip.is-active .integrations-copy{opacity:1;filter:blur(0);transform:translateY(0)}
.integrations-copy h2{
  max-width:520px;
  margin:22px 0 24px;
  font-family:var(--disp);
  font-size:clamp(44px,5vw,72px);
  font-weight:600;
  line-height:.98;
  letter-spacing:0;
}
.integrations-copy p{
  max-width:500px;
  color:var(--muted);
  font-size:18px;
  line-height:1.55;
}
.integration-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:16px;
  margin-top:44px;
}
/* --- status pill: width animates to fit, lines swap vertically ------
   Light emphasis surface (pairs with .btn.primary), like folk's pill
   pops against its section. */
.integration-status{
  position:relative;
  width:174px; /* JS sets the real width per label */
  height:40px;
  overflow:hidden;
  border:1px solid var(--status-pill-border,rgba(10,11,14,0.5));
  border-radius:14px;
  background:var(--emphasis);
  box-shadow:3px 3px 0 0 var(--status-pill-shadow,rgba(247,248,250,0.22));
  color:var(--on-emphasis);
  font-size:14px;
  font-weight:500;
  line-height:1;
  transition:width 300ms cubic-bezier(.22,1,.36,1);
}
.integration-status.no-anim{transition:none}
.status-line{
  position:absolute;
  left:16px;
  top:0;
  height:100%;
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
  transition:opacity 300ms ease,filter 300ms ease,transform 300ms cubic-bezier(.22,1,.36,1);
}
.status-line.is-in{opacity:0;filter:blur(2px);transform:translateY(5px)}
.status-line.is-out{opacity:0;filter:blur(2px);transform:translateY(-12px)}
.status-line__icon{
  width:22px;
  height:22px;
  flex:none;
  display:grid;
  place-items:center;
}
.status-line__icon img{
  display:block;
  max-width:22px;
  max-height:22px;
  object-fit:contain;
}

/* --- orbit frame ----------------------------------------------------- */
.logo-orbit{
  --orbit-size:1148px;
  --orbit-radius:-315px;
  --orbit-size-active:120px;
  --ring-size:630px;
  --line-length:720px;
  --track-length:414px;
  --track-thickness:144px;
  --track-offset:-20px;
  --core-size:120px;
  --core-offset:58px;
  /* folk's emboss recipe, inverted for the dark surface */
  --rim-shadow:0 0 0 1px rgba(247,248,250,0.07),inset 0 1px 0 rgba(255,255,255,0.09),inset 0 -1px 0 rgba(0,0,0,0.35),0 12px 32px -20px rgba(0,0,0,0.7);
  --card-shadow:inset 1px 1px 0 rgba(255,255,255,0.08),inset -1px -1px 0 rgba(0,0,0,0.45),0 0 0 .5px rgba(247,248,250,0.07),0 10px 28px -14px rgba(0,0,0,0.65),0 3px 10px -6px rgba(0,0,0,0.5);
  --card-shadow-active:inset 1px 1px 0 rgba(255,255,255,0.11),inset -1px -1px 0 rgba(0,0,0,0.5),0 0 0 .5px rgba(247,248,250,0.10),0 14px 36px -16px rgba(0,0,0,0.75),0 4px 12px -6px rgba(0,0,0,0.55),0 0 0 1px rgba(247,248,250,0.14),0 0 28px -10px rgba(247,248,250,0.20);
  --core-shadow:0 0 0 1px rgba(247,248,250,0.10),0 24px 60px -26px rgba(0,0,0,0.85),inset 1px 1px 0 rgba(255,255,255,0.10);
  --line-color:rgba(247,248,250,0.10);
  --tile-bg:var(--bg-2);
  pointer-events:none;
  position:absolute;
  z-index:5;
  top:-130px;
  left:50%;
  width:var(--orbit-size);
  height:var(--orbit-size);
  transform:translateX(-37.3%);
  opacity:0;
  filter:blur(6px);
  transition:opacity 700ms ease,filter 700ms ease;
  /* desktop: fade the frame's left side out so cards never collide with the copy */
  -webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,0) 0%,rgba(0,0,0,0) 35%,rgba(0,0,0,0.14) 38%,rgba(0,0,0,0.72) 41%,#000 44%,#000 100%);
  mask-image:linear-gradient(90deg,rgba(0,0,0,0) 0%,rgba(0,0,0,0) 35%,rgba(0,0,0,0.14) 38%,rgba(0,0,0,0.72) 41%,#000 44%,#000 100%);
}
.strip.is-active .logo-orbit{opacity:1;filter:blur(0)}
/* desktop: bottom arc hidden — cards surface low on the right, peak at active,
   then climb and dim toward the top (folk's computed desktop vmask) */
.logo-orbit__vmask{
  position:absolute;
  inset:0;
  -webkit-mask-image:linear-gradient(rgba(0,0,0,0.45) 0%,rgba(0,0,0,0.7) 18%,rgba(0,0,0,0.92) 30%,#000 40%,#000 56%,rgba(0,0,0,0.4) 59%,rgba(0,0,0,0.1) 62%,rgba(0,0,0,0) 65%,rgba(0,0,0,0) 100%);
  mask-image:linear-gradient(rgba(0,0,0,0.45) 0%,rgba(0,0,0,0.7) 18%,rgba(0,0,0,0.92) 30%,#000 40%,#000 56%,rgba(0,0,0,0.4) 59%,rgba(0,0,0,0.1) 62%,rgba(0,0,0,0) 65%,rgba(0,0,0,0) 100%);
}
.logo-orbit__stage{position:absolute;inset:0}

.orbit-ring{
  position:absolute;
  left:50%;
  top:50%;
  width:var(--ring-size);
  height:var(--ring-size);
  transform:translate(-50%,-50%);
  border-radius:50%;
  box-shadow:var(--rim-shadow);
  opacity:.7;
}
.orbit-trackpill{
  position:absolute;
  top:50%;
  left:calc(50% + var(--track-offset));
  width:var(--track-length);
  height:var(--track-thickness);
  transform:translateY(-50%);
  border-radius:999px;
  box-shadow:var(--rim-shadow);
  opacity:.9;
}
.orbit-line{
  position:absolute;
  left:50%;
  top:50%;
  width:var(--line-length);
  height:1px;
  transform:translate(-50%,-50%);
  background:linear-gradient(90deg,transparent,var(--line-color) 38%,var(--line-color) 62%,transparent);
  opacity:.5;
}

.orbit-core{
  position:absolute;
  top:50%;
  left:calc(50% + var(--core-offset));
  width:var(--core-size);
  height:var(--core-size);
  transform:translate(-50%,-50%);
  border-radius:50%;
  display:grid;
  place-items:center;
  color:var(--text);
  background:var(--tile-bg);
  box-shadow:var(--core-shadow);
}
/* monochrome shimmer in place of folk's amber halo (DESIGN.md: no colored glows) */
.orbit-core__halo{
  position:absolute;
  inset:-8px;
  border-radius:50%;
  background:conic-gradient(from 270deg,rgba(247,248,250,0.10) 0deg,rgba(247,248,250,0.30) 70deg,rgba(247,248,250,0.16) 138deg,rgba(247,248,250,0.08) 205deg,rgba(247,248,250,0.38) 278deg,rgba(247,248,250,0.10) 360deg);
}
.orbit-core__halo--soft{
  -webkit-mask:radial-gradient(circle,transparent 52%,#000 58%,#000 63%,transparent 68%);
  mask:radial-gradient(circle,transparent 52%,#000 58%,#000 63%,transparent 68%);
  filter:blur(7px);
  opacity:.38;
}
.orbit-core__halo--crisp{
  -webkit-mask:radial-gradient(circle,transparent 56%,#000 59%,#000 61.5%,transparent 64.5%);
  mask:radial-gradient(circle,transparent 56%,#000 59%,#000 61.5%,transparent 64.5%);
  opacity:.5;
}
.orbit-core__inner{
  display:grid;
  place-items:center;
  gap:5px;
}
.orbit-core__mark{
  height:32px;
  display:flex;
  color:var(--text);
}
.orbit-core__mark svg{width:auto;height:100%;display:block}
.orbit-core__name{
  font-family:var(--disp);
  font-size:14px;
  font-weight:600;
  letter-spacing:-0.01em;
}

/* --- orbit cards (positioned + slid by js/integrations.js) ----------- */
.orbit-node{
  position:absolute;
  left:50%;
  top:50%;
  width:var(--orbit-size-active);
  height:var(--orbit-size-active);
  will-change:transform,opacity,filter;
  transition:transform 650ms cubic-bezier(.22,1,.36,1),opacity 750ms cubic-bezier(.22,1,.36,1),filter 750ms cubic-bezier(.22,1,.36,1);
}
.orbit-node__cell{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:50%;
  padding:3px;
  background:var(--tile-bg);
  box-shadow:var(--card-shadow);
}
.orbit-node__cell.is-front{box-shadow:var(--card-shadow-active)}
/* Icons (~1:1) fill a square box. Wide wordmarks (toast/7shifts/jolt/marketman)
   are normalized by height so their cap-height matches the icons instead of
   collapsing to a sliver; width is capped so the widest still fit the tile. */
.orbit-node__cell img{
  display:block;
  width:46%;
  height:46%;
  object-fit:contain;
}
.orbit-node__cell--wordmark img{
  width:auto;
  height:21%;
  max-width:80%;
}
/* dark-glyph logos flip to white on dark tiles (same as builder.css chips) */
.orbit-node__cell img.lift{filter:brightness(0) invert(1);opacity:.92}

@media(max-width:960px){
  .strip{min-height:880px}
  .strip-inner{
    min-height:880px;
    padding:60px 24px 400px;
    text-align:center;
  }
  .integrations-copy{max-width:620px;margin:0 auto}
  .integrations-copy h2,.integrations-copy p{margin-left:auto;margin-right:auto}
  .integration-actions{justify-content:center;margin-top:32px}
  .integration-status{display:none}
  /* folk mobile: orbit clipped at the bottom, whole stage rotated -90° so the
     active card sits at the top of the arc, pointing up at the copy above */
  .logo-orbit{
    --orbit-size:920px;
    --orbit-radius:-300px;
    --orbit-size-active:132px;
    --ring-size:600px;
    --line-length:680px;
    --track-length:320px;
    --track-thickness:152px;
    --track-offset:55px;
    --core-size:132px;
    --core-offset:130px;
    top:auto;
    bottom:-300px;
    left:50%;
    transform:translateX(-50%) scale(.86);
    -webkit-mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.1) 6%,rgba(0,0,0,.4) 12%,rgba(0,0,0,.75) 18%,#000 24%,#000 76%,rgba(0,0,0,.75) 82%,rgba(0,0,0,.4) 88%,rgba(0,0,0,.1) 94%,transparent 100%);
    mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.1) 6%,rgba(0,0,0,.4) 12%,rgba(0,0,0,.75) 18%,#000 24%,#000 76%,rgba(0,0,0,.75) 82%,rgba(0,0,0,.4) 88%,rgba(0,0,0,.1) 94%,transparent 100%);
  }
  /* mobile (stage rotated -90°): hide the bottom of the ring instead */
  .logo-orbit__vmask{
    -webkit-mask-image:linear-gradient(rgba(0,0,0,0) 0%,#000 1%,#000 42%,rgba(0,0,0,0.5) 45%,rgba(0,0,0,0.18) 50%,rgba(0,0,0,0.05) 56%,rgba(0,0,0,0) 62%,rgba(0,0,0,0) 100%);
    mask-image:linear-gradient(rgba(0,0,0,0) 0%,#000 1%,#000 42%,rgba(0,0,0,0.5) 45%,rgba(0,0,0,0.18) 50%,rgba(0,0,0,0.05) 56%,rgba(0,0,0,0) 62%,rgba(0,0,0,0) 100%);
  }
  .logo-orbit__stage{transform:rotate(-90deg)}
  .orbit-node__cell,.orbit-core__inner{transform:rotate(90deg)}
  .orbit-core__halo{display:none}
}
@media(max-width:560px){
  .strip{min-height:680px}
  .strip-inner{min-height:680px;padding:48px 20px 300px}
  .integrations-copy h2{max-width:340px;margin:0 auto 16px;font-size:38px;line-height:1.0}
  .integrations-copy p{max-width:320px;font-size:15px;line-height:1.5}
  .integration-actions{gap:12px}
  .logo-orbit{
    --orbit-size:760px;
    top:auto;
    bottom:-350px;
    transform:translateX(-50%) scale(.82);
  }
}
@media(prefers-reduced-motion:reduce){
  .integrations-copy,.logo-orbit,.orbit-node,.status-line,.integration-status{transition:none}
  .strip .integrations-copy{opacity:1;filter:none;transform:none}
  .strip .logo-orbit{opacity:1;filter:blur(0)}
}
