/* Walter homepage: Integrations section
   Every class and id is prefixed wi- so nothing collides with the theme.
   Values are read from Figma file DOMmUOpj9Fbv0qDiQWKFvr, frame 4973:65551. */

.wi-section {
  --wi-ink: #000000;
  --wi-ink-80: rgba(0, 0, 0, 0.8);
  --wi-ink-60: rgba(0, 0, 0, 0.6);
  --wi-primary: #7A37F0;
  --wi-pill-bg: #FDFBFD;
  --wi-pill-border: #E9E7E9;
  --wi-blue: #3186FF;
  --wi-purple: #9333EA;

  /* Tile shadow stack. The ring is the inset layer. */
  --wi-tile-shadow:
    0 27px 8px 0 rgba(0, 0, 0, 0),
    0 17px 7px 0 rgba(0, 0, 0, 0.01),
    0 10px 6px 0 rgba(0, 0, 0, 0.02),
    0 4px 4px 0 rgba(0, 0, 0, 0.04),
    0 1px 2px 0 rgba(0, 0, 0, 0.05),
    inset 0 0 0 1px rgba(116, 116, 116, 0.25);
  --wi-peak-purple:
    0 27px 8px 0 rgba(77, 7, 140, 0),
    0 17px 7px 0 rgba(77, 7, 140, 0.01),
    0 10px 6px 0 rgba(77, 7, 140, 0.02),
    0 4px 4px 0 rgba(77, 7, 140, 0.04),
    0 1px 2px 0 rgba(77, 7, 140, 0.05),
    inset 0 0 0 1px #E9D5FF;
  --wi-peak-blue:
    0 27px 8px 0 rgba(1, 51, 122, 0),
    0 17px 7px 0 rgba(1, 51, 122, 0.01),
    0 10px 6px 0 rgba(1, 51, 122, 0.02),
    0 4px 4px 0 rgba(1, 51, 122, 0.04),
    0 1px 2px 0 rgba(1, 51, 122, 0.05),
    inset 0 0 0 1px #BFDBFE;

  box-sizing: border-box;
  width: 100%;
  background: #FFFFFF;
  padding: 64px 10px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wi-section *,
.wi-section *::before,
.wi-section *::after {
  box-sizing: border-box;
}

.wi-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 743px;
  max-width: 100%;
  margin: 0 auto;
}

/* ---------- Graph stage ----------
   The stage is drawn at its Figma size (743 x 359) and centered with layout,
   not with a transform. A translate of -50% on an odd width lands on a half
   pixel, and the browser then blurs every logo edge across two pixels.

   Below 768px the stage scales down as one piece, which is exactly how the
   phone frame draws it. The ratio is column width / 743px, written as
   tan(atan2()) because CSS cannot yet divide one length by another. */

.wi-inner {
  container-type: inline-size;
}

.wi-stage-wrap {
  position: relative;
  width: 100%;
  height: 359px;
}

.wi-stage {
  position: absolute;
  top: 0;
  left: 50%;
  width: 743px;
  height: 359px;
  margin-left: -371.5px;
  overflow: hidden;
  transform-origin: top center;
}

@media (max-width: 767px) {
  /* Fallback: transform scale. Correct size, but the browser resamples the
     scaled layer, so logos come out slightly soft. */
  @supports (width: calc(tan(atan2(1px, 1px)) * 1px)) {
    .wi-stage-wrap {
      height: calc(359px * tan(atan2(100cqw, 743px)));
    }
    .wi-stage {
      transform: scale(tan(atan2(100cqw, 743px)));
    }
  }
  /* Preferred: zoom redraws the stage at its final size, so logos stay as
     sharp as the source SVGs. The dot routes scale with it. */
  @supports (zoom: tan(atan2(1px, 1px))) {
    .wi-stage {
      left: 0;
      margin-left: 0;
      transform: none;
      zoom: tan(atan2(100cqw, 743px));
    }
  }
}

.wi-lines {
  position: absolute;
  inset: 0;
  display: block;
  width: 743px;
  height: 359px;
  max-width: none;
  margin: 0;
  overflow: visible;
}

.wi-lines path {
  stroke-width: 1px;
}

.wi-fade {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 743px;
  height: 31px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #FFFFFF);
  pointer-events: none;
}

.wi-dots,
.wi-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ---------- Dots ---------- */

.wi-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.wi-dot::before {
  content: "";
  position: absolute;
  top: 1.7575px;
  left: 1.7575px;
  width: 8.485px;
  height: 8.485px;
  background: #FFFFFF;
  border-radius: 2.121px;
  transform: rotate(45deg);
  box-shadow:
    0 0 0 0.53px rgba(0, 0, 0, 0.1),
    0 6.364px 3.182px 0 rgba(0, 0, 0, 0),
    0 4.243px 3.182px 0 rgba(0, 0, 0, 0.02),
    0 2.121px 2.121px 0 rgba(0, 0, 0, 0.06),
    0 1.061px 2.121px 0 rgba(0, 0, 0, 0.1),
    0 0 1.061px 0 rgba(0, 0, 0, 0.11);
}

.wi-dot::after {
  content: "";
  position: absolute;
  top: 3.8787px;
  left: 3.8787px;
  width: 4.2426px;
  height: 4.2426px;
  border-radius: 50%;
}

/* Resting positions from the Figma frame. Used before the script runs and
   when prefers-reduced-motion is set. The script moves dots with transforms. */
.wi-dot[data-wi-dot="chrome"]    { left: 224px; top: 305px; }
.wi-dot[data-wi-dot="shopify"]   { left: 548px; top: 305px; }
.wi-dot[data-wi-dot="wordpress"] { left: 163px; top: 228px; }
.wi-dot[data-wi-dot="gemini"]    { left: 544px; top: 228px; }
.wi-dot[data-wi-dot="chatgpt"]   { left: 264px; top: 150px; }
.wi-dot[data-wi-dot="zapier"]    { left: 449px; top: 150px; }
.wi-dot[data-wi-dot="claude"]    { left: 372px; top: 107px; }

.wi-dot--blue::after { background: var(--wi-blue); }
.wi-dot--purple::after { background: var(--wi-purple); }

/* ---------- Icon tiles ---------- */

.wi-icon {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: var(--wi-tile-shadow);
  overflow: hidden;
}

.wi-icon .wi-logo {
  position: absolute;
  display: block;
  max-width: none;
  margin: 0;
  overflow: visible;
}

.wi-icon--claude { left: 332px; top: 0; }
.wi-icon--claude .wi-logo { left: 16px; top: 16px; width: 48px; height: 48px; }

.wi-icon--zapier { left: 480px; top: 33px; }
.wi-icon--zapier .wi-logo { left: 16px; top: 16px; width: 48px; height: 48px; }

.wi-icon--chatgpt { left: 184px; top: 33px; }
.wi-icon--chatgpt .wi-logo { left: 16px; top: 16px; width: 48px; height: 48px; }

.wi-icon--chrome { left: 0; top: 264px; }
.wi-icon--chrome .wi-logo { left: 16px; top: 16px; width: 48px; height: 48px; }

.wi-icon--shopify { left: 663px; top: 264px; }
.wi-icon--shopify .wi-logo { left: 16px; top: 16px; width: 48px; height: 48px; }

.wi-icon--gemini { left: 598px; top: 128px; }
.wi-icon--gemini .wi-logo { left: 16px; top: 16px; width: 48px; height: 48px; }

.wi-icon--wordpress { left: 66px; top: 128px; }
.wi-icon--wordpress .wi-logo { left: 16px; top: 16px; width: 48px; height: 48px; }

/* Center icon. Resting state here; the arrival peaks are keyframes below. */
.wi-icon--walter {
  left: 332px;
  top: 184px;
}
.wi-icon--walter .wi-logo { left: 16px; top: 16px; width: 48px; height: 48px; }

/* ---------- Copy ---------- */

.wi-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 531px;
  max-width: 100%;
  text-align: center;
}

.wi-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px; /* Figma strokes sit inside the box: 1px border + 3px = 4px, box stays 95 x 29 */
  background: var(--wi-pill-bg);
  border: 1px solid var(--wi-pill-border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: -0.14px;
  color: var(--wi-ink-60);
  white-space: nowrap;
}

.wi-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.wi-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.wi-section .wi-title {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 40px;
  font-weight: 500;
  line-height: 48px;
  letter-spacing: -0.4px;
  color: var(--wi-ink);
  text-transform: none;
}

.wi-section .wi-sub {
  width: 410px;
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.16px;
  color: var(--wi-ink-80);
}

.wi-section .wi-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: var(--wi-primary);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.16px;
  color: #FFFFFF;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease-out;
}

/* Hover is not drawn in the Figma file; this is a slightly darker primary. */
.wi-section .wi-btn:hover { background: #6A2AE0; }

.wi-section .wi-btn:focus-visible {
  outline: 2px solid var(--wi-primary);
  outline-offset: 2px;
}


/* ---------- Phone layout, below 768px ----------
   Figma frame 4977:83946. The graph is the desktop stage scaled as one piece
   (378 / 743 at a 402px viewport), which is how the file draws it: every
   size, stroke and shadow in the frame is the desktop value x 0.509.
   Only the copy block changes. */

.wi-br-m { display: none; }

@media (max-width: 767px) {
  .wi-section { padding: 12px; }
  .wi-br-m { display: inline; }
  .wi-copy { gap: 16px; width: 362px; }
  .wi-section .wi-title {
    font-size: 32px;
    line-height: 40px;
    letter-spacing: -0.32px;
  }
  .wi-section .wi-sub {
    width: 100%;
    color: rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Motion ----------
   Everything below runs on CSS alone.

   Dots move at one constant speed, 30px per second, on every line, the way
   the reference (index.lue.studio) moves its shapes. Walter receives one dot
   every 1.2 seconds, in this order: Claude, ChatGPT, Zapier, Chrome, Shopify,
   WordPress, Gemini, so one loop is 8.4 seconds. The first arrival is 50ms
   after the loop starts.

   A trip on a long line takes longer than the 8.4 second loop, so every line
   except Claude's carries a second dot, 8.4 seconds behind the first. Each dot
   travels, then waits hidden under Walter until its next departure from under
   its logo. Both ends are covered by an icon, so the wait is never visible.

   The Walter icon runs its own 8.4 second loop with one peak per arrival,
   in the arriving dot's color: 120ms in, 380ms hold, 400ms out, ease-out.
   All loops share one clock, so they stay in sync.

   To retime: travel = route length / speed. The keyframe stop is
   travel / cycle. A dot departs at (arrival second - (length - 6) / speed),
   and its delay is that time mod cycle, minus cycle. */

@media (prefers-reduced-motion: no-preference) {

  /* Routes are drawn in stage coordinates, so the dot box sits at the stage
     origin. Specific enough to override the resting positions above. */
  .wi-stage .wi-dot[data-wi-dot] {
    left: 0;
    top: 0;
    transform: none;
    offset-anchor: center;
    offset-rotate: 0deg;
    /* Longhands on purpose: the shorthand would reset the per-dot values below. */
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }

  .wi-dot[data-wi-dot="claude"] {
    offset-path: path("M372 40V190");
    animation-name: wi-flow-claude;
    animation-duration: 8.4s;
    animation-delay: -4.75s;
  }
  .wi-dot[data-wi-dot="chatgpt"] {
    offset-path: path("M224 73V142.498C224 146.917 227.582 150.498 232 150.498H363C367.971 150.498 372 154.528 372 159.498V190");
    animation-name: wi-flow-chatgpt;
    animation-duration: 16.8s;
    animation-delay: -7.14s;
  }
  .wi-dot[data-wi-dot="chatgpt"][data-wi-copy="2"] {
    animation-delay: -15.54s;
  }
  .wi-dot[data-wi-dot="zapier"] {
    offset-path: path("M520 73V142.498C520 146.917 516.418 150.498 512 150.498H381C376.029 150.498 372 154.528 372 159.498V190");
    animation-name: wi-flow-zapier;
    animation-duration: 16.8s;
    animation-delay: -5.94s;
  }
  .wi-dot[data-wi-dot="zapier"][data-wi-copy="2"] {
    animation-delay: -14.34s;
  }
  .wi-dot[data-wi-dot="chrome"] {
    offset-path: path("M40 305H364C368.418 305 372 301.418 372 297V258");
    animation-name: wi-flow-chrome;
    animation-duration: 16.8s;
    animation-delay: -8.669s;
  }
  .wi-dot[data-wi-dot="chrome"][data-wi-copy="2"] {
    animation-delay: -0.269s;
  }
  .wi-dot[data-wi-dot="shopify"] {
    offset-path: path("M703 305H380.031C375.613 305 372 301.418 372 297V258");
    animation-name: wi-flow-shopify;
    animation-duration: 16.8s;
    animation-delay: -7.435s;
  }
  .wi-dot[data-wi-dot="shopify"][data-wi-copy="2"] {
    animation-delay: -15.835s;
  }
  .wi-dot[data-wi-dot="wordpress"] {
    offset-path: path("M106 168V220C106 224.418 109.582 228 114 228H338");
    animation-name: wi-flow-wordpress;
    animation-duration: 16.8s;
    animation-delay: -3.369s;
  }
  .wi-dot[data-wi-dot="wordpress"][data-wi-copy="2"] {
    animation-delay: -11.769s;
  }
  .wi-dot[data-wi-dot="gemini"] {
    offset-path: path("M637 168V220C637 224.418 633.418 228 629 228H406");
    animation-name: wi-flow-gemini;
    animation-duration: 16.8s;
    animation-delay: -2.136s;
  }
  .wi-dot[data-wi-dot="gemini"][data-wi-copy="2"] {
    animation-delay: -10.536s;
  }

  .wi-icon--walter {
    animation: wi-arrivals 8.4s ease-out infinite;
  }

  /* Paused while the section is out of view or the tab is hidden.
     The class is set by integrations.js; without it the loop simply runs. */
  .wi-section.wi-paused .wi-dot,
  .wi-section.wi-paused .wi-icon--walter {
    animation-play-state: paused;
  }
}

/* With reduced motion the section shows the Figma frame: one dot per line. */
@media (prefers-reduced-motion: reduce) {
  .wi-dot[data-wi-copy="2"] { display: none; }
}

@keyframes wi-flow-claude { /* 150px in 5.0s, then waits hidden under Walter */
  0%       { offset-distance: 0%; }
  59.524% { offset-distance: 100%; }
  100%     { offset-distance: 100%; }
}

@keyframes wi-flow-chatgpt { /* 257.7px in 8.59s, then waits hidden under Walter */
  0%       { offset-distance: 0%; }
  51.133% { offset-distance: 100%; }
  100%     { offset-distance: 100%; }
}

@keyframes wi-flow-zapier { /* 257.7px in 8.59s, then waits hidden under Walter */
  0%       { offset-distance: 0%; }
  51.133% { offset-distance: 100%; }
  100%     { offset-distance: 100%; }
}

@keyframes wi-flow-chrome { /* 375.6px in 12.52s, then waits hidden under Walter */
  0%       { offset-distance: 0%; }
  74.517% { offset-distance: 100%; }
  100%     { offset-distance: 100%; }
}

@keyframes wi-flow-shopify { /* 374.6px in 12.49s, then waits hidden under Walter */
  0%       { offset-distance: 0%; }
  74.317% { offset-distance: 100%; }
  100%     { offset-distance: 100%; }
}

@keyframes wi-flow-wordpress { /* 288.6px in 9.62s, then waits hidden under Walter */
  0%       { offset-distance: 0%; }
  57.256% { offset-distance: 100%; }
  100%     { offset-distance: 100%; }
}

@keyframes wi-flow-gemini { /* 287.6px in 9.59s, then waits hidden under Walter */
  0%       { offset-distance: 0%; }
  57.057% { offset-distance: 100%; }
  100%     { offset-distance: 100%; }
}

@keyframes wi-arrivals {
  0%       { box-shadow: var(--wi-tile-shadow); }

  /* 1. Claude, purple */
  0.595% { box-shadow: var(--wi-tile-shadow); }
  2.024%,
  6.548% { box-shadow: var(--wi-peak-purple); }
  11.31% { box-shadow: var(--wi-tile-shadow); }

  /* 2. ChatGPT, blue */
  14.881% { box-shadow: var(--wi-tile-shadow); }
  16.31%,
  20.833% { box-shadow: var(--wi-peak-blue); }
  25.595% { box-shadow: var(--wi-tile-shadow); }

  /* 3. Zapier, blue */
  29.167% { box-shadow: var(--wi-tile-shadow); }
  30.595%,
  35.119% { box-shadow: var(--wi-peak-blue); }
  39.881% { box-shadow: var(--wi-tile-shadow); }

  /* 4. Chrome, purple */
  43.452% { box-shadow: var(--wi-tile-shadow); }
  44.881%,
  49.405% { box-shadow: var(--wi-peak-purple); }
  54.167% { box-shadow: var(--wi-tile-shadow); }

  /* 5. Shopify, blue */
  57.738% { box-shadow: var(--wi-tile-shadow); }
  59.167%,
  63.69% { box-shadow: var(--wi-peak-blue); }
  68.452% { box-shadow: var(--wi-tile-shadow); }

  /* 6. WordPress, blue */
  72.024% { box-shadow: var(--wi-tile-shadow); }
  73.452%,
  77.976% { box-shadow: var(--wi-peak-blue); }
  82.738% { box-shadow: var(--wi-tile-shadow); }

  /* 7. Gemini, purple */
  86.31% { box-shadow: var(--wi-tile-shadow); }
  87.738%,
  92.262% { box-shadow: var(--wi-peak-purple); }
  97.024% { box-shadow: var(--wi-tile-shadow); }
  100%     { box-shadow: var(--wi-tile-shadow); }
}

/* Preserve the supplied CTA against theme anchor inheritance. */
body.home26-page a.wi-btn{color:#fff;text-decoration:none}
