/* --- The automation demo, on the home page and the platform page ----------
 * A picture of the editor, drawn in HTML so it stays sharp and readable. The
 * three examples switch with radio buttons, so it needs no script. */

.wow .auto-demo {
  position: relative;
  margin-top: 64px;
  border: 1px solid #232937;
  border-radius: 16px;
  background: linear-gradient(180deg, #121620, #0e1118);
  box-shadow: 0 30px 60px -30px #000c;
  overflow: hidden;
}

.wow .ad-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* The examples on the left, what you would type for them on the right. */
.wow .ad-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 0;
}

.wow .ad-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wow .ad-tabs label {
  padding: 7px 14px;
  border: 1px solid #2a3140;
  border-radius: 999px;
  color: var(--ink2);
  font-size: 0.875rem;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.wow .ad-tabs label:hover {
  border-color: #3d4557;
  color: var(--ink);
}

.wow #ad-1:checked ~ .ad-top .ad-tabs label[for='ad-1'],
.wow #ad-2:checked ~ .ad-top .ad-tabs label[for='ad-2'],
.wow #ad-3:checked ~ .ad-top .ad-tabs label[for='ad-3'] {
  border-color: #b69bff66;
  background: #b69bff1f;
  color: var(--accent2);
}

.wow #ad-1:focus-visible ~ .ad-top .ad-tabs label[for='ad-1'],
.wow #ad-2:focus-visible ~ .ad-top .ad-tabs label[for='ad-2'],
.wow #ad-3:focus-visible ~ .ad-top .ad-tabs label[for='ad-3'] {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wow .ad-describe {
  display: flex;
  align-items: center;
  flex: 0 1 440px;
  margin-left: auto;
  gap: 10px;
  min-width: 0;
  padding: 9px 14px;
  border: 1px solid #2a3140;
  border-radius: 10px;
  background: #0c0f15;
  color: var(--ink2);
  font-size: 0.875rem;
}

.wow .ad-describe svg {
  flex: none;
  color: var(--accent);
}

.wow .ad-say,
.wow .af-flow {
  display: none;
}

.wow #ad-1:checked ~ .ad-top .ad-describe .ad-say--1,
.wow #ad-2:checked ~ .ad-top .ad-describe .ad-say--2,
.wow #ad-3:checked ~ .ad-top .ad-describe .ad-say--3 {
  display: inline;
}

.wow #ad-1:checked ~ .ad-canvas .af-flow--1,
.wow #ad-2:checked ~ .ad-canvas .af-flow--2,
.wow #ad-3:checked ~ .ad-canvas .af-flow--3 {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .wow .af-flow {
    animation: af-in 0.35s ease-out;
  }

  @keyframes af-in {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
  }
}

.wow .ad-canvas {
  margin: 14px 18px 18px;
  padding: 32px 28px 24px;
  border: 1px solid #1a1f2a;
  border-radius: 12px;
  background:
    radial-gradient(#ffffff14 1px, transparent 1px) 0 0 / 18px 18px,
    #0b0e14;
  overflow-x: auto;
}

.wow .af-line {
  display: flex;
  align-items: center;
  width: max-content;
  margin: 0 auto;
}

.wow .af-link {
  position: relative;
  flex: none;
  width: 26px;
  height: 2px;
  background: #3a4150;
}

.wow .af-link::after {
  content: '';
  position: absolute;
  top: -4px;
  right: -1px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid #3a4150;
}

.wow .af-node {
  --kind: #6b93f5;
  display: grid;
  gap: 8px;
  flex: none;
  width: 190px;
  padding: 10px 12px 12px;
  border: 1px solid #2a3140;
  border-left: 3px solid var(--kind);
  border-radius: 10px;
  background: #141923;
  box-shadow: 0 10px 24px -14px #000;
}

.wow .af-node--check {
  --kind: #edcb6b;
}

.wow .af-node--do {
  --kind: #4ec99b;
}

.wow .af-node--wait {
  --kind: #b69bff;
}

.wow .af-kind {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.75rem;
}

.wow .af-kind svg {
  color: var(--kind);
}

.wow .af-node b {
  padding: 8px 10px;
  border-radius: 6px;
  background: #ffffff08;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}

.wow .af-node small {
  margin-top: -4px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.wow .af-branches {
  display: grid;
  gap: 18px;
}

.wow .af-branch {
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 16px;
}

/* The fork: a stub into each branch and the upright joining them. */
.wow .af-branch::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 16px;
  height: 2px;
  background: #3a4150;
}

.wow .af-branch::after {
  content: '';
  position: absolute;
  left: 0;
  width: 2px;
  background: #3a4150;
}

.wow .af-branch:first-child::after {
  top: 50%;
  bottom: -9px;
}

.wow .af-branch:last-child::after {
  top: -9px;
  bottom: 50%;
}

.wow .af-pill {
  flex: none;
  padding: 3px 11px;
  border: 1px solid #3a4150;
  border-radius: 999px;
  background: #0b0e14;
  color: var(--ink2);
  font-size: 0.75rem;
  font-weight: 600;
}

.wow .af-pill--then {
  border-color: #4ec99b80;
  color: #4ec99b;
}

.wow .af-empty {
  padding: 10px 14px;
  border: 1px dashed #3a4150;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.wow .af-run {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  max-width: 840px;
  margin: 28px auto 0;
  padding: 12px 14px;
  border: 1px solid #1f2430;
  border-radius: 10px;
  background: #11151e;
  color: var(--ink2);
  font-size: 0.875rem;
  line-height: 1.55;
}

.wow .af-run b {
  margin-right: 6px;
  color: var(--ink);
  font-weight: 600;
}

/* Too narrow for a row: the flow reads top to bottom instead. */
@media (max-width: 1000px) {
  .wow .auto-demo {
    margin-top: 40px;
  }

  .wow .ad-canvas {
    padding: 20px 16px;
  }

  .wow .af-line {
    flex-direction: column;
    align-items: stretch;
    width: auto;
  }

  .wow .af-node {
    width: auto;
  }

  .wow .af-link {
    width: 2px;
    height: 22px;
    margin-left: 28px;
  }

  .wow .af-link::after {
    top: auto;
    right: auto;
    bottom: -1px;
    left: -4px;
    border-top: 6px solid #3a4150;
    border-right: 5px solid transparent;
    border-bottom: 0;
    border-left: 5px solid transparent;
  }

  .wow .af-branches {
    gap: 14px;
    margin-left: 28px;
    padding-left: 16px;
    border-left: 2px solid #3a4150;
  }

  .wow .af-branch {
    flex-direction: column;
    align-items: stretch;
    padding-left: 0;
  }

  .wow .af-branch::before,
  .wow .af-branch::after {
    display: none;
  }

  .wow .af-pill {
    align-self: flex-start;
  }

  .wow .af-branch .af-link {
    margin-left: 20px;
  }
}

@media (max-width: 480px) {
  .wow .ad-top {
    padding-inline: 12px;
  }

  .wow .ad-canvas {
    margin-inline: 12px;
  }
}

/* --- The home page's section around it ------------------------------------ */

.wow .auto-section {
  background: radial-gradient(ellipse at 95% 0%, #2a38552b, transparent 50%), var(--bg);
  border-top: 1px solid var(--line);
}

.wow .auto-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
}

.wow .auto-section h2 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  letter-spacing: -0.065em;
  line-height: 1.03;
}

.wow .auto-section h2 > span {
  color: #b69bff;
}

.wow .auto-section .auto-head p {
  max-width: 520px;
  margin: 0 0 24px;
  color: #a1abbd;
  font-size: 1rem;
  line-height: 1.8;
}

.wow .auto-section .auto-demo {
  margin-top: 48px;
}

@media (max-width: 900px) {
  .wow .auto-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
